diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4fcc660..fa81497 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -32,9 +32,8 @@ elsif user_signed_in? and !current_user[:language_id].nil? I18n.locale = Language.find_by_id(current_user[:language_id]).abbreviation # if user has set preferred language use it - elsif user_signed_in? and current_user.organisation.present? and !current_user.organisation[:language_id].nil? - I18n.locale = Language.find_by_id(current_user.organisation[:language_id]).abbreviation - # use user's organization language, keep in mine the "OTHER ORG" edge case which should use default language + elsif false # TODO + # use user's organization language, keep in mine the "OTHER ORG" edge case which should use english else # just use the default language, line can be commented out, included just for clarity I18n.locale = I18n.default_locale @@ -75,7 +74,7 @@ def authenticate_admin! # currently if admin has any super-admin task, they can view the super-admin - redirect_to root_path unless user_signed_in? && (current_user.can_add_orgs? || current_user.can_change_org? || current_user.is_admin?) + redirect_to root_path unless user_signed_in? && (current_user.can_add_orgs? || current_user.can_change_org? || current_user.can_super_admin?) end def get_plan_list_columns diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index fef951e..f35e0bd 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -96,12 +96,12 @@ user.remove_token! end # ORG_ADMINS - if admin_user_ids.include?( user.id) && !user.is_org_admin? + if admin_user_ids.include?( user.id) && !user.can_org_admin? # add admin privleges # MAGIC_STRING user.roles << Role.find_by(name: constant("user_role_types.organisational_admin")) # if user_id not in passed, but user is an admin - elsif !admin_user_ids.include?(user.id) && user.is_org_admin? + elsif !admin_user_ids.include?(user.id) && user.can_org_admin? # strip admin privleges user.roles.delete(Role.find_by(name: constant("user_role_types.organisational_admin"))) end diff --git a/app/models/user.rb b/app/models/user.rb index 5416052..b815846 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -155,21 +155,23 @@ end ## - # checks if the user is an admin + # checks if the user is a super admin + # if the user has any privelege which requires them to see the super admin page + # then they are a super admin # # @return [Boolean] true if the user is an admin - def is_admin? - admin = roles.find_by( name: constant("user_role_types.super_admin")) - return !admin.nil? + def can_super_admin? + return self.can_add_orgs? end ## # checks if the user is an organisation admin + # if the user has any privlege which requires them to see the org-admin pages + # then they are an org admin # # @return [Boolean] true if the user is an organisation admin - def is_org_admin? - org_admin = roles.find_by(name: constant("user_role_types.organisational_admin")) - return !org_admin.nil? + def can_org_admin? + return self.can_grant_permissions? || self.can_modify_guidance? || self.can_modify_templates? || self.can_modify_org_details? end ## diff --git a/app/views/dmptemplates/_admin_nav_tabs.html.erb b/app/views/dmptemplates/_admin_nav_tabs.html.erb index 6974892..49c3c20 100644 --- a/app/views/dmptemplates/_admin_nav_tabs.html.erb +++ b/app/views/dmptemplates/_admin_nav_tabs.html.erb @@ -20,7 +20,7 @@ <% end %> - <% if current_user.is_org_admin? && (dmptemplate.org_type != constant("organisation_types.funder")|| current_user.org_type == constant("organisation_types.funder")) then %> + <% if current_user.can_org_admin? && (dmptemplate.org_type != constant("organisation_types.funder")|| current_user.org_type == constant("organisation_types.funder")) then %> <% if active == 'add_plan' then %>
  • <% else %> diff --git a/app/views/dmptemplates/admin_index.html.erb b/app/views/dmptemplates/admin_index.html.erb index 64a2097..b22018c 100644 --- a/app/views/dmptemplates/admin_index.html.erb +++ b/app/views/dmptemplates/admin_index.html.erb @@ -60,7 +60,7 @@ <%= l last_temp_updated.to_date, :formats => :short %> - <%if current_user.is_org_admin? then%> + <%if current_user.can_org_admin? then%> <% b_label = t('helpers.submit.edit')%> <%else%> <% b_label = t('helpers.view')%> @@ -129,7 +129,7 @@ - <%if current_user.is_org_admin? then%> + <%if current_user.can_org_admin? then%> <% if org_template.org_type == constant("organisation_types.funder") then %> <%if org_template.has_customisations?(current_user.organisation_id, org_template) then%> <% b_label = t("org_admin.templates.edit_customisation")%> diff --git a/app/views/dmptemplates/export.pdf.erb b/app/views/dmptemplates/export.pdf.erb new file mode 100644 index 0000000..3726b39 --- /dev/null +++ b/app/views/dmptemplates/export.pdf.erb @@ -0,0 +1,23 @@ + + + + + + <%= @template.title %> + + + + +

    <%= @template.title %>

    + + \ No newline at end of file diff --git a/app/views/layouts/_dmponline_navigation.html.erb b/app/views/layouts/_dmponline_navigation.html.erb index 7db4f41..5a553cd 100644 --- a/app/views/layouts/_dmponline_navigation.html.erb +++ b/app/views/layouts/_dmponline_navigation.html.erb @@ -5,109 +5,115 @@ <% namespace = controller_path.split("/").first %> + <%= link_to language.name, {locale: language.abbreviation}, class: 'main_nav lang-dropdown-link'%> +
  • + <% end %> + + + <%end%> + + diff --git a/app/views/layouts/_dmponline_signin_signout.html.erb b/app/views/layouts/_dmponline_signin_signout.html.erb index f649068..876dc27 100644 --- a/app/views/layouts/_dmponline_signin_signout.html.erb +++ b/app/views/layouts/_dmponline_signin_signout.html.erb @@ -8,18 +8,16 @@ <% else %> -
  • <% unless controller_name == "home" && action_name == "index" then %> <%= t("helpers.sign_in")%> / diff --git a/app/views/users/admin_api_update.html.erb b/app/views/users/admin_api_update.html.erb index 3f26ec2..2585634 100644 --- a/app/views/users/admin_api_update.html.erb +++ b/app/views/users/admin_api_update.html.erb @@ -44,7 +44,7 @@ <% end %> - <%= check_box_tag "org_admin_ids[]", user.id, user.is_org_admin? %> + <%= check_box_tag "org_admin_ids[]", user.id, user.can_org_admin? %> <% if current_user.organisation.token_permission_types.count > 0 %> diff --git a/app/views/users/admin_index.html.erb b/app/views/users/admin_index.html.erb index 3f26ec2..2585634 100644 --- a/app/views/users/admin_index.html.erb +++ b/app/views/users/admin_index.html.erb @@ -44,7 +44,7 @@ <% end %> - <%= check_box_tag "org_admin_ids[]", user.id, user.is_org_admin? %> + <%= check_box_tag "org_admin_ids[]", user.id, user.can_org_admin? %> <% if current_user.organisation.token_permission_types.count > 0 %> diff --git a/config/initializers/rolify.rb b/config/initializers/rolify.rb index 45fd03f..481b398 100644 --- a/config/initializers/rolify.rb +++ b/config/initializers/rolify.rb @@ -2,7 +2,7 @@ # By default ORM adapter is ActiveRecord. uncomment to use mongoid # config.use_mongoid - # Dynamic shortcuts for User class (user.is_admin? like methods). Default is: false + # Dynamic shortcuts for User class (user.can_super_admin? like methods). Default is: false # Enable this feature _after_ running rake db:migrate as it relies on the roles table # config.use_dynamic_shortcuts end \ No newline at end of file diff --git a/html/ApplicationController.html b/html/ApplicationController.html index dfeacc1..6a420af 100644 --- a/html/ApplicationController.html +++ b/html/ApplicationController.html @@ -309,8 +309,8 @@
    # File app/controllers/application_controller.rb, line 32
    -def after_sign_in_error_path_for(resource)
    -  session[:previous_url] || root_path
    +def after_sign_in_error_path_for(resource)
    +  session[:previous_url] || root_path
     end
    @@ -339,8 +339,8 @@
    # File app/controllers/application_controller.rb, line 24
    -def after_sign_in_path_for(resource)
    -  session[:previous_url] || root_path
    +def after_sign_in_path_for(resource)
    +  session[:previous_url] || root_path
     end
    @@ -369,8 +369,8 @@
    # File app/controllers/application_controller.rb, line 36
    -def after_sign_up_error_path_for(resource)
    -  session[:previous_url] || root_path
    +def after_sign_up_error_path_for(resource)
    +  session[:previous_url] || root_path
     end
    @@ -399,8 +399,8 @@
    # File app/controllers/application_controller.rb, line 28
    -def after_sign_up_path_for(resource)
    -  session[:previous_url] || root_path
    +def after_sign_up_path_for(resource)
    +  session[:previous_url] || root_path
     end
    @@ -429,8 +429,8 @@
    # File app/controllers/application_controller.rb, line 40
    -def authenticate_admin!
    -        redirect_to root_path unless user_signed_in? && current_user.is_admin?
    +def authenticate_admin!
    +        redirect_to root_path unless user_signed_in? && current_user.can_super_admin?
     end
    @@ -459,11 +459,11 @@
    # File app/controllers/application_controller.rb, line 44
    -def get_plan_list_columns
    -        if user_signed_in?
    -                @selected_columns = current_user.settings(:plan_list).columns
    -                @all_columns = Settings::PlanList::ALL_COLUMNS
    -        end
    +def get_plan_list_columns
    +        if user_signed_in?
    +                @selected_columns = current_user.settings(:plan_list).columns
    +                @all_columns = Settings::PlanList::ALL_COLUMNS
    +        end
     end
    @@ -492,15 +492,17 @@
    # File app/controllers/application_controller.rb, line 13
    -def store_location
    - # store last url - this is needed for post-login redirect to whatever the user last visited.
    
    -        if (request.fullpath != "/users/sign_in" && \
    -                request.fullpath != "/users/sign_up" && \
    -                request.fullpath != "/users/password" && \
    -    request.fullpath != "/users/sign_up?nosplash=true" && \
    -                !request.xhr?) # don't store ajax calls
    
    -          session[:previous_url] = request.fullpath 
    -        end
    +def store_location
    + # store last url - this is needed for post-login redirect to whatever the user last visited.
    +
    +        if (request.fullpath != "/users/sign_in" && \
    +                request.fullpath != "/users/sign_up" && \
    +                request.fullpath != "/users/password" && \
    +    request.fullpath != "/users/sign_up?nosplash=true" && \
    +                !request.xhr?) # don't store ajax calls
    +
    +          session[:previous_url] = request.fullpath 
    +        end
     end
    diff --git a/html/DmptemplatesController.html b/html/DmptemplatesController.html index 228be4f..547fccf 100644 --- a/html/DmptemplatesController.html +++ b/html/DmptemplatesController.html @@ -355,20 +355,20 @@
    # File app/controllers/dmptemplates_controller.rb, line 187
    -def admin_addphase
    -        if user_signed_in? && current_user.is_org_admin? then
    -                @dmptemplate = Dmptemplate.find(params[:id])
    -                @phase = Phase.new
    -                if @dmptemplate.phases.count == 0 then
    -                        @phase.number = '1'
    -                else
    -                        @phase.number = @dmptemplate.phases.count + 1
    -                end
    -
    -                respond_to do |format|
    -      format.html
    -    end
    -        end
    +def admin_addphase
    +        if user_signed_in? && current_user.can_org_admin? then
    +                @dmptemplate = Dmptemplate.find(params[:id])
    +                @phase = Phase.new
    +                if @dmptemplate.phases.count == 0 then
    +                        @phase.number = '1'
    +                else
    +                        @phase.number = @dmptemplate.phases.count + 1
    +                end
    +
    +                respond_to do |format|
    +      format.html
    +    end
    +        end
     end
    @@ -397,22 +397,22 @@
    # File app/controllers/dmptemplates_controller.rb, line 293
    -def admin_cloneversion
    -        if user_signed_in? && current_user.is_org_admin? then
    -@old_version = Version.find(params[:version_id])
    -                @version = @old_version.amoeba_dup
    -                @phase = @version.phase
    -
    -    respond_to do |format|
    -      if @version.save
    -        format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    -        format.json { head :no_content }
    -      else
    -        format.html { render action: "admin_phase" }
    -        format.json { render json: @version.errors, status: :unprocessable_entity }
    -      end
    -    end
    -        end
    +def admin_cloneversion
    +        if user_signed_in? && current_user.can_org_admin? then
    +@old_version = Version.find(params[:version_id])
    +                @version = @old_version.amoeba_dup
    +                @phase = @version.phase
    +
    +    respond_to do |format|
    +      if @version.save
    +        format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    +        format.json { head :no_content }
    +      else
    +        format.html { render action: "admin_phase" }
    +        format.json { render json: @version.errors, status: :unprocessable_entity }
    +      end
    +    end
    +        end
     end
    @@ -441,24 +441,24 @@
    # File app/controllers/dmptemplates_controller.rb, line 81
    -def admin_create
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @dmptemplate = Dmptemplate.new(params[:dmptemplate])
    -          @dmptemplate.organisation_id = current_user.organisation.id
    -          @dmptemplate.description = params['template-desc']
    -
    -          respond_to do |format|
    -            if @dmptemplate.save
    -              format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.created_message') }
    -              format.json { render json: @dmptemplate, status: :created, location: @dmptemplate }
    -            else
    -              format.html { render action: "admin_new" }
    -              format.json { render json: @dmptemplate.errors, status: :unprocessable_entity }
    -            end
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_create
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @dmptemplate = Dmptemplate.new(params[:dmptemplate])
    +          @dmptemplate.organisation_id = current_user.organisation.id
    +          @dmptemplate.description = params['template-desc']
    +
    +          respond_to do |format|
    +            if @dmptemplate.save
    +              format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.created_message') }
    +              format.json { render json: @dmptemplate, status: :created, location: @dmptemplate }
    +            else
    +              format.html { render action: "admin_new" }
    +              format.json { render json: @dmptemplate.errors, status: :unprocessable_entity }
    +            end
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -487,26 +487,26 @@
    # File app/controllers/dmptemplates_controller.rb, line 204
    -      def admin_createphase
    -  if user_signed_in? && current_user.is_org_admin? then
    -             @phase = Phase.new(params[:phase])
    -          @phase.description = params["phase-desc"]
    -          @version = @phase.versions.build
    -          @version.title = "#{@phase.title} v.1"
    -          @version.phase_id = @phase.id
    -          @version.number = 1
    -          @version.published = false
    -
    -          respond_to do |format|
    -            if @phase.save
    -              format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "admin_phase" }
    -              format.json { render json: @phase.errors, status: :unprocessable_entity }
    -            end
    -                      end
    -              end
    +      def admin_createphase
    +  if user_signed_in? && current_user.can_org_admin? then
    +             @phase = Phase.new(params[:phase])
    +          @phase.description = params["phase-desc"]
    +          @version = @phase.versions.build
    +          @version.title = "#{@phase.title} v.1"
    +          @version.phase_id = @phase.id
    +          @version.number = 1
    +          @version.published = false
    +
    +          respond_to do |format|
    +            if @phase.save
    +              format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "admin_phase" }
    +              format.json { render json: @phase.errors, status: :unprocessable_entity }
    +            end
    +                      end
    +              end
     end
    @@ -535,23 +535,23 @@
    # File app/controllers/dmptemplates_controller.rb, line 386
    -      def admin_createquestion
    -  if user_signed_in? && current_user.is_org_admin? then
    -             @question = Question.new(params[:question])
    -          @question.guidance = params["new-question-guidance"]
    -          @question.default_value = params["new-question-default-value"]
    -
    -
    -          respond_to do |format|
    -            if @question.save
    -              format.html { redirect_to admin_phase_dmptemplate_path(:id => @question.section.version.phase_id, :version_id => @question.section.version_id, :section_id => @question.section_id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "admin_phase" }
    -              format.json { render json: @question.errors, status: :unprocessable_entity }
    -            end
    -                      end
    -              end
    +      def admin_createquestion
    +  if user_signed_in? && current_user.can_org_admin? then
    +             @question = Question.new(params[:question])
    +          @question.guidance = params["new-question-guidance"]
    +          @question.default_value = params["new-question-default-value"]
    +
    +
    +          respond_to do |format|
    +            if @question.save
    +              format.html { redirect_to admin_phase_dmptemplate_path(:id => @question.section.version.phase_id, :version_id => @question.section.version_id, :section_id => @question.section_id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "admin_phase" }
    +              format.json { render json: @question.errors, status: :unprocessable_entity }
    +            end
    +                      end
    +              end
     end
    @@ -580,21 +580,21 @@
    # File app/controllers/dmptemplates_controller.rb, line 328
    -      def admin_createsection
    -  if user_signed_in? && current_user.is_org_admin? then
    -             @section = Section.new(params[:section])
    -          @section.description = params["section-desc"]
    -
    -          respond_to do |format|
    -            if @section.save
    -              format.html { redirect_to admin_phase_dmptemplate_path(:id => @section.version.phase_id, :version_id => @section.version_id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "admin_phase" }
    -              format.json { render json: @section.errors, status: :unprocessable_entity }
    -            end
    -                      end
    -              end
    +      def admin_createsection
    +  if user_signed_in? && current_user.can_org_admin? then
    +             @section = Section.new(params[:section])
    +          @section.description = params["section-desc"]
    +
    +          respond_to do |format|
    +            if @section.save
    +              format.html { redirect_to admin_phase_dmptemplate_path(:id => @section.version.phase_id, :version_id => @section.version_id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "admin_phase" }
    +              format.json { render json: @section.errors, status: :unprocessable_entity }
    +            end
    +                      end
    +              end
     end
    @@ -623,20 +623,20 @@
    # File app/controllers/dmptemplates_controller.rb, line 446
    -   def admin_createsuggestedanswer
    -   if user_signed_in? && current_user.is_org_admin? then
    -           @suggested_answer = SuggestedAnswer.new(params[:suggested_answer])
    -
    -       respond_to do |format|
    -         if @suggested_answer.save
    -           format.html { redirect_to admin_phase_dmptemplate_path(:id => @suggested_answer.question.section.version.phase_id, :version_id => @suggested_answer.question.section.version_id, :section_id => @suggested_answer.question.section_id, :question_id => @suggested_answer.question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    -           format.json { head :no_content }
    -         else
    -           format.html { render action: "admin_phase" }
    -           format.json { render json: @suggested_answer.errors, status: :unprocessable_entity }
    -         end
    -           end
    -    end
    +   def admin_createsuggestedanswer
    +   if user_signed_in? && current_user.can_org_admin? then
    +           @suggested_answer = SuggestedAnswer.new(params[:suggested_answer])
    +
    +       respond_to do |format|
    +         if @suggested_answer.save
    +           format.html { redirect_to admin_phase_dmptemplate_path(:id => @suggested_answer.question.section.version.phase_id, :version_id => @suggested_answer.question.section.version_id, :section_id => @suggested_answer.question.section_id, :question_id => @suggested_answer.question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') }
    +           format.json { head :no_content }
    +         else
    +           format.html { render action: "admin_phase" }
    +           format.json { render json: @suggested_answer.errors, status: :unprocessable_entity }
    +         end
    +           end
    +    end
     end
    @@ -665,18 +665,18 @@
    # File app/controllers/dmptemplates_controller.rb, line 105
    -def admin_destroy
    -      if user_signed_in? && current_user.is_org_admin? then
    -             @dmptemplate = Dmptemplate.find(params[:id])
    -          @dmptemplate.destroy
    -
    -          respond_to do |format|
    -            format.html { redirect_to admin_index_dmptemplate_path }
    -            format.json { head :no_content }
    -          end
    -             else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_destroy
    +      if user_signed_in? && current_user.can_org_admin? then
    +             @dmptemplate = Dmptemplate.find(params[:id])
    +          @dmptemplate.destroy
    +
    +          respond_to do |format|
    +            format.html { redirect_to admin_index_dmptemplate_path }
    +            format.json { head :no_content }
    +          end
    +             else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
           end
    @@ -705,17 +705,17 @@
    # File app/controllers/dmptemplates_controller.rb, line 246
    -def admin_destroyphase
    -if user_signed_in? && current_user.is_org_admin? then
    -       @phase = Phase.find(params[:phase_id])
    -       @dmptemplate = @phase.dmptemplate
    -    @phase.destroy
    -
    -    respond_to do |format|
    -      format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.destroyed_message') }
    -      format.json { head :no_content }
    -    end
    -       end
    +def admin_destroyphase
    +if user_signed_in? && current_user.can_org_admin? then
    +       @phase = Phase.find(params[:phase_id])
    +       @dmptemplate = @phase.dmptemplate
    +    @phase.destroy
    +
    +    respond_to do |format|
    +      format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.destroyed_message') }
    +      format.json { head :no_content }
    +    end
    +       end
     end
    @@ -744,19 +744,19 @@
    # File app/controllers/dmptemplates_controller.rb, line 428
    -def admin_destroyquestion
    -if user_signed_in? && current_user.is_org_admin? then
    -       @question = Question.find(params[:question_id])
    -       @section = @question.section
    -                @version = @section.version
    -       @phase = @version.phase
    -    @question.destroy
    -
    -    respond_to do |format|
    -      format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') }
    -      format.json { head :no_content }
    -    end
    -       end
    +def admin_destroyquestion
    +if user_signed_in? && current_user.can_org_admin? then
    +       @question = Question.find(params[:question_id])
    +       @section = @question.section
    +                @version = @section.version
    +       @phase = @version.phase
    +    @question.destroy
    +
    +    respond_to do |format|
    +      format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') }
    +      format.json { head :no_content }
    +    end
    +       end
     end
    @@ -785,18 +785,18 @@
    # File app/controllers/dmptemplates_controller.rb, line 368
    -def admin_destroysection
    -if user_signed_in? && current_user.is_org_admin? then
    -       @section = Section.find(params[:section_id])
    -       @version = @section.version
    -       @phase = @version.phase
    -    @section.destroy
    -
    -    respond_to do |format|
    -      format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id,  :edit => 'true' ), notice: I18n.t('org_admin.templates.destroyed_message') }
    -      format.json { head :no_content }
    -    end
    -       end
    +def admin_destroysection
    +if user_signed_in? && current_user.can_org_admin? then
    +       @section = Section.find(params[:section_id])
    +       @version = @section.version
    +       @phase = @version.phase
    +    @section.destroy
    +
    +    respond_to do |format|
    +      format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id,  :edit => 'true' ), notice: I18n.t('org_admin.templates.destroyed_message') }
    +      format.json { head :no_content }
    +    end
    +       end
     end
    @@ -825,20 +825,20 @@
    # File app/controllers/dmptemplates_controller.rb, line 484
    -def admin_destroysuggestedanswer
    -if user_signed_in? && current_user.is_org_admin? then
    -       @suggested_answer = SuggestedAnswer.find(params[:suggested_answer])
    -       @question = @suggested_answer.question
    -       @section = @question.section
    -                @version = @section.version
    -       @phase = @version.phase
    -    @suggested_answer.destroy
    -
    -    respond_to do |format|
    -      format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') }
    -      format.json { head :no_content }
    -    end
    -       end
    +def admin_destroysuggestedanswer
    +if user_signed_in? && current_user.can_org_admin? then
    +       @suggested_answer = SuggestedAnswer.find(params[:suggested_answer])
    +       @question = @suggested_answer.question
    +       @section = @question.section
    +                @version = @section.version
    +       @phase = @version.phase
    +    @suggested_answer.destroy
    +
    +    respond_to do |format|
    +      format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') }
    +      format.json { head :no_content }
    +    end
    +       end
     end
    @@ -867,17 +867,17 @@
    # File app/controllers/dmptemplates_controller.rb, line 312
    -def admin_destroyversion
    -if user_signed_in? && current_user.is_org_admin? then
    -       @version = Version.find(params[:version_id])
    -       @phase = @version.phase
    -    @version.destroy
    -
    -    respond_to do |format|
    -      format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.destroyed_message') }
    -      format.json { head :no_content }
    -    end
    -       end
    +def admin_destroyversion
    +if user_signed_in? && current_user.can_org_admin? then
    +       @version = Version.find(params[:version_id])
    +       @phase = @version.phase
    +    @version.destroy
    +
    +    respond_to do |format|
    +      format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.destroyed_message') }
    +      format.json { head :no_content }
    +    end
    +       end
     end
    @@ -906,20 +906,23 @@
    # File app/controllers/dmptemplates_controller.rb, line 9
    -def admin_index
    -  if user_signed_in? && current_user.is_org_admin? then
    -      #institutional templates
    
    -          @dmptemplates_own = Dmptemplate.own_institutional_templates(current_user.organisation_id)
    -
    -          #funders templates
    
    -          @dmptemplates_funders = Dmptemplate.funders_templates
    -
    -   respond_to do |format|
    -            format.html # index.html.erb
    
    -         end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_index
    +  if user_signed_in? && current_user.can_org_admin? then
    +      #institutional templates
    +
    +          @dmptemplates_own = Dmptemplate.own_institutional_templates(current_user.organisation_id)
    +
    +          #funders templates
    +
    +          @dmptemplates_funders = Dmptemplate.funders_templates
    +
    +   respond_to do |format|
    +            format.html # index.html.erb
    +
    +         end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -948,17 +951,18 @@
    # File app/controllers/dmptemplates_controller.rb, line 66
    -def admin_new
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @dmptemplate = Dmptemplate.new
    -
    -          respond_to do |format|
    -            format.html # new.html.erb
    
    -            format.json { render json: @dmptemplate }
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_new
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @dmptemplate = Dmptemplate.new
    +
    +          respond_to do |format|
    +            format.html # new.html.erb
    +
    +            format.json { render json: @dmptemplate }
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -987,52 +991,56 @@
    # File app/controllers/dmptemplates_controller.rb, line 124
    -def admin_phase
    -        if user_signed_in? && current_user.is_org_admin? then
    -
    -                @phase = Phase.find(params[:id])
    -
    -                if !params.has_key?(:version_id) then
    -                        @edit = 'false'
    -                        #check for the most recent published version, if none is available then return the most recent one
    
    -                        versions = @phase.versions.where('published = ?', true).order('updated_at DESC')
    -                        if versions.any?() then
    -                                @version = versions.first
    -                        else
    -                                @version = @phase.versions.order('updated_at DESC').first
    -                        end
    -                        # When the version_id is passed as an argument
    
    -                else
    -                        @edit = params[:edit]
    -                        @version = Version.find(params[:version_id])
    -                end
    -
    -                #verify if there are any sections if not create one
    
    -                @sections = @version.sections
    -                if !@sections.any?() || @sections.count == 0 then
    -                        @section = @version.sections.build
    -                        @section.title = ''
    -                        @section.version_id = params[:version_id]
    -                        @section.number = 1
    -                        @section.organisation_id = current_user.organisation.id
    -                        @section.published = true
    -                        @section.save
    -                end
    -
    -                #verify if section_id has been passed, if so then open that section
    
    -                if params.has_key?(:section_id) then
    -                        @open = true
    -                        @section_id = params[:section_id].to_i
    -                end
    -
    -                if params.has_key?(:question_id) then
    -                        @question_id = params[:question_id].to_i
    -                end
    -
    -                respond_to do |format|
    -                        format.html
    -                end
    -        end
    +def admin_phase
    +        if user_signed_in? && current_user.can_org_admin? then
    +
    +                @phase = Phase.find(params[:id])
    +
    +                if !params.has_key?(:version_id) then
    +                        @edit = 'false'
    +                        #check for the most recent published version, if none is available then return the most recent one
    +
    +                        versions = @phase.versions.where('published = ?', true).order('updated_at DESC')
    +                        if versions.any?() then
    +                                @version = versions.first
    +                        else
    +                                @version = @phase.versions.order('updated_at DESC').first
    +                        end
    +                        # When the version_id is passed as an argument
    +
    +                else
    +                        @edit = params[:edit]
    +                        @version = Version.find(params[:version_id])
    +                end
    +
    +                #verify if there are any sections if not create one
    +
    +                @sections = @version.sections
    +                if !@sections.any?() || @sections.count == 0 then
    +                        @section = @version.sections.build
    +                        @section.title = ''
    +                        @section.version_id = params[:version_id]
    +                        @section.number = 1
    +                        @section.organisation_id = current_user.organisation.id
    +                        @section.published = true
    +                        @section.save
    +                end
    +
    +                #verify if section_id has been passed, if so then open that section
    +
    +                if params.has_key?(:section_id) then
    +                        @open = true
    +                        @section_id = params[:section_id].to_i
    +                end
    +
    +                if params.has_key?(:question_id) then
    +                        @question_id = params[:question_id].to_i
    +                end
    +
    +                respond_to do |format|
    +                        format.html
    +                end
    +        end
     end
    @@ -1061,16 +1069,16 @@
    # File app/controllers/dmptemplates_controller.rb, line 173
    -def admin_previewphase
    -        if user_signed_in? && current_user.is_org_admin? then
    -                
    -                @version = Version.find(params[:id])
    -                
    -                        
    -                respond_to do |format|
    -                        format.html
    -                end
    -        end   
    +def admin_previewphase
    +        if user_signed_in? && current_user.can_org_admin? then
    +                
    +                @version = Version.find(params[:id])
    +                
    +                        
    +                respond_to do |format|
    +                        format.html
    +                end
    +        end   
     end
    @@ -1099,17 +1107,18 @@
    # File app/controllers/dmptemplates_controller.rb, line 27
    -def admin_template
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @dmptemplate = Dmptemplate.find(params[:id])
    -
    -          respond_to do |format|
    -            format.html # show.html.erb
    
    -            format.json { render json: @dmptemplate }
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_template
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @dmptemplate = Dmptemplate.find(params[:id])
    +
    +          respond_to do |format|
    +            format.html # show.html.erb
    +
    +            format.json { render json: @dmptemplate }
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -1138,23 +1147,23 @@
    # File app/controllers/dmptemplates_controller.rb, line 44
    -def admin_update
    -      if user_signed_in? && current_user.is_org_admin? then
    -              @dmptemplate = Dmptemplate.find(params[:id])
    -              @dmptemplate.description = params["template-desc"]
    -
    -                respond_to do |format|
    -            if @dmptemplate.update_attributes(params[:dmptemplate])
    -              format.html { redirect_to admin_template_dmptemplate_path(params[:dmptemplate]), notice: I18n.t('org_admin.templates.updated_message') }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "edit" }
    -              format.json { render json: @dmptemplate.errors, status: :unprocessable_entity }
    -            end
    -             end
    -      else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -      end
    +def admin_update
    +      if user_signed_in? && current_user.can_org_admin? then
    +              @dmptemplate = Dmptemplate.find(params[:id])
    +              @dmptemplate.description = params["template-desc"]
    +
    +                respond_to do |format|
    +            if @dmptemplate.update_attributes(params[:dmptemplate])
    +              format.html { redirect_to admin_template_dmptemplate_path(params[:dmptemplate]), notice: I18n.t('org_admin.templates.updated_message') }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "edit" }
    +              format.json { render json: @dmptemplate.errors, status: :unprocessable_entity }
    +            end
    +             end
    +      else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +      end
     end
    @@ -1183,21 +1192,21 @@
    # File app/controllers/dmptemplates_controller.rb, line 228
    -def admin_updatephase
    -        if user_signed_in? && current_user.is_org_admin? then
    -        @phase = Phase.find(params[:id])
    -        @phase.description = params["phase-desc"]
    -
    -    respond_to do |format|
    -      if @phase.update_attributes(params[:phase])
    -        format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.updated_message') }
    -        format.json { head :no_content }
    -      else
    -        format.html { render action: "admin_phase" }
    -        format.json { render json: @phase.errors, status: :unprocessable_entity }
    -      end
    -    end
    -        end
    +def admin_updatephase
    +        if user_signed_in? && current_user.can_org_admin? then
    +        @phase = Phase.find(params[:id])
    +        @phase.description = params["phase-desc"]
    +
    +    respond_to do |format|
    +      if @phase.update_attributes(params[:phase])
    +        format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.updated_message') }
    +        format.json { head :no_content }
    +      else
    +        format.html { render action: "admin_phase" }
    +        format.json { render json: @phase.errors, status: :unprocessable_entity }
    +      end
    +    end
    +        end
     end
    @@ -1226,25 +1235,25 @@
    # File app/controllers/dmptemplates_controller.rb, line 406
    -def admin_updatequestion
    -        if user_signed_in? && current_user.is_org_admin? then
    -               @question = Question.find(params[:id])
    -                        @question.guidance = params["question-guidance-#{params[:id]}"]
    -                        @question.default_value = params["question-default-value-#{params[:id]}"]
    -       @section = @question.section
    -                        @version = @section.version
    -                        @phase = @version.phase
    -
    -                        respond_to do |format|
    -              if @question.update_attributes(params[:question])
    -                format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    -                format.json { head :no_content }
    -              else
    -                format.html { render action: "admin_phase" }
    -                format.json { render json: @question.errors, status: :unprocessable_entity }
    -              end
    -            end
    -                end
    +def admin_updatequestion
    +        if user_signed_in? && current_user.can_org_admin? then
    +               @question = Question.find(params[:id])
    +                        @question.guidance = params["question-guidance-#{params[:id]}"]
    +                        @question.default_value = params["question-default-value-#{params[:id]}"]
    +       @section = @question.section
    +                        @version = @section.version
    +                        @phase = @version.phase
    +
    +                        respond_to do |format|
    +              if @question.update_attributes(params[:question])
    +                format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    +                format.json { head :no_content }
    +              else
    +                format.html { render action: "admin_phase" }
    +                format.json { render json: @question.errors, status: :unprocessable_entity }
    +              end
    +            end
    +                end
             end
    @@ -1273,23 +1282,23 @@
    # File app/controllers/dmptemplates_controller.rb, line 347
    -def admin_updatesection
    -        if user_signed_in? && current_user.is_org_admin? then
    -               @section = Section.find(params[:id])
    -               @section.description = params["section-desc-#{params[:id]}"]
    -       @version = @section.version
    -                        @phase = @version.phase
    -
    -                        respond_to do |format|
    -              if @section.update_attributes(params[:section])
    -                format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id , :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    -                format.json { head :no_content }
    -              else
    -                format.html { render action: "admin_phase" }
    -                format.json { render json: @section.errors, status: :unprocessable_entity }
    -              end
    -            end
    -                end
    +def admin_updatesection
    +        if user_signed_in? && current_user.can_org_admin? then
    +               @section = Section.find(params[:id])
    +               @section.description = params["section-desc-#{params[:id]}"]
    +       @version = @section.version
    +                        @phase = @version.phase
    +
    +                        respond_to do |format|
    +              if @section.update_attributes(params[:section])
    +                format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id , :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    +                format.json { head :no_content }
    +              else
    +                format.html { render action: "admin_phase" }
    +                format.json { render json: @section.errors, status: :unprocessable_entity }
    +              end
    +            end
    +                end
     end
    @@ -1318,24 +1327,24 @@
    # File app/controllers/dmptemplates_controller.rb, line 463
    -def admin_updatesuggestedanswer
    -        if user_signed_in? && current_user.is_org_admin? then
    -               @suggested_answer = SuggestedAnswer.find(params[:id])
    -    @question = @suggested_answer.question
    -    @section = @question.section
    -    @version = @section.version
    -    @phase = @version.phase
    -
    -                        respond_to do |format|
    -              if @suggested_answer.update_attributes(params[:suggested_answer])
    -                format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    -                format.json { head :no_content }
    -              else
    -                format.html { render action: "admin_phase" }
    -                format.json { render json: @suggested_answer.errors, status: :unprocessable_entity }
    -              end
    -            end
    -                end
    +def admin_updatesuggestedanswer
    +        if user_signed_in? && current_user.can_org_admin? then
    +               @suggested_answer = SuggestedAnswer.find(params[:id])
    +    @question = @suggested_answer.question
    +    @section = @question.section
    +    @version = @section.version
    +    @phase = @version.phase
    +
    +                        respond_to do |format|
    +              if @suggested_answer.update_attributes(params[:suggested_answer])
    +                format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') }
    +                format.json { head :no_content }
    +              else
    +                format.html { render action: "admin_phase" }
    +                format.json { render json: @suggested_answer.errors, status: :unprocessable_entity }
    +              end
    +            end
    +                end
             end
    @@ -1364,34 +1373,34 @@
    # File app/controllers/dmptemplates_controller.rb, line 262
    -def admin_updateversion
    -        if user_signed_in? && current_user.is_org_admin? then
    -               @version = Version.find(params[:id])
    -    @version.description = params["version-desc"]
    -    @phase = @version.phase
    -
    -    if @version.published && !@phase.dmptemplate.published then
    -        @phase.dmptemplate.published = true
    -    end
    -    
    -    @all_versions = @phase.versions.where('published = ?', true)
    -    @all_versions.each do |v|
    -        if v.id != @version.id && v.published == true then
    -            v.published = false
    -            v.save
    -        end
    -    end
    -
    -            respond_to do |format|
    -              if @version.update_attributes(params[:version])
    -                format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id =>  @version.id, :edit => 'false'), notice: I18n.t('org_admin.templates.updated_message') }
    -                format.json { head :no_content }
    -              else
    -                format.html { render action: "admin_phase" }
    -                format.json { render json: @version.errors, status: :unprocessable_entity }
    -              end
    -            end
    -                end
    +def admin_updateversion
    +        if user_signed_in? && current_user.can_org_admin? then
    +               @version = Version.find(params[:id])
    +    @version.description = params["version-desc"]
    +    @phase = @version.phase
    +
    +    if @version.published && !@phase.dmptemplate.published then
    +        @phase.dmptemplate.published = true
    +    end
    +    
    +    @all_versions = @phase.versions.where('published = ?', true)
    +    @all_versions.each do |v|
    +        if v.id != @version.id && v.published == true then
    +            v.published = false
    +            v.save
    +        end
    +    end
    +
    +            respond_to do |format|
    +              if @version.update_attributes(params[:version])
    +                format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id =>  @version.id, :edit => 'false'), notice: I18n.t('org_admin.templates.updated_message') }
    +                format.json { head :no_content }
    +              else
    +                format.html { render action: "admin_phase" }
    +                format.json { render json: @version.errors, status: :unprocessable_entity }
    +              end
    +            end
    +                end
             end
    diff --git a/html/GuidanceGroupsController.html b/html/GuidanceGroupsController.html index db1ac12..ed9a143 100644 --- a/html/GuidanceGroupsController.html +++ b/html/GuidanceGroupsController.html @@ -307,23 +307,23 @@
    # File app/controllers/guidance_groups_controller.rb, line 34
    -def admin_create
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @guidance_group = GuidanceGroup.new(params[:guidance_group])
    -          @guidance_group.organisation_id = current_user.organisation_id
    -      
    -          respond_to do |format|
    -            if @guidance_group.save
    -              format.html { redirect_to admin_index_guidance_path, notice: I18n.t('org_admin.guidance_group.created_message') }
    -              format.json { render json: @guidance_group, status: :created, location: @guidance_group }
    -            else
    -              format.html { render action: "new" }
    -              format.json { render json: @guidance_group.errors, status: :unprocessable_entity }
    -            end
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end 
    +def admin_create
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @guidance_group = GuidanceGroup.new(params[:guidance_group])
    +          @guidance_group.organisation_id = current_user.organisation_id
    +      
    +          respond_to do |format|
    +            if @guidance_group.save
    +              format.html { redirect_to admin_index_guidance_path, notice: I18n.t('org_admin.guidance_group.created_message') }
    +              format.json { render json: @guidance_group, status: :created, location: @guidance_group }
    +            else
    +              format.html { render action: "new" }
    +              format.json { render json: @guidance_group.errors, status: :unprocessable_entity }
    +            end
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end 
     end
    @@ -352,19 +352,19 @@
    # File app/controllers/guidance_groups_controller.rb, line 87
    -def admin_destroy
    -      if user_signed_in? && current_user.is_org_admin? then
    -             @guidance_group = GuidanceGroup.find(params[:id])
    -          @guidance_group.destroy
    -      
    -          respond_to do |format|
    -            format.html { redirect_to admin_index_guidance_path, notice: I18n.t('org_admin.guidance_group.destroyed_message') }
    -            format.json { head :no_content }
    -          end
    -             else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end 
    -      
    +def admin_destroy
    +      if user_signed_in? && current_user.can_org_admin? then
    +             @guidance_group = GuidanceGroup.find(params[:id])
    +          @guidance_group.destroy
    +      
    +          respond_to do |format|
    +            format.html { redirect_to admin_index_guidance_path, notice: I18n.t('org_admin.guidance_group.destroyed_message') }
    +            format.json { head :no_content }
    +          end
    +             else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end 
    +      
           end
    @@ -393,12 +393,12 @@
    # File app/controllers/guidance_groups_controller.rb, line 55
    -def admin_edit
    -      if user_signed_in? && current_user.is_org_admin? then
    -    @guidance_group = GuidanceGroup.find(params[:id])
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end 
    +def admin_edit
    +      if user_signed_in? && current_user.can_org_admin? then
    +    @guidance_group = GuidanceGroup.find(params[:id])
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end 
     end
    @@ -427,15 +427,16 @@
    # File app/controllers/guidance_groups_controller.rb, line 21
    -    def admin_new
    -if user_signed_in? && current_user.is_org_admin? then
    -        @guidance_group = GuidanceGroup.new
    -           
    -        respond_to do |format|
    -          format.html # new.html.erb
    
    -          format.json { render json: @guidance }
    -        end
    -    end
    +    def admin_new
    +if user_signed_in? && current_user.can_org_admin? then
    +        @guidance_group = GuidanceGroup.new
    +           
    +        respond_to do |format|
    +          format.html # new.html.erb
    +
    +          format.json { render json: @guidance }
    +        end
    +    end
         end
    @@ -464,17 +465,17 @@
    # File app/controllers/guidance_groups_controller.rb, line 6
    -def admin_show
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @guidance_group = GuidanceGroup.find(params[:id])
    -      
    -          respond_to do |format|
    -            format.html 
    -            format.json { render json: @guidance_group }
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end 
    +def admin_show
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @guidance_group = GuidanceGroup.find(params[:id])
    +      
    +          respond_to do |format|
    +            format.html 
    +            format.json { render json: @guidance_group }
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end 
     end
    @@ -503,23 +504,23 @@
    # File app/controllers/guidance_groups_controller.rb, line 65
    -def admin_update
    -              if user_signed_in? && current_user.is_org_admin? then
    -              @guidance_group = GuidanceGroup.find(params[:id])
    -          @guidance_group.organisation_id = current_user.organisation_id
    -
    -          respond_to do |format|
    -            if @guidance_group.update_attributes(params[:guidance_group])
    -              format.html { redirect_to admin_index_guidance_path(params[:guidance_group]), notice: I18n.t('org_admin.guidance_group.updated_message') }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "edit" }
    -              format.json { render json: @guidance_group.errors, status: :unprocessable_entity }
    -            end
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end 
    +def admin_update
    +              if user_signed_in? && current_user.can_org_admin? then
    +              @guidance_group = GuidanceGroup.find(params[:id])
    +          @guidance_group.organisation_id = current_user.organisation_id
    +
    +          respond_to do |format|
    +            if @guidance_group.update_attributes(params[:guidance_group])
    +              format.html { redirect_to admin_index_guidance_path(params[:guidance_group]), notice: I18n.t('org_admin.guidance_group.updated_message') }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "edit" }
    +              format.json { render json: @guidance_group.errors, status: :unprocessable_entity }
    +            end
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end 
     end
    diff --git a/html/GuidancesController.html b/html/GuidancesController.html index 03ef0db..661593b 100644 --- a/html/GuidancesController.html +++ b/html/GuidancesController.html @@ -317,24 +317,24 @@
    # File app/controllers/guidances_controller.rb, line 155
    -def admin_create
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @guidance = Guidance.new(params[:guidance])
    -          @guidance.text = params["guidance-text"]
    -          @guidance.question_id = params["question_id"]
    -
    -          respond_to do |format|
    -            if @guidance.save
    -              format.html { redirect_to admin_show_guidance_path(@guidance), notice: I18n.t('org_admin.guidance.created_message') }
    -              format.json { render json: @guidance, status: :created, location: @guidance }
    -            else
    -              format.html { render action: "new" }
    -              format.json { render json: @guidance.errors, status: :unprocessable_entity }
    -            end
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_create
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @guidance = Guidance.new(params[:guidance])
    +          @guidance.text = params["guidance-text"]
    +          @guidance.question_id = params["question_id"]
    +
    +          respond_to do |format|
    +            if @guidance.save
    +              format.html { redirect_to admin_show_guidance_path(@guidance), notice: I18n.t('org_admin.guidance.created_message') }
    +              format.json { render json: @guidance, status: :created, location: @guidance }
    +            else
    +              format.html { render action: "new" }
    +              format.json { render json: @guidance.errors, status: :unprocessable_entity }
    +            end
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -363,19 +363,19 @@
    # File app/controllers/guidances_controller.rb, line 202
    -def admin_destroy
    -      if user_signed_in? && current_user.is_org_admin? then
    -             @guidance = Guidance.find(params[:id])
    -          @guidance.destroy
    -
    -          respond_to do |format|
    -            format.html { redirect_to admin_index_guidance_path }
    -            format.json { head :no_content }
    -          end
    -             else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    -
    +def admin_destroy
    +      if user_signed_in? && current_user.can_org_admin? then
    +             @guidance = Guidance.find(params[:id])
    +          @guidance.destroy
    +
    +          respond_to do |format|
    +            format.html { redirect_to admin_index_guidance_path }
    +            format.json { head :no_content }
    +          end
    +             else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
    +
           end
    @@ -404,45 +404,45 @@
    # File app/controllers/guidances_controller.rb, line 112
    -def admin_edit
    -      if user_signed_in? && current_user.is_org_admin? then
    -    @guidance = Guidance.find(params[:id])
    -    @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
    -                      @phases = nil
    -                      @dmptemplates.each do |template|
    -                              if @phases.nil? then
    -                                      @phases = template.phases.find(:all,:order => 'number ASC')
    -                              else
    -                                      @phases = @phases + template.phases.find(:all,:order => 'number ASC')
    -                              end
    -                      end
    -                      @versions = nil
    -                      @phases.each do |phase|
    -                              if @versions.nil? then
    -                                      @versions = phase.versions.find(:all,:order => 'title ASC')
    -                              else
    -                                      @versions = @versions + phase.versions.find(:all,:order => 'title ASC')
    -                              end
    -                      end
    -                      @sections = nil
    -                      @versions.each do |version|
    -                              if @sections.nil? then
    -                                      @sections = version.sections.find(:all,:order => 'number ASC')
    -                              else
    -                                      @sections = @sections + version.sections.find(:all,:order => 'number ASC')
    -                              end
    -                      end
    -                      @questions = nil
    -                      @sections.each do |section|
    -                              if @questions.nil? then
    -                                      @questions = section.questions.find(:all,:order => 'number ASC')
    -                              else
    -                                      @questions = @questions + section.questions.find(:all,:order => 'number ASC')
    -                              end
    -                      end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_edit
    +      if user_signed_in? && current_user.can_org_admin? then
    +    @guidance = Guidance.find(params[:id])
    +    @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
    +                      @phases = nil
    +                      @dmptemplates.each do |template|
    +                              if @phases.nil? then
    +                                      @phases = template.phases.find(:all,:order => 'number ASC')
    +                              else
    +                                      @phases = @phases + template.phases.find(:all,:order => 'number ASC')
    +                              end
    +                      end
    +                      @versions = nil
    +                      @phases.each do |phase|
    +                              if @versions.nil? then
    +                                      @versions = phase.versions.find(:all,:order => 'title ASC')
    +                              else
    +                                      @versions = @versions + phase.versions.find(:all,:order => 'title ASC')
    +                              end
    +                      end
    +                      @sections = nil
    +                      @versions.each do |version|
    +                              if @sections.nil? then
    +                                      @sections = version.sections.find(:all,:order => 'number ASC')
    +                              else
    +                                      @sections = @sections + version.sections.find(:all,:order => 'number ASC')
    +                              end
    +                      end
    +                      @questions = nil
    +                      @sections.each do |section|
    +                              if @questions.nil? then
    +                                      @questions = section.questions.find(:all,:order => 'number ASC')
    +                              else
    +                                      @questions = @questions + section.questions.find(:all,:order => 'number ASC')
    +                              end
    +                      end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -471,19 +471,20 @@
    # File app/controllers/guidances_controller.rb, line 5
    -def admin_index
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @guidances = Guidance.by_organisation(current_user.organisation_id)
    -          @guidance_groups = GuidanceGroup.where('organisation_id = ?', current_user.organisation_id )
    -
    -
    -          respond_to do |format|
    -            format.html # index.html.erb
    
    -            format.json { render json: @guidances }
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_index
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @guidances = Guidance.by_organisation(current_user.organisation_id)
    +          @guidance_groups = GuidanceGroup.where('organisation_id = ?', current_user.organisation_id )
    +
    +
    +          respond_to do |format|
    +            format.html # index.html.erb
    +
    +            format.json { render json: @guidances }
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -512,46 +513,46 @@
    # File app/controllers/guidances_controller.rb, line 33
    -def admin_new
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @guidance = Guidance.new
    -                      @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
    -                      @phases = nil
    -                      @dmptemplates.each do |template|
    -                              if @phases.nil? then
    -                                      @phases = template.phases.find(:all,:order => 'number ASC')
    -                              else
    -                                      @phases = @phases + template.phases.find(:all,:order => 'number ASC')
    -                              end
    -                      end
    -                      @versions = nil
    -                      @phases.each do |phase|
    -                              if @versions.nil? then
    -                                      @versions = phase.versions.find(:all,:order => 'title ASC')
    -                              else
    -                                      @versions = @versions + phase.versions.find(:all,:order => 'title ASC')
    -                              end
    -                      end
    -                      @sections = nil
    -                      @versions.each do |version|
    -                              if @sections.nil? then
    -                                      @sections = version.sections.find(:all,:order => 'number ASC')
    -                              else
    -                                      @sections = @sections + version.sections.find(:all,:order => 'number ASC')
    -                              end
    -                      end
    -                      @questions = nil
    -                      @sections.each do |section|
    -                              if @questions.nil? then
    -                                      @questions = section.questions.find(:all,:order => 'number ASC')
    -                              else
    -                                      @questions = @questions + section.questions.find(:all,:order => 'number ASC')
    -                              end
    -                      end
    -          respond_to do |format|
    -            format.html
    -          end
    -      end
    +def admin_new
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @guidance = Guidance.new
    +                      @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
    +                      @phases = nil
    +                      @dmptemplates.each do |template|
    +                              if @phases.nil? then
    +                                      @phases = template.phases.find(:all,:order => 'number ASC')
    +                              else
    +                                      @phases = @phases + template.phases.find(:all,:order => 'number ASC')
    +                              end
    +                      end
    +                      @versions = nil
    +                      @phases.each do |phase|
    +                              if @versions.nil? then
    +                                      @versions = phase.versions.find(:all,:order => 'title ASC')
    +                              else
    +                                      @versions = @versions + phase.versions.find(:all,:order => 'title ASC')
    +                              end
    +                      end
    +                      @sections = nil
    +                      @versions.each do |version|
    +                              if @sections.nil? then
    +                                      @sections = version.sections.find(:all,:order => 'number ASC')
    +                              else
    +                                      @sections = @sections + version.sections.find(:all,:order => 'number ASC')
    +                              end
    +                      end
    +                      @questions = nil
    +                      @sections.each do |section|
    +                              if @questions.nil? then
    +                                      @questions = section.questions.find(:all,:order => 'number ASC')
    +                              else
    +                                      @questions = @questions + section.questions.find(:all,:order => 'number ASC')
    +                              end
    +                      end
    +          respond_to do |format|
    +            format.html
    +          end
    +      end
           end
    @@ -580,15 +581,16 @@
    # File app/controllers/guidances_controller.rb, line 22
    -def admin_show
    -  if user_signed_in? && current_user.is_org_admin? then
    -          @guidance = Guidance.find(params[:id])
    -
    -          respond_to do |format|
    -            format.html # show.html.erb
    
    -            format.json { render json: @guidance }
    -          end
    - end
    +def admin_show
    +  if user_signed_in? && current_user.can_org_admin? then
    +          @guidance = Guidance.find(params[:id])
    +
    +          respond_to do |format|
    +            format.html # show.html.erb
    +
    +            format.json { render json: @guidance }
    +          end
    + end
     end
    @@ -617,26 +619,26 @@
    # File app/controllers/guidances_controller.rb, line 177
    -def admin_update
    -              if user_signed_in? && current_user.is_org_admin? then
    -              @guidance = Guidance.find(params[:id])
    -
    -                      @guidance.text = params["guidance-text"]
    -
    -                      @guidance.question_id = params["question_id"]
    -
    -          respond_to do |format|
    -            if @guidance.update_attributes(params[:guidance])
    -              format.html { redirect_to admin_show_guidance_path(params[:guidance]), notice: I18n.t('org_admin.guidance.updated_message') }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "edit" }
    -              format.json { render json: @guidance.errors, status: :unprocessable_entity }
    -            end
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end
    +def admin_update
    +              if user_signed_in? && current_user.can_org_admin? then
    +              @guidance = Guidance.find(params[:id])
    +
    +                      @guidance.text = params["guidance-text"]
    +
    +                      @guidance.question_id = params["question_id"]
    +
    +          respond_to do |format|
    +            if @guidance.update_attributes(params[:guidance])
    +              format.html { redirect_to admin_show_guidance_path(params[:guidance]), notice: I18n.t('org_admin.guidance.updated_message') }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "edit" }
    +              format.json { render json: @guidance.errors, status: :unprocessable_entity }
    +            end
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end
     end
    @@ -665,15 +667,17 @@
    # File app/controllers/guidances_controller.rb, line 76
    -      def update_phases
    -  # updates phases, versions, sections and questions based on template selected
    
    -  dmptemplate = Dmptemplate.find(params[:dmptemplate_id])
    -  # map to title and id for use in our options_for_select
    
    -  @phases = dmptemplate.phases.map{|a| [a.title, a.id]}.insert(0, "Select a phase")
    -  @versions = dmptemplate.versions.map{|s| [s.title, s.id]}.insert(0, "Select a version")
    -  @sections = dmptemplate.sections.map{|s| [s.title, s.id]}.insert(0, "Select a section")
    -  @questions = dmptemplate.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
    -
    +      def update_phases
    +  # updates phases, versions, sections and questions based on template selected
    +
    +  dmptemplate = Dmptemplate.find(params[:dmptemplate_id])
    +  # map to title and id for use in our options_for_select
    +
    +  @phases = dmptemplate.phases.map{|a| [a.title, a.id]}.insert(0, "Select a phase")
    +  @versions = dmptemplate.versions.map{|s| [s.title, s.id]}.insert(0, "Select a version")
    +  @sections = dmptemplate.sections.map{|s| [s.title, s.id]}.insert(0, "Select a section")
    +  @questions = dmptemplate.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
    +
     end
    @@ -702,10 +706,11 @@
    # File app/controllers/guidances_controller.rb, line 104
    -def update_questions
    -  # updates songs based on artist selected
    
    -  section = Section.find(params[:section_id])
    -  @questions = section.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
    +def update_questions
    +  # updates songs based on artist selected
    +
    +  section = Section.find(params[:section_id])
    +  @questions = section.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
     end
    @@ -734,12 +739,14 @@
    # File app/controllers/guidances_controller.rb, line 96
    -def update_sections
    -  # updates sections and questions based on version selected
    
    -  version = Version.find(params[:version_id])
    -  # map to name and id for use in our options_for_select
    
    -  @sections = version.sections.map{|s| [s.title, s.id]}.insert(0, "Select a section")
    -  @questions = version.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
    +def update_sections
    +  # updates sections and questions based on version selected
    +
    +  version = Version.find(params[:version_id])
    +  # map to name and id for use in our options_for_select
    +
    +  @sections = version.sections.map{|s| [s.title, s.id]}.insert(0, "Select a section")
    +  @questions = version.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
     end
    @@ -768,13 +775,15 @@
    # File app/controllers/guidances_controller.rb, line 87
    -def update_versions
    -   # updates versions, sections and questions based on phase selected
    
    -   phase = Phase.find(params[:phase_id])
    -   # map to name and id for use in our options_for_select
    
    -   @versions = phase.versions.map{|s| [s.title, s.id]}.insert(0, "Select a version")
    -   @sections = phase.sections.map{|s| [s.title, s.id]}.insert(0, "Select a section")
    -   @questions = phase.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
    +def update_versions
    +   # updates versions, sections and questions based on phase selected
    +
    +   phase = Phase.find(params[:phase_id])
    +   # map to name and id for use in our options_for_select
    +
    +   @versions = phase.versions.map{|s| [s.title, s.id]}.insert(0, "Select a version")
    +   @sections = phase.sections.map{|s| [s.title, s.id]}.insert(0, "Select a section")
    +   @questions = phase.questions.map{|s| [s.text, s.id]}.insert(0, "Select a question")
      end
    diff --git a/html/OrganisationUsersController.html b/html/OrganisationUsersController.html index 70d20fc..5ffe280 100644 --- a/html/OrganisationUsersController.html +++ b/html/OrganisationUsersController.html @@ -297,16 +297,17 @@
    # File app/controllers/organisation_users_controller.rb, line 3
    -def admin_index
    -        if user_signed_in? && current_user.is_org_admin? then
    -                
    -                respond_to do |format|
    -                        format.html # index.html.erb
    
    -                        format.json { render json: @organisation_users }
    -                end
    -        else
    -                render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -        end 
    +def admin_index
    +        if user_signed_in? && current_user.can_org_admin? then
    +                
    +                respond_to do |format|
    +                        format.html # index.html.erb
    +
    +                        format.json { render json: @organisation_users }
    +                end
    +        else
    +                render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +        end 
     end
    diff --git a/html/OrganisationsController.html b/html/OrganisationsController.html index dcab811..0dd652a 100644 --- a/html/OrganisationsController.html +++ b/html/OrganisationsController.html @@ -315,13 +315,13 @@
    # File app/controllers/organisations_controller.rb, line 58
    -def admin_edit
    -      if user_signed_in? && current_user.is_org_admin? then
    -      @organisation = Organisation.find(params[:id])
    -  
    -  else
    -              render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -      end 
    +def admin_edit
    +      if user_signed_in? && current_user.can_org_admin? then
    +      @organisation = Organisation.find(params[:id])
    +  
    +  else
    +              render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +      end 
     end
    @@ -350,18 +350,19 @@
    # File app/controllers/organisations_controller.rb, line 43
    -def admin_show
    -      if user_signed_in? && current_user.is_org_admin? then
    -          @organisation = Organisation.find(params[:id])
    -      
    -          respond_to do |format|
    -            format.html # show.html.erb
    
    -            format.json { render json: @organisation }
    -          end
    -  else
    -                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -              end 
    -              
    +def admin_show
    +      if user_signed_in? && current_user.can_org_admin? then
    +          @organisation = Organisation.find(params[:id])
    +      
    +          respond_to do |format|
    +            format.html # show.html.erb
    +
    +            format.json { render json: @organisation }
    +          end
    +  else
    +                      render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +              end 
    +              
     end
    @@ -390,24 +391,24 @@
    # File app/controllers/organisations_controller.rb, line 70
    -def admin_update
    -  if user_signed_in? && current_user.is_org_admin? then
    -      @organisation = Organisation.find(params[:id])
    -      @organisation.banner_text = params["org_banner_text"]
    -              
    -              
    -          respond_to do |format|
    -            if @organisation.update_attributes(params[:organisation])
    -              format.html { redirect_to admin_show_organisation_path(params[:id]), notice: I18n.t("admin.org_updated_message")  }
    -              format.json { head :no_content }
    -            else
    -              format.html { render action: "edit" }
    -              format.json { render json: @organisation.errors, status: :unprocessable_entity }
    -            end
    -          end
    -      else
    -        render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    -  end         
    +def admin_update
    +  if user_signed_in? && current_user.can_org_admin? then
    +      @organisation = Organisation.find(params[:id])
    +      @organisation.banner_text = params["org_banner_text"]
    +              
    +              
    +          respond_to do |format|
    +            if @organisation.update_attributes(params[:organisation])
    +              format.html { redirect_to admin_show_organisation_path(params[:id]), notice: I18n.t("admin.org_updated_message")  }
    +              format.json { head :no_content }
    +            else
    +              format.html { render action: "edit" }
    +              format.json { render json: @organisation.errors, status: :unprocessable_entity }
    +            end
    +          end
    +      else
    +        render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +  end         
     end
    @@ -436,19 +437,23 @@
    # File app/controllers/organisations_controller.rb, line 108
    -        def children
    -                @organisation = Organisation.find(params[:id])
    -                #if user_signed_in? then
    
    -                children = {}
    -                @organisation.children.each do |child|
    -                        children[child.id] = child.name
    -                end
    -                respond_to do |format|
    -                        format.json { render json: children.to_json }
    -                end
    -#               else
    
    -#                       render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    
    -#               end
    
    +        def children
    +                @organisation = Organisation.find(params[:id])
    +                #if user_signed_in? then
    +
    +                children = {}
    +                @organisation.children.each do |child|
    +                        children[child.id] = child.name
    +                end
    +                respond_to do |format|
    +                        format.json { render json: children.to_json }
    +                end
    +#               else
    +
    +#                       render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +
    +#               end
    +
             end
    @@ -477,18 +482,18 @@
    # File app/controllers/organisations_controller.rb, line 26
    -def create
    -  @organisation = Organisation.new(params[:organisation])
    -
    -  respond_to do |format|
    -    if @organisation.save
    -      format.html { redirect_to @organisation, notice: I18n.t("admin.org_created_message") }
    -      format.json { render json: @organisation, status: :created, location: @organisation }
    -    else
    -      format.html { render action: "new" }
    -      format.json { render json: @organisation.errors, status: :unprocessable_entity }
    -    end
    -  end
    +def create
    +  @organisation = Organisation.new(params[:organisation])
    +
    +  respond_to do |format|
    +    if @organisation.save
    +      format.html { redirect_to @organisation, notice: I18n.t("admin.org_created_message") }
    +      format.json { render json: @organisation, status: :created, location: @organisation }
    +    else
    +      format.html { render action: "new" }
    +      format.json { render json: @organisation.errors, status: :unprocessable_entity }
    +    end
    +  end
     end
    @@ -517,14 +522,14 @@
    # File app/controllers/organisations_controller.rb, line 92
    -def destroy
    -  @organisation = Organisation.find(params[:id])
    -  @organisation.destroy
    -
    -  respond_to do |format|
    -    format.html { redirect_to organisations_url }
    -    format.json { head :no_content }
    -  end
    +def destroy
    +  @organisation = Organisation.find(params[:id])
    +  @organisation.destroy
    +
    +  respond_to do |format|
    +    format.html { redirect_to organisations_url }
    +    format.json { head :no_content }
    +  end
     end
    @@ -553,13 +558,14 @@
    # File app/controllers/organisations_controller.rb, line 4
    -def index
    -  @organisations = Organisation.all
    -
    -  respond_to do |format|
    -    format.html # index.html.erb
    
    -    format.json { render json: @organisations }
    -  end
    +def index
    +  @organisations = Organisation.all
    +
    +  respond_to do |format|
    +    format.html # index.html.erb
    +
    +    format.json { render json: @organisations }
    +  end
     end
    @@ -588,13 +594,14 @@
    # File app/controllers/organisations_controller.rb, line 15
    -def new
    -  @organisation = Organisation.new
    -
    -  respond_to do |format|
    -    format.html # new.html.erb
    
    -    format.json { render json: @organisation }
    -  end
    +def new
    +  @organisation = Organisation.new
    +
    +  respond_to do |format|
    +    format.html # new.html.erb
    +
    +    format.json { render json: @organisation }
    +  end
     end
    @@ -623,10 +630,10 @@
    # File app/controllers/organisations_controller.rb, line 102
    -def parent
    -      @organisation = Organisation.find(params[:id])
    -      parent_org = @organisation.find_by {|o| o.parent_id }
    -      return parent_org
    +def parent
    +      @organisation = Organisation.find(params[:id])
    +      parent_org = @organisation.find_by {|o| o.parent_id }
    +      return parent_org
     end
    @@ -655,21 +662,25 @@
    # File app/controllers/organisations_controller.rb, line 123
    -        def templates
    -                @organisation = Organisation.find(params[:id])
    -                #if user_signed_in? then
    
    -                templates = {}
    -                @organisation.dmptemplates.each do |template|
    -                        if template.is_published? then
    -                                templates[template.id] = template.title
    -                        end
    -                end
    -                respond_to do |format|
    -                        format.json { render json: templates.to_json }
    -                end
    -#               else
    
    -#                       render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    
    -#               end
    
    +        def templates
    +                @organisation = Organisation.find(params[:id])
    +                #if user_signed_in? then
    +
    +                templates = {}
    +                @organisation.dmptemplates.each do |template|
    +                        if template.is_published? then
    +                                templates[template.id] = template.title
    +                        end
    +                end
    +                respond_to do |format|
    +                        format.json { render json: templates.to_json }
    +                end
    +#               else
    +
    +#                       render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
    +
    +#               end
    +
             end
    diff --git a/html/User.html b/html/User.html index bfedcf0..8e5c259 100644 --- a/html/User.html +++ b/html/User.html @@ -74,9 +74,9 @@
  • #filter -
  • #is_admin? +
  • #can_super_admin? -
  • #is_org_admin? +
  • #can_org_admin?
  • #name @@ -378,7 +378,7 @@
    - is_admin?can_super_admin?() click to toggle source
    @@ -392,7 +392,7 @@
    # File app/models/user.rb, line 110
    -def is_admin?
    +def can_super_admin?
             admin = roles.find_by_name("admin")
             return !admin.nil?
     end
    @@ -409,7 +409,7 @@
    - is_org_admin?can_org_admin?() click to toggle source
    @@ -423,7 +423,7 @@
    # File app/models/user.rb, line 115
    -def is_org_admin?
    +def can_org_admin?
             org_admin = roles.find_by_name("org_admin")
             return !org_admin.nil?
     end
    diff --git a/html/js/search_index.js b/html/js/search_index.js index c4d1c60..c30a123 100644 --- a/html/js/search_index.js +++ b/html/js/search_index.js @@ -1 +1 @@ -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=()","is_admin?()","is_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#is_admin?()","user#is_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","","

    lib/active_admin_views_pages_base.rb\n"],["Answer","","Answer.html","",""],["AnswersController","","AnswersController.html","",""],["ApplicationController","","ApplicationController.html","",""],["ApplicationHelper","","ApplicationHelper.html","",""],["Comment","","Comment.html","",""],["CommentsController","","CommentsController.html","",""],["ConfirmationsController","","ConfirmationsController.html","",""],["ContactsController","","ContactsController.html","",""],["CustomFailure","","CustomFailure.html","",""],["DMPonline4","","DMPonline4.html","",""],["DMPonline4::Application","","DMPonline4/Application.html","",""],["Dmptemplate","","Dmptemplate.html","",""],["DmptemplatesController","","DmptemplatesController.html","","

    Project: — DMPonline v4\n

    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","","

    app/controllers/registrations_controller.rb\n"],["Role","","Role.html","",""],["Section","","Section.html","",""],["SessionsController","","SessionsController.html","","

    app/controllers/sessions_controller.rb\n"],["Settings","","Settings.html","",""],["Settings::Dmptemplate","","Settings/Dmptemplate.html","",""],["Settings::PlanList","","Settings/PlanList.html","",""],["Settings::PlansController","","Settings/PlansController.html","",""],["Settings::ProjectsController","","Settings/ProjectsController.html","",""],["Settings::SettingsController","","Settings/SettingsController.html","",""],["SplashLog","","SplashLog.html","",""],["SplashLogsController","","SplashLogsController.html","",""],["StaticPagesController","","StaticPagesController.html","",""],["SuggestedAnswer","","SuggestedAnswer.html","",""],["Theme","","Theme.html","",""],["ThemesController","","ThemesController.html","",""],["User","","User.html","",""],["UserMailer","","UserMailer.html","",""],["UserOrgRole","","UserOrgRole.html","",""],["UserOrgRolesController","","UserOrgRolesController.html","",""],["UserRoleType","","UserRoleType.html","",""],["UserRoleTypesController","","UserRoleTypesController.html","",""],["UserStatus","","UserStatus.html","",""],["UserStatusesController","","UserStatusesController.html","",""],["UserType","","UserType.html","",""],["UserTypesController","","UserTypesController.html","",""],["Users","","Users.html","",""],["Users::OmniauthCallbacksController","","Users/OmniauthCallbacksController.html","",""],["Users::OmniauthShibbolethRequestController","","Users/OmniauthShibbolethRequestController.html","",""],["UsersController","","UsersController.html","",""],["Version","","Version.html","",""],["about_us","HomeController","HomeController.html#method-i-about_us","()",""],["about_us","StaticPagesController","StaticPagesController.html#method-i-about_us","()",""],["access_level","ProjectGroup","ProjectGroup.html#method-i-access_level","()",""],["access_level=","ProjectGroup","ProjectGroup.html#method-i-access_level-3D","(new_access_level)",""],["add_guidance_to_array","Plan","Plan.html#method-i-add_guidance_to_array","(guidance_array, guidance_group, theme, guidance)",""],["add_user","Project","Project.html#method-i-add_user","(user_id, is_editor = false, is_administrator = false, is_creator = false)",""],["admin_addphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_addphase","()","

    add a new phase to a template\n"],["admin_cloneversion","DmptemplatesController","DmptemplatesController.html#method-i-admin_cloneversion","()","

    clone a version of a template\n"],["admin_create","DmptemplatesController","DmptemplatesController.html#method-i-admin_create","()","

    POST /dmptemplates POST /dmptemplates.json\n"],["admin_create","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_create","()","

    POST /guidance_groups POST /guidance_groups.json\n"],["admin_create","GuidancesController","GuidancesController.html#method-i-admin_create","()","

    POST /guidances POST /guidances.json\n"],["admin_createphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_createphase","()","

    create a phase\n"],["admin_createquestion","DmptemplatesController","DmptemplatesController.html#method-i-admin_createquestion","()","

    create a question\n"],["admin_createsection","DmptemplatesController","DmptemplatesController.html#method-i-admin_createsection","()","

    create a section\n"],["admin_createsuggestedanswer","DmptemplatesController","DmptemplatesController.html#method-i-admin_createsuggestedanswer","()","

    SUGGESTED ANSWERS create suggested answers\n"],["admin_destroy","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroy","()","

    DELETE /dmptemplates/1 DELETE /dmptemplates/1.json\n"],["admin_destroy","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_destroy","()","

    DELETE /guidance_groups/1 DELETE /guidance_groups/1.json\n"],["admin_destroy","GuidancesController","GuidancesController.html#method-i-admin_destroy","()","

    DELETE /guidances/1 DELETE /guidances/1.json\n"],["admin_destroyphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroyphase","()","

    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","()","

    ARCHIVE /comments/1 ARCHIVE /comments/1.json\n"],["as_csv","ExportedPlan","ExportedPlan.html#method-i-as_csv","()","

    Export formats\n"],["as_txt","ExportedPlan","ExportedPlan.html#method-i-as_txt","()",""],["assign_administrator","Project","Project.html#method-i-assign_administrator","(user_id)",""],["assign_creator","Project","Project.html#method-i-assign_creator","(user_id)",""],["assign_editor","Project","Project.html#method-i-assign_editor","(user_id)",""],["assign_reader","Project","Project.html#method-i-assign_reader","(user_id)",""],["associate","Users::OmniauthShibbolethRequestController","Users/OmniauthShibbolethRequestController.html#method-i-associate","()",""],["authenticate_admin!","ApplicationController","ApplicationController.html#method-i-authenticate_admin-21","()",""],["build_footer","ActiveAdmin::Views::Pages::Base","ActiveAdmin/Views/Pages/Base.html#method-i-build_footer","()","

    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","()","

    DELETE /organisations/1 DELETE /organisations/1.json\n"],["destroy","ProjectGroupsController","ProjectGroupsController.html#method-i-destroy","()",""],["destroy","ProjectsController","ProjectsController.html#method-i-destroy","()","

    DELETE /projects/1 DELETE /projects/1.json\n"],["destroy","SessionsController","SessionsController.html#method-i-destroy","()",""],["destroy","ThemesController","ThemesController.html#method-i-destroy","()","

    DELETE /themes/1 DELETE /themes/1.json\n"],["destroy","UserOrgRolesController","UserOrgRolesController.html#method-i-destroy","()","

    DELETE /user_org_roles/1 DELETE /user_org_roles/1.json\n"],["destroy","UserRoleTypesController","UserRoleTypesController.html#method-i-destroy","()","

    DELETE /user_role_types/1 DELETE /user_role_types/1.json\n"],["destroy","UserStatusesController","UserStatusesController.html#method-i-destroy","()","

    DELETE /user_statuses/1 DELETE /user_statuses/1.json\n"],["destroy","UserTypesController","UserTypesController.html#method-i-destroy","()","

    DELETE /user_types/1 DELETE /user_types/1.json\n"],["destroy","UsersController","UsersController.html#method-i-destroy","()","

    DELETE /users/1 DELETE /users/1.json\n"],["details","Plan","Plan.html#method-i-details","()",""],["devise_mapping","ApplicationHelper","ApplicationHelper.html#method-i-devise_mapping","()",""],["display_name","GuidanceGroup","GuidanceGroup.html#method-i-display_name","()",""],["dmptemplate","Plan","Plan.html#method-i-dmptemplate","()",""],["do_update","RegistrationsController","RegistrationsController.html#method-i-do_update","(require_password = true, confirm = false)",""],["edit","CommentsController","CommentsController.html#method-i-edit","()","

    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)",""],["is_admin?","User","User.html#method-i-is_admin-3F","()",""],["is_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","()","

    def question_type?\n\n

    type_label = {}\nif self.is_text_field?\n  type_label = 'Text field'\nelsif self.multiple_choice? ...
    \n"],["questions","ExportedPlan","ExportedPlan.html#method-i-questions","()",""],["questions_for_section","ExportedPlan","ExportedPlan.html#method-i-questions_for_section","(section_id)",""],["readable_by","Plan","Plan.html#method-i-readable_by","(user_id)",""],["readable_by","Project","Project.html#method-i-readable_by","(user_id)",""],["redirect","Users::OmniauthShibbolethRequestController","Users/OmniauthShibbolethRequestController.html#method-i-redirect","()",""],["redirect_url","CustomFailure","CustomFailure.html#method-i-redirect_url","()",""],["resource","ApplicationHelper","ApplicationHelper.html#method-i-resource","()",""],["resource_name","ApplicationHelper","ApplicationHelper.html#method-i-resource_name","()",""],["respond","CustomFailure","CustomFailure.html#method-i-respond","()",""],["roadmap","StaticPagesController","StaticPagesController.html#method-i-roadmap","()",""],["root","Organisation","Organisation.html#method-i-root","()",""],["sanitize_text","ExportedPlan","ExportedPlan.html#method-i-sanitize_text","(text)",""],["scoped_collection","Object","Object.html#method-i-scoped_collection","()",""],["section_answers","Plan","Plan.html#method-i-section_answers","(section_id)",""],["section_answers","PlansController","PlansController.html#method-i-section_answers","()",""],["sections","ExportedPlan","ExportedPlan.html#method-i-sections","()","

    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","","

    lib/active_admin_views_pages_base.rb\n"],["Answer","","Answer.html","",""],["AnswersController","","AnswersController.html","",""],["ApplicationController","","ApplicationController.html","",""],["ApplicationHelper","","ApplicationHelper.html","",""],["Comment","","Comment.html","",""],["CommentsController","","CommentsController.html","",""],["ConfirmationsController","","ConfirmationsController.html","",""],["ContactsController","","ContactsController.html","",""],["CustomFailure","","CustomFailure.html","",""],["DMPonline4","","DMPonline4.html","",""],["DMPonline4::Application","","DMPonline4/Application.html","",""],["Dmptemplate","","Dmptemplate.html","",""],["DmptemplatesController","","DmptemplatesController.html","","

    Project: — DMPonline v4\n

    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","","

    app/controllers/registrations_controller.rb\n"],["Role","","Role.html","",""],["Section","","Section.html","",""],["SessionsController","","SessionsController.html","","

    app/controllers/sessions_controller.rb\n"],["Settings","","Settings.html","",""],["Settings::Dmptemplate","","Settings/Dmptemplate.html","",""],["Settings::PlanList","","Settings/PlanList.html","",""],["Settings::PlansController","","Settings/PlansController.html","",""],["Settings::ProjectsController","","Settings/ProjectsController.html","",""],["Settings::SettingsController","","Settings/SettingsController.html","",""],["SplashLog","","SplashLog.html","",""],["SplashLogsController","","SplashLogsController.html","",""],["StaticPagesController","","StaticPagesController.html","",""],["SuggestedAnswer","","SuggestedAnswer.html","",""],["Theme","","Theme.html","",""],["ThemesController","","ThemesController.html","",""],["User","","User.html","",""],["UserMailer","","UserMailer.html","",""],["UserOrgRole","","UserOrgRole.html","",""],["UserOrgRolesController","","UserOrgRolesController.html","",""],["UserRoleType","","UserRoleType.html","",""],["UserRoleTypesController","","UserRoleTypesController.html","",""],["UserStatus","","UserStatus.html","",""],["UserStatusesController","","UserStatusesController.html","",""],["UserType","","UserType.html","",""],["UserTypesController","","UserTypesController.html","",""],["Users","","Users.html","",""],["Users::OmniauthCallbacksController","","Users/OmniauthCallbacksController.html","",""],["Users::OmniauthShibbolethRequestController","","Users/OmniauthShibbolethRequestController.html","",""],["UsersController","","UsersController.html","",""],["Version","","Version.html","",""],["about_us","HomeController","HomeController.html#method-i-about_us","()",""],["about_us","StaticPagesController","StaticPagesController.html#method-i-about_us","()",""],["access_level","ProjectGroup","ProjectGroup.html#method-i-access_level","()",""],["access_level=","ProjectGroup","ProjectGroup.html#method-i-access_level-3D","(new_access_level)",""],["add_guidance_to_array","Plan","Plan.html#method-i-add_guidance_to_array","(guidance_array, guidance_group, theme, guidance)",""],["add_user","Project","Project.html#method-i-add_user","(user_id, is_editor = false, is_administrator = false, is_creator = false)",""],["admin_addphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_addphase","()","

    add a new phase to a template\n"],["admin_cloneversion","DmptemplatesController","DmptemplatesController.html#method-i-admin_cloneversion","()","

    clone a version of a template\n"],["admin_create","DmptemplatesController","DmptemplatesController.html#method-i-admin_create","()","

    POST /dmptemplates POST /dmptemplates.json\n"],["admin_create","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_create","()","

    POST /guidance_groups POST /guidance_groups.json\n"],["admin_create","GuidancesController","GuidancesController.html#method-i-admin_create","()","

    POST /guidances POST /guidances.json\n"],["admin_createphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_createphase","()","

    create a phase\n"],["admin_createquestion","DmptemplatesController","DmptemplatesController.html#method-i-admin_createquestion","()","

    create a question\n"],["admin_createsection","DmptemplatesController","DmptemplatesController.html#method-i-admin_createsection","()","

    create a section\n"],["admin_createsuggestedanswer","DmptemplatesController","DmptemplatesController.html#method-i-admin_createsuggestedanswer","()","

    SUGGESTED ANSWERS create suggested answers\n"],["admin_destroy","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroy","()","

    DELETE /dmptemplates/1 DELETE /dmptemplates/1.json\n"],["admin_destroy","GuidanceGroupsController","GuidanceGroupsController.html#method-i-admin_destroy","()","

    DELETE /guidance_groups/1 DELETE /guidance_groups/1.json\n"],["admin_destroy","GuidancesController","GuidancesController.html#method-i-admin_destroy","()","

    DELETE /guidances/1 DELETE /guidances/1.json\n"],["admin_destroyphase","DmptemplatesController","DmptemplatesController.html#method-i-admin_destroyphase","()","

    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","()","

    ARCHIVE /comments/1 ARCHIVE /comments/1.json\n"],["as_csv","ExportedPlan","ExportedPlan.html#method-i-as_csv","()","

    Export formats\n"],["as_txt","ExportedPlan","ExportedPlan.html#method-i-as_txt","()",""],["assign_administrator","Project","Project.html#method-i-assign_administrator","(user_id)",""],["assign_creator","Project","Project.html#method-i-assign_creator","(user_id)",""],["assign_editor","Project","Project.html#method-i-assign_editor","(user_id)",""],["assign_reader","Project","Project.html#method-i-assign_reader","(user_id)",""],["associate","Users::OmniauthShibbolethRequestController","Users/OmniauthShibbolethRequestController.html#method-i-associate","()",""],["authenticate_admin!","ApplicationController","ApplicationController.html#method-i-authenticate_admin-21","()",""],["build_footer","ActiveAdmin::Views::Pages::Base","ActiveAdmin/Views/Pages/Base.html#method-i-build_footer","()","

    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","()","

    DELETE /organisations/1 DELETE /organisations/1.json\n"],["destroy","ProjectGroupsController","ProjectGroupsController.html#method-i-destroy","()",""],["destroy","ProjectsController","ProjectsController.html#method-i-destroy","()","

    DELETE /projects/1 DELETE /projects/1.json\n"],["destroy","SessionsController","SessionsController.html#method-i-destroy","()",""],["destroy","ThemesController","ThemesController.html#method-i-destroy","()","

    DELETE /themes/1 DELETE /themes/1.json\n"],["destroy","UserOrgRolesController","UserOrgRolesController.html#method-i-destroy","()","

    DELETE /user_org_roles/1 DELETE /user_org_roles/1.json\n"],["destroy","UserRoleTypesController","UserRoleTypesController.html#method-i-destroy","()","

    DELETE /user_role_types/1 DELETE /user_role_types/1.json\n"],["destroy","UserStatusesController","UserStatusesController.html#method-i-destroy","()","

    DELETE /user_statuses/1 DELETE /user_statuses/1.json\n"],["destroy","UserTypesController","UserTypesController.html#method-i-destroy","()","

    DELETE /user_types/1 DELETE /user_types/1.json\n"],["destroy","UsersController","UsersController.html#method-i-destroy","()","

    DELETE /users/1 DELETE /users/1.json\n"],["details","Plan","Plan.html#method-i-details","()",""],["devise_mapping","ApplicationHelper","ApplicationHelper.html#method-i-devise_mapping","()",""],["display_name","GuidanceGroup","GuidanceGroup.html#method-i-display_name","()",""],["dmptemplate","Plan","Plan.html#method-i-dmptemplate","()",""],["do_update","RegistrationsController","RegistrationsController.html#method-i-do_update","(require_password = true, confirm = false)",""],["edit","CommentsController","CommentsController.html#method-i-edit","()","

    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","()","

    def question_type?\n\n

    type_label = {}\nif self.is_text_field?\n  type_label = 'Text field'\nelsif self.multiple_choice? ...
    \n"],["questions","ExportedPlan","ExportedPlan.html#method-i-questions","()",""],["questions_for_section","ExportedPlan","ExportedPlan.html#method-i-questions_for_section","(section_id)",""],["readable_by","Plan","Plan.html#method-i-readable_by","(user_id)",""],["readable_by","Project","Project.html#method-i-readable_by","(user_id)",""],["redirect","Users::OmniauthShibbolethRequestController","Users/OmniauthShibbolethRequestController.html#method-i-redirect","()",""],["redirect_url","CustomFailure","CustomFailure.html#method-i-redirect_url","()",""],["resource","ApplicationHelper","ApplicationHelper.html#method-i-resource","()",""],["resource_name","ApplicationHelper","ApplicationHelper.html#method-i-resource_name","()",""],["respond","CustomFailure","CustomFailure.html#method-i-respond","()",""],["roadmap","StaticPagesController","StaticPagesController.html#method-i-roadmap","()",""],["root","Organisation","Organisation.html#method-i-root","()",""],["sanitize_text","ExportedPlan","ExportedPlan.html#method-i-sanitize_text","(text)",""],["scoped_collection","Object","Object.html#method-i-scoped_collection","()",""],["section_answers","Plan","Plan.html#method-i-section_answers","(section_id)",""],["section_answers","PlansController","PlansController.html#method-i-section_answers","()",""],["sections","ExportedPlan","ExportedPlan.html#method-i-sections","()","

    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 diff --git a/html/table_of_contents.html b/html/table_of_contents.html index 627c6b2..8d505d3 100644 --- a/html/table_of_contents.html +++ b/html/table_of_contents.html @@ -616,9 +616,9 @@

  • #institution_id= — Project -
  • #is_admin? — User +
  • #can_super_admin? — User -
  • #is_org_admin? — User +
  • #can_org_admin? — User
  • #javascript — ApplicationHelper