+
+ <%= form_for plan, html: {method: :put, class: "roadmap-form"} do |f| %>
+
+ <% end %>
+
<%= _('Collaborators')%>
diff --git a/app/views/plans/show.html.erb b/app/views/plans/show.html.erb
index 1fda9ce..1677d5f 100644
--- a/app/views/plans/show.html.erb
+++ b/app/views/plans/show.html.erb
@@ -11,7 +11,9 @@
<% @plan.template.phases.each do |phase| %>
- <%= (@plan.template.phases.length > 1 ? phase.title : _('Write Plan')) %>
+
+ <%= (@plan.template.phases.length > 1 ? phase.title : _('Write Plan')) %>
+
<% end %>
diff --git a/config/application.rb b/config/application.rb
index ba95598..020d725 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -97,11 +97,11 @@
views/notes/index.js
views/orgs/admin_edit.js
views/orgs/shibboleth_ds.js
- views/plans/edit.js
views/plans/export_configure.js
views/plans/index.js
views/plans/new.js
views/plans/share.js
+ views/plans/show.js
views/shared/login_form.js
views/shared/register_form.js
views/static_pages/utils.js)
diff --git a/db/migrate/20170710182442_add_principal_investigator_email_to_plans.rb b/db/migrate/20170710182442_add_principal_investigator_email_to_plans.rb
new file mode 100644
index 0000000..2690d54
--- /dev/null
+++ b/db/migrate/20170710182442_add_principal_investigator_email_to_plans.rb
@@ -0,0 +1,5 @@
+class AddPrincipalInvestigatorEmailToPlans < ActiveRecord::Migration
+ def change
+ add_column :plans, :principal_investigator_email, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 229bfd9..d9856d6 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170619173045) do
+ActiveRecord::Schema.define(version: 20170710182442) do
create_table "annotations", force: :cascade do |t|
t.integer "question_id", limit: 4
@@ -22,8 +22,8 @@
t.datetime "updated_at"
end
- add_index "annotations", ["org_id"], name: "fk_rails_aca7521f72"
- add_index "annotations", ["question_id"], name: "fk_rails_0e08e753b6"
+ add_index "annotations", ["org_id"], name: "fk_rails_aca7521f72", using: :btree
+ add_index "annotations", ["question_id"], name: "fk_rails_0e08e753b6", using: :btree
create_table "answers", force: :cascade do |t|
t.text "text", limit: 65535
@@ -35,17 +35,17 @@
t.integer "lock_version", limit: 4, default: 0
end
- add_index "answers", ["plan_id"], name: "fk_rails_84a6005a3e"
- add_index "answers", ["question_id"], name: "fk_rails_3d5ed4418f"
- add_index "answers", ["user_id"], name: "fk_rails_584be190c2"
+ add_index "answers", ["plan_id"], name: "fk_rails_84a6005a3e", using: :btree
+ add_index "answers", ["question_id"], name: "fk_rails_3d5ed4418f", using: :btree
+ add_index "answers", ["user_id"], name: "fk_rails_584be190c2", using: :btree
create_table "answers_question_options", id: false, force: :cascade do |t|
t.integer "answer_id", limit: 4, null: false
t.integer "question_option_id", limit: 4, null: false
end
- add_index "answers_question_options", ["answer_id", "question_option_id"], name: "answer_question_option_index"
- add_index "answers_question_options", ["question_option_id", "answer_id"], name: "question_option_answer_index"
+ add_index "answers_question_options", ["answer_id", "question_option_id"], name: "answer_question_option_index", using: :btree
+ add_index "answers_question_options", ["question_option_id", "answer_id"], name: "question_option_answer_index", using: :btree
create_table "exported_plans", force: :cascade do |t|
t.integer "plan_id", limit: 4
@@ -84,9 +84,9 @@
t.datetime "created_at"
end
- add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type", unique: true
- add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
- add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
+ add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type", unique: true, using: :btree
+ add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id", using: :btree
+ add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree
create_table "guidance_groups", force: :cascade do |t|
t.string "name", limit: 255
@@ -97,7 +97,7 @@
t.boolean "published"
end
- add_index "guidance_groups", ["org_id"], name: "fk_rails_819c1dbbc7"
+ add_index "guidance_groups", ["org_id"], name: "fk_rails_819c1dbbc7", using: :btree
create_table "guidances", force: :cascade do |t|
t.text "text", limit: 65535
@@ -108,7 +108,7 @@
t.boolean "published"
end
- add_index "guidances", ["guidance_group_id"], name: "fk_rails_20d29da787"
+ add_index "guidances", ["guidance_group_id"], name: "fk_rails_20d29da787", using: :btree
create_table "identifier_schemes", force: :cascade do |t|
t.string "name", limit: 255
@@ -137,8 +137,8 @@
t.datetime "updated_at"
end
- add_index "notes", ["answer_id"], name: "fk_rails_907f8d48bf"
- add_index "notes", ["user_id"], name: "fk_rails_7f2323ad43"
+ add_index "notes", ["answer_id"], name: "fk_rails_907f8d48bf", using: :btree
+ add_index "notes", ["user_id"], name: "fk_rails_7f2323ad43", using: :btree
create_table "org_identifiers", force: :cascade do |t|
t.string "identifier", limit: 255
@@ -149,8 +149,8 @@
t.integer "identifier_scheme_id", limit: 4
end
- add_index "org_identifiers", ["identifier_scheme_id"], name: "fk_rails_189ad2e573"
- add_index "org_identifiers", ["org_id"], name: "fk_rails_36323c0674"
+ add_index "org_identifiers", ["identifier_scheme_id"], name: "fk_rails_189ad2e573", using: :btree
+ add_index "org_identifiers", ["org_id"], name: "fk_rails_36323c0674", using: :btree
create_table "org_token_permissions", force: :cascade do |t|
t.integer "org_id", limit: 4
@@ -159,8 +159,8 @@
t.datetime "updated_at"
end
- add_index "org_token_permissions", ["org_id"], name: "fk_rails_e1db1b22c5"
- add_index "org_token_permissions", ["token_permission_type_id"], name: "fk_rails_2aa265f538"
+ add_index "org_token_permissions", ["org_id"], name: "fk_rails_e1db1b22c5", using: :btree
+ add_index "org_token_permissions", ["token_permission_type_id"], name: "fk_rails_2aa265f538", using: :btree
create_table "orgs", force: :cascade do |t|
t.string "name", limit: 255
@@ -182,8 +182,8 @@
t.integer "org_type", limit: 4, default: 0, null: false
end
- add_index "orgs", ["language_id"], name: "fk_rails_5640112cab"
- add_index "orgs", ["region_id"], name: "fk_rails_5a6adf6bab"
+ add_index "orgs", ["language_id"], name: "fk_rails_5640112cab", using: :btree
+ add_index "orgs", ["region_id"], name: "fk_rails_5a6adf6bab", using: :btree
create_table "perms", force: :cascade do |t|
t.string "name", limit: 255
@@ -191,8 +191,8 @@
t.datetime "updated_at", null: false
end
- add_index "perms", ["name"], name: "index_perms_on_name"
- add_index "perms", ["name"], name: "index_roles_on_name_and_resource_type_and_resource_id"
+ add_index "perms", ["name"], name: "index_perms_on_name", using: :btree
+ add_index "perms", ["name"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree
create_table "phases", force: :cascade do |t|
t.string "title", limit: 255
@@ -205,7 +205,7 @@
t.boolean "modifiable"
end
- add_index "phases", ["template_id"], name: "index_phases_on_template_id"
+ add_index "phases", ["template_id"], name: "index_phases_on_template_id", using: :btree
create_table "plans", force: :cascade do |t|
t.string "title", limit: 255
@@ -223,17 +223,18 @@
t.integer "visibility", limit: 4, default: 0, null: false
t.string "data_contact_email", limit: 255
t.string "data_contact_phone", limit: 255
+ t.string "principal_investigator_email", limit: 255
end
- add_index "plans", ["template_id"], name: "index_plans_on_template_id"
+ add_index "plans", ["template_id"], name: "index_plans_on_template_id", using: :btree
create_table "plans_guidance_groups", force: :cascade do |t|
t.integer "guidance_group_id", limit: 4
t.integer "plan_id", limit: 4
end
- add_index "plans_guidance_groups", ["guidance_group_id"], name: "fk_rails_ec1c5524d7"
- add_index "plans_guidance_groups", ["plan_id"], name: "fk_rails_13d0671430"
+ add_index "plans_guidance_groups", ["guidance_group_id"], name: "fk_rails_ec1c5524d7", using: :btree
+ add_index "plans_guidance_groups", ["plan_id"], name: "fk_rails_13d0671430", using: :btree
create_table "question_formats", force: :cascade do |t|
t.string "title", limit: 255
@@ -253,7 +254,7 @@
t.datetime "updated_at"
end
- add_index "question_options", ["question_id"], name: "fk_rails_b9c5f61cf9"
+ add_index "question_options", ["question_id"], name: "fk_rails_b9c5f61cf9", using: :btree
create_table "questions", force: :cascade do |t|
t.text "text", limit: 65535
@@ -267,16 +268,16 @@
t.boolean "modifiable"
end
- add_index "questions", ["question_format_id"], name: "fk_rails_4fbc38c8c7"
- add_index "questions", ["section_id"], name: "index_questions_on_section_id"
+ add_index "questions", ["question_format_id"], name: "fk_rails_4fbc38c8c7", using: :btree
+ add_index "questions", ["section_id"], name: "index_questions_on_section_id", using: :btree
create_table "questions_themes", id: false, force: :cascade do |t|
t.integer "question_id", limit: 4, null: false
t.integer "theme_id", limit: 4, null: false
end
- add_index "questions_themes", ["question_id", "theme_id"], name: "question_theme_index"
- add_index "questions_themes", ["theme_id", "question_id"], name: "theme_question_index"
+ add_index "questions_themes", ["question_id", "theme_id"], name: "question_theme_index", using: :btree
+ add_index "questions_themes", ["theme_id", "question_id"], name: "theme_question_index", using: :btree
create_table "regions", force: :cascade do |t|
t.string "abbreviation", limit: 255
@@ -293,8 +294,8 @@
t.integer "access", limit: 4, default: 0, null: false
end
- add_index "roles", ["plan_id"], name: "fk_rails_a1ce6c2772"
- add_index "roles", ["user_id"], name: "fk_rails_ab35d699f0"
+ add_index "roles", ["plan_id"], name: "fk_rails_a1ce6c2772", using: :btree
+ add_index "roles", ["user_id"], name: "fk_rails_ab35d699f0", using: :btree
create_table "sections", force: :cascade do |t|
t.string "title", limit: 255
@@ -307,7 +308,7 @@
t.boolean "modifiable"
end
- add_index "sections", ["phase_id"], name: "index_sections_on_phase_id"
+ add_index "sections", ["phase_id"], name: "index_sections_on_phase_id", using: :btree
create_table "settings", force: :cascade do |t|
t.string "var", limit: 255, null: false
@@ -318,7 +319,7 @@
t.datetime "updated_at", null: false
end
- add_index "settings", ["target_type", "target_id", "var"], name: "index_settings_on_target_type_and_target_id_and_var", unique: true
+ add_index "settings", ["target_type", "target_id", "var"], name: "index_settings_on_target_type_and_target_id_and_var", unique: true, using: :btree
create_table "splash_logs", force: :cascade do |t|
t.string "destination", limit: 255
@@ -343,8 +344,8 @@
t.boolean "dirty", default: false
end
- add_index "templates", ["org_id", "dmptemplate_id"], name: "template_organisation_dmptemplate_index"
- add_index "templates", ["org_id"], name: "index_templates_on_org_id"
+ add_index "templates", ["org_id", "dmptemplate_id"], name: "template_organisation_dmptemplate_index", using: :btree
+ add_index "templates", ["org_id"], name: "index_templates_on_org_id", using: :btree
create_table "themes", force: :cascade do |t|
t.string "title", limit: 255
@@ -359,8 +360,8 @@
t.integer "guidance_id", limit: 4
end
- add_index "themes_in_guidance", ["guidance_id"], name: "fk_rails_a5ab9402df"
- add_index "themes_in_guidance", ["theme_id"], name: "fk_rails_7d708f6f1e"
+ add_index "themes_in_guidance", ["guidance_id"], name: "fk_rails_a5ab9402df", using: :btree
+ add_index "themes_in_guidance", ["theme_id"], name: "fk_rails_7d708f6f1e", using: :btree
create_table "token_permission_types", force: :cascade do |t|
t.string "token_type", limit: 255
@@ -377,22 +378,22 @@
t.integer "identifier_scheme_id", limit: 4
end
- add_index "user_identifiers", ["identifier_scheme_id"], name: "fk_rails_fe95df7db0"
- add_index "user_identifiers", ["user_id"], name: "fk_rails_65c9a98cdb"
+ add_index "user_identifiers", ["identifier_scheme_id"], name: "fk_rails_fe95df7db0", using: :btree
+ add_index "user_identifiers", ["user_id"], name: "fk_rails_65c9a98cdb", using: :btree
create_table "users", force: :cascade do |t|
t.string "firstname", limit: 255
t.string "surname", limit: 255
- t.string "email", limit: 255, default: "", null: false
+ t.string "email", limit: 255, default: "", null: false
t.string "orcid_id", limit: 255
t.string "shibboleth_id", limit: 255
t.datetime "created_at"
t.datetime "updated_at"
- t.string "encrypted_password", limit: 255, default: ""
+ t.string "encrypted_password", limit: 255, default: ""
t.string "reset_password_token", limit: 255
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
- t.integer "sign_in_count", limit: 4, default: 0
+ t.integer "sign_in_count", limit: 4, default: 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip", limit: 255
@@ -412,22 +413,60 @@
t.string "invited_by_type", limit: 255
t.integer "language_id", limit: 4
t.string "recovery_email", limit: 255
- t.binary "prefs"
+ t.binary "prefs", limit: 65535
end
- add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
- add_index "users", ["email"], name: "index_users_on_email", unique: true
- add_index "users", ["invitation_token"], name: "index_users_on_invitation_token", unique: true
- add_index "users", ["language_id"], name: "fk_rails_45f4f12508"
- add_index "users", ["org_id"], name: "fk_rails_e73753bccb"
- add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
+ add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
+ add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
+ add_index "users", ["invitation_token"], name: "index_users_on_invitation_token", unique: true, using: :btree
+ add_index "users", ["language_id"], name: "fk_rails_45f4f12508", using: :btree
+ add_index "users", ["org_id"], name: "fk_rails_e73753bccb", using: :btree
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
create_table "users_perms", id: false, force: :cascade do |t|
t.integer "user_id", limit: 4
t.integer "perm_id", limit: 4
end
- add_index "users_perms", ["perm_id"], name: "fk_rails_457217c31c"
- add_index "users_perms", ["user_id", "perm_id"], name: "index_users_perms_on_user_id_and_perm_id"
+ add_index "users_perms", ["perm_id"], name: "fk_rails_457217c31c", using: :btree
+ add_index "users_perms", ["user_id", "perm_id"], name: "index_users_perms_on_user_id_and_perm_id", using: :btree
+ add_foreign_key "annotations", "orgs"
+ add_foreign_key "annotations", "questions"
+ add_foreign_key "answers", "plans"
+ add_foreign_key "answers", "questions"
+ add_foreign_key "answers", "users"
+ add_foreign_key "answers_question_options", "answers"
+ add_foreign_key "answers_question_options", "question_options"
+ add_foreign_key "guidance_groups", "orgs"
+ add_foreign_key "guidances", "guidance_groups"
+ add_foreign_key "notes", "answers"
+ add_foreign_key "notes", "users"
+ add_foreign_key "org_identifiers", "identifier_schemes"
+ add_foreign_key "org_identifiers", "orgs"
+ add_foreign_key "org_token_permissions", "orgs"
+ add_foreign_key "org_token_permissions", "token_permission_types"
+ add_foreign_key "orgs", "languages"
+ add_foreign_key "orgs", "regions"
+ add_foreign_key "phases", "templates"
+ add_foreign_key "plans", "templates"
+ add_foreign_key "plans_guidance_groups", "guidance_groups"
+ add_foreign_key "plans_guidance_groups", "plans"
+ add_foreign_key "question_options", "questions"
+ add_foreign_key "questions", "question_formats"
+ add_foreign_key "questions", "sections"
+ add_foreign_key "questions_themes", "questions"
+ add_foreign_key "questions_themes", "themes"
+ add_foreign_key "roles", "plans"
+ add_foreign_key "roles", "users"
+ add_foreign_key "sections", "phases"
+ add_foreign_key "templates", "orgs"
+ add_foreign_key "themes_in_guidance", "guidances"
+ add_foreign_key "themes_in_guidance", "themes"
+ add_foreign_key "user_identifiers", "identifier_schemes"
+ add_foreign_key "user_identifiers", "users"
+ add_foreign_key "users", "languages"
+ add_foreign_key "users", "orgs"
+ add_foreign_key "users_perms", "perms"
+ add_foreign_key "users_perms", "users"
end
diff --git a/lib/assets/javascripts/views/plans/show.js b/lib/assets/javascripts/views/plans/show.js
new file mode 100644
index 0000000..7161876
--- /dev/null
+++ b/lib/assets/javascripts/views/plans/show.js
@@ -0,0 +1,16 @@
+$(document).ready(function(){
+ toggleDataContact();
+
+ $("#show-data-contact").click(function(){
+ toggleDataContact();
+ })
+
+ function toggleDataContact(){
+ if($("#show-data-contact").is(':checked')){
+ $(".data-contact-info").hide();
+ $(".data-contact-info input").val('');
+ }else{
+ $(".data-contact-info").show();
+ }
+ }
+});
\ No newline at end of file
diff --git a/lib/assets/stylesheets/dmproadmap/base.scss b/lib/assets/stylesheets/dmproadmap/base.scss
index 3234ee0..e47102d 100644
--- a/lib/assets/stylesheets/dmproadmap/base.scss
+++ b/lib/assets/stylesheets/dmproadmap/base.scss
@@ -140,7 +140,8 @@
border-radius: 3px;
padding: 15px 20px;
z-index: 10;
- a {
+ a, a:hover, a:visited, a:focus,
+ h1, h2, h3, h4, h5 {
color: $white;
}
}
diff --git a/lib/assets/stylesheets/dmproadmap/forms.scss b/lib/assets/stylesheets/dmproadmap/forms.scss
index fef96ea..2e81f91 100644
--- a/lib/assets/stylesheets/dmproadmap/forms.scss
+++ b/lib/assets/stylesheets/dmproadmap/forms.scss
@@ -60,12 +60,26 @@
border: 0;
}
+div.under-input {
+ display: block;
+ margin: -5px 0 10px;
+
+ label {
+ font-weight: normal;
+ }
+}
/* Roadmap Form Styling */
/* ------------------------------------------------ */
form.roadmap-form {
text-align: top;
+ div.form-separator {
+ width: 75%;
+ margin: 25px auto;
+ border-bottom: 1px solid $dark-grey;
+ }
+
fieldset.padded {
padding: 10px 10px 25px 10px;
}
@@ -78,6 +92,16 @@
text-align: left;
margin-bottom: 25px;
+ div.form-separator {
+ margin-left: 15px;
+ }
+
+ .mce-tinymce {
+ display: inline-block;
+ margin: 10px 5px 15px 15px;
+ width: 70%;
+ }
+
label,
input[type="checkbox"],
.combobox-container,
@@ -93,6 +117,14 @@
vertical-align: top;
}
+ label:not(.checkbox-label) {
+ display: block;
+ }
+
+ input, select {
+ margin-bottom: 15px;
+ }
+
.checkbox-label {
font-weight: normal;
display: inline-block;
@@ -111,6 +143,14 @@
width: 51%;
}
+ div.under-input {
+ margin-left: 25%;
+
+ label {
+ width: auto;
+ }
+ }
+
div {
label,
.button-spacer,
@@ -161,7 +201,7 @@
border-bottom: none;
}
- label {
+ label:not(.regular-text) {
font-weight: bold;
}
label:not(.no-colon):not(.checkbox-label):after {
@@ -175,15 +215,6 @@
clear: both;
}
- div.inline {
- display: inline-block;
- }
- .left-indent {
- margin-left: 15px;
- }
- .right-indent {
- margin-right: 5px;
- }
.input-full-width {
width: 95%;
}
@@ -207,10 +238,6 @@
width: 550px;
}
- /* Override the button color for the Org Admin sections */
- input[type="submit"].admin{
- background-color: $primary-color;
- }
input.form-submit[aria-disabled='true'] {
background-color: $disabled-button-color;
}
@@ -621,11 +648,6 @@
div.show-plan {
width: 60%;
- hr {
- width: 45%;
- margin: 5px 0 15px 0;
- }
-
div.side-by-side {
margin: 10px auto 0 auto;
}
@@ -637,10 +659,6 @@
.edit-plan-left {
display: inline-block;
width: 60%;
-
- hr {
- width: 65%;
- }
}
.edit-plan-right {
vertical-align: top;