-
-
\ No newline at end of file
diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb
index 2ea27f8..f81dbfc 100644
--- a/app/views/guidance_groups/admin_edit.html.erb
+++ b/app/views/guidance_groups/admin_edit.html.erb
@@ -7,7 +7,7 @@
<% end %>
-
+
\ No newline at end of file
diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb
index 4bd3367..712cf83 100644
--- a/app/views/guidance_groups/admin_new.html.erb
+++ b/app/views/guidance_groups/admin_new.html.erb
@@ -7,8 +7,8 @@
- <% if @guidance_group.dmptemplates.count == 1 then %>
- <%= t("org_admin.guidance.template") %>
- <% else %>
- <%= t("org_admin.guidance.templates") %>
- <% end %>
-
-
- <% i = 1 %>
- <% if @guidance_group.dmptemplates.count == 0 then %>
- <% list = Dmptemplate.funders_and_own_templates(current_user.organisation_id) %>
- <% list.each do |tem| %>
- <%= tem.title %>
- <% if list.count > i then %>
- ,
- <% i +=1 %>
- <% end %>
- <% end %>
- <% else %>
- <% @guidance_group.dmptemplates.each do |tem| %>
- <%= tem.title %>
- <% if @guidance_group.dmptemplates.count > i then %>
- ,
- <% i +=1 %>
- <% end %>
- <% end %>
- <% end %>
-
-
-
<%= t('org_admin.templates.published_label') %>
- <% if @guidance_group.published.nil? || @guidance_group.published == false then %>
+ <% if @guidance_group.published.nil? || !@guidance_group.published then %>
<%= t("helpers.no_label") %>
<% else %>
<%= t("helpers.yes_label") %>
@@ -66,7 +36,7 @@
<%= t("org_admin.guidance_group.subset") %>
- <% if @guidance_group.optional_subset.nil? || @guidance_group.optional_subset == false then %>
+ <% if @guidance_group.optional_subset.nil? || !@guidance_group.optional_subset then %>
<%= t('helpers.no_label') %>
<% else %>
<%= t('helpers.yes_label') %>
@@ -75,18 +45,18 @@
<%= t("org_admin.guidance.created") %>
-
<%= l @guidance_group.created_at.to_date, :formats => :short %>
+
<%= l @guidance_group.created_at.to_date, formats: :short %>
<%= t("org_admin.guidance.last_updated") %>
-
<%= l @guidance_group.updated_at.to_date, :formats => :short %>
+
<%= l @guidance_group.updated_at.to_date, formats: :short %>
\ No newline at end of file
diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb
index e6a47f9..055334d 100644
--- a/app/views/guidances/admin_edit.html.erb
+++ b/app/views/guidances/admin_edit.html.erb
@@ -7,11 +7,11 @@
-<% if @guidances.count > 0 then%>
+<% if @guidances.length > 0 then%>
@@ -120,55 +98,53 @@
<% @guidances.each do |guidance| %>
- <% if guidance.in_group_belonging_to?(current_user.organisation_id) then %>
+ <% if guidance.in_group_belonging_to?(current_user.org_id) then %>
<%= guidance.text.html_safe%>
- <% if guidance.themes != [] then %>
+ <% if guidance.themes.present? then %>
<% guidance.themes.each do |th| %>
<%= th.title %>
- <%end%>
+ <% end %>
- <%else%>
+ <% else %>
-
- <%end%>
+ <% end %>
<% if !guidance.question_id.nil? then %>
<%= raw guidance.question.text.truncate(70, omission: t('helpers.truncate_continued')) %>
- <%else%>
+ <% else %>
-
- <%end%>
- <% if guidance.guidance_groups != [] then %>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/views/layouts/_branding.html.erb b/app/views/layouts/_branding.html.erb
index 7c436ff..4774bee 100644
--- a/app/views/layouts/_branding.html.erb
+++ b/app/views/layouts/_branding.html.erb
@@ -1,19 +1,19 @@
<% if user_signed_in? %>
- <% if !current_user.organisation.nil? %>
+ <% if !current_user.org.nil? %>
- <% if current_user.organisation.logo.present? %>
+ <% if current_user.org.logo.present? %>
+ <% end %>
+
+ <% if current_user.can_org_admin? && (template.org_type != constant("organisation_types.funder")|| current_user.org_type == constant("organisation_types.funder")) then %>
+ <% if active == 'add_plan' then %>
+
\ No newline at end of file
diff --git a/app/views/templates/_option_fields.html.erb b/app/views/templates/_option_fields.html.erb
new file mode 100644
index 0000000..21f3e80
--- /dev/null
+++ b/app/views/templates/_option_fields.html.erb
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/views/user_mailer/api_token_granted_notification.html.erb b/app/views/user_mailer/api_token_granted_notification.html.erb
index e72d6f2..bf43579 100644
--- a/app/views/user_mailer/api_token_granted_notification.html.erb
+++ b/app/views/user_mailer/api_token_granted_notification.html.erb
@@ -2,5 +2,5 @@
- <% end %>
- <% end %>
-
- <%= submit_tag "Update Users" %>
- <% end %>
-
\ No newline at end of file
diff --git a/app/views/users/admin_grant_permissions.html.erb b/app/views/users/admin_grant_permissions.html.erb
index ca5a170..dc42fb1 100644
--- a/app/views/users/admin_grant_permissions.html.erb
+++ b/app/views/users/admin_grant_permissions.html.erb
@@ -9,16 +9,16 @@
- <% @roles.each do |role| %>
-
<%= role.name %>
+ <% @perms.each do |perm| %>
+
<%= perm.name %>
<% end %>
- <% @roles.each do |role| %>
+ <% @perms.each do |perm| %>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/branding.yml b/config/branding.yml
index e69de29..5649562 100644
--- a/config/branding.yml
+++ b/config/branding.yml
@@ -0,0 +1,29 @@
+defaults: &defaults
+ legal_entity: 'the University of Edinburgh, University of Glasgow and the University of California'
+
+ organisation:
+ name: 'Digital Curation Center and University of California Curation Center'
+ abbreviation: 'DCC and UC3'
+ url: 'https://github.com/DMPRoadmap/roadmap/wiki'
+ copywrite_name: 'DCC and UC3'
+ email: 'dmponline@dcc.ac.uk'
+
+ application:
+ name: 'DMPRoadmap'
+ url: 'https://github.com/DMPRoadmap/roadmap'
+ version: '0.1.0'
+ release_notes_url: 'https://github.com/DMPRoadmap/roadmap/wiki/Releases'
+ issue_list_url: 'https://github.com/DMPRoadmap/roadmap/issues'
+ user_group_subscription_url: 'http://listserv.ucop.edu/cgi-bin/wa.exe?SUBED1=ROADMAP-L&A=1'
+
+development:
+ <<: *defaults
+
+test:
+ <<: *defaults
+
+staging:
+ <<: *defaults
+
+production:
+ <<: *defaults
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 9d4ec8d..9c10799 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -99,20 +99,20 @@
template_label: "Vorlagen"
user_list_label: "Nutzer"
org_details_label: "Organisations-Details"
- org_text: "Grundlegende Informationen über ihre Organisation."
+ org_text: "Grundlegende Informationen über ihre Org."
org_abbr_help_text_html: "Dies wird als Bezeichnung an Ihrer Anleitung angezeigt, z.B. 'Kieler Hilfestellung für Metadaten'. Am besten eine Abkürzung oder ein Namenskürzel."
users_list: "Liste der Nutzer"
user_full_name: "Name"
user_name: "E-Mail-Adresse"
last_logged_in: "Zuletzt angemeldet"
how_many_plans: "Wie viele Pläne?"
- user_text_html: "Folgend findet sich die Liste von Benutzern registriert bzgl. Ihrer Organisation. Sie können diese Liste bzgl. aller Felder sortieren."
+ user_text_html: "Folgend findet sich die Liste von Benutzern registriert bzgl. Ihrer Org. Sie können diese Liste bzgl. aller Felder sortieren."
org_name: "Name"
org_abbr: "Abkürzung"
org_logo_failed_message: "Logo Upload fehlgeschlagen."
org_logo: "Logo"
org_contact_email: "Kontakt Email"
- org_contact_email_help_text: "Die E-Mail -Adresse des Administrators in Ihrer Organisation. Ihre Benutzer werden diese Adresse verwenden, wenn sie Fragen haben."
+ org_contact_email_help_text: "Die E-Mail -Adresse des Administrators in Ihrer Org. Ihre Benutzer werden diese Adresse verwenden, wenn sie Fragen haben."
new_org_logo: "Laden Sie ein neues Logo-Datei"
remove_logo: "Wenn Sie die Standard DMPRoadmap Logo verwenden entscheiden , prüfen Sie bitte dieses Feld Ihre aktuelle Logo zu entfernen."
org_desc: "Beschreibung"
@@ -120,7 +120,7 @@
org_type: "Organisationsart"
parent_org: "Übergeordnete Organisation"
last_updated: "Zuletzt aktualisiert"
- desc_help_text_html: "
Bitte beschreibenden Sie Ihre Organisation.
"
+ desc_help_text_html: "
Bitte beschreibenden Sie Ihre Org.
"
abbre_help_text: "Bitte geben Sie eine Abkürzung für Ihre Organisation an."
template_desc_help_text_html: "
Geben Sie eine Beschreibung ein, die Ihnen bei der Unterscheidung von Vorlagen hilft, falls Sie z.B. welche für unterschiedliche Zielgruppen besitzen.
"
target_url_help_text: "Bitte prüfen Sie die Korrektheit ihrer Web-Adresse."
diff --git a/config/routes.rb b/config/routes.rb
index 78c801a..8e6d1d0 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -13,10 +13,9 @@
get '/users/sign_out' => 'devise/sessions#destroy'
end
- ActiveAdmin.routes(self)
+ #ActiveAdmin.routes(self)
#organisation admin area
- #match "org/admin/users" => 'organisation_users#admin_index', :as => "org/admin/users"
resources :users, :path => 'org/admin/users', only: [] do
collection do
get 'admin_index'
@@ -42,7 +41,7 @@
#post 'contact_form' => 'contacts', as: 'localized_contact_creation'
#get 'contact_form' => 'contacts#new', as: 'localized_contact_form'
- resources :organisations, :path => 'org/admin', only: [] do
+ resources :orgs, :path => 'org/admin', only: [] do
member do
get 'children'
get 'templates'
@@ -80,7 +79,7 @@
end
end
- resources :dmptemplates, :path => 'org/admin/templates', only: [] do
+ resources :templates, :path => 'org/admin/templates', only: [] do
member do
get 'admin_index'
get 'admin_template'
@@ -111,7 +110,7 @@
resources :answers, only: :create
- resources :comments, only: [:create, :update] do
+ resources :notes, only: [:create, :update] do
member do
put 'archive'
end
@@ -145,7 +144,7 @@
end
end
- resources :project_groups, only: [:create, :update, :destroy]
+ resources :roles, only: [:create, :update, :destroy]
namespace :settings do
resource :projects, only: [:show, :update]
@@ -157,8 +156,8 @@
namespace :api, defaults: {format: :json} do
namespace :v0 do
resources :guidance_groups, only: [:index, :show]
- resources :plans, only: :create, controller: "projects", path: "plans"
- resources :templates, only: :index, controller: "dmptemplates", path: "templates"
+ resources :plans, only: :create
+ resources :templates, only: :index
resource :statistics, only: [], controller: "statistics", path: "statistics" do
member do
get :users_joined
diff --git a/db/migrate/20161122152339_new_plan_template_structure.rb b/db/migrate/20161122152339_new_plan_template_structure.rb
index 661ac12..dcd7bd2 100644
--- a/db/migrate/20161122152339_new_plan_template_structure.rb
+++ b/db/migrate/20161122152339_new_plan_template_structure.rb
@@ -235,6 +235,11 @@
template = Template.includes(new_phases: {new_sections: :new_questions}).find(new_plan.template_id)
template.new_phases.each do |new_phase|
old_plan = project.plans.where(version_id: new_phase.vid).first
+ puts "old plan id: #{old_plan.id}"
+ puts "plan ids :#{plans.pluck(:id)}"
+ if old_plan.id == 46
+ puts "IT'S NOT WORKING RITE HERE!!!!!!!!!!!!!!!!!!!!!!! IT'S NOT WORKING RITE HERE!!!!!!!!!!!!!!!!!!!!!!! IT'S NOT WORKING RITE HERE!!!!!!!!!!!!!!!!!!!!!!!"
+ end
new_phase.new_sections.each do |new_section|
new_section.new_questions.each do |new_question|
# init new answer
@@ -251,6 +256,17 @@
note = initNote(comment, new_ans)
note.save!
end
+ if new_ans.present? && new_ans.text.present? && new_ans.text.include?("test2")
+ puts "!!!!!!!!!!!!!!!!DEBUG MODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ puts "old answer: #{old_ans.text}"
+ puts "old answer: #{old_ans.id}"
+ puts "new answer: #{new_ans.text}"
+ puts "old plans: #{project.plans.pluck(:id)}"
+ puts "old_plan: #{old_plan.id}"
+ puts "old project: #{project.id}"
+ puts "question: #{new_question.question_id}"
+ puts "old user: #{old_ans.user.email}"
+ end
end
end
end
diff --git a/db/migrate/20161205095623_removing_intermediary_tables.rb b/db/migrate/20161205095623_removing_intermediary_tables.rb
new file mode 100644
index 0000000..7462176
--- /dev/null
+++ b/db/migrate/20161205095623_removing_intermediary_tables.rb
@@ -0,0 +1,161 @@
+class RemovingIntermediaryTables < ActiveRecord::Migration
+ def up
+ # removing intermediary structures
+
+ drop_table :dmptemplates
+
+ change_table :new_phases do |t|
+ t.remove :vid
+ end
+ drop_table :phases
+ rename_table :new_phases, :phases
+
+ change_table :new_sections do |t|
+ t.rename :new_phase_id, :phase_id
+
+ end
+ drop_table :sections
+ rename_table :new_sections, :sections
+
+ change_table :new_questions do |t|
+ t.rename :new_section_id, :section_id
+ t.remove :question_id
+ end
+ drop_table :questions
+ rename_table :new_questions, :questions
+
+ change_table :new_questions_themes do |t|
+ t.rename :new_question_id, :question_id
+ end
+ drop_table :questions_themes
+ rename_table :new_questions_themes, :questions_themes
+
+ change_table :new_answers do |t|
+ t.rename :new_plan_id, :plan_id
+ t.rename :new_question_id, :question_id
+ end
+ drop_table :answers
+ rename_table :new_answers, :answers
+
+ change_table :question_options do |t|
+ t.rename :new_question_id, :question_id
+ t.remove :option_id
+ end
+ drop_table :options
+
+ change_table :new_answers_question_options do |t|
+ t.rename :new_answer_id, :answer_id
+ end
+ drop_table :answers_options
+ rename_table :new_answers_question_options, :answers_question_options
+
+ change_table :notes do |t|
+ t.rename :new_answer_id, :answer_id
+ end
+ drop_table :comments
+
+ change_table :new_plans do |t|
+ #t.remove :project_id
+ end
+ drop_table :plans
+ rename_table :new_plans, :plans
+
+ change_table :roles do |t|
+ t.rename :new_plan_id, :plan_id
+ end
+
+ change_table :new_suggested_answers do |t|
+ t.rename :new_question_id, :question_id
+ end
+ drop_table :suggested_answers
+ rename_table :new_suggested_answers, :suggested_answers
+
+ #drop_table :projects
+
+ rename_table :organisations, :orgs
+ rename_column :guidance_groups, :organisation_id, :org_id
+ rename_column :suggested_answers, :organisation_id, :org_id
+ rename_column :org_token_permissions, :organisation_id, :org_id
+ rename_column :projects, :organisation_id, :org_id
+ rename_column :templates, :organisation_id, :org_id
+ rename_column :users, :organisation_id, :org_id
+
+ drop_table :projects
+
+ drop_table :project_groups
+ drop_table :project_guidance
+ drop_table :versions
+ drop_table :dmptemplates_guidance_groups
+ drop_table :plan_sections
+
+ end
+
+ def down
+ create_table :dmptemplates
+ change_table :phases do |t|
+ t.integer :vid
+ end
+ rename_table :phases, :new_phases
+ create_table :phases
+
+
+ change_table :sections do |t|
+ t.rename :phase_id, :new_phase_id
+ end
+ rename_table :sections, :new_sections
+ create_table :sections
+
+
+ change_table :questions do |t|
+ t.rename :section_id, :new_section_id
+ t.integer :question_id
+ end
+ rename_table :questions, :new_questions
+ create_table :questions
+
+ change_table :questions_themes do |t|
+ t.rename :question_id, :new_question_id
+ end
+ rename_table :questions_themes, :new_questions_themes
+ create_table :questions_themes
+
+ change_table :answers do |t|
+ t.rename :plan_id, :new_plan_id
+ t.rename :question_id, :new_question_id
+ end
+ rename_table :answers, :new_answers
+ create_table :answers
+
+ change_table :question_options do |t|
+ t.rename :question_id, :new_question_id
+ t.integer :option_id
+ end
+ create_table :options
+
+ change_table :answers_question_options do |t|
+ t.rename :answer_id, :new_answer_id
+ end
+ rename_table :answers_question_options, :new_answers_question_options
+ create_table :answers_options
+
+ change_table :notes do |t|
+ t.rename :answer_id, :new_answer_id
+ end
+ create_table :comments
+
+ change_table :plans do |t|
+ end
+ rename_table :plans, :new_plans
+ create_table :plans
+
+ change_table :roles do |t|
+ t.rename :plan_id, :new_plan_id
+ end
+
+ rename_table :suggested_answers, :new_suggested_answers
+ create_table :suggested_answers
+ change_table :new_suggested_answers do |t|
+ t.rename :question_id, :new_question_id
+ end
+ end
+end
diff --git a/db/migrate/20161205095624_replacing_organisation_types_with_bitflags.rb b/db/migrate/20161205095624_replacing_organisation_types_with_bitflags.rb
new file mode 100644
index 0000000..16be879
--- /dev/null
+++ b/db/migrate/20161205095624_replacing_organisation_types_with_bitflags.rb
@@ -0,0 +1,40 @@
+class ReplacingOrganisationTypesWithBitflags < ActiveRecord::Migration
+ # requires flag_shih_tzu for bitfields
+ def change
+ # add org_type field to orgs
+ change_table :orgs do |t|
+ t.integer :org_type, null: false, default: 0 # flag_shih_tzu-managed bitfield
+ # Effective booleans which will be stored on the flags column:
+ # t.boolean :Organisation
+ # t.boolean :Funder
+ # t.boolean :Institution
+ # t.boolean :Reaserch_Institution
+ # t.boolean :School
+ # t.boolean :Project
+ end
+ # migrate old org_type data to bitfield
+ Org.includes(:organisation_type).all.each do |org|
+ unless org.organisation_type.nil?
+ case org.organisation_type.name
+ when "Organisation"
+ org.organisation = true
+ when "Funder"
+ org.funder = true
+ when "Project"
+ org.project = true
+ when "School"
+ org.school = true
+ when "Institution"
+ org.institution = true
+ when "Research Institute"
+ org.research_institute = true
+ end
+ org.save!
+ end
+ end
+ # remove organisation_type_id field from orgs
+ remove_column :orgs, :organisation_type_id
+ # remove organisation_type table
+ drop_table :organisation_types
+ end
+end
diff --git a/db/migrate/20161205095625_replacing_plan_roles_with_bitflags.rb b/db/migrate/20161205095625_replacing_plan_roles_with_bitflags.rb
new file mode 100644
index 0000000..fa9d143
--- /dev/null
+++ b/db/migrate/20161205095625_replacing_plan_roles_with_bitflags.rb
@@ -0,0 +1,27 @@
+class ReplacingPlanRolesWithBitflags < ActiveRecord::Migration
+ def change
+ # create the field to hold the user's role in plans
+ add_column :roles, :access, :integer, null: false, default: 0
+ # rename creator, editor, and aministrator column names so we can access data
+ rename_column :roles, :creator, :create
+ rename_column :roles, :editor, :edit
+ rename_column :roles, :administrator, :admin
+ # transfer the data from the other fields to the bitfield
+ Role.find_each do |role|
+ if role.admin
+ role.administrator = true
+ end
+ if role.edit
+ role.editor = true
+ end
+ if role.create
+ role.creator = true
+ end
+ role.save!
+ end
+ # remove the other columns
+ remove_column :roles, :create
+ remove_column :roles, :edit
+ remove_column :roles, :admin
+ end
+end
diff --git a/db/migrate/20161206122926_add_foreign_keys.rb b/db/migrate/20161206122926_add_foreign_keys.rb
new file mode 100644
index 0000000..2eba3c6
--- /dev/null
+++ b/db/migrate/20161206122926_add_foreign_keys.rb
@@ -0,0 +1,227 @@
+class AddForeignKeys < ActiveRecord::Migration
+ # this migraiton modifies data in tables, and thus depends on being at a specific
+ # point in the history of the codebase. Specificly the models must reflect the
+ # relationships expected within this code
+ def change
+ # remove broken references
+ scrub_references
+ # answers
+ add_foreign_key :answers, :users
+ add_foreign_key :answers, :plans
+ add_foreign_key :answers, :questions
+
+ # answers_question_options
+ add_foreign_key :answers_question_options, :answers
+ add_foreign_key :answers_question_options, :question_options
+
+ # notes
+ add_foreign_key :notes, :answers
+ add_foreign_key :notes, :users
+
+ # templates
+ add_foreign_key :templates, :orgs
+
+ # guidance_groups
+ add_foreign_key :guidance_groups, :orgs
+
+ # guidance_in_group
+ add_foreign_key :guidance_in_group, :guidance_groups
+ add_foreign_key :guidance_in_group, :guidances
+
+ # guidances
+ add_foreign_key :guidances, :guidance_groups
+
+ # question_options
+ add_foreign_key :question_options, :questions
+
+ # org_token_permissions
+ add_foreign_key :org_token_permissions, :orgs
+ add_foreign_key :org_token_permissions, :token_permission_types
+
+ # orgs
+ add_foreign_key :orgs, :regions
+ add_foreign_key :orgs, :languages
+
+ # phases
+ add_foreign_key :phases, :templates
+
+ # plans
+ add_foreign_key :plans, :templates
+
+ # roles
+ add_foreign_key :roles, :plans
+ add_foreign_key :roles, :users
+
+ # questions
+ add_foreign_key :questions, :sections
+ add_foreign_key :questions, :question_formats
+
+ # questions_themes
+ add_foreign_key :questions_themes, :questions
+ add_foreign_key :questions_themes, :themes
+
+ # sections
+ add_foreign_key :sections, :phases
+
+ # suggested_answers
+ add_foreign_key :suggested_answers, :orgs
+ add_foreign_key :suggested_answers, :questions
+
+ # themes_in_guidance
+ add_foreign_key :themes_in_guidance, :themes
+ add_foreign_key :themes_in_guidance, :guidances
+
+ # users
+ add_foreign_key :users, :orgs
+ add_foreign_key :users, :languages
+
+ # users_perms
+ add_foreign_key :users_perms, :users
+ add_foreign_key :users_perms, :perms
+ end
+
+ def scrub_references
+ # answers
+ i = 0
+ Answer.includes(:user, :plan, :question).find_each do |ans|
+ if ans.user.nil? && ans.user_id.present?
+ ans.user_id = nil
+ i += 1
+ end
+ if ans.plan.nil? && ans.plan_id.present?
+ ans.plan_id = nil
+ i += 1
+ end
+ if ans.question.nil? && ans.question_id.present?
+ ans.question_id = nil
+ i += 1
+ end
+ ans.save!
+ end
+ puts "#{i} answers scrubbed"
+
+ # notes
+ i = 0
+ Note.includes(:answer, :user).find_each do |note|
+ if note.answer.nil? && note.answer_id.present?
+ note.answer_id = nil
+ i += 1
+ end
+ if note.user.nil? && note.user_id.present?
+ note.user_id = nil
+ i += 1
+ end
+ note.save!
+ end
+ puts "#{i} notes scrubbed"
+
+ # templates
+ i = 0
+ Template.includes(:org).find_each do |temp|
+ if temp.org.nil? && temp.org_id.present?
+ temp.org_id = nil
+ i += 1
+ end
+ temp.save!
+ end
+ puts "#{i} templates scrubbed"
+
+ # guidance_groups
+ # i = 0
+ # GuidanceGroup.includes(:org).find_each do |gg|
+ # if gg.org.nil? && gg.org_id.present?
+ # gg.org_id = nil
+ # i += 1
+ # end
+ # gg.save!
+ # end
+ # puts "#{i} guidance groups scrubbed"
+
+ # # question_options
+ # i = 0
+ # QuestionOption.includes(:question).find_each do |opt|
+ # if opt.question.nil? && opt.question_id.present?
+ # opt.question_id = nil
+ # i += 1
+ # end
+ # opt.save!
+ # end
+ # puts "#{i} question_options scrubbed"
+
+ # # orgs
+ # i = 0
+ # Org.includes( :language).find_each do |org|
+ # if org.language.nil? && org.language_id.present?
+ # org.language_id = nil
+ # i += 1
+ # end
+ # org.save!
+ # end
+ # puts "#{i} orgs scrubbed"
+
+ # # phases
+ # # new structure so it's fine
+
+ # # plans
+ # # new structure so it's fine
+
+ # roles
+ i = 0
+ Role.includes(:user, :plan).find_each do |role|
+ if role.user.nil? && role.user_id.present?
+ Role.delete_all(user_id: role.user_id)
+ i += 1
+ next
+ end
+ if role.plan.nil? && role.plan_id.present?
+ Role.delete_all(plan_id: role.plan_id)
+ i += 1
+ end
+ end
+ puts "#{i} roles scrubbed"
+
+ # # questions
+
+ # # sections
+
+ # # suggested_answers
+ # i = 0
+ # SuggestedAnswer.includes(:org, :question).find_each do |sa|
+ # if sa.org.nil? && sa.org_id.present?
+ # sa.org_id = nil
+ # i += 1
+ # end
+ # if sa.question.nil?
+ # sa.delete!
+ # i += 1
+ # next
+ # end
+ # sa.save!
+ # end
+ # puts "#{i} suggested answers scrubbed"
+
+ # # themes_in_guidance
+
+ # # users
+ # i = 0
+ # User.includes(:org, :language).find_each do |u|
+ # if u.org.nil? && u.org_id.present?
+ # u.org_id = nil
+ # i += 1
+ # end
+ # if u.language.nil? && u.language_id.present?
+ # u.language_id = nil
+ # i += 1
+ # end
+ # u.save!
+ # end
+ # puts "#{i} users scrubbed"
+
+ # users_perms
+ UsersPerm.includes(:user).all.each do |u|
+ if u.user.nil?
+ UsersPerm.delete_all(user_id: u.user_id)
+ end
+ end
+ end
+end
diff --git a/db/migrate/20161208122123_single_group_for_guidance.rb b/db/migrate/20161208122123_single_group_for_guidance.rb
new file mode 100644
index 0000000..4c02f86
--- /dev/null
+++ b/db/migrate/20161208122123_single_group_for_guidance.rb
@@ -0,0 +1,20 @@
+class SingleGroupForGuidance < ActiveRecord::Migration
+ def change
+ unless Rails.env.test?
+ Guidance.class_eval do
+ belongs_to :guidance_group, class_name: "GuidanceGroup", foreign_key: "guidance_group_id"
+ end
+
+ Guidance.includes( :guidance_groups).all.each do |guidance|
+ guidance.guidance_group_id = guidance.guidance_groups.first.id unless guidance.guidance_groups.empty?
+ if guidance.guidance_group_id.nil?
+ guidance.destroy
+ else
+ guidance.save!
+ end
+ end
+ end
+
+ drop_table :guidance_in_group
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 4951228..2e8ab74 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,10 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(version: 20161122152339) do
+ActiveRecord::Schema.define(version: 20161208122123) do
+
+ # These are extensions that must be enabled in order to support this database
+ enable_extension "plpgsql"
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -25,39 +28,13 @@
t.datetime "updated_at", null: false
end
- create_table "answers_options", :id => false, :force => true do |t|
- t.integer "answer_id", :null => false
- t.integer "option_id", :null => false
+ create_table "answers_question_options", id: false, force: :cascade do |t|
+ t.integer "answer_id", null: false
+ t.integer "question_option_id", null: false
end
- add_index "answers_options", ["answer_id", "option_id"], name: "index_answers_options_on_answer_id_and_option_id", using: :btree
-
- create_table "comments", :force => true do |t|
- t.integer "user_id"
- t.integer "question_id"
- t.text "text"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "archived"
- t.integer "plan_id"
- t.integer "archived_by"
- end
-
- create_table "dmptemplates", :force => true do |t|
- t.string "title"
- t.text "description"
- t.boolean "published"
- t.integer "organisation_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.string "locale"
- t.boolean "is_default"
- end
-
- create_table "dmptemplates_guidance_groups", :id => false, :force => true do |t|
- t.integer "dmptemplate_id"
- t.integer "guidance_group_id"
- end
+ 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 => true do |t|
t.integer "plan_id"
@@ -101,21 +78,14 @@
create_table "guidance_groups", :force => true do |t|
t.string "name"
- t.integer "organisation_id"
+ t.integer "org_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "optional_subset"
t.boolean "published"
end
- create_table "guidance_in_group", :id => false, :force => true do |t|
- t.integer "guidance_id", :null => false
- t.integer "guidance_group_id", :null => false
- end
-
- add_index "guidance_in_group", ["guidance_id", "guidance_group_id"], name: "index_guidance_in_group_on_guidance_id_and_guidance_group_id", using: :btree
-
- create_table "guidances", :force => true do |t|
+ create_table "guidances", force: :cascade do |t|
t.text "text"
t.integer "guidance_group_id"
t.datetime "created_at", null: false
@@ -130,135 +100,31 @@
t.boolean "default_language"
end
- create_table "new_answers", force: :cascade do |t|
- t.text "text"
- t.integer "new_plan_id"
- t.integer "user_id"
- t.integer "new_question_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
- create_table "new_answers_question_options", id: false, force: :cascade do |t|
- t.integer "new_answer_id", null: false
- t.integer "question_option_id", null: false
- end
-
- add_index "new_answers_question_options", ["new_answer_id", "question_option_id"], name: "answer_question_option_index", using: :btree
- add_index "new_answers_question_options", ["question_option_id", "new_answer_id"], name: "question_option_answer_index", using: :btree
-
- create_table "new_phases", force: :cascade do |t|
- t.string "title"
- t.text "description"
- t.integer "number"
- t.integer "template_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "slug"
- t.integer "vid"
- t.boolean "modifiable"
- end
-
- create_table "new_plans", force: :cascade do |t|
- t.integer "project_id"
- t.string "title"
- t.integer "template_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "slug"
- t.string "grant_number"
- t.string "identifier"
- t.text "description"
- t.string "principal_investigator"
- t.string "principal_investigator_identifier"
- t.string "data_contact"
- t.string "funder_name"
- end
-
- create_table "new_questions", force: :cascade do |t|
- t.text "text"
- t.text "default_value"
- t.text "guidance"
- t.integer "number"
- t.integer "new_section_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "question_format_id"
- t.boolean "option_comment_display", default: true
- t.boolean "modifiable"
- t.integer "question_id"
- end
-
- create_table "new_questions_themes", id: false, force: :cascade do |t|
- t.integer "new_question_id", null: false
- t.integer "theme_id", null: false
- end
-
- add_index "new_questions_themes", ["new_question_id", "theme_id"], name: "question_theme_index", using: :btree
- add_index "new_questions_themes", ["theme_id", "new_question_id"], name: "theme_question_index", using: :btree
-
- create_table "new_sections", force: :cascade do |t|
- t.string "title"
- t.text "description"
- t.integer "number"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "published"
- t.integer "new_phase_id"
- t.boolean "modifiable"
- end
-
- create_table "new_suggested_answers", force: :cascade do |t|
- t.integer "new_question_id"
- t.integer "organisation_id"
- t.text "text"
- t.boolean "is_example"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
create_table "notes", force: :cascade do |t|
t.integer "user_id"
t.text "text"
t.boolean "archived"
- t.integer "new_answer_id"
+ t.integer "answer_id"
t.integer "archived_by"
t.datetime "created_at"
t.datetime "updated_at"
end
- create_table "options", :force => true do |t|
- t.integer "question_id"
- t.string "text"
- t.integer "number"
- t.boolean "is_default"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
-
create_table "org_token_permissions", force: :cascade do |t|
- t.integer "organisation_id"
+ t.integer "org_id"
t.integer "token_permission_type_id"
t.datetime "created_at"
t.datetime "updated_at"
end
- create_table "organisation_types", :force => true do |t|
- t.string "name"
- t.text "description"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
-
- create_table "organisations", :force => true do |t|
+ create_table "orgs", force: :cascade do |t|
t.string "name"
t.string "abbreviation"
t.text "description"
t.string "target_url"
- t.integer "organisation_type_id"
t.string "wayfless_entity"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.integer "parent_id"
t.boolean "is_other"
t.string "sort_name"
@@ -269,6 +135,7 @@
t.string "logo_uid"
t.string "logo_name"
t.string "contact_email"
+ t.integer "org_type", default: 0, null: false
end
create_table "perms", force: :cascade do |t|
@@ -284,56 +151,20 @@
t.string "title"
t.text "description"
t.integer "number"
- t.integer "dmptemplate_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.integer "template_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "slug"
+ t.boolean "modifiable"
end
- add_index "phases", ["dmptemplate_id"], name: "index_phases_on_dmptemplate_id", using: :btree
- add_index "phases", ["slug"], name: "index_phases_on_slug", unique: true, using: :btree
-
- create_table "plan_sections", :force => true do |t|
- t.integer "user_id"
- t.integer "section_id"
- t.integer "plan_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.datetime "release_time"
- end
-
- create_table "plans", :force => true do |t|
- t.boolean "locked"
+ create_table "plans", force: :cascade do |t|
t.integer "project_id"
- t.integer "version_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
-
- create_table "project_groups", :force => true do |t|
- t.boolean "project_creator"
- t.boolean "project_editor"
- t.integer "user_id"
- t.integer "project_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "project_administrator"
- end
-
- create_table "project_guidance", :id => false, :force => true do |t|
- t.integer "project_id", :null => false
- t.integer "guidance_group_id", :null => false
- end
-
- add_index "project_guidance", ["project_id", "guidance_group_id"], name: "index_project_guidance_on_project_id_and_guidance_group_id", using: :btree
-
- create_table "projects", :force => true do |t|
t.string "title"
- t.integer "dmptemplate_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.integer "template_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "slug"
- t.integer "organisation_id"
t.string "grant_number"
t.string "identifier"
t.text "description"
@@ -343,9 +174,7 @@
t.string "funder_name"
end
- add_index "projects", ["slug"], name: "index_projects_on_slug", unique: true, using: :btree
-
- create_table "question_formats", :force => true do |t|
+ create_table "question_formats", force: :cascade do |t|
t.string "title"
t.text "description"
t.datetime "created_at", null: false
@@ -353,8 +182,7 @@
end
create_table "question_options", force: :cascade do |t|
- t.integer "new_question_id"
- t.integer "option_id"
+ t.integer "question_id"
t.string "text"
t.integer "number"
t.boolean "is_default"
@@ -367,13 +195,12 @@
t.text "default_value"
t.text "guidance"
t.integer "number"
- t.integer "dependency_id"
- t.text "dependency_text"
t.integer "section_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "question_format_id"
- t.boolean "option_comment_display", :default => true
+ t.boolean "option_comment_display", default: true
+ t.boolean "modifiable"
end
create_table "questions_themes", :id => false, :force => true do |t|
@@ -381,7 +208,8 @@
t.integer "theme_id", :null => false
end
- add_index "questions_themes", ["question_id", "theme_id"], name: "index_questions_themes_on_question_id_and_theme_id", using: :btree
+ 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 "region_groups", force: :cascade do |t|
t.integer "super_region_id"
@@ -395,24 +223,22 @@
end
create_table "roles", force: :cascade do |t|
- t.boolean "creator"
- t.boolean "editor"
- t.boolean "administrator"
t.integer "user_id"
- t.integer "new_plan_id"
+ t.integer "plan_id"
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "access", default: 0, null: false
end
create_table "sections", force: :cascade do |t|
t.string "title"
t.text "description"
t.integer "number"
- t.integer "version_id"
- t.integer "organisation_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.boolean "published"
+ t.integer "phase_id"
+ t.boolean "modifiable"
end
create_table "settings", :force => true do |t|
@@ -434,18 +260,18 @@
create_table "suggested_answers", :force => true do |t|
t.integer "question_id"
- t.integer "organisation_id"
+ t.integer "org_id"
t.text "text"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
t.boolean "is_example"
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "templates", force: :cascade do |t|
t.string "title"
t.text "description"
t.boolean "published"
- t.integer "organisation_id"
+ t.integer "org_id"
t.string "locale"
t.boolean "is_default"
t.datetime "created_at"
@@ -469,12 +295,11 @@
t.integer "guidance_id"
end
- create_table "user_org_roles", :force => true do |t|
- t.integer "user_id"
- t.integer "organisation_id"
- t.integer "user_role_type_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ create_table "token_permission_types", force: :cascade do |t|
+ t.string "token_type"
+ t.text "text_description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "users", force: :cascade do |t|
@@ -504,7 +329,11 @@
t.string "other_organisation"
t.boolean "dmponline3"
t.boolean "accept_terms"
- t.integer "organisation_id"
+ t.integer "org_id"
+ t.string "api_token"
+ t.integer "invited_by_id"
+ t.string "invited_by_type"
+ t.integer "language_id"
end
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
@@ -519,16 +348,37 @@
add_index "users_perms", ["user_id", "perm_id"], name: "index_users_perms_on_user_id_and_perm_id", using: :btree
- create_table "versions", :force => true do |t|
- t.string "title"
- t.text "description"
- t.boolean "published"
- t.integer "number"
- t.integer "phase_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
+ 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_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 "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 "suggested_answers", "orgs"
+ add_foreign_key "suggested_answers", "questions"
+ add_foreign_key "templates", "orgs"
+ add_foreign_key "themes_in_guidance", "guidances"
+ add_foreign_key "themes_in_guidance", "themes"
+ add_foreign_key "users", "languages"
+ add_foreign_key "users", "orgs"
+ add_foreign_key "users_perms", "perms"
+ add_foreign_key "users_perms", "users"
+end
- add_index "versions", ["phase_id"], name: "index_versions_on_phase_id", using: :btree
-
-end
\ No newline at end of file
diff --git a/db/seeds.rb b/db/seeds.rb
index 8b1b243..70912b7 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -162,8 +162,8 @@
}
organisations.each do |org, details|
- if Organisation.where(abbreviation: details[:abbreviation]).empty?
- organisation = Organisation.new
+ if Org.where(abbreviation: details[:abbreviation]).empty?
+ organisation = Org.new
organisation.name = details[:name]
organisation.abbreviation = details[:abbreviation]
organisation.sort_name = details[:sort_name]
@@ -291,7 +291,7 @@
usr.password = details[:password]
usr.password_confirmation = details[:password_confirmation]
usr.confirmed_at = details[:confirmed_at]
- usr.organisation_id = Organisation.find_by_abbreviation(details[:organisation]).id
+ usr.organisation_id = Org.find_by_abbreviation(details[:organisation]).id
usr.language_id = Language.find_by_name(details[:language]).id
details[:roles].each do |role|
usr.roles << Role.find_by_name(role)
@@ -387,7 +387,7 @@
if GuidanceGroup.where(name: details[:name]).empty?
guidance_group = GuidanceGroup.new
guidance_group.name = details[:name]
- guidance_group.organisation = Organisation.find_by_abbreviation(details[:organisation])
+ guidance_group.organisation = Org.find_by_abbreviation(details[:organisation])
guidance_group.optional_subset = details[:optional_subset]
guidance_group.save!
end
@@ -469,7 +469,7 @@
}
templates.each do |t, details|
- org = Organisation.where(abbreviation: details[:organisation]).first
+ org = Org.where(abbreviation: details[:organisation]).first
if Dmptemplate.where(organisation: org).where(title: details[:title]).empty?
template = Dmptemplate.new
@@ -627,7 +627,7 @@
section.number = details[:number]
section.description = details[:description]
section.version = Version.find_by_title(details[:version])
- section.organisation = Organisation.find_by_abbreviation(details[:organisation])
+ section.organisation = Org.find_by_abbreviation(details[:organisation])
section.save!
end
end
diff --git a/html/Ability.html b/html/Ability.html
index 8b48429..d808822 100644
--- a/html/Ability.html
+++ b/html/Ability.html
@@ -183,7 +183,7 @@
# File app/models/ability.rb, line 4
-definitialize(user)
- # Define abilities for the passed in user here. For example:
- #
- user||=User.new# guest user (not logged in)
- ifuser.has_role?:admin
- can:manage, :all
- else
- can:read, :all
- end
-
- can:manage_settings, Userdo|viewed_user|
- viewed_user.present?&&user.id==viewed_user.id
- end
- #
- # The first argument to `can` is the action you are giving the user
- # permission to do.
- # If you pass :manage it will apply to every action. Other common actions
- # here are :read, :create, :update and :destroy.
- #
- # The second argument is the resource the user can perform the action on.
- # If you pass :all it will apply to every resource. Otherwise pass a Ruby
- # class of the resource.
- #
- # The third argument is an optional hash of conditions to further filter the
- # objects.
- # For example, here the user can only update published articles.
- #
- # can :update, Article, :published => true
- #
- # See the wiki for details:
- # https://github.com/ryanb/cancan/wiki/Defining-Abilities
-
+definitialize(user)
+ # Define abilities for the passed in user here. For example:
+
+ #
+
+ user||=User.new# guest user (not logged in)
+
+ ifuser.has_role?:admin
+ can:manage, :all
+ else
+ can:read, :all
+ end
+
+ can:manage_settings, Userdo|viewed_user|
+ viewed_user.present?&&user.id==viewed_user.id
+ end
+ #
+
+ # The first argument to `can` is the action you are giving the user
+
+ # permission to do.
+
+ # If you pass :manage it will apply to every action. Other common actions
+
+ # here are :read, :create, :update and :destroy.
+
+ #
+
+ # The second argument is the resource the user can perform the action on.
+
+ # If you pass :all it will apply to every resource. Otherwise pass a Ruby
+
+ # class of the resource.
+
+ #
+
+ # The third argument is an optional hash of conditions to further filter the
+
+ # objects.
+
+ # For example, here the user can only update published articles.
+
+ #
+
+ # can :update, Article, :published => true
+
+ #
+
+ # See the wiki for details:
+
+ # https://github.com/ryanb/cancan/wiki/Defining-Abilities
+
+
end
# File app/models/plan.rb, line 156
-defeditable_by(user_id)
- returnproject.editable_by(user_id)
+defeditable_by(user_id)
+ returnproject.editable_by(user_id)
end
@@ -649,42 +649,45 @@
# File app/models/plan.rb, line 81
-defguidance_for_question(question)
- guidances = {}
- # If project org isn't nil, get guidance by theme from any "non-subset" groups belonging to project org
- unlessproject.organisation.nil?then
- project.organisation.guidance_groups.eachdo|group|
- if!group.optional_subset&& (group.dmptemplates.pluck(:id).include?(project.dmptemplate_id) ||group.dmptemplates.count==0) then
- group.guidances.eachdo|guidance|
- guidance.themes.where("id IN (?)", question.theme_ids).eachdo|theme|
- guidances = self.add_guidance_to_array(guidances, group, theme, guidance)
- end
- end
- end
- end
- end
-
- # Get guidance by theme from any guidance groups selected on creation
- project.guidance_groups.eachdo|group|
- ifgroup.dmptemplates.pluck(:id).include?(project.dmptemplate_id) ||group.dmptemplates.count==0then
- group.guidances.eachdo|guidance|
- guidance.themes.where("id IN (?)", question.theme_ids).eachdo|theme|
- guidances = self.add_guidance_to_array(guidances, group, theme, guidance)
- end
- end
- end
-end
-
- # Get guidance by question where guidance group was selected on creation or if group is organisation default
- question.guidances.eachdo|guidance|
- guidance.guidance_groups.eachdo|group|
- if (group.organisation==project.organisation&&!group.optional_subset) ||project.guidance_groups.include?(group) then
- guidances = self.add_guidance_to_array(guidances, group, nil, guidance)
- end
- end
- end
-
- returnguidances
+defguidance_for_question(question)
+ guidances = {}
+ # If project org isn't nil, get guidance by theme from any "non-subset" groups belonging to project org
+
+ unlessproject.organisation.nil?then
+ project.organisation.guidance_groups.eachdo|group|
+ if!group.optional_subset&& (group.dmptemplates.pluck(:id).include?(project.dmptemplate_id) ||group.dmptemplates.count==0) then
+ group.guidances.eachdo|guidance|
+ guidance.themes.where("id IN (?)", question.theme_ids).eachdo|theme|
+ guidances = self.add_guidance_to_array(guidances, group, theme, guidance)
+ end
+ end
+ end
+ end
+ end
+
+ # Get guidance by theme from any guidance groups selected on creation
+
+ project.guidance_groups.eachdo|group|
+ ifgroup.dmptemplates.pluck(:id).include?(project.dmptemplate_id) ||group.dmptemplates.count==0then
+ group.guidances.eachdo|guidance|
+ guidance.themes.where("id IN (?)", question.theme_ids).eachdo|theme|
+ guidances = self.add_guidance_to_array(guidances, group, theme, guidance)
+ end
+ end
+ end
+end
+
+ # Get guidance by question where guidance group was selected on creation or if group is organisation default
+
+ question.guidances.eachdo|guidance|
+ guidance.guidance_groups.eachdo|group|
+ if (group.organisation==project.organisation&&!group.optional_subset) ||project.guidance_groups.include?(group) then
+ guidances = self.add_guidance_to_array(guidances, group, nil, guidance)
+ end
+ end
+ end
+
+ returnguidancesend
# File app/controllers/plans_controller.rb, line 6
- defedit
- @plan = Plan.find(params[:id])
-
-
-if!user_signed_in?then
- respond_todo|format|
- format.html { redirect_toedit_user_registration_path }
- end
- elsif!@plan.readable_by(current_user.id) then
- respond_todo|format|
- format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
- end
- end
+ defedit
+ @plan = Plan.find(params[:id])
+
+
+if!user_signed_in?then
+ respond_todo|format|
+ format.html { redirect_toedit_user_registration_path }
+ end
+ elsif!@plan.readable_by(current_user.id) then
+ respond_todo|format|
+ format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
+ end
+ endend
@@ -440,52 +440,53 @@
# File app/controllers/plans_controller.rb, line 164
-defexport
- @plan = Plan.find(params[:id])
-
- ifuser_signed_in?&&@plan.readable_by(current_user.id) then
- @exported_plan = ExportedPlan.new.tapdo|ep|
- ep.plan = @plan
- ep.user = current_user
- ep.format = request.format.try(:symbol)
- plan_settings = @plan.settings(:export)
-
- Settings::Dmptemplate::DEFAULT_SETTINGS.eachdo|key, value|
- ep.settings(:export).send("#{key}=", plan_settings.send(key))
- end
- end
-
- @exported_plan.save!# FIXME: handle invalid request types without erroring?
- file_name = @exported_plan.project_name
-
- respond_todo|format|
- format.html
- format.xml
- format.json
- format.csv { send_data@exported_plan.as_csv, filename:"#{file_name}.csv" }
- format.text { send_data@exported_plan.as_txt, filename:"#{file_name}.txt" }
- format.docx { headers["Content-Disposition"] = "attachment; filename=\"#{file_name}.docx\""}
- format.pdfdo
- @formatting = @plan.settings(:export).formatting
- renderpdf:file_name,
- margin:@formatting[:margin],
- footer: {
- center:t('helpers.plan.export.pdf.generated_by'),
- font_size:8,
- spacing: (@formatting[:margin][:bottom] /2) -4,
- right:'[page] of [topage]'
- }
- end
- end
- elsif!user_signed_in?then
- respond_todo|format|
- format.html { redirect_toedit_user_registration_path }
- end
- elsif!@plan.editable_by(current_user.id) then
- respond_todo|format|
- format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
- end
- end
+defexport
+ @plan = Plan.find(params[:id])
+
+ ifuser_signed_in?&&@plan.readable_by(current_user.id) then
+ @exported_plan = ExportedPlan.new.tapdo|ep|
+ ep.plan = @plan
+ ep.user = current_user
+ ep.format = request.format.try(:symbol)
+ plan_settings = @plan.settings(:export)
+
+ Settings::Dmptemplate::DEFAULT_SETTINGS.eachdo|key, value|
+ ep.settings(:export).send("#{key}=", plan_settings.send(key))
+ end
+ end
+
+ @exported_plan.save!# FIXME: handle invalid request types without erroring?
+
+ file_name = @exported_plan.project_name
+
+ respond_todo|format|
+ format.html
+ format.xml
+ format.json
+ format.csv { send_data@exported_plan.as_csv, filename:"#{file_name}.csv" }
+ format.text { send_data@exported_plan.as_txt, filename:"#{file_name}.txt" }
+ format.docx { headers["Content-Disposition"] = "attachment; filename=\"#{file_name}.docx\""}
+ format.pdfdo
+ @formatting = @plan.settings(:export).formatting
+ renderpdf:file_name,
+ margin:@formatting[:margin],
+ footer: {
+ center:t('helpers.plan.export.pdf.generated_by'),
+ font_size:8,
+ spacing: (@formatting[:margin][:bottom] /2) -4,
+ right:'[page] of [topage]'
+ }
+ end
+ end
+ elsif!user_signed_in?then
+ respond_todo|format|
+ format.html { redirect_toedit_user_registration_path }
+ end
+ elsif!@plan.editable_by(current_user.id) then
+ respond_todo|format|
+ format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
+ end
+ endend
# File app/controllers/projects_controller.rb, line 71
-defedit
- @project = Project.find(params[:id])
- if!user_signed_in?then
- respond_todo|format|
- format.html { redirect_toedit_user_registration_path }
- end
- elsif!@project.editable_by(current_user.id) then
- respond_todo|format|
- format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
- end
- end
+defedit
+ @project = Project.find(params[:id])
+ if!user_signed_in?then
+ respond_todo|format|
+ format.html { redirect_toedit_user_registration_path }
+ end
+ elsif!@project.editable_by(current_user.id) then
+ respond_todo|format|
+ format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
+ end
+ endend
# File app/controllers/projects_controller.rb, line 213
-defpossible_guidance
- if!params[:template].nil?&¶ms[:template] !=""&¶ms[:template] !="undefined"then
- template = Dmptemplate.find(params[:template])
- else
- template = nil
- end
- if!params[:institution].nil?&¶ms[:institution] !=""&¶ms[:institution] !="undefined"then
- institution = Organisation.find(params[:institution])
- else
- institution = nil
- end
- excluded_orgs = orgs_of_type(t('helpers.org_type.funder')) +orgs_of_type(t('helpers.org_type.institution')) +Organisation.orgs_with_parent_of_type(t('helpers.org_type.institution'))
- guidance_groups = {}
- ggs = GuidanceGroup.guidance_groups_excluding(excluded_orgs)
-
- ggs.eachdo|gg|
- guidance_groups[gg.id] = gg.name
- end
-
-#subset guidance that belong to the institution
- unlessinstitution.nil?then
- optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, institution.id)
- optional_gg.eachdo|optional|
- guidance_groups[optional.id] = optional.name
- end
-
- institution.children.eachdo|o|
- o.guidance_groups.eachdo|gg|
- include = false
- gg.guidances.eachdo|g|
- ifg.dmptemplate.nil?||g.dmptemplate_id==template.idthen
- include = true
- break
- end
- end
- ifincludethen
- guidance_groups[gg.id] = gg.name
- end
- end
- end
- end
-
-#If template belongs to a funder and that funder has subset guidance display then.
-if!template.nil?&&template.organisation.organisation_type.name==t('helpers.org_type.funder') then
- optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, template.organisation_id)
- optional_gg.eachdo|optional|
- guidance_groups[optional.id] = optional.name
- end
-end
-
-
- respond_todo|format|
- format.json { renderjson:guidance_groups.to_json }
- end
+defpossible_guidance
+ if!params[:template].nil?&¶ms[:template] !=""&¶ms[:template] !="undefined"then
+ template = Dmptemplate.find(params[:template])
+ else
+ template = nil
+ end
+ if!params[:institution].nil?&¶ms[:institution] !=""&¶ms[:institution] !="undefined"then
+ institution = Organisation.find(params[:institution])
+ else
+ institution = nil
+ end
+ excluded_orgs = orgs_of_type(t('helpers.org_type.funder')) +orgs_of_type(t('helpers.org_type.institution')) +Organisation.orgs_with_parent_of_type(t('helpers.org_type.institution'))
+ guidance_groups = {}
+ ggs = GuidanceGroup.guidance_groups_excluding(excluded_orgs)
+
+ ggs.eachdo|gg|
+ guidance_groups[gg.id] = gg.name
+ end
+
+#subset guidance that belong to the institution
+
+ unlessinstitution.nil?then
+ optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, institution.id)
+ optional_gg.eachdo|optional|
+ guidance_groups[optional.id] = optional.name
+ end
+
+ institution.children.eachdo|o|
+ o.guidance_groups.eachdo|gg|
+ include = false
+ gg.guidances.eachdo|g|
+ ifg.dmptemplate.nil?||g.dmptemplate_id==template.idthen
+ include = true
+ break
+ end
+ end
+ ifincludethen
+ guidance_groups[gg.id] = gg.name
+ end
+ end
+ end
+ end
+
+#If template belongs to a funder and that funder has subset guidance display then.
+
+if!template.nil?&&template.organisation.organisation_type.name==t('helpers.org_type.funder') then
+ optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, template.organisation_id)
+ optional_gg.eachdo|optional|
+ guidance_groups[optional.id] = optional.name
+ end
+end
+
+
+ respond_todo|format|
+ format.json { renderjson:guidance_groups.to_json }
+ endend
@@ -667,36 +673,36 @@
# File app/controllers/projects_controller.rb, line 181
-defpossible_templates
- if!params[:funder].nil?&¶ms[:funder] !=""&¶ms[:funder] !="undefined"then
- funder = Organisation.find(params[:funder])
- else
- funder = nil
- end
- if!params[:institution].nil?&¶ms[:institution] !=""&¶ms[:institution] !="undefined"then
- institution = Organisation.find(params[:institution])
- else
- institution = nil
- end
- templates = {}
- unlessfunder.nil?then
- funder.published_templates.eachdo|t|
- templates[t.id] = t.title
- end
- end
- iftemplates.count==0&&!institution.nil?then
- institution.published_templates.eachdo|t|
- templates[t.id] = t.title
- end
- institution.children.eachdo|o|
- o.published_templates.eachdo|t|
- templates[t.id] = t.title
- end
- end
- end
- respond_todo|format|
- format.json { renderjson:templates.to_json }
- end
+defpossible_templates
+ if!params[:funder].nil?&¶ms[:funder] !=""&¶ms[:funder] !="undefined"then
+ funder = Organisation.find(params[:funder])
+ else
+ funder = nil
+ end
+ if!params[:institution].nil?&¶ms[:institution] !=""&¶ms[:institution] !="undefined"then
+ institution = Organisation.find(params[:institution])
+ else
+ institution = nil
+ end
+ templates = {}
+ unlessfunder.nil?then
+ funder.published_templates.eachdo|t|
+ templates[t.id] = t.title
+ end
+ end
+ iftemplates.count==0&&!institution.nil?then
+ institution.published_templates.eachdo|t|
+ templates[t.id] = t.title
+ end
+ institution.children.eachdo|o|
+ o.published_templates.eachdo|t|
+ templates[t.id] = t.title
+ end
+ end
+ end
+ respond_todo|format|
+ format.json { renderjson:templates.to_json }
+ endend
@@ -725,17 +731,17 @@
# File app/controllers/projects_controller.rb, line 84
-defshare
- @project = Project.find(params[:id])
- if!user_signed_in?then
- respond_todo|format|
- format.html { redirect_toedit_user_registration_path }
- end
- elsif!@project.editable_by(current_user.id) then
- respond_todo|format|
- format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
- end
- end
+defshare
+ @project = Project.find(params[:id])
+ if!user_signed_in?then
+ respond_todo|format|
+ format.html { redirect_toedit_user_registration_path }
+ end
+ elsif!@project.editable_by(current_user.id) then
+ respond_todo|format|
+ format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
+ end
+ endend
@@ -764,26 +770,27 @@
# File app/controllers/projects_controller.rb, line 28
-defshow
- @project = Project.find(params[:id])
- @show_form = false
- ifparams[:show_form] =="yes"then
- @show_form = true
- end
- ifuser_signed_in?&&@project.readable_by(current_user.id) then
- respond_todo|format|
- format.html# show.html.erb
- format.json { renderjson:@project }
- end
- elsifuser_signed_in?then
- respond_todo|format|
- format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
- end
- else
- respond_todo|format|
- format.html { redirect_toedit_user_registration_path }
- end
- end
+defshow
+ @project = Project.find(params[:id])
+ @show_form = false
+ ifparams[:show_form] =="yes"then
+ @show_form = true
+ end
+ ifuser_signed_in?&&@project.readable_by(current_user.id) then
+ respond_todo|format|
+ format.html# show.html.erb
+
+ format.json { renderjson:@project }
+ end
+ elsifuser_signed_in?then
+ respond_todo|format|
+ format.html { redirect_toprojects_url, notice:"This account does not have access to that plan." }
+ end
+ else
+ respond_todo|format|
+ format.html { redirect_toedit_user_registration_path }
+ end
+ endend
# File app/models/question.rb, line 69
-defguidance_for_question(question, org_admin)
-# pulls together guidance from various sources for question
-guidances = {}
-theme_ids = question.theme_ids
-
-GuidanceGroup.where("organisation_id = ?", org_admin.id).eachdo|group|
- group.guidances.eachdo|g|
- g.themes.where("id IN (?)", theme_ids).eachdo|gg|
- guidances["#{group.name} guidance on #{gg.title}"] = g
- end
- end
-end
-
- # Guidance link to directly to a question
-question.guidances.eachdo|g_by_q|
- g_by_q.guidance_groups.eachdo|group|
- ifgroup.organisation==org_admin
- guidances["#{group.name} guidance for this question"] = g_by_q
- end
- end
- end
-
- returnguidances
+defguidance_for_question(question, org_admin)
+# pulls together guidance from various sources for question
+
+guidances = {}
+theme_ids = question.theme_ids
+
+GuidanceGroup.where("organisation_id = ?", org_admin.id).eachdo|group|
+ group.guidances.eachdo|g|
+ g.themes.where("id IN (?)", theme_ids).eachdo|gg|
+ guidances["#{group.name} guidance on #{gg.title}"] = g
+ end
+ end
+end
+
+ # Guidance link to directly to a question
+
+question.guidances.eachdo|g_by_q|
+ g_by_q.guidance_groups.eachdo|group|
+ ifgroup.organisation==org_admin
+ guidances["#{group.name} guidance for this question"] = g_by_q
+ end
+ end
+ end
+
+ returnguidancesend
# File app/controllers/settings/projects_controller.rb, line 29
-defget_settings
- @settings = current_user.settings(:plan_list)
- # :name column should always be present (displayed as a disabled checkbox)
- # so it's not necessary to include it in the list here
- @all_columns-= [:name]
+defget_settings
+ @settings = current_user.settings(:plan_list)
+ # :name column should always be present (displayed as a disabled checkbox)
+
+ # so it's not necessary to include it in the list here
+
+ @all_columns-= [:name]
end
# File app/controllers/users/omniauth_shibboleth_request_controller.rb, line 17
-defassociate
- # This action is protected - can only be reached if user is already logged in.
- # See before_filter
- redirect_touser_omniauth_callback_path(:shibboleth)
+defassociate
+ # This action is protected - can only be reached if user is already logged in.
+
+ # See before_filter
+
+ redirect_touser_omniauth_callback_path(:shibboleth)
end
Description: — This controller is responsible for all the actions in the admin interface …\n"],["ExistingUsersController","","ExistingUsersController.html","",""],["ExportedPlan","","ExportedPlan.html","",""],["FileType","","FileType.html","",""],["FileUpload","","FileUpload.html","",""],["Guidance","","Guidance.html","","
Project: — DMPonline v4\n
Description: — This class keeps the information organisations enter to support users …\n"],["GuidanceGroup","","GuidanceGroup.html","",""],["GuidanceGroupsController","","GuidanceGroupsController.html","",""],["GuidancesController","","GuidancesController.html","",""],["HomeController","","HomeController.html","",""],["Object","","Object.html","",""],["Option","","Option.html","",""],["OptionWarning","","OptionWarning.html","",""],["Organisation","","Organisation.html","",""],["OrganisationType","","OrganisationType.html","",""],["OrganisationUsersController","","OrganisationUsersController.html","",""],["OrganisationsController","","OrganisationsController.html","",""],["PasswordsController","","PasswordsController.html","",""],["Phase","","Phase.html","","
Project: — DMPonline v4\n
Description: — This model describes informmation about the phase of a plan, it's …\n"],["Plan","","Plan.html","",""],["PlanSection","","PlanSection.html","",""],["PlansController","","PlansController.html","",""],["PlansHelper","","PlansHelper.html","",""],["Project","","Project.html","",""],["ProjectGroup","","ProjectGroup.html","",""],["ProjectGroupsController","","ProjectGroupsController.html","",""],["ProjectPartner","","ProjectPartner.html","",""],["ProjectsController","","ProjectsController.html","",""],["Question","","Question.html","",""],["QuestionFormat","","QuestionFormat.html","",""],["RegistrationsController","","RegistrationsController.html","","
delete a version, sections and questions\n"],["admin_destroyquestion","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroyquestion","()","
delete a version, sections and questions\n"],["admin_destroysection","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroysection","()","
delete a section and questions\n"],["admin_destroysuggestedanswer","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroysuggestedanswer","()","
delete a suggested answer\n"],["admin_destroyversion","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroyversion","()","
delete a version, sections and questions\n"],["admin_details","ExportedPlan","ExportedPlan.html#method-i-admin_details","()",""],["admin_edit","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_edit","()","
GET /guidance_groups/1/edit\n"],["admin_edit","GuidancesController","GuidancesController.html#method-i-admin_edit","()","
GET /guidances/1/edit\n"],["admin_edit","OrganisationsController","OrganisationsController.html#method-i-admin_edit","()","
GET /organisations/1/edit\n"],["admin_index","DmptemplatesController","DmptemplatesController.html#method-i-admin_index","()","
GET /dmptemplates GET /dmptemplates.json\n"],["admin_index","GuidancesController","GuidancesController.html#method-i-admin_index","()","
GET /guidances GET /guidances.json\n"],["admin_index","OrganisationUsersController","OrganisationUsersController.html#method-i-admin_index","()",""],["admin_new","DmptemplatesController","DmptemplatesController.html#method-i-admin_new","()","
GET /dmptemplates/new GET /dmptemplates/new.json\n"],["admin_new","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_new","()","
GET add new guidance groups\n"],["admin_new","GuidancesController","GuidancesController.html#method-i-admin_new","()",""],["admin_phase","DmptemplatesController","DmptemplatesController.html#method-i-admin_phase","()","
show and edit a phase of the template\n"],["admin_previewphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_previewphase","()","
preview a phase\n"],["admin_show","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_show","()","
GET /guidance_groups/1 GET /guidance_groups/1.json\n"],["admin_show","GuidancesController","GuidancesController.html#method-i-admin_show","()","
GET /guidances/1 GET /guidances/1.json\n"],["admin_show","OrganisationsController","OrganisationsController.html#method-i-admin_show","()","
GET /organisations/1 GET /organisations/1.json\n"],["admin_template","DmptemplatesController","DmptemplatesController.html#method-i-admin_template","()","
GET /dmptemplates/1 GET /dmptemplates/1.json\n"],["admin_update","DmptemplatesController","DmptemplatesController.html#method-i-admin_update","()","
PUT /dmptemplates/1 PUT /dmptemplates/1.json\n"],["admin_update","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_update","()","
PUT /guidance_groups/1 PUT /guidance_groups/1.json\n"],["admin_update","GuidancesController","GuidancesController.html#method-i-admin_update","()","
PUT /guidances/1 PUT /guidances/1.json\n"],["admin_update","OrganisationsController","OrganisationsController.html#method-i-admin_update","()","
PUT /organisations/1 PUT /organisations/1.json\n"],["admin_updatephase","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatephase","()","
update a phase of a template\n"],["admin_updatequestion","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatequestion","()","
update a question of a template\n"],["admin_updatesection","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatesection","()","
update a section of a template\n"],["admin_updatesuggestedanswer","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatesuggestedanswer","()","
update a suggested answer of a template\n"],["admin_updateversion","DmptemplatesController","DmptemplatesController.html#method-i-admin_updateversion","()","
update a version of a template\n"],["administerable_by","Plan","Plan.html#method-i-administerable_by","(user_id)",""],["administerable_by","Project","Project.html#method-i-administerable_by","(user_id)",""],["after_confirmation_path_for","ConfirmationsController","ConfirmationsController.html#method-i-after_confirmation_path_for","(resource_name, resource)",""],["after_resetting_password_path_for","PasswordsController","PasswordsController.html#method-i-after_resetting_password_path_for","(resource)",""],["after_sign_in_error_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_in_error_path_for","(resource)",""],["after_sign_in_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_in_path_for","(resource)",""],["after_sign_up_error_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_up_error_path_for","(resource)",""],["after_sign_up_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_up_path_for","(resource)",""],["all_guidance_groups","Organisation","Organisation.html#method-i-all_guidance_groups","()",""],["all_sections","Organisation","Organisation.html#method-i-all_sections","(version_id)",""],["answer","Plan","Plan.html#method-i-answer","(qid, create_if_missing = true)",""],["answer","PlansController","PlansController.html#method-i-answer","()",""],["archive","CommentsController","CommentsController.html#method-i-archive","()","
Renders the content for the footer\n"],["by_organisation","Guidance","Guidance.html#method-c-by_organisation","(org_id)","
all guidance that belong to an organisation\n"],["children","OrganisationsController","OrganisationsController.html#method-i-children","()",""],["contact_us","StaticPagesController","StaticPagesController.html#method-i-contact_us","()",""],["create","AnswersController","AnswersController.html#method-i-create","()","
POST /answers POST /answers.json\n"],["create","CommentsController","CommentsController.html#method-i-create","()","
POST /comments POST /comments.json\n"],["create","ContactsController","ContactsController.html#method-i-create","()",""],["create","OrganisationsController","OrganisationsController.html#method-i-create","()","
POST /organisations POST /organisations.json\n"],["create","ProjectGroupsController","ProjectGroupsController.html#method-i-create","()",""],["create","ProjectsController","ProjectsController.html#method-i-create","()","
POST /projects POST /projects.json\n"],["create","RegistrationsController","RegistrationsController.html#method-i-create","()","
POST /resource\n"],["create","SessionsController","SessionsController.html#method-i-create","()",""],["create","SplashLogsController","SplashLogsController.html#method-i-create","()","
POST /answers POST /answers.json\n"],["create","ThemesController","ThemesController.html#method-i-create","()","
POST /themes POST /themes.json\n"],["create","UserOrgRolesController","UserOrgRolesController.html#method-i-create","()","
POST /user_org_roles POST /user_org_roles.json\n"],["create","UserRoleTypesController","UserRoleTypesController.html#method-i-create","()","
POST /user_role_types POST /user_role_types.json\n"],["create","UserStatusesController","UserStatusesController.html#method-i-create","()","
POST /user_statuses POST /user_statuses.json\n"],["create","UserTypesController","UserTypesController.html#method-i-create","()","
POST /user_types POST /user_types.json\n"],["create","UsersController","UsersController.html#method-i-create","()","
POST /users POST /users.json\n"],["create_plans","Project","Project.html#method-i-create_plans","()",""],["created_by","Project","Project.html#method-i-created_by","(user_id)",""],["current_organisation","User","User.html#method-i-current_organisation","()",""],["delete_recent_locks","Plan","Plan.html#method-i-delete_recent_locks","(user_id)",""],["delete_recent_locks","PlansController","PlansController.html#method-i-delete_recent_locks","()",""],["destroy","OrganisationsController","OrganisationsController.html#method-i-destroy","()","
GET /comments/1/edit\n"],["edit","PlansController","PlansController.html#method-i-edit","()","
GET /plans/1/edit\n"],["edit","ProjectsController","ProjectsController.html#method-i-edit","()","
GET /projects/1/edit Should this be removed?\n"],["edit","ThemesController","ThemesController.html#method-i-edit","()","
GET /themes/1/edit\n"],["edit","UserOrgRolesController","UserOrgRolesController.html#method-i-edit","()","
GET /user_org_roles/1/edit\n"],["edit","UserRoleTypesController","UserRoleTypesController.html#method-i-edit","()","
GET /user_role_types/1/edit\n"],["edit","UserStatusesController","UserStatusesController.html#method-i-edit","()","
GET /user_statuses/1/edit\n"],["edit","UserTypesController","UserTypesController.html#method-i-edit","()","
GET /user_types/1/edit\n"],["edit","UsersController","UsersController.html#method-i-edit","()","
GET /users/1/edit\n"],["editable_by","Plan","Plan.html#method-i-editable_by","(user_id)",""],["editable_by","Project","Project.html#method-i-editable_by","(user_id)",""],["email","ProjectGroup","ProjectGroup.html#method-i-email","()",""],["email=","ProjectGroup","ProjectGroup.html#method-i-email-3D","(new_email)",""],["estimate_space_used","Plan","Plan.html#method-i-estimate_space_used","(used_height)","
Based on the height of the text gathered so far and the available vertical\nspace of the pdf, estimate …\n"],["export","PlansController","PlansController.html#method-i-export","()",""],["export","ProjectsController","ProjectsController.html#method-i-export","()",""],["filter","User","User.html#method-i-filter","(query)",""],["funder","ExportedPlan","ExportedPlan.html#method-i-funder","()",""],["funder","Project","Project.html#method-i-funder","()",""],["funder_id","Project","Project.html#method-i-funder_id","()",""],["funder_id=","Project","Project.html#method-i-funder_id-3D","(new_funder_id)",""],["funder_name","Project","Project.html#method-i-funder_name","()",""],["funder_name=","Project","Project.html#method-i-funder_name-3D","(new_funder_name)",""],["funders_and_own_templates","Dmptemplate","Dmptemplate.html#method-c-funders_and_own_templates","(org_id)","
returns an array with all funders and own institutional templates\n"],["funders_templates","Dmptemplate","Dmptemplate.html#method-c-funders_templates","()","
returns all funders templates\n"],["get_guidance_group_templates?","Guidance","Guidance.html#method-i-get_guidance_group_templates-3F","(guidance_group)",""],["get_plan_list_columns","ApplicationController","ApplicationController.html#method-i-get_plan_list_columns","()",""],["get_settings","Settings::PlansController","Settings/PlansController.html#method-i-get_settings","()",""],["get_settings","Settings::ProjectsController","Settings/ProjectsController.html#method-i-get_settings","()",""],["get_suggested_answer","Question","Question.html#method-i-get_suggested_answer","(org_id)","
get suggested answer belonging to the currents user for this question\n"],["global_sections","Version","Version.html#method-i-global_sections","()",""],["grant_title","ExportedPlan","ExportedPlan.html#method-i-grant_title","()",""],["guidance_for_question","Plan","Plan.html#method-i-guidance_for_question","(question)",""],["guidance_for_question","Question","Question.html#method-i-guidance_for_question","(question, org_admin)","
guidance for question in the org admin\n"],["guidance_groups_excluding","GuidanceGroup","GuidanceGroup.html#method-c-guidance_groups_excluding","(excluded_orgs)",""],["has_customisations?","Dmptemplate","Dmptemplate.html#method-i-has_customisations-3F","(org_id, temp)","
verify if a template has customisation by current user's org\n"],["has_published_versions?","Dmptemplate","Dmptemplate.html#method-i-has_published_versions-3F","()","
verify if there are any publish version for the template\n"],["has_sections","Phase","Phase.html#method-i-has_sections","()","
verify if a phase has a published version or a version with one or more\nsections\n"],["height_of_text","Plan","Plan.html#method-i-height_of_text","(text, font_size_inc = 0, vertical_margin = 0)","
Take a guess at the vertical height (in mm) of the given text based on the\nfont-size and left/right margins …\n"],["in_group_belonging_to?","Guidance","Guidance.html#method-i-in_group_belonging_to-3F","(organisation_id)","
verifies if one guidance belongs to a org\n"],["index","CommentsController","CommentsController.html#method-i-index","()","
GET /comments GET /comments.json\n"],["index","ExistingUsersController","ExistingUsersController.html#method-i-index","()",""],["index","HomeController","HomeController.html#method-i-index","()",""],["index","OrganisationsController","OrganisationsController.html#method-i-index","()","
GET /organisations GET /organisations.json\n"],["index","ProjectsController","ProjectsController.html#method-i-index","()","
GET /projects GET /projects.json\n"],["index","ThemesController","ThemesController.html#method-i-index","()","
GET /themes GET /themes.json\n"],["index","UserOrgRolesController","UserOrgRolesController.html#method-i-index","()","
GET /user_org_roles GET /user_org_roles.json\n"],["index","UserRoleTypesController","UserRoleTypesController.html#method-i-index","()","
GET /user_role_types GET /user_role_types.json\n"],["index","UserStatusesController","UserStatusesController.html#method-i-index","()","
GET /user_statuses GET /user_statuses.json\n"],["index","UserTypesController","UserTypesController.html#method-i-index","()","
GET /user_types GET /user_types.json\n"],["institution","ExportedPlan","ExportedPlan.html#method-i-institution","()",""],["institution_id","Project","Project.html#method-i-institution_id","()",""],["institution_id=","Project","Project.html#method-i-institution_id-3D","(new_institution_id)",""],["can_super_admin?","User","User.html#method-i-is_admin-3F","()",""],["can_org_admin?","User","User.html#method-i-is_org_admin-3F","()",""],["javascript","ApplicationHelper","ApplicationHelper.html#method-i-javascript","(*files)",""],["last_edited","Project","Project.html#method-i-last_edited","()",""],["latest_published_version","Phase","Phase.html#method-i-latest_published_version","()","
Verify if this phase has any published versions\n"],["latest_update","Plan","Plan.html#method-i-latest_update","()",""],["latest_update","Project","Project.html#method-i-latest_update","()",""],["latest_version","Phase","Phase.html#method-i-latest_version","()",""],["link_to_add_object","ApplicationHelper","ApplicationHelper.html#method-i-link_to_add_object","(name, f, association, css_class, i)",""],["lock_all_sections","Plan","Plan.html#method-i-lock_all_sections","(user_id)",""],["lock_section","Plan","Plan.html#method-i-lock_section","(section_id, user_id, release_time = 60)",""],["lock_section","PlansController","PlansController.html#method-i-lock_section","()",""],["locked","Plan","Plan.html#method-i-locked","(section_id, user_id)",""],["locked","PlansController","PlansController.html#method-i-locked","()",""],["name","Project","Project.html#method-i-name","()","
Getters to match 'My plans' columns\n"],["name","User","User.html#method-i-name","(use_email = true)",""],["needs_password?","RegistrationsController","RegistrationsController.html#method-i-needs_password-3F","(user, params)","
check if we need password to update user data ie if password or email was\nchanged extend this as needed …\n"],["new","Ability","Ability.html#method-c-new","(user)",""],["new","OrganisationsController","OrganisationsController.html#method-i-new","()","
GET /organisations/new GET /organisations/new.json\n"],["new","ProjectsController","ProjectsController.html#method-i-new","()","
GET /projects/new GET /projects/new.json\n"],["new","ThemesController","ThemesController.html#method-i-new","()","
GET /themes/new GET /themes/new.json\n"],["new","UserOrgRolesController","UserOrgRolesController.html#method-i-new","()","
GET /user_org_roles/new GET /user_org_roles/new.json\n"],["new","UserRoleTypesController","UserRoleTypesController.html#method-i-new","()","
GET /user_role_types/new GET /user_role_types/new.json\n"],["new","UserStatusesController","UserStatusesController.html#method-i-new","()","
GET /user_statuses/new GET /user_statuses/new.json\n"],["new","UserTypesController","UserTypesController.html#method-i-new","()","
GET /user_types/new GET /user_types/new.json\n"],["new","UsersController","UsersController.html#method-i-new","()","
GET /users/new GET /users/new.json\n"],["org_type","Dmptemplate","Dmptemplate.html#method-i-org_type","()",""],["org_type","User","User.html#method-i-org_type","()",""],["organisation","User","User.html#method-i-organisation","()",""],["organisation=","User","User.html#method-i-organisation-3D","(new_organisation)",""],["organisation_id","User","User.html#method-i-organisation_id","()",""],["organisation_id=","User","User.html#method-i-organisation_id-3D","(new_organisation_id)",""],["orgs_of_type","ProjectsController","ProjectsController.html#method-i-orgs_of_type","(org_type_name, published_templates = false)",""],["orgs_with_parent_of_type","Organisation","Organisation.html#method-c-orgs_with_parent_of_type","(org_type)","
retrieves info off a child org\n"],["other_organisations","Organisation","Organisation.html#method-c-other_organisations","()",""],["own_institutional_templates","Dmptemplate","Dmptemplate.html#method-c-own_institutional_templates","(org_id)","
returns all institutional templates bellowing to the current user's org\n"],["owner","Project","Project.html#method-i-owner","()",""],["parent","OrganisationsController","OrganisationsController.html#method-i-parent","()",""],["permissions_change_notification","UserMailer","UserMailer.html#method-i-permissions_change_notification","(project_group)",""],["plan","Settings::PlansController","Settings/PlansController.html#method-i-plan","()",""],["plan_settings_indicator","PlansHelper","PlansHelper.html#method-i-plan_settings_indicator","(plan)","
Shows whether the user has default, template-default or custom settings for\nthe given plan.\n"],["possible_guidance","ProjectsController","ProjectsController.html#method-i-possible_guidance","()",""],["possible_templates","ProjectsController","ProjectsController.html#method-i-possible_templates","()","
GET /projects/possible_templates.json\n"],["principal_investigator","ExportedPlan","ExportedPlan.html#method-i-principal_investigator","()",""],["project_access_removed_notification","UserMailer","UserMailer.html#method-i-project_access_removed_notification","(user, project)",""],["project_data_contact","ExportedPlan","ExportedPlan.html#method-i-project_data_contact","()",""],["project_description","ExportedPlan","ExportedPlan.html#method-i-project_description","()",""],["project_identifier","ExportedPlan","ExportedPlan.html#method-i-project_identifier","()",""],["project_list_body","PlansHelper","PlansHelper.html#method-i-project_list_body","(column, project)",""],["project_list_head","PlansHelper","PlansHelper.html#method-i-project_list_head","(column)",""],["project_name","ExportedPlan","ExportedPlan.html#method-i-project_name","()","
Getters to match Settings::Dmptemplate::VALID_ADMIN_FIELDS\n"],["projects_for_user","Project","Project.html#method-c-projects_for_user","(user_id)",""],["published_templates","Organisation","Organisation.html#method-i-published_templates","()",""],["question_themes?","Question","Question.html#method-i-question_themes-3F","()","
sections taken from fields settings\n"],["sections","Plan","Plan.html#method-i-sections","()",""],["settings","Plan","Plan.html#method-i-settings","(key)","
Proxy through to the template settings (or defaults if this plan\ndoesn't have an associated template) …\n"],["settings_json","Settings::PlansController","Settings/PlansController.html#method-i-settings_json","()",""],["settings_json","Settings::ProjectsController","Settings/ProjectsController.html#method-i-settings_json","()",""],["share","ProjectsController","ProjectsController.html#method-i-share","()",""],["shared","Project","Project.html#method-i-shared","()",""],["shared?","Project","Project.html#method-i-shared-3F","()",""],["sharing_notification","UserMailer","UserMailer.html#method-i-sharing_notification","(project_group)",""],["shibboleth","Users::OmniauthCallbacksController","Users/OmniauthCallbacksController.html#method-i-shibboleth","()",""],["short_name","Organisation","Organisation.html#method-i-short_name","()",""],["show","CommentsController","CommentsController.html#method-i-show","()","
GET /comments/1 GET /comments/1.json\n"],["show","ProjectsController","ProjectsController.html#method-i-show","()","
GET /projects/1 GET /projects/1.json\n"],["show","Settings::PlansController","Settings/PlansController.html#method-i-show","()",""],["show","Settings::ProjectsController","Settings/ProjectsController.html#method-i-show","()",""],["show","ThemesController","ThemesController.html#method-i-show","()","
GET /themes/1 GET /themes/1.json\n"],["show","UserOrgRolesController","UserOrgRolesController.html#method-i-show","()","
GET /user_org_roles/1 GET /user_org_roles/1.json\n"],["show","UserRoleTypesController","UserRoleTypesController.html#method-i-show","()","
GET /user_role_types/1 GET /user_role_types/1.json\n"],["show","UserStatusesController","UserStatusesController.html#method-i-show","()","
GET /user_statuses/1 GET /user_statuses/1.json\n"],["show","UserTypesController","UserTypesController.html#method-i-show","()","
GET /user_types/1 GET /user_types/1.json\n"],["show","UsersController","UsersController.html#method-i-show","()","
GET /users/1 GET /users/1.json\n"],["status","Plan","Plan.html#method-i-status","()",""],["status","PlansController","PlansController.html#method-i-status","()","
GET /status/1.json\n"],["store_location","ApplicationController","ApplicationController.html#method-i-store_location","()",""],["super_settings","Plan","Plan.html#method-i-super_settings","(key)",""],["template_owner","Project","Project.html#method-i-template_owner","()",""],["templates","OrganisationsController","OrganisationsController.html#method-i-templates","()",""],["templates_org_type","Dmptemplate","Dmptemplate.html#method-c-templates_org_type","(ot)",""],["title","Plan","Plan.html#method-i-title","()",""],["to_s","Comment","Comment.html#method-i-to_s","()",""],["to_s","Dmptemplate","Dmptemplate.html#method-i-to_s","()",""],["to_s","GuidanceGroup","GuidanceGroup.html#method-i-to_s","()",""],["to_s","Option","Option.html#method-i-to_s","()",""],["to_s","OptionWarning","OptionWarning.html#method-i-to_s","()",""],["to_s","Organisation","Organisation.html#method-i-to_s","()",""],["to_s","Phase","Phase.html#method-i-to_s","()",""],["to_s","Question","Question.html#method-i-to_s","()",""],["to_s","QuestionFormat","QuestionFormat.html#method-i-to_s","()",""],["to_s","Section","Section.html#method-i-to_s","()",""],["to_s","SuggestedAnswer","SuggestedAnswer.html#method-i-to_s","()",""],["to_s","Theme","Theme.html#method-i-to_s","()",""],["to_s","Version","Version.html#method-i-to_s","()",""],["unit_id","Project","Project.html#method-i-unit_id","()",""],["unit_id=","Project","Project.html#method-i-unit_id-3D","(new_unit_id)",""],["unlock_all_sections","Plan","Plan.html#method-i-unlock_all_sections","(user_id)",""],["unlock_all_sections","PlansController","PlansController.html#method-i-unlock_all_sections","()",""],["unlock_section","Plan","Plan.html#method-i-unlock_section","(section_id, user_id)",""],["unlock_section","PlansController","PlansController.html#method-i-unlock_section","()",""],["update","CommentsController","CommentsController.html#method-i-update","()","
PUT /comments/1 PUT /comments/1.json\n"],["update","PlansController","PlansController.html#method-i-update","()","
PUT /plans/1 PUT /plans/1.json\n"],["update","ProjectGroupsController","ProjectGroupsController.html#method-i-update","()",""],["update","ProjectsController","ProjectsController.html#method-i-update","()","
PUT /projects/1 PUT /projects/1.json\n"],["update","RegistrationsController","RegistrationsController.html#method-i-update","()",""],["update","Settings::PlansController","Settings/PlansController.html#method-i-update","()",""],["update","Settings::ProjectsController","Settings/ProjectsController.html#method-i-update","()",""],["update","ThemesController","ThemesController.html#method-i-update","()","
PUT /themes/1 PUT /themes/1.json\n"],["update","UserOrgRolesController","UserOrgRolesController.html#method-i-update","()","
PUT /user_org_roles/1 PUT /user_org_roles/1.json\n"],["update","UserRoleTypesController","UserRoleTypesController.html#method-i-update","()","
PUT /user_role_types/1 PUT /user_role_types/1.json\n"],["update","UserStatusesController","UserStatusesController.html#method-i-update","()","
PUT /user_statuses/1 PUT /user_statuses/1.json\n"],["update","UserTypesController","UserTypesController.html#method-i-update","()","
PUT /user_types/1 PUT /user_types/1.json\n"],["update","UsersController","UsersController.html#method-i-update","()","
PUT /users/1 PUT /users/1.json\n"],["update_phases","GuidancesController","GuidancesController.html#method-i-update_phases","()","
setup variables for use in the dynamic updating\n"],["update_questions","GuidancesController","GuidancesController.html#method-i-update_questions","()",""],["update_sections","GuidancesController","GuidancesController.html#method-i-update_sections","()",""],["update_versions","GuidancesController","GuidancesController.html#method-i-update_versions","()",""],["warning","Organisation","Organisation.html#method-i-warning","(option_id)",""],["warning","Plan","Plan.html#method-i-warning","(option_id)",""],["warning","PlansController","PlansController.html#method-i-warning","()",""],["README","","README_rdoc.html","","
DMPonline v4\n
DMPonline is the DCC's data management planning tool, available at\ndmponline.dcc.ac.uk …\n"]]}}
\ No newline at end of file
+var search_data = {"index":{"searchIndex":["ability","activeadmin","views","pages","base","answer","answerscontroller","applicationcontroller","applicationhelper","comment","commentscontroller","confirmationscontroller","contactscontroller","customfailure","dmponline4","application","dmptemplate","dmptemplatescontroller","existinguserscontroller","exportedplan","filetype","fileupload","guidance","guidancegroup","guidancegroupscontroller","guidancescontroller","homecontroller","object","option","optionwarning","organisation","organisationtype","organisationuserscontroller","organisationscontroller","passwordscontroller","phase","plan","plansection","planscontroller","planshelper","project","projectgroup","projectgroupscontroller","projectpartner","projectscontroller","question","questionformat","registrationscontroller","role","section","sessionscontroller","settings","dmptemplate","planlist","planscontroller","projectscontroller","settingscontroller","splashlog","splashlogscontroller","staticpagescontroller","suggestedanswer","theme","themescontroller","user","usermailer","userorgrole","userorgrolescontroller","userroletype","userroletypescontroller","userstatus","userstatusescontroller","usertype","usertypescontroller","users","omniauthcallbackscontroller","omniauthshibbolethrequestcontroller","userscontroller","version","about_us()","about_us()","access_level()","access_level=()","add_guidance_to_array()","add_user()","admin_addphase()","admin_cloneversion()","admin_create()","admin_create()","admin_create()","admin_createphase()","admin_createquestion()","admin_createsection()","admin_createsuggestedanswer()","admin_destroy()","admin_destroy()","admin_destroy()","admin_destroyphase()","admin_destroyquestion()","admin_destroysection()","admin_destroysuggestedanswer()","admin_destroyversion()","admin_details()","admin_edit()","admin_edit()","admin_edit()","admin_index()","admin_index()","admin_index()","admin_new()","admin_new()","admin_new()","admin_phase()","admin_previewphase()","admin_show()","admin_show()","admin_show()","admin_template()","admin_update()","admin_update()","admin_update()","admin_update()","admin_updatephase()","admin_updatequestion()","admin_updatesection()","admin_updatesuggestedanswer()","admin_updateversion()","administerable_by()","administerable_by()","after_confirmation_path_for()","after_resetting_password_path_for()","after_sign_in_error_path_for()","after_sign_in_path_for()","after_sign_up_error_path_for()","after_sign_up_path_for()","all_guidance_groups()","all_sections()","answer()","answer()","archive()","as_csv()","as_txt()","assign_administrator()","assign_creator()","assign_editor()","assign_reader()","associate()","authenticate_admin!()","build_footer()","by_organisation()","children()","contact_us()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create_plans()","created_by()","current_organisation()","delete_recent_locks()","delete_recent_locks()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","details()","devise_mapping()","display_name()","dmptemplate()","do_update()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","editable_by()","editable_by()","email()","email=()","estimate_space_used()","export()","export()","filter()","funder()","funder()","funder_id()","funder_id=()","funder_name()","funder_name=()","funders_and_own_templates()","funders_templates()","get_guidance_group_templates?()","get_plan_list_columns()","get_settings()","get_settings()","get_suggested_answer()","global_sections()","grant_title()","guidance_for_question()","guidance_for_question()","guidance_groups_excluding()","has_customisations?()","has_published_versions?()","has_sections()","height_of_text()","in_group_belonging_to?()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","institution()","institution_id()","institution_id=()","can_super_admin?()","can_org_admin?()","javascript()","last_edited()","latest_published_version()","latest_update()","latest_update()","latest_version()","link_to_add_object()","lock_all_sections()","lock_section()","lock_section()","locked()","locked()","name()","name()","needs_password?()","new()","new()","new()","new()","new()","new()","new()","new()","new()","org_type()","org_type()","organisation()","organisation=()","organisation_id()","organisation_id=()","orgs_of_type()","orgs_with_parent_of_type()","other_organisations()","own_institutional_templates()","owner()","parent()","permissions_change_notification()","plan()","plan_settings_indicator()","possible_guidance()","possible_templates()","principal_investigator()","project_access_removed_notification()","project_data_contact()","project_description()","project_identifier()","project_list_body()","project_list_head()","project_name()","projects_for_user()","published_templates()","question_themes?()","questions()","questions_for_section()","readable_by()","readable_by()","redirect()","redirect_url()","resource()","resource_name()","respond()","roadmap()","root()","sanitize_text()","scoped_collection()","section_answers()","section_answers()","sections()","sections()","settings()","settings_json()","settings_json()","share()","shared()","shared?()","sharing_notification()","shibboleth()","short_name()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","status()","status()","store_location()","super_settings()","template_owner()","templates()","templates_org_type()","title()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","to_s()","unit_id()","unit_id=()","unlock_all_sections()","unlock_all_sections()","unlock_section()","unlock_section()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update_phases()","update_questions()","update_sections()","update_versions()","warning()","warning()","warning()","readme"],"longSearchIndex":["ability","activeadmin","activeadmin::views","activeadmin::views::pages","activeadmin::views::pages::base","answer","answerscontroller","applicationcontroller","applicationhelper","comment","commentscontroller","confirmationscontroller","contactscontroller","customfailure","dmponline4","dmponline4::application","dmptemplate","dmptemplatescontroller","existinguserscontroller","exportedplan","filetype","fileupload","guidance","guidancegroup","guidancegroupscontroller","guidancescontroller","homecontroller","object","option","optionwarning","organisation","organisationtype","organisationuserscontroller","organisationscontroller","passwordscontroller","phase","plan","plansection","planscontroller","planshelper","project","projectgroup","projectgroupscontroller","projectpartner","projectscontroller","question","questionformat","registrationscontroller","role","section","sessionscontroller","settings","settings::dmptemplate","settings::planlist","settings::planscontroller","settings::projectscontroller","settings::settingscontroller","splashlog","splashlogscontroller","staticpagescontroller","suggestedanswer","theme","themescontroller","user","usermailer","userorgrole","userorgrolescontroller","userroletype","userroletypescontroller","userstatus","userstatusescontroller","usertype","usertypescontroller","users","users::omniauthcallbackscontroller","users::omniauthshibbolethrequestcontroller","userscontroller","version","homecontroller#about_us()","staticpagescontroller#about_us()","projectgroup#access_level()","projectgroup#access_level=()","plan#add_guidance_to_array()","project#add_user()","dmptemplatescontroller#admin_addphase()","dmptemplatescontroller#admin_cloneversion()","dmptemplatescontroller#admin_create()","guidancegroupscontroller#admin_create()","guidancescontroller#admin_create()","dmptemplatescontroller#admin_createphase()","dmptemplatescontroller#admin_createquestion()","dmptemplatescontroller#admin_createsection()","dmptemplatescontroller#admin_createsuggestedanswer()","dmptemplatescontroller#admin_destroy()","guidancegroupscontroller#admin_destroy()","guidancescontroller#admin_destroy()","dmptemplatescontroller#admin_destroyphase()","dmptemplatescontroller#admin_destroyquestion()","dmptemplatescontroller#admin_destroysection()","dmptemplatescontroller#admin_destroysuggestedanswer()","dmptemplatescontroller#admin_destroyversion()","exportedplan#admin_details()","guidancegroupscontroller#admin_edit()","guidancescontroller#admin_edit()","organisationscontroller#admin_edit()","dmptemplatescontroller#admin_index()","guidancescontroller#admin_index()","organisationuserscontroller#admin_index()","dmptemplatescontroller#admin_new()","guidancegroupscontroller#admin_new()","guidancescontroller#admin_new()","dmptemplatescontroller#admin_phase()","dmptemplatescontroller#admin_previewphase()","guidancegroupscontroller#admin_show()","guidancescontroller#admin_show()","organisationscontroller#admin_show()","dmptemplatescontroller#admin_template()","dmptemplatescontroller#admin_update()","guidancegroupscontroller#admin_update()","guidancescontroller#admin_update()","organisationscontroller#admin_update()","dmptemplatescontroller#admin_updatephase()","dmptemplatescontroller#admin_updatequestion()","dmptemplatescontroller#admin_updatesection()","dmptemplatescontroller#admin_updatesuggestedanswer()","dmptemplatescontroller#admin_updateversion()","plan#administerable_by()","project#administerable_by()","confirmationscontroller#after_confirmation_path_for()","passwordscontroller#after_resetting_password_path_for()","applicationcontroller#after_sign_in_error_path_for()","applicationcontroller#after_sign_in_path_for()","applicationcontroller#after_sign_up_error_path_for()","applicationcontroller#after_sign_up_path_for()","organisation#all_guidance_groups()","organisation#all_sections()","plan#answer()","planscontroller#answer()","commentscontroller#archive()","exportedplan#as_csv()","exportedplan#as_txt()","project#assign_administrator()","project#assign_creator()","project#assign_editor()","project#assign_reader()","users::omniauthshibbolethrequestcontroller#associate()","applicationcontroller#authenticate_admin!()","activeadmin::views::pages::base#build_footer()","guidance::by_organisation()","organisationscontroller#children()","staticpagescontroller#contact_us()","answerscontroller#create()","commentscontroller#create()","contactscontroller#create()","organisationscontroller#create()","projectgroupscontroller#create()","projectscontroller#create()","registrationscontroller#create()","sessionscontroller#create()","splashlogscontroller#create()","themescontroller#create()","userorgrolescontroller#create()","userroletypescontroller#create()","userstatusescontroller#create()","usertypescontroller#create()","userscontroller#create()","project#create_plans()","project#created_by()","user#current_organisation()","plan#delete_recent_locks()","planscontroller#delete_recent_locks()","organisationscontroller#destroy()","projectgroupscontroller#destroy()","projectscontroller#destroy()","sessionscontroller#destroy()","themescontroller#destroy()","userorgrolescontroller#destroy()","userroletypescontroller#destroy()","userstatusescontroller#destroy()","usertypescontroller#destroy()","userscontroller#destroy()","plan#details()","applicationhelper#devise_mapping()","guidancegroup#display_name()","plan#dmptemplate()","registrationscontroller#do_update()","commentscontroller#edit()","planscontroller#edit()","projectscontroller#edit()","themescontroller#edit()","userorgrolescontroller#edit()","userroletypescontroller#edit()","userstatusescontroller#edit()","usertypescontroller#edit()","userscontroller#edit()","plan#editable_by()","project#editable_by()","projectgroup#email()","projectgroup#email=()","plan#estimate_space_used()","planscontroller#export()","projectscontroller#export()","user#filter()","exportedplan#funder()","project#funder()","project#funder_id()","project#funder_id=()","project#funder_name()","project#funder_name=()","dmptemplate::funders_and_own_templates()","dmptemplate::funders_templates()","guidance#get_guidance_group_templates?()","applicationcontroller#get_plan_list_columns()","settings::planscontroller#get_settings()","settings::projectscontroller#get_settings()","question#get_suggested_answer()","version#global_sections()","exportedplan#grant_title()","plan#guidance_for_question()","question#guidance_for_question()","guidancegroup::guidance_groups_excluding()","dmptemplate#has_customisations?()","dmptemplate#has_published_versions?()","phase#has_sections()","plan#height_of_text()","guidance#in_group_belonging_to?()","commentscontroller#index()","existinguserscontroller#index()","homecontroller#index()","organisationscontroller#index()","projectscontroller#index()","themescontroller#index()","userorgrolescontroller#index()","userroletypescontroller#index()","userstatusescontroller#index()","usertypescontroller#index()","exportedplan#institution()","project#institution_id()","project#institution_id=()","user#can_super_admin?()","user#can_org_admin?()","applicationhelper#javascript()","project#last_edited()","phase#latest_published_version()","plan#latest_update()","project#latest_update()","phase#latest_version()","applicationhelper#link_to_add_object()","plan#lock_all_sections()","plan#lock_section()","planscontroller#lock_section()","plan#locked()","planscontroller#locked()","project#name()","user#name()","registrationscontroller#needs_password?()","ability::new()","organisationscontroller#new()","projectscontroller#new()","themescontroller#new()","userorgrolescontroller#new()","userroletypescontroller#new()","userstatusescontroller#new()","usertypescontroller#new()","userscontroller#new()","dmptemplate#org_type()","user#org_type()","user#organisation()","user#organisation=()","user#organisation_id()","user#organisation_id=()","projectscontroller#orgs_of_type()","organisation::orgs_with_parent_of_type()","organisation::other_organisations()","dmptemplate::own_institutional_templates()","project#owner()","organisationscontroller#parent()","usermailer#permissions_change_notification()","settings::planscontroller#plan()","planshelper#plan_settings_indicator()","projectscontroller#possible_guidance()","projectscontroller#possible_templates()","exportedplan#principal_investigator()","usermailer#project_access_removed_notification()","exportedplan#project_data_contact()","exportedplan#project_description()","exportedplan#project_identifier()","planshelper#project_list_body()","planshelper#project_list_head()","exportedplan#project_name()","project::projects_for_user()","organisation#published_templates()","question#question_themes?()","exportedplan#questions()","exportedplan#questions_for_section()","plan#readable_by()","project#readable_by()","users::omniauthshibbolethrequestcontroller#redirect()","customfailure#redirect_url()","applicationhelper#resource()","applicationhelper#resource_name()","customfailure#respond()","staticpagescontroller#roadmap()","organisation#root()","exportedplan#sanitize_text()","object#scoped_collection()","plan#section_answers()","planscontroller#section_answers()","exportedplan#sections()","plan#sections()","plan#settings()","settings::planscontroller#settings_json()","settings::projectscontroller#settings_json()","projectscontroller#share()","project#shared()","project#shared?()","usermailer#sharing_notification()","users::omniauthcallbackscontroller#shibboleth()","organisation#short_name()","commentscontroller#show()","projectscontroller#show()","settings::planscontroller#show()","settings::projectscontroller#show()","themescontroller#show()","userorgrolescontroller#show()","userroletypescontroller#show()","userstatusescontroller#show()","usertypescontroller#show()","userscontroller#show()","plan#status()","planscontroller#status()","applicationcontroller#store_location()","plan#super_settings()","project#template_owner()","organisationscontroller#templates()","dmptemplate::templates_org_type()","plan#title()","comment#to_s()","dmptemplate#to_s()","guidancegroup#to_s()","option#to_s()","optionwarning#to_s()","organisation#to_s()","phase#to_s()","question#to_s()","questionformat#to_s()","section#to_s()","suggestedanswer#to_s()","theme#to_s()","version#to_s()","project#unit_id()","project#unit_id=()","plan#unlock_all_sections()","planscontroller#unlock_all_sections()","plan#unlock_section()","planscontroller#unlock_section()","commentscontroller#update()","planscontroller#update()","projectgroupscontroller#update()","projectscontroller#update()","registrationscontroller#update()","settings::planscontroller#update()","settings::projectscontroller#update()","themescontroller#update()","userorgrolescontroller#update()","userroletypescontroller#update()","userstatusescontroller#update()","usertypescontroller#update()","userscontroller#update()","guidancescontroller#update_phases()","guidancescontroller#update_questions()","guidancescontroller#update_sections()","guidancescontroller#update_versions()","organisation#warning()","plan#warning()","planscontroller#warning()",""],"info":[["Ability","","Ability.html","",""],["ActiveAdmin","","ActiveAdmin.html","",""],["ActiveAdmin::Views","","ActiveAdmin/Views.html","",""],["ActiveAdmin::Views::Pages","","ActiveAdmin/Views/Pages.html","",""],["ActiveAdmin::Views::Pages::Base","","ActiveAdmin/Views/Pages/Base.html","","
Description: — This controller is responsible for all the actions in the admin interface …\n"],["ExistingUsersController","","ExistingUsersController.html","",""],["ExportedPlan","","ExportedPlan.html","",""],["FileType","","FileType.html","",""],["FileUpload","","FileUpload.html","",""],["Guidance","","Guidance.html","","
Project: — DMPonline v4\n
Description: — This class keeps the information organisations enter to support users …\n"],["GuidanceGroup","","GuidanceGroup.html","",""],["GuidanceGroupsController","","GuidanceGroupsController.html","",""],["GuidancesController","","GuidancesController.html","",""],["HomeController","","HomeController.html","",""],["Object","","Object.html","",""],["Option","","Option.html","",""],["OptionWarning","","OptionWarning.html","",""],["Organisation","","Org.html","",""],["OrganisationType","","OrganisationType.html","",""],["OrganisationUsersController","","OrganisationUsersController.html","",""],["OrganisationsController","","OrganisationsController.html","",""],["PasswordsController","","PasswordsController.html","",""],["Phase","","Phase.html","","
Project: — DMPonline v4\n
Description: — This model describes informmation about the phase of a plan, it's …\n"],["Plan","","Plan.html","",""],["PlanSection","","PlanSection.html","",""],["PlansController","","PlansController.html","",""],["PlansHelper","","PlansHelper.html","",""],["Project","","Project.html","",""],["ProjectGroup","","ProjectGroup.html","",""],["ProjectGroupsController","","ProjectGroupsController.html","",""],["ProjectPartner","","ProjectPartner.html","",""],["ProjectsController","","ProjectsController.html","",""],["Question","","Question.html","",""],["QuestionFormat","","QuestionFormat.html","",""],["RegistrationsController","","RegistrationsController.html","","
delete a version, sections and questions\n"],["admin_destroyquestion","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroyquestion","()","
delete a version, sections and questions\n"],["admin_destroysection","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroysection","()","
delete a section and questions\n"],["admin_destroysuggestedanswer","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroysuggestedanswer","()","
delete a suggested answer\n"],["admin_destroyversion","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroyversion","()","
delete a version, sections and questions\n"],["admin_details","ExportedPlan","ExportedPlan.html#method-i-admin_details","()",""],["admin_edit","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_edit","()","
GET /guidance_groups/1/edit\n"],["admin_edit","GuidancesController","GuidancesController.html#method-i-admin_edit","()","
GET /guidances/1/edit\n"],["admin_edit","OrganisationsController","OrganisationsController.html#method-i-admin_edit","()","
GET /organisations/1/edit\n"],["admin_index","DmptemplatesController","DmptemplatesController.html#method-i-admin_index","()","
GET /dmptemplates GET /dmptemplates.json\n"],["admin_index","GuidancesController","GuidancesController.html#method-i-admin_index","()","
GET /guidances GET /guidances.json\n"],["admin_index","OrganisationUsersController","OrganisationUsersController.html#method-i-admin_index","()",""],["admin_new","DmptemplatesController","DmptemplatesController.html#method-i-admin_new","()","
GET /dmptemplates/new GET /dmptemplates/new.json\n"],["admin_new","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_new","()","
GET add new guidance groups\n"],["admin_new","GuidancesController","GuidancesController.html#method-i-admin_new","()",""],["admin_phase","DmptemplatesController","DmptemplatesController.html#method-i-admin_phase","()","
show and edit a phase of the template\n"],["admin_previewphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_previewphase","()","
preview a phase\n"],["admin_show","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_show","()","
GET /guidance_groups/1 GET /guidance_groups/1.json\n"],["admin_show","GuidancesController","GuidancesController.html#method-i-admin_show","()","
GET /guidances/1 GET /guidances/1.json\n"],["admin_show","OrganisationsController","OrganisationsController.html#method-i-admin_show","()","
GET /organisations/1 GET /organisations/1.json\n"],["admin_template","DmptemplatesController","DmptemplatesController.html#method-i-admin_template","()","
GET /dmptemplates/1 GET /dmptemplates/1.json\n"],["admin_update","DmptemplatesController","DmptemplatesController.html#method-i-admin_update","()","
PUT /dmptemplates/1 PUT /dmptemplates/1.json\n"],["admin_update","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_update","()","
PUT /guidance_groups/1 PUT /guidance_groups/1.json\n"],["admin_update","GuidancesController","GuidancesController.html#method-i-admin_update","()","
PUT /guidances/1 PUT /guidances/1.json\n"],["admin_update","OrganisationsController","OrganisationsController.html#method-i-admin_update","()","
PUT /organisations/1 PUT /organisations/1.json\n"],["admin_updatephase","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatephase","()","
update a phase of a template\n"],["admin_updatequestion","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatequestion","()","
update a question of a template\n"],["admin_updatesection","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatesection","()","
update a section of a template\n"],["admin_updatesuggestedanswer","DmptemplatesController","DmptemplatesController.html#method-i-admin_updatesuggestedanswer","()","
update a suggested answer of a template\n"],["admin_updateversion","DmptemplatesController","DmptemplatesController.html#method-i-admin_updateversion","()","
update a version of a template\n"],["administerable_by","Plan","Plan.html#method-i-administerable_by","(user_id)",""],["administerable_by","Project","Project.html#method-i-administerable_by","(user_id)",""],["after_confirmation_path_for","ConfirmationsController","ConfirmationsController.html#method-i-after_confirmation_path_for","(resource_name, resource)",""],["after_resetting_password_path_for","PasswordsController","PasswordsController.html#method-i-after_resetting_password_path_for","(resource)",""],["after_sign_in_error_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_in_error_path_for","(resource)",""],["after_sign_in_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_in_path_for","(resource)",""],["after_sign_up_error_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_up_error_path_for","(resource)",""],["after_sign_up_path_for","ApplicationController","ApplicationController.html#method-i-after_sign_up_path_for","(resource)",""],["all_guidance_groups","Organisation","Org.html#method-i-all_guidance_groups","()",""],["all_sections","Organisation","Org.html#method-i-all_sections","(version_id)",""],["answer","Plan","Plan.html#method-i-answer","(qid, create_if_missing = true)",""],["answer","PlansController","PlansController.html#method-i-answer","()",""],["archive","CommentsController","CommentsController.html#method-i-archive","()","
Renders the content for the footer\n"],["by_organisation","Guidance","Guidance.html#method-c-by_organisation","(org_id)","
all guidance that belong to an organisation\n"],["children","OrganisationsController","OrganisationsController.html#method-i-children","()",""],["contact_us","StaticPagesController","StaticPagesController.html#method-i-contact_us","()",""],["create","AnswersController","AnswersController.html#method-i-create","()","
POST /answers POST /answers.json\n"],["create","CommentsController","CommentsController.html#method-i-create","()","
POST /comments POST /comments.json\n"],["create","ContactsController","ContactsController.html#method-i-create","()",""],["create","OrganisationsController","OrganisationsController.html#method-i-create","()","
POST /organisations POST /organisations.json\n"],["create","ProjectGroupsController","ProjectGroupsController.html#method-i-create","()",""],["create","ProjectsController","ProjectsController.html#method-i-create","()","
POST /projects POST /projects.json\n"],["create","RegistrationsController","RegistrationsController.html#method-i-create","()","
POST /resource\n"],["create","SessionsController","SessionsController.html#method-i-create","()",""],["create","SplashLogsController","SplashLogsController.html#method-i-create","()","
POST /answers POST /answers.json\n"],["create","ThemesController","ThemesController.html#method-i-create","()","
POST /themes POST /themes.json\n"],["create","UserOrgRolesController","UserOrgRolesController.html#method-i-create","()","
POST /user_org_roles POST /user_org_roles.json\n"],["create","UserRoleTypesController","UserRoleTypesController.html#method-i-create","()","
POST /user_role_types POST /user_role_types.json\n"],["create","UserStatusesController","UserStatusesController.html#method-i-create","()","
POST /user_statuses POST /user_statuses.json\n"],["create","UserTypesController","UserTypesController.html#method-i-create","()","
POST /user_types POST /user_types.json\n"],["create","UsersController","UsersController.html#method-i-create","()","
POST /users POST /users.json\n"],["create_plans","Project","Project.html#method-i-create_plans","()",""],["created_by","Project","Project.html#method-i-created_by","(user_id)",""],["current_organisation","User","User.html#method-i-current_organisation","()",""],["delete_recent_locks","Plan","Plan.html#method-i-delete_recent_locks","(user_id)",""],["delete_recent_locks","PlansController","PlansController.html#method-i-delete_recent_locks","()",""],["destroy","OrganisationsController","OrganisationsController.html#method-i-destroy","()","
GET /comments/1/edit\n"],["edit","PlansController","PlansController.html#method-i-edit","()","
GET /plans/1/edit\n"],["edit","ProjectsController","ProjectsController.html#method-i-edit","()","
GET /projects/1/edit Should this be removed?\n"],["edit","ThemesController","ThemesController.html#method-i-edit","()","
GET /themes/1/edit\n"],["edit","UserOrgRolesController","UserOrgRolesController.html#method-i-edit","()","
GET /user_org_roles/1/edit\n"],["edit","UserRoleTypesController","UserRoleTypesController.html#method-i-edit","()","
GET /user_role_types/1/edit\n"],["edit","UserStatusesController","UserStatusesController.html#method-i-edit","()","
GET /user_statuses/1/edit\n"],["edit","UserTypesController","UserTypesController.html#method-i-edit","()","
GET /user_types/1/edit\n"],["edit","UsersController","UsersController.html#method-i-edit","()","
GET /users/1/edit\n"],["editable_by","Plan","Plan.html#method-i-editable_by","(user_id)",""],["editable_by","Project","Project.html#method-i-editable_by","(user_id)",""],["email","ProjectGroup","ProjectGroup.html#method-i-email","()",""],["email=","ProjectGroup","ProjectGroup.html#method-i-email-3D","(new_email)",""],["estimate_space_used","Plan","Plan.html#method-i-estimate_space_used","(used_height)","
Based on the height of the text gathered so far and the available vertical\nspace of the pdf, estimate …\n"],["export","PlansController","PlansController.html#method-i-export","()",""],["export","ProjectsController","ProjectsController.html#method-i-export","()",""],["filter","User","User.html#method-i-filter","(query)",""],["funder","ExportedPlan","ExportedPlan.html#method-i-funder","()",""],["funder","Project","Project.html#method-i-funder","()",""],["funder_id","Project","Project.html#method-i-funder_id","()",""],["funder_id=","Project","Project.html#method-i-funder_id-3D","(new_funder_id)",""],["funder_name","Project","Project.html#method-i-funder_name","()",""],["funder_name=","Project","Project.html#method-i-funder_name-3D","(new_funder_name)",""],["funders_and_own_templates","Dmptemplate","Dmptemplate.html#method-c-funders_and_own_templates","(org_id)","
returns an array with all funders and own institutional templates\n"],["funders_templates","Dmptemplate","Dmptemplate.html#method-c-funders_templates","()","
returns all funders templates\n"],["get_guidance_group_templates?","Guidance","Guidance.html#method-i-get_guidance_group_templates-3F","(guidance_group)",""],["get_plan_list_columns","ApplicationController","ApplicationController.html#method-i-get_plan_list_columns","()",""],["get_settings","Settings::PlansController","Settings/PlansController.html#method-i-get_settings","()",""],["get_settings","Settings::ProjectsController","Settings/ProjectsController.html#method-i-get_settings","()",""],["get_suggested_answer","Question","Question.html#method-i-get_suggested_answer","(org_id)","
get suggested answer belonging to the currents user for this question\n"],["global_sections","Version","Version.html#method-i-global_sections","()",""],["grant_title","ExportedPlan","ExportedPlan.html#method-i-grant_title","()",""],["guidance_for_question","Plan","Plan.html#method-i-guidance_for_question","(question)",""],["guidance_for_question","Question","Question.html#method-i-guidance_for_question","(question, org_admin)","
guidance for question in the org admin\n"],["guidance_groups_excluding","GuidanceGroup","GuidanceGroup.html#method-c-guidance_groups_excluding","(excluded_orgs)",""],["has_customisations?","Dmptemplate","Dmptemplate.html#method-i-has_customisations-3F","(org_id, temp)","
verify if a template has customisation by current user's org\n"],["has_published_versions?","Dmptemplate","Dmptemplate.html#method-i-has_published_versions-3F","()","
verify if there are any publish version for the template\n"],["has_sections","Phase","Phase.html#method-i-has_sections","()","
verify if a phase has a published version or a version with one or more\nsections\n"],["height_of_text","Plan","Plan.html#method-i-height_of_text","(text, font_size_inc = 0, vertical_margin = 0)","
Take a guess at the vertical height (in mm) of the given text based on the\nfont-size and left/right margins …\n"],["in_group_belonging_to?","Guidance","Guidance.html#method-i-in_group_belonging_to-3F","(organisation_id)","
verifies if one guidance belongs to a org\n"],["index","CommentsController","CommentsController.html#method-i-index","()","
GET /comments GET /comments.json\n"],["index","ExistingUsersController","ExistingUsersController.html#method-i-index","()",""],["index","HomeController","HomeController.html#method-i-index","()",""],["index","OrganisationsController","OrganisationsController.html#method-i-index","()","
GET /organisations GET /organisations.json\n"],["index","ProjectsController","ProjectsController.html#method-i-index","()","
GET /projects GET /projects.json\n"],["index","ThemesController","ThemesController.html#method-i-index","()","
GET /themes GET /themes.json\n"],["index","UserOrgRolesController","UserOrgRolesController.html#method-i-index","()","
GET /user_org_roles GET /user_org_roles.json\n"],["index","UserRoleTypesController","UserRoleTypesController.html#method-i-index","()","
GET /user_role_types GET /user_role_types.json\n"],["index","UserStatusesController","UserStatusesController.html#method-i-index","()","
GET /user_statuses GET /user_statuses.json\n"],["index","UserTypesController","UserTypesController.html#method-i-index","()","
GET /user_types GET /user_types.json\n"],["institution","ExportedPlan","ExportedPlan.html#method-i-institution","()",""],["institution_id","Project","Project.html#method-i-institution_id","()",""],["institution_id=","Project","Project.html#method-i-institution_id-3D","(new_institution_id)",""],["can_super_admin?","User","User.html#method-i-is_admin-3F","()",""],["can_org_admin?","User","User.html#method-i-is_org_admin-3F","()",""],["javascript","ApplicationHelper","ApplicationHelper.html#method-i-javascript","(*files)",""],["last_edited","Project","Project.html#method-i-last_edited","()",""],["latest_published_version","Phase","Phase.html#method-i-latest_published_version","()","
Verify if this phase has any published versions\n"],["latest_update","Plan","Plan.html#method-i-latest_update","()",""],["latest_update","Project","Project.html#method-i-latest_update","()",""],["latest_version","Phase","Phase.html#method-i-latest_version","()",""],["link_to_add_object","ApplicationHelper","ApplicationHelper.html#method-i-link_to_add_object","(name, f, association, css_class, i)",""],["lock_all_sections","Plan","Plan.html#method-i-lock_all_sections","(user_id)",""],["lock_section","Plan","Plan.html#method-i-lock_section","(section_id, user_id, release_time = 60)",""],["lock_section","PlansController","PlansController.html#method-i-lock_section","()",""],["locked","Plan","Plan.html#method-i-locked","(section_id, user_id)",""],["locked","PlansController","PlansController.html#method-i-locked","()",""],["name","Project","Project.html#method-i-name","()","
Getters to match 'My plans' columns\n"],["name","User","User.html#method-i-name","(use_email = true)",""],["needs_password?","RegistrationsController","RegistrationsController.html#method-i-needs_password-3F","(user, params)","
check if we need password to update user data ie if password or email was\nchanged extend this as needed …\n"],["new","Ability","Ability.html#method-c-new","(user)",""],["new","OrganisationsController","OrganisationsController.html#method-i-new","()","
GET /organisations/new GET /organisations/new.json\n"],["new","ProjectsController","ProjectsController.html#method-i-new","()","
GET /projects/new GET /projects/new.json\n"],["new","ThemesController","ThemesController.html#method-i-new","()","
GET /themes/new GET /themes/new.json\n"],["new","UserOrgRolesController","UserOrgRolesController.html#method-i-new","()","
GET /user_org_roles/new GET /user_org_roles/new.json\n"],["new","UserRoleTypesController","UserRoleTypesController.html#method-i-new","()","
GET /user_role_types/new GET /user_role_types/new.json\n"],["new","UserStatusesController","UserStatusesController.html#method-i-new","()","
GET /user_statuses/new GET /user_statuses/new.json\n"],["new","UserTypesController","UserTypesController.html#method-i-new","()","
GET /user_types/new GET /user_types/new.json\n"],["new","UsersController","UsersController.html#method-i-new","()","
GET /users/new GET /users/new.json\n"],["org_type","Dmptemplate","Dmptemplate.html#method-i-org_type","()",""],["org_type","User","User.html#method-i-org_type","()",""],["organisation","User","User.html#method-i-organisation","()",""],["organisation=","User","User.html#method-i-organisation-3D","(new_organisation)",""],["organisation_id","User","User.html#method-i-organisation_id","()",""],["organisation_id=","User","User.html#method-i-organisation_id-3D","(new_organisation_id)",""],["orgs_of_type","ProjectsController","ProjectsController.html#method-i-orgs_of_type","(org_type_name, published_templates = false)",""],["orgs_with_parent_of_type","Organisation","Org.html#method-c-orgs_with_parent_of_type","(org_type)","
retrieves info off a child org\n"],["other_organisations","Organisation","Org.html#method-c-other_organisations","()",""],["own_institutional_templates","Dmptemplate","Dmptemplate.html#method-c-own_institutional_templates","(org_id)","
returns all institutional templates bellowing to the current user's org\n"],["owner","Project","Project.html#method-i-owner","()",""],["parent","OrganisationsController","OrganisationsController.html#method-i-parent","()",""],["permissions_change_notification","UserMailer","UserMailer.html#method-i-permissions_change_notification","(project_group)",""],["plan","Settings::PlansController","Settings/PlansController.html#method-i-plan","()",""],["plan_settings_indicator","PlansHelper","PlansHelper.html#method-i-plan_settings_indicator","(plan)","
Shows whether the user has default, template-default or custom settings for\nthe given plan.\n"],["possible_guidance","ProjectsController","ProjectsController.html#method-i-possible_guidance","()",""],["possible_templates","ProjectsController","ProjectsController.html#method-i-possible_templates","()","
GET /projects/possible_templates.json\n"],["principal_investigator","ExportedPlan","ExportedPlan.html#method-i-principal_investigator","()",""],["project_access_removed_notification","UserMailer","UserMailer.html#method-i-project_access_removed_notification","(user, project)",""],["project_data_contact","ExportedPlan","ExportedPlan.html#method-i-project_data_contact","()",""],["project_description","ExportedPlan","ExportedPlan.html#method-i-project_description","()",""],["project_identifier","ExportedPlan","ExportedPlan.html#method-i-project_identifier","()",""],["project_list_body","PlansHelper","PlansHelper.html#method-i-project_list_body","(column, project)",""],["project_list_head","PlansHelper","PlansHelper.html#method-i-project_list_head","(column)",""],["project_name","ExportedPlan","ExportedPlan.html#method-i-project_name","()","
Getters to match Settings::Dmptemplate::VALID_ADMIN_FIELDS\n"],["projects_for_user","Project","Project.html#method-c-projects_for_user","(user_id)",""],["published_templates","Organisation","Org.html#method-i-published_templates","()",""],["question_themes?","Question","Question.html#method-i-question_themes-3F","()","
sections taken from fields settings\n"],["sections","Plan","Plan.html#method-i-sections","()",""],["settings","Plan","Plan.html#method-i-settings","(key)","
Proxy through to the template settings (or defaults if this plan\ndoesn't have an associated template) …\n"],["settings_json","Settings::PlansController","Settings/PlansController.html#method-i-settings_json","()",""],["settings_json","Settings::ProjectsController","Settings/ProjectsController.html#method-i-settings_json","()",""],["share","ProjectsController","ProjectsController.html#method-i-share","()",""],["shared","Project","Project.html#method-i-shared","()",""],["shared?","Project","Project.html#method-i-shared-3F","()",""],["sharing_notification","UserMailer","UserMailer.html#method-i-sharing_notification","(project_group)",""],["shibboleth","Users::OmniauthCallbacksController","Users/OmniauthCallbacksController.html#method-i-shibboleth","()",""],["short_name","Organisation","Org.html#method-i-short_name","()",""],["show","CommentsController","CommentsController.html#method-i-show","()","
GET /comments/1 GET /comments/1.json\n"],["show","ProjectsController","ProjectsController.html#method-i-show","()","
GET /projects/1 GET /projects/1.json\n"],["show","Settings::PlansController","Settings/PlansController.html#method-i-show","()",""],["show","Settings::ProjectsController","Settings/ProjectsController.html#method-i-show","()",""],["show","ThemesController","ThemesController.html#method-i-show","()","
GET /themes/1 GET /themes/1.json\n"],["show","UserOrgRolesController","UserOrgRolesController.html#method-i-show","()","
GET /user_org_roles/1 GET /user_org_roles/1.json\n"],["show","UserRoleTypesController","UserRoleTypesController.html#method-i-show","()","
GET /user_role_types/1 GET /user_role_types/1.json\n"],["show","UserStatusesController","UserStatusesController.html#method-i-show","()","
GET /user_statuses/1 GET /user_statuses/1.json\n"],["show","UserTypesController","UserTypesController.html#method-i-show","()","
GET /user_types/1 GET /user_types/1.json\n"],["show","UsersController","UsersController.html#method-i-show","()","
GET /users/1 GET /users/1.json\n"],["status","Plan","Plan.html#method-i-status","()",""],["status","PlansController","PlansController.html#method-i-status","()","
GET /status/1.json\n"],["store_location","ApplicationController","ApplicationController.html#method-i-store_location","()",""],["super_settings","Plan","Plan.html#method-i-super_settings","(key)",""],["template_owner","Project","Project.html#method-i-template_owner","()",""],["templates","OrganisationsController","OrganisationsController.html#method-i-templates","()",""],["templates_org_type","Dmptemplate","Dmptemplate.html#method-c-templates_org_type","(ot)",""],["title","Plan","Plan.html#method-i-title","()",""],["to_s","Comment","Comment.html#method-i-to_s","()",""],["to_s","Dmptemplate","Dmptemplate.html#method-i-to_s","()",""],["to_s","GuidanceGroup","GuidanceGroup.html#method-i-to_s","()",""],["to_s","Option","Option.html#method-i-to_s","()",""],["to_s","OptionWarning","OptionWarning.html#method-i-to_s","()",""],["to_s","Organisation","Org.html#method-i-to_s","()",""],["to_s","Phase","Phase.html#method-i-to_s","()",""],["to_s","Question","Question.html#method-i-to_s","()",""],["to_s","QuestionFormat","QuestionFormat.html#method-i-to_s","()",""],["to_s","Section","Section.html#method-i-to_s","()",""],["to_s","SuggestedAnswer","SuggestedAnswer.html#method-i-to_s","()",""],["to_s","Theme","Theme.html#method-i-to_s","()",""],["to_s","Version","Version.html#method-i-to_s","()",""],["unit_id","Project","Project.html#method-i-unit_id","()",""],["unit_id=","Project","Project.html#method-i-unit_id-3D","(new_unit_id)",""],["unlock_all_sections","Plan","Plan.html#method-i-unlock_all_sections","(user_id)",""],["unlock_all_sections","PlansController","PlansController.html#method-i-unlock_all_sections","()",""],["unlock_section","Plan","Plan.html#method-i-unlock_section","(section_id, user_id)",""],["unlock_section","PlansController","PlansController.html#method-i-unlock_section","()",""],["update","CommentsController","CommentsController.html#method-i-update","()","
PUT /comments/1 PUT /comments/1.json\n"],["update","PlansController","PlansController.html#method-i-update","()","
PUT /plans/1 PUT /plans/1.json\n"],["update","ProjectGroupsController","ProjectGroupsController.html#method-i-update","()",""],["update","ProjectsController","ProjectsController.html#method-i-update","()","
PUT /projects/1 PUT /projects/1.json\n"],["update","RegistrationsController","RegistrationsController.html#method-i-update","()",""],["update","Settings::PlansController","Settings/PlansController.html#method-i-update","()",""],["update","Settings::ProjectsController","Settings/ProjectsController.html#method-i-update","()",""],["update","ThemesController","ThemesController.html#method-i-update","()","
PUT /themes/1 PUT /themes/1.json\n"],["update","UserOrgRolesController","UserOrgRolesController.html#method-i-update","()","
PUT /user_org_roles/1 PUT /user_org_roles/1.json\n"],["update","UserRoleTypesController","UserRoleTypesController.html#method-i-update","()","
PUT /user_role_types/1 PUT /user_role_types/1.json\n"],["update","UserStatusesController","UserStatusesController.html#method-i-update","()","
PUT /user_statuses/1 PUT /user_statuses/1.json\n"],["update","UserTypesController","UserTypesController.html#method-i-update","()","
PUT /user_types/1 PUT /user_types/1.json\n"],["update","UsersController","UsersController.html#method-i-update","()","
PUT /users/1 PUT /users/1.json\n"],["update_phases","GuidancesController","GuidancesController.html#method-i-update_phases","()","
setup variables for use in the dynamic updating\n"],["update_questions","GuidancesController","GuidancesController.html#method-i-update_questions","()",""],["update_sections","GuidancesController","GuidancesController.html#method-i-update_sections","()",""],["update_versions","GuidancesController","GuidancesController.html#method-i-update_versions","()",""],["warning","Organisation","Org.html#method-i-warning","(option_id)",""],["warning","Plan","Plan.html#method-i-warning","(option_id)",""],["warning","PlansController","PlansController.html#method-i-warning","()",""],["README","","README_rdoc.html","","
DMPonline v4\n
DMPonline is the DCC's data management planning tool, available at\ndmponline.dcc.ac.uk …\n"]]}}
\ No newline at end of file
diff --git a/html/table_of_contents.html b/html/table_of_contents.html
index 8d505d3..f6e52e3 100644
--- a/html/table_of_contents.html
+++ b/html/table_of_contents.html
@@ -160,7 +160,7 @@
OptionWarning
#warning — PlansController
diff --git a/lib/assets/javascripts/admin.js b/lib/assets/javascripts/admin.js
index 6354869..f3d3aaf 100644
--- a/lib/assets/javascripts/admin.js
+++ b/lib/assets/javascripts/admin.js
@@ -1,5 +1,5 @@
//= require tinymce
-/*
+/*
**Project: DMPRoadmap
**Description: This file include all javascript regarding admin interface
**Copyright: Digital Curation Centre and University of California Curation Center
@@ -20,7 +20,7 @@
}, 1000);
}
}
-
+
//set the tinymce popover help text
$(".template_desc_popover, .phase_desc_popover, .version_desc_popover, .section_desc_popover, .question_format_popover," +
" .default_answer_popover, .suggested_answer_popover, .question_guidance_popover, .question_themes_popover," +
@@ -29,13 +29,13 @@
" .guidance_by_question_popover, .guidance_group_select_popover, .org_abbr_popover").on('click', function(e) {
e.preventDefault();
}).popover();
-
+
//show or hide divs based on what the user selects from the question format. New question
$('.ques_format').on("change", function(e) {
var s_id = $(this).prev(".section_id").val();
-
+
var selected_format = $('#new-select-format-'+ s_id).val();
-
+
//text area
if (selected_format == 1){
$("#new-options-"+ s_id).hide();
@@ -175,7 +175,7 @@
//action for show or hide template editing display
$('#edit_template_button').click(function(e){
e.preventDefault();
-
+
$('#edit_template_div').show();
$('#show_template_div').hide();
});
@@ -220,18 +220,18 @@
$('#add_question_block_div_'+ s_id).show();
$('#add_question_button_div_'+ s_id).hide();
e.preventDefault();
-
+
});
-
- //if question text area is empty send alert
- $('.new_question_save_button').click(function(e){
+
+ //if question text area is empty send alert
+ $('.new_question_save_button').click(function(e){
var s_id = $(this).prev(".section_id").val();
if ($('#new_question_text_'+ s_id).val() == ''){
alert(I18n.t("js.question_text_empty"));
return false;
}
});
-
+
//action for cancelling a new question
$('.cancel_add_new_question').click(function(e){
var s_id_new = $(this).prev(".section_id_new").val();
@@ -280,7 +280,7 @@
$('#show_suggested_answer_div_'+ q_id).hide();
e.preventDefault();
});
-
+
//GUIDANCE
//action for adding a new guidance next to the question
$('.add_guidance_button').click(function(e){
@@ -305,44 +305,44 @@
$('#show_guidance_div_'+ q_id).hide();
e.preventDefault();
});
-
-
- //Add new guidance Alerts
+
+
+ //Add new guidance Alerts
$("#return_to_new_guidance").click(function(){
$('#new_guidance_alert_dialog').modal("hide");
});
-
-
+
+
$('#new_guidance_submit').click( function(e){
// $('#new_guidance_alert_dialog').on("hide", function(){
-
+
var alert_message = [];
//verify if text area is not nil
var editorContent = tinyMCE.get('guidance-text').getContent();
if (editorContent == ''){
alert_message.push(I18n.t("js.add_guidance_text"));
- }
- //verify dropdown with questions has a selected option if guidance for a question being used
+ }
+ //verify dropdown with questions has a selected option if guidance for a question being used
if ($('#g_options').val() == '2') {
if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){
alert_message.push(I18n.t("js.select_question"));
}
}
- //verify dropdown with questions has a selected option if guidance for a question being used
+ //verify dropdown with questions has a selected option if guidance for a question being used
if ($('#g_options').val() == '1' ){
if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){
alert_message.push(I18n.t("js.select_at_least_one_theme"));
}
}
- //verify if guidance group is selected
+ //verify if guidance group is selected
if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) {
alert_message.push(I18n.t("js.select_guidance_group"));
}
if(alert_message.length == 0){
//clear dropdowns before submission
$('#new_guidance_alert_dialog').modal("hide");
-
+
if ($('#g_options').val() == '2'){
$('#guidance_theme_ids').val(null);
}
@@ -351,12 +351,12 @@
}
$('#new_guidance_form').submit();
return false;
-
+
}
else if (alert_message.length != 0){
var message = '';
$('#new_guidance_alert_dialog').on("show", function(){
-
+
$("#missing_fields_new_guidance").empty();
$.each(alert_message, function(key, value){
message += "
"+value+"
";
@@ -368,43 +368,43 @@
delete alert_message;
e.preventDefault();
});
-
+
//edit guidance alerts
$("#return_to_edit_guidance").click(function(){
$('#edit_guidance_alert_dialog').modal("hide");
});
-
-
+
+
$('#edit_guidance_submit').click( function(e){
// $('#new_guidance_alert_dialog').on("hide", function(){
-
+
var alert_message = [];
//verify if text area is not nil
var editorContent = tinyMCE.get('guidance-text').getContent();
if (editorContent == ''){
alert_message.push(I18n.t("js.add_guidance_text"));
- }
- //verify dropdown with questions has a selected option if guidance for a question being used
+ }
+ //verify dropdown with questions has a selected option if guidance for a question being used
if ($('#g_options').val() == '2') {
if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){
alert_message.push(I18n.t("js.select_question"));
}
}
- //verify dropdown with questions has a selected option if guidance for a question being used
+ //verify dropdown with questions has a selected option if guidance for a question being used
if ($('#g_options').val() == '1' ){
if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){
alert_message.push(I18n.t("js.select_at_least_one_theme"));
}
}
- //verify if guidance group is selected
+ //verify if guidance group is selected
if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) {
alert_message.push(I18n.t("js.select_guidance_group"));
}
-
+
if(alert_message.length == 0){
//clear dropdowns before submission
$('#edit_guidance_alert_dialog').modal("hide");
-
+
if ($('#g_options').val() == '2'){ $('#guidance_theme_ids').val(null);}
if($('#g_options').val() == '1'){$('#questions_select').val(null);}
$('#edit_guidance_form').submit();
@@ -413,7 +413,7 @@
else if (alert_message.length != 0){
var message = '';
$('#edit_guidance_alert_dialog').on("show", function(){
-
+
$("#missing_fields_edit_guidance").empty();
$.each(alert_message, function(key, value){
message += "
"+value+"
";
@@ -424,9 +424,9 @@
}
delete alert_message;
e.preventDefault();
- });
-
-
+ });
+
+
//Validate banner_text area for less than 165 character
$("form#edit_org_details").submit(function(){
if (getStats('org_banner_text').chars > 165) {
@@ -434,10 +434,10 @@
return false;
}
});
-
-
-
-
+
+
+
+
});
@@ -459,8 +459,8 @@
// Returns text statistics for the specified editor by id
function getStats(id) {
var body = tinymce.get(id).getBody(), text = tinymce.trim(body.innerText || body.textContent);
-
+
return {
chars: text.length
};
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/test/fixtures/templates.yml b/test/fixtures/templates.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/templates.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/functional/organisations_controller_test.rb b/test/functional/organisations_controller_test.rb
index c43d4f4..9518993 100644
--- a/test/functional/organisations_controller_test.rb
+++ b/test/functional/organisations_controller_test.rb
@@ -18,7 +18,7 @@
end
test "should create organisation" do
- assert_difference('Organisation.count') do
+ assert_difference('Org.count') do
post :create, organisation: { abbreviation: @organisation.abbreviation, banner_file_id: @organisation.banner_file_id, description: @organisation.description, domain: @organisation.domain, logo_file_id: @organisation.logo_file_id, name: @organisation.name, stylesheet_file_id: @organisation.stylesheet_file_id, target_url: @organisation.target_url, type_id: @organisation.type_id, wayfless_entite: @organisation.wayfless_entite }
end
@@ -41,7 +41,7 @@
end
test "should destroy organisation" do
- assert_difference('Organisation.count', -1) do
+ assert_difference('Org.count', -1) do
delete :destroy, id: @organisation
end
diff --git a/test/models/template_test.rb b/test/models/template_test.rb
new file mode 100644
index 0000000..a8346d6
--- /dev/null
+++ b/test/models/template_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TemplateTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/dmptemplate_test.rb b/test/unit/dmptemplate_test.rb
index 595d984..805540a 100644
--- a/test/unit/dmptemplate_test.rb
+++ b/test/unit/dmptemplate_test.rb
@@ -228,7 +228,7 @@
# ---------- own_institutional_templates ----------
test "own_institutional_templates returns all templates belonging to given org_id" do
- Organisation.find_each do |org|
+ Org.find_each do |org|
result_templates = Dmptemplate.own_institutional_templates(org.id)
org.dmptemplates.each do |template|
assert_includes(result_templates, template, "Template: #{template.title} not returned by own_institutional_templates")
@@ -238,7 +238,7 @@
# ---------- funders_and_own_templates ----------
test "funders_and_own_templates returns all funder and own given org_id templates" do
- Organisation.find_each do |org|
+ Org.find_each do |org|
result_templates = Dmptemplate.funders_and_own_templates(org.id)
org.dmptemplates.each do |template|
assert_includes(result_templates, template, "Template #{template.title} not returned by funders and own templates")
diff --git a/test/unit/guidance_group_test.rb b/test/unit/guidance_group_test.rb
index 1b7e6c8..c5b4716 100644
--- a/test/unit/guidance_group_test.rb
+++ b/test/unit/guidance_group_test.rb
@@ -9,7 +9,7 @@
@org_type = OrganisationType.first
- @organisations = Organisation.all
+ @organisations = Org.all
end
# ---------- can_view? ----------
diff --git a/test/unit/guidance_test.rb b/test/unit/guidance_test.rb
index 9091309..8157e60 100644
--- a/test/unit/guidance_test.rb
+++ b/test/unit/guidance_test.rb
@@ -9,7 +9,7 @@
@org_type = OrganisationType.first
- @organisations = Organisation.all
+ @organisations = Org.all
end
# ---------- can_view? ----------
@@ -168,7 +168,7 @@
# ---------- by_organisation ----------
test "by_organisation correctly returns all guidance belonging to a given org" do
=begin
- Organisation.all.each do |org|
+ Org.all.each do |org|
org_guidance = Guidance.by_organisation(org)
org.guidance_groups.each do |group|
group.guidances.each do |guidance|
diff --git a/test/unit/organisation_test.rb b/test/unit/organisation_test.rb
index d4fca37..4ef761a 100644
--- a/test/unit/organisation_test.rb
+++ b/test/unit/organisation_test.rb
@@ -10,7 +10,7 @@
# ---------- required fields are required ------------
test "required fields should be required" do
- org = Organisation.new
+ org = Org.new
assert_not(org.valid?)
org.name = 'ABCD'
@@ -86,7 +86,7 @@
# ---------------------------------------------------
test "can CRUD" do
- org = Organisation.create(name: 'testing')
+ org = Org.create(name: 'testing')
assert_not org.id.nil?, "was expecting to be able to create a new Organisation: #{org.errors.map{|f, m| f.to_s + ' ' + m}.join(', ')}"
org.abbreviation = 'TEST'
diff --git a/test/unit/organisation_type_test.rb b/test/unit/organisation_type_test.rb
index 31cccdc..95f968a 100644
--- a/test/unit/organisation_type_test.rb
+++ b/test/unit/organisation_type_test.rb
@@ -22,7 +22,7 @@
# ---------------------------------------------------
test "can manage has_many relationship with Organisations" do
- organisation = Organisation.new(name: 'test')
+ organisation = Org.new(name: 'test')
verify_has_many_relationship(@organisation_type, organisation,
@organisation_type.organisations.count)
end
diff --git a/test/unit/token_permission_type_test.rb b/test/unit/token_permission_type_test.rb
index 6a1585b..c09aa85 100644
--- a/test/unit/token_permission_type_test.rb
+++ b/test/unit/token_permission_type_test.rb
@@ -32,7 +32,7 @@
# ---------------------------------------------------
test "can manage has_many relationship with OrgTokenPermissions" do
- org = Organisation.new(name: 'Testing')
+ org = Org.new(name: 'Testing')
verify_has_many_relationship(@tpt, org, @tpt.organisations.count)
end