diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a1ff6ad..2d3dcb0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -33,7 +33,7 @@ if FastGettext.default_available_locales.include?(params[:locale]) session[:locale] = params[:locale] end - redirect_to root_path + redirect_to(request.referer || root_path) #redirects the user to URL where she/he was when the request to this resource was made or root if none is encountered end def store_location diff --git a/app/controllers/guidances_controller.rb b/app/controllers/guidances_controller.rb index 2356ef0..9cfcfc5 100644 --- a/app/controllers/guidances_controller.rb +++ b/app/controllers/guidances_controller.rb @@ -39,19 +39,11 @@ @guidance = Guidance.new(guidance_params) authorize @guidance @guidance.text = params["guidance-text"] - + @guidance.themes = [] if !guidance_params[:theme_ids].nil? guidance_params[:theme_ids].map{|t| @guidance.themes << Theme.find(t.to_i) unless t.empty? } end - - if @guidance.published == true then - @gg = GuidanceGroup.find(@guidance.guidance_group_id) - if @gg.published == false || @gg.published.nil? then - @gg.published = true - @gg.save - end - end if @guidance.save redirect_to admin_show_guidance_path(@guidance), notice: _('Guidance was successfully created.') @@ -69,8 +61,7 @@ @guidance = Guidance.find(params[:id]) authorize @guidance @guidance.text = params["guidance-text"] - - if @guidance.save(guidance_params) + if @guidance.update_attributes(guidance_params) redirect_to admin_show_guidance_path(params[:guidance]), notice: _('Guidance was successfully updated.') else flash[:notice] = failed_update_error(@guidance, _('guidance')) diff --git a/app/controllers/orgs_controller.rb b/app/controllers/orgs_controller.rb index a8f9835..d0f5a8e 100644 --- a/app/controllers/orgs_controller.rb +++ b/app/controllers/orgs_controller.rb @@ -47,6 +47,6 @@ private def org_params params.require(:org).permit(:name, :abbreviation, :target_url, :is_other, :banner_text, :language_id, - :region_id, :logo, :contact_email) + :region_id, :logo, :contact_email, :remove_logo) end end diff --git a/app/controllers/phases_controller.rb b/app/controllers/phases_controller.rb index 4abba8b..21084a9 100644 --- a/app/controllers/phases_controller.rb +++ b/app/controllers/phases_controller.rb @@ -23,23 +23,25 @@ # get the ids of the dynamically selected guidance groups # and keep a map of them so we can extract the names later guidance_groups_ids = @plan.guidance_groups.map{|pgg| pgg.id} - guidance_groups = GuidanceGroup.includes({guidances: :themes}).find(guidance_groups_ids) + guidance_groups = GuidanceGroup.includes({guidances: :themes}).where(published: true, id: guidance_groups_ids) # create a map from theme to array of guidances # where guidance is a hash with the text and the org name theme_guidance = {} - guidance_groups.each do |guidance_group| + guidance_groups.includes(guidances:[:themes]).each do |guidance_group| guidance_group.guidances.each do |guidance| - guidance.themes.each do |theme| - title = theme.title - if !theme_guidance.has_key?(title) - theme_guidance[title] = Array.new + if guidance.published + guidance.themes.each do |theme| + title = theme.title + if !theme_guidance.has_key?(title) + theme_guidance[title] = Array.new + end + theme_guidance[title] << { + text: guidance.text, + org: guidance_group.name + ':' + } end - theme_guidance[title] << { - text: guidance.text, - org: guidance_group.name + ':' - } end end end diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index f967326..fc968ff 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -16,14 +16,14 @@ def new @plan = Plan.new authorize @plan - + # Get all of the available funders and non-funder orgs @funders = Org.funders.joins(:templates).where(templates: {published: true}).uniq.sort{|x,y| x.name <=> y.name } @orgs = (Org.institutions + Org.managing_orgs).flatten.uniq.sort{|x,y| x.name <=> y.name } - + # Get the current user's org @default_org = current_user.org if @orgs.include?(current_user.org) - + respond_to :html end @@ -32,48 +32,48 @@ def create @plan = Plan.new authorize @plan - + @plan.principal_investigator = current_user.surname.blank? ? nil : "#{current_user.firstname} #{current_user.surname}" @plan.data_contact = current_user.email @plan.funder_name = plan_params[:funder_name] - + # If a template hasn't been identified look for the available templates if plan_params[:template_id].blank? template_options(plan_params[:org_id], plan_params[:funder_id]) # Return the 'Select a template' section respond_to do |format| - format.js {} + format.js {} end - + # Otherwise create the plan else @plan.template = Template.find(plan_params[:template_id]) - + if plan_params[:title].blank? - @plan.title = current_user.firstname.blank? ? _('My Plan') + '(' + @plan.template.title + ')' : + @plan.title = current_user.firstname.blank? ? _('My Plan') + '(' + @plan.template.title + ')' : current_user.firstname + "'s" + _(" Plan") else @plan.title = plan_params[:title] end - + if @plan.save @plan.assign_creator(current_user) - + # pre-select org's guidance - ggs = GuidanceGroup.where(org_id: plan_params[:org_id], - optional_subset: false, + ggs = GuidanceGroup.where(org_id: plan_params[:org_id], + optional_subset: false, published: true) - if !ggs.blank? then @plan.guidance_groups << ggs end - + if !ggs.blank? then @plan.guidance_groups << ggs end + default = Template.find_by(is_default: true) - + msg = "#{_('Plan was successfully created.')} " - + if !default.nil? && default == @plan.template # We used the generic/default template msg += _('This plan is based on the default template.') - + elsif !@plan.template.customization_of.nil? # We used a customized version of the the funder template msg += "#{_('This plan is based on the')} #{plan_params[:funder_name]} #{_('template with customisations by the')} #{plan_params[:org_name]}" @@ -82,9 +82,9 @@ # We used the specified org's or funder's template msg += "#{_('This plan is based on the')} #{@plan.template.org.name} template." end - + flash[:notice] = msg - + respond_to do |format| format.js { render js: "window.location='#{plan_url(@plan)}?editing=true'" } end @@ -93,7 +93,7 @@ # Something went wrong so report the issue to the user flash[:notice] = failed_create_error(@plan, 'Plan') respond_to do |format| - format.js {} + format.js {} end end end @@ -115,8 +115,8 @@ @important_ggs = [] @important_ggs << [current_user.org, @all_ggs_grouped_by_org.delete(current_user.org)] @all_ggs_grouped_by_org.each do |org, ggs| - if org.organisation? - @important_ggs << [org,ggs] + if org.organisation? + @important_ggs << [org,ggs] @all_ggs_grouped_by_org.delete(org) end end @@ -226,96 +226,6 @@ end end - -# TODO: Remove these endpoints now that we're no longer using them -=begin - def section_answers - @plan = Plan.find(params[:id]) - authorize @plan - respond_to do |format| - format.json { render json: @plan.section_answers(params[:section_id]) } - end - end - - def locked - @plan = Plan.find(params[:id]) - authorize @plan - if !@plan.nil? && user_signed_in? && @plan.readable_by(current_user.id) then - respond_to do |format| - format.json { render json: @plan.locked(params[:section_id],current_user.id) } - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - def delete_recent_locks - @plan = Plan.find(params[:id]) - authorize @plan - if user_signed_in? && @plan.editable_by(current_user.id) then - respond_to do |format| - if @plan.delete_recent_locks(current_user.id) - format.html { render action: "edit" } - else - format.html { render action: "edit" } - end - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - def unlock_all_sections - @plan = Plan.find(params[:id]) - authorize @plan - if user_signed_in? && @plan.editable_by(current_user.id) then - respond_to do |format| - if @plan.unlock_all_sections(current_user.id) - format.html { render action: "edit" } - else - format.html { render action: "edit" } - end - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - def lock_section - @plan = Plan.find(params[:id]) - authorize @plan - if user_signed_in? && @plan.editable_by(current_user.id) then - respond_to do |format| - if @plan.lock_section(params[:section_id], current_user.id) - format.html { render action: "edit" } - else - format.html { render action: "edit" } - format.json { render json: @plan.errors, status: :unprocessable_entity } - end - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - def unlock_section - @plan = Plan.find(params[:id]) - authorize @plan - if user_signed_in? && @plan.editable_by(current_user.id) then - respond_to do |format| - if @plan.unlock_section(params[:section_id], current_user.id) - format.html { render action: "edit" } - - else - format.html { render action: "edit" } - end - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end -=end - def answer @plan = Plan.find(params[:id]) authorize @plan @@ -388,7 +298,7 @@ private - def plan_params + def plan_params params.require(:plan).permit(:org_id, :org_name, :funder_id, :funder_name, :template_id, :title) end @@ -459,7 +369,7 @@ # -------------------------------------------------------------------------- def template_options(org_id, funder_id) @templates = [] - + if !org_id.blank? || !funder_id.blank? if funder_id.blank? # Load the org's template(s) @@ -468,15 +378,15 @@ @templates = Template.valid.where(published: true, org: org, customization_of: nil).to_a @msg = _("We found multiple DMP templates corresponding to the research organisation.") if @templates.count > 1 end - + else funder = Org.find(funder_id) # Load the funder's template(s) @templates = Template.valid.where(published: true, org: funder).to_a - + unless org_id.blank? org = Org.find(org_id) - + # Swap out any organisational cusotmizations of a funder template @templates.each do |tmplt| customization = Template.valid.find_by(published: true, org: org, customization_of: tmplt.dmptemplate_id) @@ -486,17 +396,17 @@ end end end - + msg = _("We found multiple DMP templates corresponding to the funder.") if @templates.count > 1 end end - + # If no templates were available use the generic templates if @templates.empty? @msg = _("Using the generic Data Management Plan") @templates << Template.find_by(is_default: true) end - + @templates = @templates.sort{|x,y| x.title <=> y.title } if @templates.count > 1 end diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb index dbc5613..f3250bb 100644 --- a/app/controllers/questions_controller.rb +++ b/app/controllers/questions_controller.rb @@ -56,10 +56,21 @@ if guidance.blank? guidance = @question.annotations.build guidance.type = :guidance + guidance.org_id = current_user.org_id end guidance.text = params["question-guidance-#{params[:id]}"] guidance.save end + example_answer = @question.get_example_answer(current_user.org_id) + if params["question"]["annotations_attributes"].present? && params["question"]["annotations_attributes"]["0"]["id"].present? + if example_answer.blank? + example_answer = @question.annotations.build + example_answer.type = :example_answer + example_answer.org_id = current_user.org_id + end + example_answer.text = params["question"]["annotations_attributes"]["0"]["text"] + example_answer.save + end if @question.question_format.textfield? @question.default_value = params["question-default-value-textfield"] elsif @question.question_format.textarea? diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 57b504f..b26a62e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -41,7 +41,7 @@ else if perms.include? perm @user.perms << perm - if perm.name == Perm.use_api.id + if perm.id == Perm.use_api.id @user.keep_or_generate_token! end end diff --git a/app/dashboards/exported_plan_dashboard.rb b/app/dashboards/exported_plan_dashboard.rb index 47b352e..ec618cf 100644 --- a/app/dashboards/exported_plan_dashboard.rb +++ b/app/dashboards/exported_plan_dashboard.rb @@ -15,6 +15,7 @@ format: Field::String, created_at: Field::DateTime, updated_at: Field::DateTime, + phase_id: Field::Number, }.freeze # COLLECTION_ATTRIBUTES @@ -39,6 +40,7 @@ :format, :created_at, :updated_at, + :phase_id, ].freeze # FORM_ATTRIBUTES @@ -49,6 +51,7 @@ :user, :setting_objects, :format, + :phase_id, ].freeze # Overwrite this method to customize how exported plans are displayed diff --git a/app/dashboards/guidance_dashboard.rb b/app/dashboards/guidance_dashboard.rb index 8e6427f..c76c41b 100644 --- a/app/dashboards/guidance_dashboard.rb +++ b/app/dashboards/guidance_dashboard.rb @@ -10,7 +10,6 @@ ATTRIBUTE_TYPES = { guidance_group: Field::BelongsTo, themes: Field::HasMany, - guidance_groups: Field::HasMany, id: Field::Number, text: Field::Text, created_at: Field::DateTime, @@ -27,8 +26,8 @@ COLLECTION_ATTRIBUTES = [ :guidance_group, :themes, - :guidance_groups, :id, + :text, ].freeze # SHOW_PAGE_ATTRIBUTES @@ -36,7 +35,6 @@ SHOW_PAGE_ATTRIBUTES = [ :guidance_group, :themes, - :guidance_groups, :id, :text, :created_at, @@ -51,7 +49,6 @@ FORM_ATTRIBUTES = [ :guidance_group, :themes, - :guidance_groups, :text, :question_id, :published, diff --git a/app/dashboards/guidance_group_dashboard.rb b/app/dashboards/guidance_group_dashboard.rb index a8a83cc..76e2f09 100644 --- a/app/dashboards/guidance_group_dashboard.rb +++ b/app/dashboards/guidance_group_dashboard.rb @@ -10,6 +10,7 @@ ATTRIBUTE_TYPES = { org: Field::BelongsTo, guidances: Field::HasMany, + plans: Field::HasMany, id: Field::Number, name: Field::String, created_at: Field::DateTime, @@ -24,10 +25,11 @@ # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ + :name, :org, :guidances, +# :plans, :id, - :name, ].freeze # SHOW_PAGE_ATTRIBUTES @@ -35,6 +37,7 @@ SHOW_PAGE_ATTRIBUTES = [ :org, :guidances, +# :plans, :id, :name, :created_at, @@ -49,6 +52,7 @@ FORM_ATTRIBUTES = [ :org, :guidances, +# :plans, :name, :optional_subset, :published, @@ -60,7 +64,6 @@ # def display_resource(guidance_group) # "GuidanceGroup ##{guidance_group.id}" # end - def display_resource(guidance_group) guidance_group.name end diff --git a/app/dashboards/org_dashboard.rb b/app/dashboards/org_dashboard.rb index c00db7b..72f8962 100644 --- a/app/dashboards/org_dashboard.rb +++ b/app/dashboards/org_dashboard.rb @@ -43,7 +43,7 @@ :abbreviation, :language, :guidance_groups, - :templates, +# :templates, :contact_email, :org_type, ].freeze @@ -55,7 +55,7 @@ :abbreviation, :language, :guidance_groups, - :templates, +# :templates, :contact_email, :org_type, :users, diff --git a/app/dashboards/plan_dashboard.rb b/app/dashboards/plan_dashboard.rb index cb3b724..e22c30f 100644 --- a/app/dashboards/plan_dashboard.rb +++ b/app/dashboards/plan_dashboard.rb @@ -17,12 +17,10 @@ notes: Field::HasMany, roles: Field::HasMany, users: Field::HasMany, - plans_guidance_groups: Field::HasMany, guidance_groups: Field::HasMany, exported_plans: Field::HasMany, setting_objects: Field::HasMany.with_options(class_name: "Settings::Template"), id: Field::Number, - project_id: Field::Number, title: Field::String, created_at: Field::DateTime, updated_at: Field::DateTime, @@ -61,12 +59,10 @@ :notes, :roles, :users, - :plans_guidance_groups, :guidance_groups, :exported_plans, :setting_objects, :id, - :project_id, :title, :created_at, :updated_at, @@ -94,11 +90,9 @@ :notes, :roles, :users, - :plans_guidance_groups, :guidance_groups, :exported_plans, :setting_objects, - :project_id, :title, :slug, :grant_number, diff --git a/app/dashboards/question_dashboard.rb b/app/dashboards/question_dashboard.rb index af3d8bb..cda2c4c 100644 --- a/app/dashboards/question_dashboard.rb +++ b/app/dashboards/question_dashboard.rb @@ -17,7 +17,6 @@ id: Field::Number, text: Field::Text, default_value: Field::Text, - guidance: Field::Text, number: Field::Number, created_at: Field::DateTime, updated_at: Field::DateTime, @@ -49,7 +48,6 @@ :id, :text, :default_value, - :guidance, :number, :created_at, :updated_at, @@ -69,7 +67,6 @@ :question_format, :text, :default_value, - :guidance, :number, :option_comment_display, :modifiable, diff --git a/app/dashboards/template_dashboard.rb b/app/dashboards/template_dashboard.rb index cfaa8e0..7a5a313 100644 --- a/app/dashboards/template_dashboard.rb +++ b/app/dashboards/template_dashboard.rb @@ -28,6 +28,8 @@ visibility: Field::Number, customization_of: Field::Number, dmptemplate_id: Field::Number, + migrated: Field::Boolean, + dirty: Field::Boolean, }.freeze # COLLECTION_ATTRIBUTES @@ -67,6 +69,8 @@ :visibility, :customization_of, :dmptemplate_id, + :migrated, + :dirty, ].freeze # FORM_ATTRIBUTES @@ -90,6 +94,8 @@ :visibility, :customization_of, :dmptemplate_id, + :migrated, + :dirty, ].freeze # Overwrite this method to customize how templates are displayed diff --git a/app/dashboards/theme_dashboard.rb b/app/dashboards/theme_dashboard.rb index 40f8b3d..2be7c8d 100644 --- a/app/dashboards/theme_dashboard.rb +++ b/app/dashboards/theme_dashboard.rb @@ -60,4 +60,7 @@ # def display_resource(theme) # "Theme ##{theme.id}" # end + def display_resource(theme) + "Theme: #{theme.title} (##{theme.id})" + end end diff --git a/app/models/plan.rb b/app/models/plan.rb index f3974d2..8688f34 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -139,7 +139,8 @@ section.questions.each do |question| question.themes.each do |theme| theme.guidances.each do |guidance| - ggroups << guidance.guidance_group + ggroups << guidance.guidance_group if guidance.guidance_group.published + # only show published guidance groups end end end @@ -158,12 +159,13 @@ # find all the themes in this plan # and get the guidance groups they belong to ggroups = [] - self.template.phases.each do |phase| + Template.includes(phases: [sections: [questions: [themes: [guidances: [guidance_group: :org]]]]]).find(self.template_id).phases.each do |phase| phase.sections.each do |section| section.questions.each do |question| question.themes.each do |theme| theme.guidances.each do |guidance| - ggroups << guidance.guidance_group + ggroups << guidance.guidance_group if guidance.guidance_group.published + # only show published guidance groups end end end diff --git a/app/models/user.rb b/app/models/user.rb index c1350f6..f900030 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -53,7 +53,7 @@ ## # Scopes - default_scope { includes(:org, :perms, :plans) } + default_scope { includes(:org, :perms) } diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb index 77146d5..a68ab68 100644 --- a/app/views/guidance_groups/admin_edit.html.erb +++ b/app/views/guidance_groups/admin_edit.html.erb @@ -29,7 +29,7 @@
- <%= link_to(image_tag('help_button.png'), '#', class: 'guidance_group_title_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.')) %> + <%= link_to(image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.')) %>
@@ -55,7 +55,7 @@ <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %>
- <%= link_to(image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.")) %> + <%= link_to(image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.")) %>
diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb index 8ea92b8..2c466cb 100644 --- a/app/views/guidance_groups/admin_new.html.erb +++ b/app/views/guidance_groups/admin_new.html.erb @@ -25,7 +25,7 @@ <%= f.text_field :name, as: :string, class: "text_field" %>
- <%= link_to( image_tag("help_button.png"), "#", class: 'guidance_group_title_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.'))%>
@@ -35,7 +35,7 @@ <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard."))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard."))%>
diff --git a/app/views/guidances/_add_guidance.html.erb b/app/views/guidances/_add_guidance.html.erb index bd036d2..ca49a90 100644 --- a/app/views/guidances/_add_guidance.html.erb +++ b/app/views/guidances/_add_guidance.html.erb @@ -9,7 +9,7 @@ <%= text_area_tag("guidance-text", "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "guidance_text_popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter your guidance here. You can include links where needed.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter your guidance here. You can include links where needed.'))%>
@@ -24,7 +24,7 @@ :id, :title, {prompt: false, include_blank: _('None')}, {multiple: true})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "guidance_by_themes_popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which theme(s) this guidance relates to.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which theme(s) this guidance relates to.'))%>
@@ -47,7 +47,7 @@ :id, :name, {prompt: false, include_blank: _('None')}, {multiple: false})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "guidance_group_select_popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which group this guidance relates to.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which group this guidance relates to.'))%>
diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb index b8ddce7..769fc6e 100644 --- a/app/views/guidances/admin_edit.html.erb +++ b/app/views/guidances/admin_edit.html.erb @@ -29,7 +29,7 @@ <%= text_area_tag("guidance-text", @guidance.text, class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_text_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%>
@@ -43,7 +43,7 @@ {prompt: false, include_blank: 'None'}, {multiple: true})%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_by_themes_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%>
@@ -65,7 +65,7 @@ :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false})%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_select_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%>
diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index 59b5397..a67fe0e 100644 --- a/app/views/guidances/admin_new.html.erb +++ b/app/views/guidances/admin_new.html.erb @@ -24,7 +24,7 @@ <%= text_area_tag("guidance-text", "", class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_text_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%>
@@ -38,7 +38,7 @@ :id, :title, {prompt: false, include_blank: 'None'}, {multiple: true})%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_by_themes_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%>
@@ -51,7 +51,7 @@ <%= f.check_box :published , as: :check_boxes%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("Check this box when you are ready for this guidance to appear on user's plans."))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("Check this box when you are ready for this guidance to appear on user's plans."))%>
@@ -62,7 +62,7 @@ :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false})%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_select_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%>
diff --git a/app/views/phases/_edit_phase.html.erb b/app/views/phases/_edit_phase.html.erb index de7b425..40ae572 100644 --- a/app/views/phases/_edit_phase.html.erb +++ b/app/views/phases/_edit_phase.html.erb @@ -29,7 +29,7 @@ <%= text_area_tag("phase-desc", phase.description, class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'phase_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%>
diff --git a/app/views/phases/admin_add.html.erb b/app/views/phases/admin_add.html.erb index 546c727..2263b8d 100644 --- a/app/views/phases/admin_add.html.erb +++ b/app/views/phases/admin_add.html.erb @@ -53,7 +53,7 @@ <%= tinymce :content_css => asset_path('application.css') %>
- <%= link_to( image_tag("help_button.png"), "#", class: "phase_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%>
diff --git a/app/views/plans/_plan_details.html.erb b/app/views/plans/_plan_details.html.erb index f971214..b23b647 100644 --- a/app/views/plans/_plan_details.html.erb +++ b/app/views/plans/_plan_details.html.erb @@ -153,10 +153,10 @@ <%= form_tag( update_guidance_choices_plan_path(@plan), method: :put) do %>
-

Guidance Choices

+

<%=_('Guidance Choices')%>

- <% @important_ggs.each do |org, groups| %> + <% @important_ggs.each do |org, groups| %> - + @@ -97,7 +97,7 @@
- <%= link_to( image_tag("help_button.png"), "#", class: "default_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%>
@@ -113,7 +113,7 @@ <%= text_area_tag(:example_answer, "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "suggested_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%>
@@ -127,7 +127,7 @@ <%= text_area_tag(:guidance, "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_guidance_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%>
@@ -143,7 +143,7 @@ :id, :title, {prompt: false, include_blank: _('None')}, {multiple: true})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_themes_popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%>
diff --git a/app/views/questions/_edit_question.html.erb b/app/views/questions/_edit_question.html.erb index c46d932..0d721d4 100644 --- a/app/views/questions/_edit_question.html.erb +++ b/app/views/questions/_edit_question.html.erb @@ -38,7 +38,7 @@ {}, class: "question_format", id: "#{question.id}-select-format"%>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_format_popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:"))%>
@@ -51,7 +51,7 @@ - + @@ -92,7 +92,7 @@
- <%= link_to( image_tag("help_button.png"), "#", class: "default_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%>
@@ -116,7 +116,7 @@ <% end %>
- <%= link_to( image_tag("help_button.png"), "#", class: "suggested_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%>
@@ -132,7 +132,7 @@ <%= text_area_tag("question-guidance-#{question.id}", guidance_text , class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_guidance_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%>
@@ -147,7 +147,7 @@ :id, :title, {prompt: false, include_blank: "None"}, {multiple: true})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_themes_popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%>
diff --git a/app/views/sections/_add_section.html.erb b/app/views/sections/_add_section.html.erb index 4bbed72..93564b8 100644 --- a/app/views/sections/_add_section.html.erb +++ b/app/views/sections/_add_section.html.erb @@ -25,7 +25,8 @@ @@ -35,7 +36,7 @@ <%= text_area_tag("section-desc", "" , class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "section_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%>
diff --git a/app/views/sections/_edit_section.html.erb b/app/views/sections/_edit_section.html.erb index 5ed252c..4bc7cfc 100644 --- a/app/views/sections/_edit_section.html.erb +++ b/app/views/sections/_edit_section.html.erb @@ -39,7 +39,8 @@
<% if groups && groups.size == 1 %> diff --git a/app/views/plans/export.docx.erb b/app/views/plans/export.docx.erb index be267a8..05f5a3c 100644 --- a/app/views/plans/export.docx.erb +++ b/app/views/plans/export.docx.erb @@ -21,9 +21,7 @@ %>

<%= section.title %>

<% questions.each do |question| %> -

- <%= raw question.text %> -

+

<%= raw question.text %>

<% answer = @plan.answer(question.id, false) %> <% if answer.nil? %>

<%= _('Question not answered') %>

@@ -36,12 +34,13 @@ <% end %> <% if question.option_comment_display %> - <%= raw answer.text %> +

<%= raw answer.text %>

<% end %> <% else %> - <%= raw answer.text %> +

<%= raw answer.text %>

<% end %> - <% end%> + <% end%> +

<% end %> <% end %> <% end %> diff --git a/app/views/questions/_add_question.html.erb b/app/views/questions/_add_question.html.erb index 96b894f..6675827 100644 --- a/app/views/questions/_add_question.html.erb +++ b/app/views/questions/_add_question.html.erb @@ -43,7 +43,7 @@ {}, class: "question_format" %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_format_popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:
  • - text area (large box for paragraphs);
  • - text field (for a short answer);
  • - checkboxes where options are presented in a list and multiple values can be selected;
  • - radio buttons where options are presented in a list but only one can be selected;
  • - dropdown like this box - only one option can be selected;
  • - multiple select box allows users to select several options from a scrollable list, using the CTRL key;
"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:
  • - text area (large box for paragraphs);
  • - text field (for a short answer);
  • - checkboxes where options are presented in a list and multiple values can be selected;
  • - radio buttons where options are presented in a list but only one can be selected;
  • - dropdown like this box - only one option can be selected;
  • - multiple select box allows users to select several options from a scrollable list, using the CTRL key;
"))%>
@@ -55,7 +55,7 @@
<%= _('Order')%> <%= _('Text')%> <%= _('Default')%><%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%><%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", "data-toggle": "popover",rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%>
<%= _('Order')%> <%= _('Text')%> <%= _('Default')%><%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%><%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", "data-toggle": "popover",rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%>
<%= _('Order of display') %> - <%= f.number_field :number, in: 1..15, class: "number_field has-tooltip", "data-toggle" => "tooltip", title: _('This allows you to order sections.') %> + <% range = @phase.template.customization_of.present? ? 0..15 : 1..15 %> + <%= f.number_field :number, in: range, class: "number_field has-tooltip", "data-toggle" => "tooltip", title: _('This allows you to order sections.') %>
- + <% range = @phase.template.customization_of.present? ? 0..15 : 1..15 %> + @@ -48,7 +49,7 @@ <%= text_area_tag("section-desc-#{section.id}", section.description , class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'section_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%>
diff --git a/app/views/shared/_register_form.html.erb b/app/views/shared/_register_form.html.erb index 1546594..e8eac9e 100644 --- a/app/views/shared/_register_form.html.erb +++ b/app/views/shared/_register_form.html.erb @@ -27,14 +27,11 @@ <%= f.hidden_field "user_identifiers[#{scheme}]", value: resource.user_identifiers.first.identifier%> <% end %>
  • - <%= collection_select(:user, :org_id, Org.where("parent_id IS NULL").order("sort_name ASC, name ASC"), :id, :name, {include_blank: _('Organisation')}, { :class => 'typeahead org_sign_up' }) %> + <%= collection_select(:user, :org_id, Org.where("parent_id IS NULL").order("sort_name ASC, name ASC"), :id, :name, {include_blank: _('Organisation')}, { :class => 'typeahead org_sign_up', 'data-allow-clear': false }) %>
  • - - <% other_organisations = Array.new %> - <% Org.where("parent_id IS ? AND is_other = ?", nil, true).each do |org| %> - <% other_organisations << org.id %> - <% end %> -
  • diff --git a/app/views/templates/_edit_annotations.html.erb b/app/views/templates/_edit_annotations.html.erb index 8273f4d..e69961f 100644 --- a/app/views/templates/_edit_annotations.html.erb +++ b/app/views/templates/_edit_annotations.html.erb @@ -59,7 +59,7 @@ <% end %>
    - <%= link_to( image_tag("help_button.png"), "#", class: "suggested_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%>
    @@ -74,7 +74,7 @@ <%= text_area_tag("question-guidance-#{question.id}", question.guidance , class: "tinymce") %>
    - <%= link_to( image_tag("help_button.png"), "#", class: "question_guidance_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%>
    diff --git a/app/views/templates/_edit_template.html.erb b/app/views/templates/_edit_template.html.erb index a660e7b..dab4241 100644 --- a/app/views/templates/_edit_template.html.erb +++ b/app/views/templates/_edit_template.html.erb @@ -15,7 +15,7 @@ <%= text_area_tag("template-desc", template.description, class: "tinymce") %>
    - <%= link_to( image_tag('help_button.png'), '#', class: 'template_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences'))%>
    diff --git a/app/views/templates/admin_new.html.erb b/app/views/templates/admin_new.html.erb index bfdf195..9c5c7a4 100644 --- a/app/views/templates/admin_new.html.erb +++ b/app/views/templates/admin_new.html.erb @@ -30,7 +30,7 @@ <%= text_area_tag("template-desc", "", class: "tinymce") %>
    - <%= link_to( image_tag("help_button.png"), "#", class: "template_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("
    Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.
    "))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("
    Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.
    "))%>
    diff --git a/config/locale/app.pot b/config/locale/app.pot index 30adcde..1f6401d 100644 --- a/config/locale/app.pot +++ b/config/locale/app.pot @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: app 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-15 12:42+0000\n" -"PO-Revision-Date: 2017-06-15 12:42+0000\n" +"POT-Creation-Date: 2017-06-27 12:05+0000\n" +"PO-Revision-Date: 2017-06-27 12:05+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -42,9 +42,6 @@ msgid " by" msgstr "" -msgid " by " -msgstr "" - msgid " has been removed by " msgstr "" @@ -186,9 +183,6 @@ msgid "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " msgstr "" -msgid "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " -msgstr "" - msgid "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " msgstr "" @@ -519,9 +513,6 @@ msgid "Edit phase" msgstr "" -msgid "Edit phase details" -msgstr "" - msgid "Edit plan details" msgstr "" @@ -636,6 +627,9 @@ msgid "Guidance" msgstr "" +msgid "Guidance Choices" +msgstr "" + msgid "Guidance choices saved." msgstr "" @@ -1314,9 +1308,6 @@ msgid "This plan is based on:" msgstr "" -msgid "This section is locked for editing by " -msgstr "" - msgid "Title" msgstr "" @@ -1347,12 +1338,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "" -msgid "Unlink account" -msgstr "" - -msgid "Unlink institutional credentials alert" -msgstr "" - msgid "Unlock my account" msgstr "" @@ -1503,9 +1488,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/locale/de/app.po b/config/locale/de/app.po index b28632b..5e22290 100644 --- a/config/locale/de/app.po +++ b/config/locale/de/app.po @@ -43,9 +43,6 @@ msgid " by" msgstr " von " -msgid " by " -msgstr " von " - #, fuzzy msgid " has been removed by " msgstr " von " @@ -199,9 +196,6 @@ msgid "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " msgstr "

    Nach der Anmeldung in DMPonline werden sie zur 'Meine Pläne'-Seite weitergeleitet. Dies ist der Startpunkt, um ihre Pläne zu Edieren, zu Teilen oder zu löschen. Sie sehen außerdem, welche Pläne sie mit anderen geteilt haben.

    Pläne erstellen

    Um einen Plan zu erstellen, klicken sie auf den 'Plan erstellen'-Knopf auf der 'Meine Pläne'-Seite, oder im Hauptmenü. Wählen sie die passenden Optionen in den Ausklappmenüs und Auswahlboxen aus, um zu bestimmen, welche Fragen und Hilfestellungen ihnen angezeigt werden sollen. Bestätigen sie ihre Auswahl durch das Klicken von 'Ja, Plan erstellen'.

    Pläne schreiben

    Die Reiter der Benutzerschnittstelle erlauben ihnen durch die verschiedenen Bereiche zu navigieren wenn sie ihren Plan bearbeiten.

    • - 'Plandetails' enthält die grundliegenden administrativen Details, listet die Fragen und Hilfestellungen, auf denen ihr Plan basiert und gibt eine Übersicht über die zu beantwortenden Fragen
    • - die folgenden Reiter repräsentieren die zu beantwortenden Fragen. Sollten ihr Förderer oder ihre Institution verschiedene Fragen zu verschiedenen Stufen des Plans beantwortet wissen möchten, können hier mehrere Reiter auftauchen
    • - 'Teilen' enthält Details zum Einladen von anderen Personen zum Lesen oder zur aktiven Mitabeit am Plan
    • - 'Export' enthält Möglichkeiten zum Export des Plans in verschiedene Dateiformate. Dies kann nützlich sein, wenn sie ihren Plan im Rahmen eines Antrags einreichen müssen

    In den Fragereitern sind die verschiedenen Abschnitte ihres Plans dargestellt, die sich durch anklicken zur Bearbeitung auswählen lassen. Die Antworttexte können mit den Textbearbeitungsknöpfen formatiert werden.

    Hilfestellungen werden rechts von den Fragen durch klicken des '+'-Symbols angezeigt.

    Bitte vergessen sie nicht ihre Antworten zu speichern, bevor sie die Seite verlassen.

    Pläne teilen

    Geben sie die E-Mail-Adresse der Person an, die ihren Plan lesen oder bearbeiten können sollen. Mithilfe des Ausklappmenüs können sie die Befugnisse, die die Person im Bezug auf den Plan haben soll, auswählen. Klicken sie abschließend auf 'Mitarbeitende(n) hinzufügen'.

    Pläne exportieren

    Wählen sie das Dateiformat aus, in das sie ihren Plan exportieren möchten und klicken sie 'Export'. Unterhalb des Dialogs können sie durch klicken auf das '+'-Symbol detaillierte Einstellungen zum Export vornehmen.

    " -msgid "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " -msgstr "

    You are about to unlink DMP Builder of your institutional credentials, would you like to continue?

    " - #, fuzzy msgid "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " msgstr "

    Sie können anderen Zugriff zu Ihren Plan gewähren. Es gibt hierbei drei Abstufungen des Zugriffs.

    • Benutzer mit 'nur lesen'-Rechten können den Plan nur lesen.
    • Bearbeiter können zum Plan beitragen.
    • Miteigentümer können zum Plan beitragen und zusätzlich die Plandetails und die Zugriffsrechte bearbeiten.

    Neue Mitarbeitende können durch die Angabe ihrer E-Mail-Adresse und das Wählen des Zugriffsrechts hinzugefugt werden. Bestätigen Sie Ihre Angaben mit 'Mitarbeitende(n) hinzufügen'

    Eingeladene Mitarbeitende erhalten eine E-Mail, die sie darüber informiert, dass sie Zugriff zu Ihrem Plan erhalten haben; sofern Mitarbeitende noch nicht bei DMPonline registriert sind, erhalten sie eine Einladung zur Registrierung. Wenn die Zugriffsrechte geändert werden wird ebenfalls eine Benachrichtigungs-E-Mail versand.

    " @@ -556,9 +550,6 @@ msgid "Edit phase" msgstr "Phase bearbeiten" -msgid "Edit phase details" -msgstr "Details der Phase bearbeiten" - msgid "Edit plan details" msgstr "Plandetails bearbeiten" @@ -680,6 +671,10 @@ msgstr "Hilfestellung" #, fuzzy +msgid "Guidance Choices" +msgstr "Hilfestellung" + +#, fuzzy msgid "Guidance choices saved." msgstr "Hilfestellung" @@ -1385,9 +1380,6 @@ msgid "This plan is based on:" msgstr "Dieser Plan basiert auf:" -msgid "This section is locked for editing by " -msgstr "Dieser Abschnitt ist gespert wegen Bearbeitung durch " - msgid "Title" msgstr "Titel" @@ -1419,12 +1411,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Unbekannter Rand. Kann nur 'oben', 'unten', 'links' oder 'rechts' sein" -msgid "Unlink account" -msgstr "Trenne Zugang" - -msgid "Unlink institutional credentials alert" -msgstr "Unlink institutional credentials alert" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1590,11 +1576,6 @@ msgid "You have un-published changes" msgstr "" -#, fuzzy -msgid "You have unsaved answers in the following sections:" -msgstr "" -"You have unsaved answers in the following sections:\n" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/locale/domain.pot b/config/locale/domain.pot new file mode 100644 index 0000000..3069d0f --- /dev/null +++ b/config/locale/domain.pot @@ -0,0 +1,3 @@ +# Some descriptive title +msgid "" +msgstr "" \ No newline at end of file diff --git a/config/locale/en_GB/app.po b/config/locale/en_GB/app.po index 0d6a6e3..50e9e8e 100644 --- a/config/locale/en_GB/app.po +++ b/config/locale/en_GB/app.po @@ -44,9 +44,6 @@ msgid " by" msgstr " by" -msgid " by " -msgstr " by " - msgid " has been removed by " msgstr " has been removed by " @@ -194,9 +191,6 @@ msgid "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " msgstr "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " -msgid "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " -msgstr "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " - msgid "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " msgstr "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " @@ -540,9 +534,6 @@ msgid "Edit phase" msgstr "Edit phase" -msgid "Edit phase details" -msgstr "Edit phase details" - msgid "Edit plan details" msgstr "Edit plan details" @@ -662,6 +653,10 @@ msgstr "Guidance" #, fuzzy +msgid "Guidance Choices" +msgstr "Guidance" + +#, fuzzy msgid "Guidance choices saved." msgstr "Guidance" @@ -1363,9 +1358,6 @@ msgid "This plan is based on:" msgstr "This plan is based on:" -msgid "This section is locked for editing by " -msgstr "This section is locked for editing by " - msgid "Title" msgstr "Title" @@ -1396,12 +1388,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" -msgid "Unlink account" -msgstr "Unlink account" - -msgid "Unlink institutional credentials alert" -msgstr "Unlink institutional credentials alert" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1561,9 +1547,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "You must accept the terms and conditions to register." diff --git a/config/locale/en_US/app.po b/config/locale/en_US/app.po index d1e5e4e..0f7a346 100644 --- a/config/locale/en_US/app.po +++ b/config/locale/en_US/app.po @@ -44,9 +44,6 @@ msgid " by" msgstr " by" -msgid " by " -msgstr " by " - msgid " has been removed by " msgstr " has been removed by " @@ -194,9 +191,6 @@ msgid "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " msgstr "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " -msgid "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " -msgstr "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " - msgid "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " msgstr "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " @@ -540,9 +534,6 @@ msgid "Edit phase" msgstr "Edit phase" -msgid "Edit phase details" -msgstr "Edit phase details" - msgid "Edit plan details" msgstr "Edit plan details" @@ -662,6 +653,10 @@ msgstr "Guidance" #, fuzzy +msgid "Guidance Choices" +msgstr "Guidance" + +#, fuzzy msgid "Guidance choices saved." msgstr "Guidance" @@ -1363,9 +1358,6 @@ msgid "This plan is based on:" msgstr "This plan is based on:" -msgid "This section is locked for editing by " -msgstr "This section is locked for editing by " - msgid "Title" msgstr "Title" @@ -1396,12 +1388,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" -msgid "Unlink account" -msgstr "Unlink account" - -msgid "Unlink institutional credentials alert" -msgstr "Unlink institutional credentials alert" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1561,9 +1547,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "You must accept the terms and conditions to register." diff --git a/config/locale/es/app.po b/config/locale/es/app.po index c921f5c..ffda90d 100644 --- a/config/locale/es/app.po +++ b/config/locale/es/app.po @@ -43,9 +43,6 @@ msgid " by" msgstr " por " -msgid " by " -msgstr " por " - #, fuzzy msgid " has been removed by " msgstr " por " @@ -196,9 +193,6 @@ msgid "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " msgstr "" -msgid "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " -msgstr "

    Va a desvincular DMPonline de las credenciales de su institución, ¿Quiere continuar?

    " - #, fuzzy msgid "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " msgstr "

    Aquí puede dar a otras personas acceso a su plan. Hay tres niveles de permiso.

    • Los usuarios con acceso de \"sólo lectura\" sólo pueden leer el plan.
    • Los Editores pueden contribuir al plan.
    • Los Co-propietarios pueden también contribuir, editar los detalles y controlar el acceso al plan.

    Añada cada colaborador individualmente introduciendo su dirección de correo electrónico, seleccionando un nivel de permiso y haciendo clic en \"Añadir colaborador\".

    Aquellos a quienes invite recibirán un aviso por correo electrónico indicando que tienen acceso al plan e invitándoles a registrarse en DMPonline si no tienen ya una cuenta. También se envia un aviso si se cambia el nivel de permiso de un usuario.

    " @@ -552,9 +546,6 @@ msgid "Edit phase" msgstr "Editar fase" -msgid "Edit phase details" -msgstr "Editar los detalles de las fase" - msgid "Edit plan details" msgstr "Editar los detalles del plan" @@ -676,6 +667,10 @@ msgstr "Guía" #, fuzzy +msgid "Guidance Choices" +msgstr "Guía" + +#, fuzzy msgid "Guidance choices saved." msgstr "Guía" @@ -1378,9 +1373,6 @@ msgid "This plan is based on:" msgstr "Este plan está basado en:" -msgid "This section is locked for editing by " -msgstr "Esta sección está bloqueda para su edición por " - msgid "Title" msgstr "Título" @@ -1412,12 +1404,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Margen desconocido. Sólo puede ser 'superior', 'inferior', 'izquierdo' or 'derecho'" -msgid "Unlink account" -msgstr "Desvincular cuenta" - -msgid "Unlink institutional credentials alert" -msgstr "Desvincule las alertas relacionadas con las credenciales de su institución" - msgid "Unlock my account" msgstr "" @@ -1583,9 +1569,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/locale/fr/app.po b/config/locale/fr/app.po index 26cbc38..d7706f1 100644 --- a/config/locale/fr/app.po +++ b/config/locale/fr/app.po @@ -43,9 +43,6 @@ msgid " by" msgstr " par " -msgid " by " -msgstr " par " - #, fuzzy msgid " has been removed by " msgstr " par " @@ -195,9 +192,6 @@ msgid "

    When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    Create a plan

    To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

    Write your plan

    The tabbed interface allows you to navigate through different functions when editing your plan.

    • - 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.
    • - The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.
    • - The 'Share' tab allows you to invite others to read or contribute to your plan.
    • - The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.

    When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

    Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

    Remember to 'save' your responses before moving on.

    Share plans

    Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

    Export plans

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

    " msgstr "

    Lorsque vous vous connectez à l'Assistant PGD, vous serez dirigé vers la page « Mes plans ». À partir de cette page, vous pouvez modifier, partager, exporter ou supprimer l'un ou l'autre de vos plans. Vous verrez également les plans qui ont été partagés avec vous par d'autres personnes.

    Créer un plan

    Pour créer un plan, cliquez sur le bouton « Créer un plan » à la page « Mes plans » ou dans le menu du haut. Faites des choix dans les listes déroulantes et les cases à cocher afin de déterminer les questions et les directives qui seront affichées. Confirmez votre choix en cliquant sur « Oui, créer un plan ».

    Rédiger votre plan

    L'interface à onglets vous permet de naviguer dans diverses fonctions lorsque vous mettez au point votre plan.

    • - L'option « renseignements sur le plan » comprend des renseignements administratifs de base, indique la série de questions et de directives sur laquelle votre plan s'appuie et vous donne un aperçu des questions auxquelles vous devez répondre.
    • - Les onglets suivants contiennent les questions auxquelles il faut répondre. Il peut y avoir plus d'un onglet si votre bailleur de fonds ou votre université pose différentes séries de questions à diverses étapes, par exemple lors d'une demande de subvention et après l'octroi d'une subvention.
    • - L'onglet « Partager » vous permet d'inviter d'autres personnes à lire votre plan ou à y collaborer.
    • - L'onglet « Exporter » vous permet de télécharger votre plan en divers formats, ce qui peut être utile si vous devez joindre votre plan à une demande de subvention.

    Lorsque vous consultez l'un ou l'autre des onglets de questions, vous verrez les différentes sections de votre plan affichées. Cliquez sur ces onglets à tour de rôle pour répondre aux questions. Vous pouvez choisir le format de vos réponses à l'aide des boutons de mise en forme.

    Les directives sont affichées dans la partie de droite. Cliquez sur le symbole « + » pour les consulter.

    N'oubliez pas d'enregistrer vos réponses avant de poursuivre.

    Partager les plans

    Inscrivez l'adresse électronique de tout collaborateur que vous aimeriez inviter à lire ou à modifier votre plan. Choisissez le niveau d'autorisation que vous souhaitez lui accorder dans les options de la liste déroulante et cliquez sur « Ajouter un collaborateur ».

    Exporter les plans

    En choisissant cette option, vous pouvez télécharger votre plan en divers formats, ce qui peut être utile si vous devez joindre votre plan à une demande de subvention. Choisissez le format dans lequel vous aimeriez voir ou télécharger votre plan et cliquez pour l'exporter. Lorsque vous vous connectez à l'Assistant PGD, vous êtes dirigé vers la page « Mes plans ». À partir de cette page, vous pouvez modifier, partager, exporter ou supprimer l'un ou l'autre de vos plans. Vous voyez également les plans qui ont été partagés avec vous par d'autres personnes.

    " -msgid "

    You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

    " -msgstr "

    Vous allez détacher DMPonline de votre authentfiant détablissement, voulez-vous continuer ?

    " - #, fuzzy msgid "

    You can give other people access to your plan here. There are three permission levels.

    • Users with \"read only\" access can only read the plan.
    • Editors can contribute to the plan.
    • Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.

    Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

    Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " msgstr "

    À ce niveau, vous pouvez donner accès à votre plan à dautres personnes. Trois niveaux dautorisation sont possibles.

    • Les utilisateurs avec un droit en \"lecture seule\" ne pourront que consulter le plan.
    • Les utilisateurs avec un droit de mofification pourront y contribuer.
    • Les copropriétaires le peuvent aussi, mais peuvent aussi en modifier les détails et en contrôler laccès.

    Ajoutez chacun des collaborateurs en saisissant leurs courriels lun après lautre, en choisissant un niveau dautorisation et en cliquant sur \"Ajouter le collaborateur\".

    Ceux qui sont invités recevront un avis par courriel leur indiquant quils ont accès à ce plan, invitant ceux qui nont pas de compte dans DMPonline à senregistrer. Lutilisateur reçoit aussi un avis quand ces droits sont changés.

    " @@ -550,9 +544,6 @@ msgid "Edit phase" msgstr "Modifier la phase" -msgid "Edit phase details" -msgstr "Modifiez les détails de la phase" - msgid "Edit plan details" msgstr "Modifier des détails du plan" @@ -674,6 +665,10 @@ msgstr "Conseils" #, fuzzy +msgid "Guidance Choices" +msgstr "Conseils" + +#, fuzzy msgid "Guidance choices saved." msgstr "Conseils" @@ -1375,9 +1370,6 @@ msgid "This plan is based on:" msgstr "Ce plan sinspire de :" -msgid "This section is locked for editing by " -msgstr "La modification de cette section a été verrouillée par " - msgid "Title" msgstr "Titre" @@ -1409,12 +1401,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Marge inconnue. Seules marges possibles : Haut, Bas, Gauche et Droite" -msgid "Unlink account" -msgstr "Délier le compte" - -msgid "Unlink institutional credentials alert" -msgstr "Alerte de détachement dauthentifiant détablissement" - msgid "Unlock my account" msgstr "" @@ -1580,9 +1566,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/routes.rb b/config/routes.rb index 2f4c08c..d7d2c53 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,56 +1,56 @@ Rails.application.routes.draw do namespace :admin do - resources :users, only: [:new, :create, :edit, :update, :index, :show] - resources :orgs, only: [:new, :create, :edit, :update, :index, :show] - resources :perms, only: [:new, :create, :edit, :update, :index, :show] - resources :languages - resources :templates - resources :token_permission_types - resources :phases - resources :sections - resources :questions - resources :question_formats - resources :question_options - resources :annotations - resources :answers - resources :guidances - resources :guidance_groups - resources :themes - resources :notes - resources :plans - # resources :plans_guidance_groups - resources :identifier_schemes - resources :exported_plans - resources :regions - resources :roles - resources :splash_logs - resources :user_identifiers + resources :users, only: [:new, :create, :edit, :update, :index, :show] + resources :orgs, only: [:new, :create, :edit, :update, :index, :show] + resources :perms, only: [:new, :create, :edit, :update, :index, :show] + resources :languages, only: [:new, :create, :edit, :update, :index, :show] + resources :templates, only: [:new, :create, :edit, :update, :index, :show] + resources :phases, only: [:new, :create, :edit, :update, :index, :show] + resources :sections, only: [:new, :create, :edit, :update, :index, :show] + resources :questions, only: [:new, :create, :edit, :update, :index, :show] + resources :question_formats, only: [:new, :create, :edit, :update, :index, :show] + resources :question_options, only: [:new, :create, :edit, :update, :index, :show] + resources :annotations, only: [:new, :create, :edit, :update, :index, :show] + resources :answers, only: [:new, :create, :edit, :update, :index, :show] + resources :guidances, only: [:new, :create, :edit, :update, :index, :show] + resources :guidance_groups, only: [:new, :create, :edit, :update, :index, :show] + resources :themes, only: [:new, :create, :edit, :update, :index, :show] + resources :notes, only: [:new, :create, :edit, :update, :index, :show] + resources :plans, only: [:new, :create, :edit, :update, :index, :show] + resources :identifier_schemes, only: [:new, :create, :edit, :update, :index, :show] + resources :exported_plans, only: [:new, :create, :edit, :update, :index, :show] + resources :regions, only: [:new, :create, :edit, :update, :index, :show] + resources :roles, only: [:new, :create, :edit, :update, :index, :show] + resources :splash_logs, only: [:new, :create, :edit, :update, :index, :show] + resources :user_identifiers, only: [:new, :create, :edit, :update, :index, :show] +resources :token_permission_types, only: [:new, :create, :edit, :update, :index, :show] +#resources :plans_guidance_groups root to: "users#index" end devise_for :users, controllers: { - registrations: "registrations", - passwords: 'passwords', - sessions: 'sessions', + registrations: "registrations", + passwords: 'passwords', + sessions: 'sessions', omniauth_callbacks: 'users/omniauth_callbacks'} do - + get "/users/sign_out", :to => "devise/sessions#destroy" end - + # WAYFless access point - use query param idp #get 'auth/shibboleth' => 'users/omniauth_shibboleth_request#redirect', :as => 'user_omniauth_shibboleth' #get 'auth/shibboleth/assoc' => 'users/omniauth_shibboleth_request#associate', :as => 'user_shibboleth_assoc' #post '/auth/:provider/callback' => 'sessions#oauth_create' - + # fix for activeadmin signout bug devise_scope :user do delete '/users/sign_out' => 'devise/sessions#destroy' end delete '/users/identifiers/:id', to: 'user_identifiers#destroy', as: 'destroy_user_identifier' - + #ActiveAdmin.routes(self) #organisation admin area @@ -77,10 +77,10 @@ get "public_plans" => 'static_pages#public_plans' get "public_export/:id" => 'static_pages#public_export', as: 'public_export' get "existing_users" => 'existing_users#index' - + #post 'contact_form' => 'contacts', as: 'localized_contact_creation' #get 'contact_form' => 'contacts#new', as: 'localized_contact_form' - + resources :orgs, :path => 'org/admin', only: [] do member do get 'children' diff --git a/config/tinymce.yml b/config/tinymce.yml index 8002f2e..ce9069d 100644 --- a/config/tinymce.yml +++ b/config/tinymce.yml @@ -7,6 +7,8 @@ - autoresize - link - paste + - advlist +advlist_bullet_styles: "circle,disc,square" #only disc bullets display on htmltoword target_list: false autoresize_min_height: 130 autoresize_bottom_margin: 10 diff --git a/db/migrate/20170702012742_ensure_indexes_in_place.rb b/db/migrate/20170702012742_ensure_indexes_in_place.rb new file mode 100644 index 0000000..6bd9410 --- /dev/null +++ b/db/migrate/20170702012742_ensure_indexes_in_place.rb @@ -0,0 +1,40 @@ +class EnsureIndexesInPlace < ActiveRecord::Migration + def change + #users_perms + remove_index :users_perms, name: 'index_users_perms_on_user_id_and_perm_id' + add_index :users_perms, :user_id + #user_identifiers + add_index :user_identifiers, :user_id + #roles + add_index :roles, :user_id + add_index :roles, :plan_id + #org_token_permissions + add_index :org_token_permissions, :org_id + #users + add_index :users, :org_id + remove_index :users, :confirmation_token + remove_index :users, :invitation_token + remove_index :users, :reset_password_token + #notes + add_index :notes, :answer_id + #guidance_groups + add_index :guidance_groups, :org_id + #guidance + add_index :guidances, :guidance_group_id + #themes_in_guidance + add_index :themes_in_guidance, :theme_id + add_index :themes_in_guidance, :guidance_id + #annotations + add_index :annotations, :question_id + #question_themes + remove_index :questions_themes, name: 'question_theme_index' + remove_index :questions_themes, name: 'theme_question_index' + add_index :questions_themes, :question_id + #question_options + add_index :question_options, :question_id + #answers_question_options + remove_index :answers_question_options, name: 'answer_question_option_index' + remove_index :answers_question_options, name: 'question_option_answer_index' + add_index :answers_question_options, :answer_id + end +end diff --git a/db/schema.rb b/db/schema.rb index fd97cce..1c7f711 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170428083711) do +ActiveRecord::Schema.define(version: 20170702012742) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -25,6 +25,8 @@ t.datetime "updated_at" end + add_index "annotations", ["question_id"], name: "index_annotations_on_question_id", using: :btree + create_table "answers", force: :cascade do |t| t.text "text" t.integer "plan_id" @@ -40,8 +42,7 @@ t.integer "question_option_id", null: false end - add_index "answers_question_options", ["answer_id", "question_option_id"], name: "answer_question_option_index", using: :btree - add_index "answers_question_options", ["question_option_id", "answer_id"], name: "question_option_answer_index", using: :btree + add_index "answers_question_options", ["answer_id"], name: "index_answers_question_options_on_answer_id", using: :btree create_table "exported_plans", force: :cascade do |t| t.integer "plan_id" @@ -93,6 +94,8 @@ t.boolean "published" end + add_index "guidance_groups", ["org_id"], name: "index_guidance_groups_on_org_id", using: :btree + create_table "guidances", force: :cascade do |t| t.text "text" t.integer "guidance_group_id" @@ -102,6 +105,8 @@ t.boolean "published" end + add_index "guidances", ["guidance_group_id"], name: "index_guidances_on_guidance_group_id", using: :btree + create_table "identifier_schemes", force: :cascade do |t| t.string "name" t.string "description" @@ -129,6 +134,8 @@ t.datetime "updated_at" end + add_index "notes", ["answer_id"], name: "index_notes_on_answer_id", using: :btree + create_table "org_token_permissions", force: :cascade do |t| t.integer "org_id" t.integer "token_permission_type_id" @@ -136,6 +143,8 @@ t.datetime "updated_at" end + add_index "org_token_permissions", ["org_id"], name: "index_org_token_permissions_on_org_id", using: :btree + create_table "orgs", force: :cascade do |t| t.string "name" t.string "abbreviation" @@ -219,6 +228,8 @@ t.datetime "updated_at" end + add_index "question_options", ["question_id"], name: "index_question_options_on_question_id", using: :btree + create_table "questions", force: :cascade do |t| t.text "text" t.text "default_value" @@ -238,8 +249,7 @@ t.integer "theme_id", null: false end - add_index "questions_themes", ["question_id", "theme_id"], name: "question_theme_index", using: :btree - add_index "questions_themes", ["theme_id", "question_id"], name: "theme_question_index", using: :btree + add_index "questions_themes", ["question_id"], name: "index_questions_themes_on_question_id", using: :btree create_table "regions", force: :cascade do |t| t.string "abbreviation" @@ -256,6 +266,9 @@ t.integer "access", default: 0, null: false end + add_index "roles", ["plan_id"], name: "index_roles_on_plan_id", using: :btree + add_index "roles", ["user_id"], name: "index_roles_on_user_id", using: :btree + create_table "sections", force: :cascade do |t| t.string "title" t.text "description" @@ -319,6 +332,9 @@ t.integer "guidance_id" end + add_index "themes_in_guidance", ["guidance_id"], name: "index_themes_in_guidance_on_guidance_id", using: :btree + add_index "themes_in_guidance", ["theme_id"], name: "index_themes_in_guidance_on_theme_id", using: :btree + create_table "token_permission_types", force: :cascade do |t| t.string "token_type" t.text "text_description" @@ -334,14 +350,16 @@ t.integer "identifier_scheme_id" end + add_index "user_identifiers", ["user_id"], name: "index_user_identifiers_on_user_id", using: :btree + create_table "users", force: :cascade do |t| t.string "firstname" t.string "surname" t.string "email", default: "", null: false t.string "orcid_id" t.string "shibboleth_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "encrypted_password", default: "" t.string "reset_password_token" t.datetime "reset_password_sent_at" @@ -367,17 +385,15 @@ t.integer "language_id" end - add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree - add_index "users", ["invitation_token"], name: "index_users_on_invitation_token", unique: true, using: :btree - add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree + add_index "users", ["org_id"], name: "index_users_on_org_id", using: :btree create_table "users_perms", id: false, force: :cascade do |t| t.integer "user_id" t.integer "perm_id" end - add_index "users_perms", ["user_id", "perm_id"], name: "index_users_perms_on_user_id_and_perm_id", using: :btree + add_index "users_perms", ["user_id"], name: "index_users_perms_on_user_id", using: :btree add_foreign_key "annotations", "orgs" add_foreign_key "annotations", "questions" diff --git a/doc/data_model.png b/doc/data_model.png new file mode 100644 index 0000000..cb83c4d --- /dev/null +++ b/doc/data_model.png Binary files differ diff --git a/lib/assets/javascripts/admin.js b/lib/assets/javascripts/admin.js index 4dc2829..24bd345 100644 --- a/lib/assets/javascripts/admin.js +++ b/lib/assets/javascripts/admin.js @@ -46,6 +46,7 @@ last.after(clone); }); + if($('.in').length > 0) { if ($('.in .current_question').length > 0) { $(document.body).animate({ @@ -59,15 +60,6 @@ } } - //set the tinymce popover help text - $(".template_desc_popover, .phase_desc_popover, .version_desc_popover, .section_desc_popover, .question_format_popover," + - " .default_answer_popover, .suggested_answer_popover, .question_guidance_popover, .question_themes_popover," + - " .question_options_popover, .guidance_group_title_popover, .guidance_group_template_popover," + - " .guidance_group_subset_popover, .guidance_text_popover, .guidance_apply_to_popover, .guidance_by_themes_popover," + - " .guidance_by_question_popover, .guidance_group_select_popover, .org_abbr_popover").on('click', function(e) { - e.preventDefault(); - }).popover(); - // This handler serves to display/hide default_answer field as well as to display/hide question_options fields // depending on the question_format selected $('.question_format').change(function(){ diff --git a/lib/assets/javascripts/bootstrap_listeners.js b/lib/assets/javascripts/bootstrap_listeners.js index 409805d..269b1da 100644 --- a/lib/assets/javascripts/bootstrap_listeners.js +++ b/lib/assets/javascripts/bootstrap_listeners.js @@ -15,9 +15,10 @@ $(this).parent().find('.minus-laranja').removeClass('minus-laranja').addClass('plus-laranja'); }); // Initialises all tooltips present on a page - $('.has-tooltip').tooltip({ - placement: "right", - trigger: "focus" - }); + $('.has-tooltip').tooltip({ placement: "right", trigger: "focus" }); $(".help").popover(); + //Initiliases all popovers on a page + $('[data-toggle="popover"]').on('click', function(e){ + e.preventDefault(); + }).popover(); }); \ No newline at end of file diff --git a/lib/assets/javascripts/shared/register_form.js b/lib/assets/javascripts/shared/register_form.js index 0a2be6c..ccf8642 100644 --- a/lib/assets/javascripts/shared/register_form.js +++ b/lib/assets/javascripts/shared/register_form.js @@ -12,12 +12,26 @@ allowClear: true }); // TODO removing once the new create account functionality is in place + $('#user_org_id').on("change", function(e) { + e.preventDefault(); + var selected_org = $(this).select2("val"); + var other_orgs = $("#other-org-name").attr("data-orgs").split(","); + var index = $.inArray(selected_org, other_orgs); + if (index > -1) { + $("#other-org-name").show(); + $("#user_other_organisation").focus(); + } + else { + $("#other-org-name").hide(); + $("#user_other_organisation").val(""); + } + }); $("#other-org-link > a").click(function(e){ e.preventDefault(); - var other_org = $("#other-organisation-name").attr("data-orgs").split(","); - $("#user_organisation_id").select2("val", other_org); - $("#other-org-link").hide(); - $("#user_organisation_id").change(); + var other_org = $("#other-org-name").attr("data-orgs").split(","); + $("#user_org_id").select2("val", other_org); + $("#user_org_id").change(); + //$("#other-org-link").hide(); }); $("#user_email.text_field.reg-input").change(function(){ if (email_regex.test($(this).val())) {
  • <%= _('Order of display') %><%= s.number_field :number, in: 1..15, class: "number_field has-tooltip", 'data-toggle' => "tooltip", 'title' => _('This allows you to order sections.') %><%= s.number_field :number, in: range, class: "number_field has-tooltip", 'data-toggle' => "tooltip", 'title' => _('This allows you to order sections.') %>
    <%= _('Description') %>