diff --git a/Gemfile b/Gemfile index 6176695..2d9b5b9 100644 --- a/Gemfile +++ b/Gemfile @@ -34,7 +34,7 @@ # ------------------------------------------------ # SUPER ADMIN SECTION -gem "administrate", :github => 'thoughtbot/administrate', :branch =>'master' #:branch =>'v0.4.0' +gem "administrate", :github => 'thoughtbot/administrate', :branch =>'v0.7.0' # ------------------------------------------------ # USERS @@ -59,6 +59,7 @@ gem 'sass-rails' gem 'less-rails' # WE SHOULD PROBABLY USE SASS OR LESS NOT BOTH gem 'jquery-rails' +gem 'font-awesome-rails' gem 'twitter-bootstrap-rails', '2.2.8' gem 'tinymce-rails' # WYSIWYG EDITOR gem 'contact_us', '>= 1.2.0' # COULD BE EASILY REPLACED WITH OUR OWN CODE diff --git a/Gemfile.lock b/Gemfile.lock index 50e0c71..53bf3cf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,18 +1,18 @@ GIT remote: git://github.com/thoughtbot/administrate.git - revision: 47a2f99e22be87119ef0e3a7af3956984df5842c - branch: master + revision: 6bc227907e8567ca9d8c51658abc92fc2b19ca2d + branch: v0.7.0 specs: - administrate (0.4.0) + administrate (0.7.0) + actionpack (>= 4.2, < 5.1) + actionview (>= 4.2, < 5.1) + activerecord (>= 4.2, < 5.1) autoprefixer-rails (~> 6.0) - bourbon (>= 5.0.0.beta.6) datetime_picker_rails (~> 0.0.7) - jquery-rails (~> 4.0) + jquery-rails (>= 4.0) kaminari (>= 1.0) momentjs-rails (~> 2.8) - neat (~> 1.1) normalize-rails (>= 3.0) - rails (>= 4.2, < 5.1) sass-rails (~> 5.0) selectize-rails (~> 0.6) @@ -65,7 +65,7 @@ addressable (2.4.0) ansi (1.5.0) arel (6.0.3) - autoprefixer-rails (6.7.7.1) + autoprefixer-rails (6.7.7.2) execjs bcrypt (3.1.11) better_errors (2.1.1) @@ -74,9 +74,6 @@ rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - bourbon (5.0.0.beta.7) - sass (~> 3.4.22) - thor (~> 0.19.1) builder (3.2.2) byebug (9.0.5) capybara (2.9.1) @@ -125,6 +122,8 @@ loofah (~> 2.0) sax-machine (~> 1.0) flag_shih_tzu (0.3.15) + font-awesome-rails (4.7.0.1) + railties (>= 3.2, < 5.1) formtastic (3.1.4) actionpack (>= 3.2.13) friendly_id (5.1.0) @@ -216,9 +215,6 @@ multi_xml (0.5.5) multipart-post (2.0.0) mysql2 (0.3.21) - neat (1.8.0) - sass (>= 3.3) - thor (~> 0.19) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) @@ -366,6 +362,7 @@ dragonfly feedjira flag_shih_tzu + font-awesome-rails formtastic friendly_id gettext (>= 3.0.2) diff --git a/app/controllers/admin/answers_controller.rb b/app/controllers/admin/answers_controller.rb index c220635..8960f9f 100644 --- a/app/controllers/admin/answers_controller.rb +++ b/app/controllers/admin/answers_controller.rb @@ -1,7 +1,7 @@ module Admin class AnswersController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/exported_plans_controller.rb b/app/controllers/admin/exported_plans_controller.rb index aecd7f0..e4bde90 100644 --- a/app/controllers/admin/exported_plans_controller.rb +++ b/app/controllers/admin/exported_plans_controller.rb @@ -1,7 +1,7 @@ module Admin class ExportedPlansController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/guidance_groups_controller.rb b/app/controllers/admin/guidance_groups_controller.rb index 6b9ad4b..95d3e7c 100644 --- a/app/controllers/admin/guidance_groups_controller.rb +++ b/app/controllers/admin/guidance_groups_controller.rb @@ -1,7 +1,7 @@ module Admin class GuidanceGroupsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/guidances_controller.rb b/app/controllers/admin/guidances_controller.rb index 6690ff3..1f2495f 100644 --- a/app/controllers/admin/guidances_controller.rb +++ b/app/controllers/admin/guidances_controller.rb @@ -1,7 +1,7 @@ module Admin class GuidancesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/identifier_schemes_controller.rb b/app/controllers/admin/identifier_schemes_controller.rb index 43911d1..eb50d8a 100644 --- a/app/controllers/admin/identifier_schemes_controller.rb +++ b/app/controllers/admin/identifier_schemes_controller.rb @@ -1,7 +1,7 @@ module Admin class IdentifierSchemesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/languages_controller.rb b/app/controllers/admin/languages_controller.rb index e70e606..e58baa9 100644 --- a/app/controllers/admin/languages_controller.rb +++ b/app/controllers/admin/languages_controller.rb @@ -1,7 +1,7 @@ module Admin class LanguagesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/notes_controller.rb b/app/controllers/admin/notes_controller.rb index c740124..db832f4 100644 --- a/app/controllers/admin/notes_controller.rb +++ b/app/controllers/admin/notes_controller.rb @@ -1,7 +1,7 @@ module Admin class NotesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/orgs_controller.rb b/app/controllers/admin/orgs_controller.rb index 91092db..d68f358 100644 --- a/app/controllers/admin/orgs_controller.rb +++ b/app/controllers/admin/orgs_controller.rb @@ -1,7 +1,7 @@ module Admin class OrgsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/perms_controller.rb b/app/controllers/admin/perms_controller.rb index 4e153cc..99e9b95 100644 --- a/app/controllers/admin/perms_controller.rb +++ b/app/controllers/admin/perms_controller.rb @@ -1,7 +1,7 @@ module Admin class PermsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/phases_controller.rb b/app/controllers/admin/phases_controller.rb index 5877a50..de6e3c3 100644 --- a/app/controllers/admin/phases_controller.rb +++ b/app/controllers/admin/phases_controller.rb @@ -1,7 +1,7 @@ module Admin class PhasesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/plans_controller.rb b/app/controllers/admin/plans_controller.rb index aaa9189..424389f 100644 --- a/app/controllers/admin/plans_controller.rb +++ b/app/controllers/admin/plans_controller.rb @@ -1,7 +1,7 @@ module Admin class PlansController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/question_formats_controller.rb b/app/controllers/admin/question_formats_controller.rb index 7644265..1338b69 100644 --- a/app/controllers/admin/question_formats_controller.rb +++ b/app/controllers/admin/question_formats_controller.rb @@ -1,7 +1,7 @@ module Admin class QuestionFormatsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/question_options_controller.rb b/app/controllers/admin/question_options_controller.rb index 237df25..103e543 100644 --- a/app/controllers/admin/question_options_controller.rb +++ b/app/controllers/admin/question_options_controller.rb @@ -1,7 +1,7 @@ module Admin class QuestionOptionsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/questions_controller.rb b/app/controllers/admin/questions_controller.rb index 1be38bf..be5d2a7 100644 --- a/app/controllers/admin/questions_controller.rb +++ b/app/controllers/admin/questions_controller.rb @@ -1,7 +1,7 @@ module Admin class QuestionsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/regions_controller.rb b/app/controllers/admin/regions_controller.rb index 44d2065..6e5627b 100644 --- a/app/controllers/admin/regions_controller.rb +++ b/app/controllers/admin/regions_controller.rb @@ -1,7 +1,7 @@ module Admin class RegionsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/roles_controller.rb b/app/controllers/admin/roles_controller.rb index 6633242..748c165 100644 --- a/app/controllers/admin/roles_controller.rb +++ b/app/controllers/admin/roles_controller.rb @@ -1,7 +1,7 @@ module Admin class RolesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/sections_controller.rb b/app/controllers/admin/sections_controller.rb index b06bb8c..3b94a0a 100644 --- a/app/controllers/admin/sections_controller.rb +++ b/app/controllers/admin/sections_controller.rb @@ -1,7 +1,7 @@ module Admin class SectionsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/splash_logs_controller.rb b/app/controllers/admin/splash_logs_controller.rb index 4cb0f85..aa3fa22 100644 --- a/app/controllers/admin/splash_logs_controller.rb +++ b/app/controllers/admin/splash_logs_controller.rb @@ -1,7 +1,7 @@ module Admin class SplashLogsController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/suggested_answers_controller.rb b/app/controllers/admin/suggested_answers_controller.rb index 5ee314e..35d5243 100644 --- a/app/controllers/admin/suggested_answers_controller.rb +++ b/app/controllers/admin/suggested_answers_controller.rb @@ -1,7 +1,7 @@ module Admin class SuggestedAnswersController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/templates_controller.rb b/app/controllers/admin/templates_controller.rb index 090a84b..8ac79e1 100644 --- a/app/controllers/admin/templates_controller.rb +++ b/app/controllers/admin/templates_controller.rb @@ -1,7 +1,7 @@ module Admin class TemplatesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/themes_controller.rb b/app/controllers/admin/themes_controller.rb index f15a730..9617c6c 100644 --- a/app/controllers/admin/themes_controller.rb +++ b/app/controllers/admin/themes_controller.rb @@ -1,7 +1,7 @@ module Admin class ThemesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/token_permission_types_controller.rb b/app/controllers/admin/token_permission_types_controller.rb index 7e90c37..37b3487 100644 --- a/app/controllers/admin/token_permission_types_controller.rb +++ b/app/controllers/admin/token_permission_types_controller.rb @@ -1,7 +1,7 @@ module Admin class TokenPermissionTypesController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/user_identifiers_controller.rb b/app/controllers/admin/user_identifiers_controller.rb index 6699719..bdf5faa 100644 --- a/app/controllers/admin/user_identifiers_controller.rb +++ b/app/controllers/admin/user_identifiers_controller.rb @@ -1,7 +1,7 @@ module Admin class UserIdentifiersController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index b456891..70251c0 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,7 +1,7 @@ module Admin class UsersController < Admin::ApplicationController # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: + # you can overwrite any of the RESTful actions. For example: # # def index # super diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 27cca0d..526f76a 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -1,11 +1,8 @@ class PlansController < ApplicationController require 'pp' helper SettingsTemplateHelper - #Uncomment the line below in order to add authentication to this page - users without permission will not be able to add new plans - #load_and_authorize_resource - # - after_action :verify_authorized + after_action :verify_authorized def index authorize Plan @@ -15,111 +12,83 @@ # GET /plans/new + # ------------------------------------------------------------------------------------ def new @plan = Plan.new authorize @plan - @funders = Org.funders.order('name ASC') - - no_org = Org.new() - no_org.id = -1 - no_org.name = "No Funder" - @funders.unshift(no_org) - - - respond_to do |format| - format.html # new.html.erb - end + + # Get all of the available funders and non-funder orgs + @funders = Org.funders.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 - - # we get here either from selecting a funder or if if the first selection - # results in multiple templates, from a template selection screen + # POST /plans + # ------------------------------------------------------------------- def create @plan = Plan.new authorize @plan - message = "" - - # if we have a template_id we've been selcting between templates, otherwise funders - if params[:template_id] - @templates = [ Template.find(params[:template_id] ) ] - else - funder_id = params[:plan][:funder_id].to_i - - if funder_id.present? && funder_id != -1 - @templates = [] - - # get all funder @templates - funder = Org.find(params[:plan][:funder_id]) - funder_templates = get_most_recent( funder.templates.where(published: true).all ) - - # get org templates and index by customization id - if current_user.org.nil? - orgtemplates = [] - else - orgtemplates = get_most_recent( current_user.org.templates.all ) - end - - orgt_by_customization = orgtemplates.collect{|t| [t.customization_of, t]}.to_h - - # go through funder templates and replace with org cusomizations if needed - funder_templates.each do |ft| - if orgt_by_customization.has_key?(ft.dmptemplate_id) - message = _(" - using template customised by your institution") - @templates << orgt_by_customization[ft.dmptemplate_id] - else - @templates << ft - end - end - - else # either didn't select funder or selected "No Funder" - - # get all org @templates which are not customisations - @templates = get_most_recent( current_user.org.templates.where(customization_of: nil) ) - - message = _(" - choosing default template for your institution") - - # if none of these get the default template - if @templates.blank? - @templates = get_most_recent( Template.where(is_default: true, customization_of: nil) ) - message = _(" - no funder or institution template, choosing default template") - end - end - end - - # if we have more than one template then back to the user - # using the 'create' template - # to choose otherwise just create the plan - # and go to the plan/show template - if @templates.length > 1 - message += _(" - there are more than one to choose from") - flash.notice = message - respond_to do |format| - format.html - end - return - end - - @plan.template = @templates[0] - - @based_on = @plan.base_template() - - @plan.principal_investigator = current_user.name - - @plan.title = _('My plan')+' ('+@plan.template.title+')' # We should use interpolated string since the order of the words from this message could vary among languages - - @all_guidance_groups = @plan.get_guidance_group_options - @selected_guidance_groups = @plan.guidance_groups.pluck(:id) + @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]) - respond_to do |format| - if @plan.save - @plan.assign_creator(current_user.id) - flash.notice = _('Plan was successfully created.') + message - format.html { redirect_to({:action => "show", :id => @plan.id, :editing => true }) } + # Return the 'Select a template' section + respond_to do |format| + 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 + ')' : + current_user.firstname + "'s" + _(" Plan") else - flash[:notice] = failed_create_error(@plan, _('plan')) - format.html { render action: "new" } + @plan.title = plan_params[:title] + end + + if @plan.save + @plan.assign_creator(current_user) + + 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]}" + + else + # 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 + + else + # Something went wrong so report the issue to the user + flash[:notice] = failed_create_error(@plan, 'Plan') + respond_to do |format| + format.js {} + end end end end @@ -150,7 +119,7 @@ @all_ggs_grouped_by_org = @all_ggs_grouped_by_org.sort_by {|org,gg| org.name} @selected_guidance_groups = @plan.guidance_groups.pluck(:id) - @based_on = @plan.base_template + @based_on = (@plan.template.customization_of.nil? ? @plan.template : Template.live(@plan.template.customization_of)) respond_to :html end @@ -412,6 +381,9 @@ private + def plan_params + params.require(:plan).permit(:org_id, :org_name, :funder_id, :funder_name, :template_id, :title) + end # different versions of the same template have the same dmptemplate_id # but different version numbers so for each set of templates with the @@ -476,4 +448,49 @@ plan.delete(src_plan_key) end + # Collect all of the templates available for the org+funder combination + # -------------------------------------------------------------------------- + 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) + unless org_id.nil? + org = Org.find(org_id) + @templates = Template.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.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.find_by(published: true, org: org, customization_of: tmplt.dmptemplate_id) + unless customization.nil? + @templates.delete(tmplt) + @templates << customization + 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 + end diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 448efa8..dbc8dd4 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -6,6 +6,7 @@ @orgs = Org.where(parent_id: nil).order("name") @other_organisations = Org.where(parent_id: nil, is_other: true).pluck(:id) @identifier_schemes = IdentifierScheme.where(active: true).order(:name) + @default_org = current_user.org end # GET /resource diff --git a/app/dashboards/user_dashboard.rb b/app/dashboards/user_dashboard.rb index 687d2b9..4ba23ad 100644 --- a/app/dashboards/user_dashboard.rb +++ b/app/dashboards/user_dashboard.rb @@ -82,7 +82,6 @@ :plans, :user_identifiers, :identifier_schemes, - :setting_objects, :orcid_id, :shibboleth_id, :created_at, @@ -122,7 +121,6 @@ # :plans, :user_identifiers, :identifier_schemes, -# :setting_objects, :firstname, :surname, :email, @@ -159,5 +157,4 @@ def display_resource(user) "#{user.firstname} #{user.surname} (##{user.id})" end - end diff --git a/app/models/org.rb b/app/models/org.rb index 3c23dcc..e11d5e1 100644 --- a/app/models/org.rb +++ b/app/models/org.rb @@ -49,7 +49,7 @@ # Predefined queries for retrieving the managain organisation and funders scope :managing_orgs, -> { where(abbreviation: Rails.configuration.branding[:organisation][:abbreviation]) } scope :funders, -> { where(org_type: 2) } - scope :institutions, -> { where(org_type: 3) } + scope :institutions, -> { where(org_type: 1) } # EVALUATE CLASS AND INSTANCE METHODS BELOW diff --git a/app/models/plan.rb b/app/models/plan.rb index 50d075d..8c8d3c7 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -1,4 +1,7 @@ class Plan < ActiveRecord::Base + + before_validation :set_creation_defaults + ## # Associations belongs_to :template @@ -1104,4 +1107,14 @@ (num_lines * font_height) + vertical_margin + leading end + # Initialize the title and dirty flags for new templates + # -------------------------------------------------------- + def set_creation_defaults + # Only run this before_validation because rails fires this before save/create + if self.id.nil? + self.title = "My plan (#{self.template.title})" if self.title.nil? && !self.template.nil? + self.visibility = 1 + end + end + end diff --git a/app/models/template.rb b/app/models/template.rb index 63b4b3e..94a845b 100644 --- a/app/models/template.rb +++ b/app/models/template.rb @@ -17,7 +17,7 @@ ## # Possibly needed for active_admin # -relies on protected_attributes gem as syntax depricated in rails 4.2 - attr_accessible :id, :org_id, :description, :published, :title, :locale, + attr_accessible :id, :org_id, :description, :published, :title, :locale, :customization_of, :is_default, :guidance_group_ids, :org, :plans, :phases, :dmptemplate_id, :version, :visibility, :published, :as => [:default, :admin] @@ -130,6 +130,7 @@ self.published = false self.dirty = false self.visibility = 1 + self.is_default = false self.version = 0 if self.version.nil? # Generate a unique identifier for the dmptemplate_id if necessary diff --git a/app/policies/plan_policy.rb b/app/policies/plan_policy.rb index 318608d..d6c8703 100644 --- a/app/policies/plan_policy.rb +++ b/app/policies/plan_policy.rb @@ -43,6 +43,10 @@ def status? @plan.readable_by?(@user.id) end + + def possible_templates? + @plan.id.nil? + end # TODO: These routes are no lonmger used =begin diff --git a/app/views/admin/application/_admin_header.html.erb b/app/views/admin/application/_admin_header.html.erb deleted file mode 100644 index 6f7bcb5..0000000 --- a/app/views/admin/application/_admin_header.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
-
-
- -
-
-
diff --git a/app/views/admin/application/_sidebar.html.erb b/app/views/admin/application/_sidebar.html.erb deleted file mode 100644 index 98adca4..0000000 --- a/app/views/admin/application/_sidebar.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<%# Hack for customisation %> -<%= render 'admin_header' %> - -<%# -# Sidebar - -This partial is used to display the sidebar in Administrate. -By default, the sidebar contains navigation links -for all resources in the admin dashboard, -as defined by the routes in the `admin/` namespace -%> - - diff --git a/app/views/administrate/application/_admin_header.html.erb b/app/views/administrate/application/_admin_header.html.erb new file mode 100644 index 0000000..115db95 --- /dev/null +++ b/app/views/administrate/application/_admin_header.html.erb @@ -0,0 +1,4 @@ +
+

Super Admin area

+ <%= link_to(image_tag("logo.jpg"), root_path)%> +
diff --git a/app/views/administrate/application/_navigation.html.erb b/app/views/administrate/application/_navigation.html.erb new file mode 100644 index 0000000..a5cfa7a --- /dev/null +++ b/app/views/administrate/application/_navigation.html.erb @@ -0,0 +1,26 @@ +<%# Hack for customisation %> + +<%# +# Navigation + +This partial is used to display the navigation in Administrate. +By default, the navigation contains navigation links +for all resources in the admin dashboard, +as defined by the routes in the `admin/` namespace +%> + + diff --git a/app/views/contact_us/contacts/new.html.erb b/app/views/contact_us/contacts/new.html.erb index 57596a5..c4d2f30 100644 --- a/app/views/contact_us/contacts/new.html.erb +++ b/app/views/contact_us/contacts/new.html.erb @@ -1,122 +1,111 @@ - +<% javascript "contacts/new_contact.js" %> +

- <%= t("contact_page.title") %> + <%= _("Contact Us") %>

- <%= raw t("contact_page.intro_text_html", - organisation_name: Rails.configuration.branding[:organisation][:name], - organisation_email: Rails.configuration.branding[:organisation][:email], - organisation_url: Rails.configuration.branding[:organisation][:url], - application_name: Rails.configuration.branding[:application][:name], - application_url: Rails.configuration.branding[:application][:url], - application_issue_list_url: Rails.configuration.branding[:application][:issue_list_url]) %> - <%= raw t("contact_page.github_text_html") %> + <%= raw _('%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below.') % {organisation_name: Rails.configuration.branding[:organisation][:name], + organisation_url: Rails.configuration.branding[:organisation][:url], + application_name: Rails.configuration.branding[:application][:name]} %>

- -
-
- <%= form_for @contact, :url => contacts_path do |f| %> -
- - <% if ContactUs.require_name %> - - - - - <% end %> - - - - - <% if ContactUs.require_subject %> - - - - - <% end %> - - - - - <% if !user_signed_in? then %> - - - - - <% end %> -
- <%= f.label :name, (t('.name') + content_tag(:abbr, "*", :class => "required")).html_safe %> - - <% if user_signed_in? then %> - <%= f.text_field :name, :value => current_user.name(false) %> - <% else %> - <%= f.text_field :name %> - <% end %> - <% if f.object.errors[:name].present? %> -

<%= f.object.errors[:name].join(" and ") %>

- <% end %> -
- <%= f.label :email, (t('.email') + content_tag(:abbr, "*", :class => "required")).html_safe %> - - <% if user_signed_in? then %> - <%= f.email_field :email, :value => current_user.email %> - <% else %> - <%= f.email_field :email %> - <% end %> - <% if f.object.errors[:email].present? %> -

<%= f.object.errors[:email].join(" and ") %>

- <% end %> -
- <%= f.label :subject, (t('.subject') + content_tag(:abbr, "*", :class => "required")).html_safe %> - - <%= f.text_field :subject %> - <% if f.object.errors[:subject].present? %> -

<%= f.object.errors[:subject].join(" and ") %>

- <% end %> -
- <%= f.label :message, (t('.message') + content_tag(:abbr, "*", :class => "required")).html_safe %> - - <%= f.text_area :message, :rows => 10 %> - <% if f.object.errors[:message].present? %> -

<%= f.object.errors[:message].join(" and ") %>

- <% end %> -
- <%= t('helpers.security_check') %> - - <%= recaptcha_tags %> -
-
-
- <%= f.submit :submit, :class => "btn btn-primary", :label => t('.submit') %> -
- <% end %> -
-
- - -
-
- <%= raw t("contact_page.address_text_html", - organisation_name: Rails.configuration.branding[:organisation][:name], - organisation_email: Rails.configuration.branding[:organisation][:email], - application_name: Rails.configuration.branding[:application][:name], - organisation_telephone: Rails.configuration.branding[:organisation][:telephone], - organisation_address_line1: Rails.configuration.branding[:organisation][:address_line1], - organisation_address_line2: Rails.configuration.branding[:organisation][:address_line2], - organisation_address_line3: Rails.configuration.branding[:organisation][:address_line3], - organisation_address_line4: Rails.configuration.branding[:organisation][:address_line4], - organisation_address_country: Rails.configuration.branding[:organisation][:address_country]) %> - -
- + +
+
+ <%= form_for @contact, url: contacts_path, html: {class: "roadmap-form"} do |f| %> +
+ <% if ContactUs.require_name %> +
+ <%= f.label :name, (_('Name') + content_tag(:abbr, "*", class: "required")).html_safe %> + <% if user_signed_in? then %> + <%= f.text_field :name, value: current_user.name(false) %> + <% else %> + <%= f.text_field :name %> + <% end %> + <% if f.object.errors[:name].present? %> +

<%= f.object.errors[:name].join(_(" and ")) %>

+ <% end %> +
+ <% end %> + +
+ <%= f.label :email, (_('Email') + content_tag(:abbr, "*", class: "required")).html_safe %> + <% if user_signed_in? then %> + <%= f.email_field :email, value: current_user.email %> + <% else %> + <%= f.email_field :email %> + <% end %> + <% if f.object.errors[:email].present? %> +

<%= f.object.errors[:email].join(_(" and ")) %>

+ <% end %> +
+ + <% if ContactUs.require_subject %> +
+ <%= f.label :subject, (_('Subject') + content_tag(:abbr, "*", class: "required")).html_safe %> + <%= f.text_field :subject %> + <% if f.object.errors[:subject].present? %> +

<%= f.object.errors[:subject].join(_(" and ")) %>

+ <% end %> +
+ <% end %> + +
+ <%= f.label :message, (_('Message') + content_tag(:abbr, "*", class: "required")).html_safe %> + <%= f.text_area :message, rows: 10, class: "input-large" %> + <% if f.object.errors[:message].present? %> +

<%= f.object.errors[:message].join(_(" and ")) %>

+ <% end %> +
+ + <% if !user_signed_in? then %> +
+ <%= t('helpers.security_check') %> + <%= recaptcha_tags %> +
+ <% end %> + +
+ + <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'create_contact_submit', + val: 'Submit', + disabled_initially: true, + tooltip: _('Fill in the required fields')} %> +
+
-
-
-
- + <% end %> +
+
+ + +
+
+ <%= raw _("
  • %{organisation_name}
  • +
  • %{organisation_address_line1}
  • +
  • %{organisation_address_line2}
  • +
  • %{organisation_address_line3}
  • +
  • %{organisation_address_line4}
  • +
  • %{organisation_address_country}
  • +
+

Helpline: %{organisation_telephone}

+

Email %{organisation_email}

") % + { organisation_name: Rails.configuration.branding[:organisation][:name], + organisation_address_line1: Rails.configuration.branding[:organisation][:address_line1], + organisation_address_line2: Rails.configuration.branding[:organisation][:address_line2], + organisation_address_line3: Rails.configuration.branding[:organisation][:address_line3], + organisation_address_line4: Rails.configuration.branding[:organisation][:address_line4], + organisation_address_country: Rails.configuration.branding[:organisation][:address_country], + organisation_telephone: Rails.configuration.branding[:organisation][:telephone], + organisation_email: Rails.configuration.branding[:organisation][:email], + application_name: Rails.configuration.branding[:application][:name]} %> + +
+ + +
+
+
+
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 5acc77e..22ac7ef 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,138 +1,114 @@ -

<%= _('Edit profile') %>

-<%= raw _('

Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

') %> +
+

<%= _('Edit profile') %>

-
- <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put}) do |f| %> - <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %> - -
+

+ <%= _("Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.") %> +

-

<%= raw _('You can edit any of the details below.') %>

+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: "roadmap-form white_background"}) do |f| %> + +
+ <%= _('You can edit any of the details below.') %> + + <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %> - - - - - - - - - - - - - - - - - - "> - - - - <% if MANY_LANGUAGES %> - - - - - <% end %> - - <% @identifier_schemes.each do |scheme| %> - - - - - <% end %> - - - <% unless @user.api_token.blank? %> - - - - - - - - - <% end %> -
<%= (_('Email') + " *") %><%= f.email_field :email, as: :email %>
<%= _('First name') %><%= f.text_field :firstname, as: :string, - id: "first_time_login_firstname", - autofocus: true, - class: "text_field has-tooltip", - "data-toggle" => "tooltip", - "data-trigger" => "focus" , - "title" => _('Please enter your first name.') %>
<%= _('Last name') %><%= f.text_field :surname, - as: :string, id: "first_time_login_surname", - class: "text_field has-tooltip", - "data-toggle" => "tooltip", - "data-trigger" => "focus" , - "title" => _('Please enter your surname or family name.') %>
<%= _('Organisation') %><%= collection_select(:user, - :org_id, @orgs, - :id, :name, {include_blank: _('Select Organisation')}, - { class: "typeahead org_sign_up" }) %>
<%= _('Language') %> - - <% locale = current_user.get_locale(); %> - <%= @languages.each do |l| %> - <% end %> -
<%= scheme.description %> - <%= render partial: 'external_identifier', - locals: {scheme: scheme, - id: current_user.identifier_for(scheme)} %> -
<%= _('API token') %><%= @user.api_token %>
<%= _('API Information') %><%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%>
-
-

- -

-
-
-
-

- <%= _('If you would like to change your password please complete the following fields.') %> -

- - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -
<%= t('custom_devise.waiting_for_confirmation') %><%= resource.unconfirmed_email %>
- <% end %> - - - - - - - - - - - - -
<%= _('Current password') %> - <%= f.password_field :current_password, as: :password %> -
<%= _('New password') %><%= f.password_field :password, as: :password, autocomplete: "off" %> -
<%= _('Password confirmation') %><%= f.password_field :password_confirmation, as: :password, autocomplete: "off" %>
-
- <%= f.submit _('Save'), class: "btn btn-primary" %> - <%= link_to _('Cancel'), :back, class: "btn btn-primary" %> -
+ + <% @identifier_schemes.each do |scheme| %> +
+ +
+ <%= render partial: 'external_identifier', + locals: {scheme: scheme, + id: current_user.identifier_for(scheme)} %> +
+
+ <% end %> + + <% unless @user.api_token.blank? %> +
+ <%= f.label :api_token, _('API token') %> +
<%= @user.api_token %>
+ + +
<%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%>
+
+ <% end %> + +
+ + <%= _('If you would like to change your password please complete the following fields.') %> + +
+ <%= f.label :current_password, _('Current password') %> + <%= f.password_field :current_password, as: :password, class: 'input-medium' %> +
+ +
+ <%= f.label :password, _('New password') %> + <%= f.password_field :password, as: :password, autocomplete: "off", class: 'input-medium' %> +
+ +
+ <%= f.label :password_confirmation, _('Password confirmation') %> + <%= f.password_field :password_confirmation, as: :password, autocomplete: "off", + class: 'input-medium' %> +
+ +
+ + +
+
+ <% end %> -
diff --git a/app/views/phases/_add_note.html.erb b/app/views/phases/_add_note.html.erb index bcfcab7..51e81e2 100644 --- a/app/views/phases/_add_note.html.erb +++ b/app/views/phases/_add_note.html.erb @@ -8,21 +8,17 @@ <%= form_for( :new_note, url: notes_path, remote: true, - method: :post, - id: "new_note_form_#{questionid}", - class: "add_note_form") do |f| %> + html: {method: :post, class: "add_note_form roadmap-form"}, + id: "new_note_form_#{questionid}") do |f| %> <%= f.hidden_field :user_id, value: current_user.id %> <%= f.hidden_field :question_id, value: questionid %> <%= f.hidden_field :answer_id, value: answer.id %> <%= f.hidden_field :plan_id, value: plan_id %> - <%= text_area_tag "#{questionid}new_note_text", nil, class: "tinymce" %> - <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %> -
- - -
- <%= f.submit _('Save'), class: "btn btn-primary new_comment_submit_button" %> -
-
+
+ <%= label_tag "#{questionid}new_note_text", _('Share note with collaborators') %> + <%= text_area_tag "#{questionid}new_note_text", nil, class: "tinymce" %> + <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %> + +
<% end %> diff --git a/app/views/phases/_answer_form.html.erb b/app/views/phases/_answer_form.html.erb index 85be632..bdd8c1d 100644 --- a/app/views/phases/_answer_form.html.erb +++ b/app/views/phases/_answer_form.html.erb @@ -19,12 +19,12 @@ %>
- <%= semantic_form_for answer, :url => {:controller => :answers, :action => :update }, method: "put", :remote => true do |f| %> - <%= f.inputs do %> - <%= f.input :id, :as => :hidden, :input_html => { :value => answer.id } %> - <%= f.input :plan_id, :as => :hidden, :input_html => { :value => @plan.id } %> - <%= f.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %> - <%= f.input :question_id, :as => :hidden, :input_html => { :value => question_id, :class => "question_id" } %> + <%= semantic_form_for answer, :url => {controller: :answers, action: :update }, html: {method: "put", class: "roadmap-form"}, remote: true do |f| %> +
+ <%= f.input :id, as: :hidden, input_html: { value: answer.id } %> + <%= f.input :plan_id, as: :hidden, input_html: { value: @plan.id } %> + <%= f.input :user_id, as: :hidden, input_html: { value: current_user.id } %> + <%= f.input :question_id, as: :hidden, input_html: { value: question_id, class: "question_id" } %> <%= f.hidden_field :lock_version, id: "answer_lock_version-#{question_id}" %> @@ -62,23 +62,23 @@ <% if q_format.checkbox? %> - <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, :input_html => { :id => "options-#{question.id}" } %> + <%= f.input :options, as: :check_boxes, collection: options, label: false, input_html: { id: "options-#{question.id}" } %> <% elsif q_format.multiselectbox? %> - <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true , :id => "options-#{question.id}" } %> + <%= f.input :options, as: :select, collection: options, label: false, input_html: { multiple: true , id: "options-#{question.id}" } %> <% elsif q_format.radiobuttons? %>
    <% options.each do |op| %>
  1. <% if answer.question_option_ids[0] == op.id then%> - <%= f.radio_button :option_ids, op.id, :checked => true, id: "answer_option_ids_#{op.id}"%> + <%= f.radio_button :option_ids, op.id, checked: true, id: "answer_option_ids_#{op.id}"%> <%else%> - <%= f.radio_button :option_ids, op.id, :checked => false, id: "answer_option_ids_#{op.id}"%> + <%= f.radio_button :option_ids, op.id, checked: false, id: "answer_option_ids_#{op.id}"%> <% end %> <%= raw op.text %>
  2. <% end %>
<% elsif q_format.dropdown? %> - <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => false, :id => "options-#{question.id}" } %> + <%= f.input :options, as: :select, collection: options, label: false, input_html: { multiple: false, id: "options-#{question.id}" } %> <% end %> @@ -95,13 +95,13 @@ <%= text_area_tag("answer-text-#{question_id}".to_sym, answer.text, class: "tinymce") %> <% end %> - <% end %> - - - <%= f.actions do %> - <%= f.action :submit, :label => _('Save'), :button_html => { :class => "btn btn-primary"} %> - - <% end %> + + + + + +
+ <% end %>
@@ -111,22 +111,20 @@ <%= _('Answered')%> <%= answer.updated_at.iso8601 %><%= _(' by')%> <%= answer.user.name %> <% end %>
- -
<% comments = answer.notes.all %> - <%= hidden_field_tag :question_id, question_id, :class => "question_id" %> + <%= hidden_field_tag :question_id, question_id, class: "question_id" %>
diff --git a/app/views/phases/_edit_note.html.erb b/app/views/phases/_edit_note.html.erb index b0a7bdf..17a75bc 100644 --- a/app/views/phases/_edit_note.html.erb +++ b/app/views/phases/_edit_note.html.erb @@ -3,18 +3,13 @@ <%= form_for(note, url: note_path(note), remote: true, - method: :put, - class: "edit_note_form", + html: {method: :put, class: "edit_note_form roadmap-form"}, id: "edit_note_form_#{note.id}") do |f| %> +
<%= f.hidden_field :id, :value => note.id %> <%= text_area_tag("#{note.id}_note_text".to_sym, note.text , class: "tinymce") %> -
- - -
- <%= f.submit _('Save'), :class => "btn btn-primary edit_note_submit_button" %> -
-
+ <%= f.submit _('Save'), :class => "form-submit edit_note_submit_button" %> +
<%end%> diff --git a/app/views/phases/_note.html.erb b/app/views/phases/_note.html.erb index 95d38ec..5cc8df3 100644 --- a/app/views/phases/_note.html.erb +++ b/app/views/phases/_note.html.erb @@ -28,6 +28,5 @@ <%= render :partial => "/phases/add_note", locals: {answer: answer, question: question, plan_id: plan.id }%>
<% else%> - <%= _('Share note with collaborators')%> <%= render :partial => "/phases/add_note", locals: {answer: answer, question: question, plan_id: plan.id }%> <% end%> diff --git a/app/views/plans/_answer_form.html.erb b/app/views/plans/_answer_form.html.erb index b53e013..45f908b 100644 --- a/app/views/plans/_answer_form.html.erb +++ b/app/views/plans/_answer_form.html.erb @@ -1,4 +1,4 @@ - - <% q_format = question.question_format%> + + <% q_format = question.question_format%> - <% if readonly != "always" then %> -
> - <%= semantic_form_for answer, :url => {:controller => :answers, :action => :create }, :html=>{:method=>:post}, :remote => true do |f| %> - <%= f.inputs do %> - <%= f.input :plan_id, :as => :hidden %> - <%= f.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %> - <%= f.input :question_id, :as => :hidden, :input_html => { :class => "question_id" } %> + <% if readonly != "always" then %> +
> + <%= semantic_form_for answer, :url => {:controller => :answers, :action => :create }, :html=>{:method=>:post}, :remote => true do |f| %> + <%= f.inputs do %> + <%= f.input :plan_id, :as => :hidden %> + <%= f.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %> + <%= f.input :question_id, :as => :hidden, :input_html => { :class => "question_id" } %> - <% if q_format.title == "Check box" then %> - <% if readonly then %> - <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, input_html => { :disabled => true, :id => "options-#{question.id}" } %> - <% else %> - <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, :input_html => { :id => "options-#{question.id}" } %> - <% end %> - - <% elsif q_format.title == "Multi select box" then %> - <% if readonly then %> - <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true, :disabled => true , :id => "options-#{question.id}" } %> - <% else %> - <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true , :id => "options-#{question.id}" } %> - <% end %> - - <% elsif q_format.title == "Radio buttons" then%> -
    + <% options = question.options.order("number") %> + + <% if q_format.title == "Check box" then %> + <% if readonly then %> + <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, input_html => { :disabled => true, :id => "options-#{question.id}" } %> + <% else %> + <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, :input_html => { :id => "options-#{question.id}" } %> + <% end %> + + <% elsif q_format.title == "Multi select box" then %> + <% if readonly then %> + <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true, :disabled => true , :id => "options-#{question.id}" } %> + <% else %> + <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true , :id => "options-#{question.id}" } %> + <% end %> + + <% elsif q_format.title == "Radio buttons" then%> +
      <% options.each do |op| %>
    1. <% if answer.option_ids[0] == op.id then%> <% if readonly then %> <%= f.radio_button :option_ids, op.id, :checked => true, disabled: true, id: "answer_option_ids_#{op.id}"%> <% else %> - <%= f.radio_button :option_ids, op.id, :checked => true, id: "answer_option_ids_#{op.id}"%> + <%= f.radio_button :option_ids, op.id, :checked => true, id: "answer_option_ids_#{op.id}"%> <% end %> <%else%> <% if readonly then %> - <%= f.radio_button :option_ids, op.id, :checked => false, disabled: true, id: "answer_option_ids_#{op.id}"%> + <%= f.radio_button :option_ids, op.id, :checked => false, disabled: true, id: "answer_option_ids_#{op.id}"%> <% else %> - <%= f.radio_button :option_ids, op.id, :checked => false, id: "answer_option_ids_#{op.id}"%> + <%= f.radio_button :option_ids, op.id, :checked => false, id: "answer_option_ids_#{op.id}"%> <% end %> <% end %> <%= op.text %>
    2. <% end %>
    - <% elsif q_format.title == "Dropdown" then%> - <% if readonly then %> - <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => false, :disabled => true, :id => "options-#{question.id}" } %> - <% else %> + <% elsif q_format.title == "Dropdown" then%> + <% if readonly then %> + <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => false, :disabled => true, :id => "options-#{question.id}" } %> + <% else %> <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => false, :id => "options-#{question.id}" } %> - <% end %> - <% end %> + <% end %> + <% end %> + + + <% if question.option_comment_display == true then%> <%= label_tag("answer-text-#{question.id}".to_sym, _('Comment')) %> @@ -116,7 +125,7 @@ <% if readonly then %> <%= f.action :submit, :label => _('Save'), :button_html => { :class => "btn btn-primary"}, :input_html => { :disabled => true } %> <% else %> - + <%= f.action :submit, :label => _('Save'), :button_html => { :class => "btn btn-primary"} %> <% end %> @@ -204,7 +213,7 @@
    - <%= question.section.organisation.abbreviation %> + <%= question.section.organisation.abbreviation %> <%if question.section.organisation.abbreviation == "EPSRC" then %> <%= _('Policy Expectations')%> <%else%> @@ -254,7 +263,7 @@
    <% if last_question_id == question.id then %> -
    +
    <% else %> -
    +
    <% end %> diff --git a/app/views/plans/_available_templates.html.erb b/app/views/plans/_available_templates.html.erb new file mode 100644 index 0000000..59eb6fa --- /dev/null +++ b/app/views/plans/_available_templates.html.erb @@ -0,0 +1,20 @@ +<%= _('Which DMP template would you like to use?') %> + + + + + +
    + <%= _('We found multiple DMP templates corresponding to your funder.') %> +
    + + \ No newline at end of file diff --git a/app/views/plans/_dropdowns_new_plan.html.erb b/app/views/plans/_dropdowns_new_plan.html.erb deleted file mode 100644 index c7e9d7e..0000000 --- a/app/views/plans/_dropdowns_new_plan.html.erb +++ /dev/null @@ -1,41 +0,0 @@ - - -<%= semantic_form_for @plan, url: plans_path(@plan) do |f| %> - <%= f.inputs do %> - <%= hidden_field_tag :default_tag, "false" ,:id => "default_tag" %> -
    - -

    <%= _('Create a new plan') %>

    -
    -

    <%= raw _("

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    ")%>

    -
    - - - - <% end %> - - - <%= f.actions do %> - <%= f.action :submit, - :as => :button, - :input_html => { :id => "create-plan-button", :class => "btn btn-primary"}, - :label => _('Create plan') %> - <% end %> - -<% end %> diff --git a/app/views/plans/_plan_details.html.erb b/app/views/plans/_plan_details.html.erb index 03f5f0b..2ce0220 100644 --- a/app/views/plans/_plan_details.html.erb +++ b/app/views/plans/_plan_details.html.erb @@ -9,84 +9,70 @@
    "> - -
    -

    - <%= raw _("Please fill in the basic project details below and click 'Update' to save")%> -

    -
    -
    + <%= form_for @plan, url: {controller: :plans, action: :update }, + html: {method: :put, class: "roadmap-form"} do |f| %> +
    -
    - - <%= semantic_form_for @plan, :url => {:controller => :plans, :action => :update }, :html=>{:method=>:put} do |f| %> - <%= f.inputs do %> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <%= _('Plan name') %> - <%= f.text_field :title, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => _('If applying for funding, state the name exactly as in the grant proposal.') %> -
    <%= _('ID') %> - <%= f.text_field :identifier, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => _('A pertinent ID as determined by the funder and/or institution.') %> -
    <%= _('Grant number') %> - <%= f.text_field :grant_number, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => _('Grant reference number if applicable [POST-AWARD DMPs ONLY]') %> -
    <%= _('Principal Investigator/Researcher') %> - <%= f.text_field :principal_investigator, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => _('Name of Principal Investigator(s) or main researcher(s) on the project.') %> -
    <%= _('Principal Investigator/Researcher ID') %> - <%= f.text_field :principal_investigator_identifier, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => _('E.g ORCID http://orcid.org/.') %> -
    <%= _('Plan data contact') %> - <%= f.text_field :data_contact, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => _('Name (if different to above), telephone and email contact details') %> -
    <%= _('Description') %> - <%= f.text_area :description, { :rows => 7, :class => 'text_area has-tooltip', 'data-toggle' => "tooltip", 'data-html' => "true", 'title'=> _("

    Questions to consider:

    • - What is the nature of your research project?
    • - What research questions are you addressing?
    • - For what purpose are the data being collected or created?

    Guidance:

    Briefly summarise the type of study (or studies) to help others understand the purposes for which the data are being collected or created.

    ")} %> -
    + +
    + <%= _('Please fill in the basic project details below') %> + +
    + <%= f.label :title, _('Plan name') %> + <%= f.text_field :title, class: "input-large has-tooltip", 'data-toggle': "tooltip", + 'title': _('If applying for funding, state the name exactly as in the grant proposal.') %>
    - <% end %> - - <%= f.actions do %> -
    - <%= f.submit _('Save'), :class => 'btn btn-primary' %> - <%= _('Cancel') %> +
    + <%= f.label :identifier, _('ID') %> + <%= f.text_field :identifier, class: 'input-medium has-tooltip', 'data-toggle': "tooltip", + 'title': _('A pertinent ID as determined by the funder and/or institution.') %>
    - <%end%> - <%end%> +
    + <%= f.label :grant_number, _('Grant number') %> + <%= f.text_field :grant_number, class: 'input-medium has-tooltip', + 'data-toggle': "tooltip", + 'title': _('Grant reference number if applicable [POST-AWARD DMPs ONLY]') %> +
    +
    + <%= f.label :principal_investigator, _('Principal Investigator/Researcher') %> + <%= f.text_field :principal_investigator, class: 'input-medium has-tooltip', + 'data-toggle': "tooltip", + 'title': _('Name of Principal Investigator(s) or main researcher(s) on the project.') %> +
    +
    + <%= f.label :principal_investigator_identifier, _('Principal Investigator/Researcher ID') %> + <%= f.text_field :principal_investigator_identifier, class: 'input-medium has-tooltip', + 'data-toggle': "tooltip", 'title': _('E.g ORCID http://orcid.org/.') %> +
    +
    + <%= f.label :data_contact, _('Plan data contact') %> + <%= f.text_field :data_contact, class: 'input-medium has-tooltip', + 'data-toggle': "tooltip", + 'title': _('Name (if different to above), telephone and email contact details') %> +
    +
    + <%= f.label :description, _('Description') %> + <%= f.text_area :description, { rows: 7, class: 'input-large has-tooltip', + 'data-toggle': "tooltip", 'data-html': "true", + 'title': _("

    Questions to consider:

    • - What is the nature of your research project?
    • - What research questions are you addressing?
    • - For what purpose are the data being collected or created?

    Guidance:

    Briefly summarise the type of study (or studies) to help others understand the purposes for which the data are being collected or created.

    ")} %> +
    + +
    + + + +
    +
    +
    + + <%end%>
    ">
    -

    <%= _('This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked.')%>

    +

    @@ -230,127 +216,118 @@
    -

    <%= _('This plan is based on:')%>

    +

    <%= _('This plan is based on:')%>

    - - - <%if based_on.present? %> - - - - - <%end%> - <%if plan.template.org.name.present? %> - - - - - <%end%> - -
    <%= _('Funder') %><%= based_on.org.name %>
    <%= _('Institution') %><%= plan.template.org.name %>
    +

    + <% if based_on.org != plan.template.org %> + <%= _('A version of ') %> "<%= based_on.title %>" <%= based_on.title.downcase.include?(_('template')) ? '' : _('template') %><%= _(' that has been customised by ') %> <%= plan.template.org.name %> + <% else %> + <%= _('The')%> "<%= plan.template.title %>" <%= (plan.template.is_default ? _('generic template') : plan.template.title.downcase.include?(_('template')) ? '' : _('template')) %> <%= _(' provided by ') %><%= plan.template.org.name %> + <% end %> +

    - + <% phases = plan.template.phases %> - <% if phases.count == 1 %> - <% phases.each do |phase| %> -
    - <%= link_to _('Answer questions'), edit_plan_phase_path(plan,phase), :class => 'btn btn-primary' %> - <%= _('Export') %> -
    - <%= render :partial => "plans/export", locals: {plan: plan, phase: phases[0] } %> -
    -

    <%= raw phase.description %>

    - <% if phase.sections.any? %> - - - - - - - - - <% phase.sections.each do |section| %> - - - - - <%end%> - -
    <%= _('Sections')%><%= _('Questions')%>
    -

    <%= section.title %>

    -
    - <% if section.questions.any? %> -
      - <% section.questions.each do |ques|%> -
    • - <%= raw ques.text %> -
    • - <%end%> -
    - <%end%> -
    - <%end%> - <%end%> + <% if phases.count == 1 %> + <% phases.each do |phase| %> +
    + <%= link_to _('Answer questions'), edit_plan_phase_path(plan,phase), :class => 'btn btn-primary' %> + <%= _('Export') %> +
    + <%= render :partial => "plans/export", locals: {plan: plan, phase: phases[0] } %> +
    +

    <%= raw phase.description %>

    + <% if phase.sections.any? %> + + + + + + + + + <% phase.sections.each do |section| %> + + + + + <%end%> + +
    <%= _('Sections')%><%= _('Questions')%>
    +

    <%= section.title %>

    +
    + <% if section.questions.any? %> +
      + <% section.questions.each do |ques|%> +
    • + <%= raw ques.text %> +
    • + <%end%> +
    + <%end%> +
    + <%end%> + <%end%> <%else%> -
    - <%= raw plan.template.description %> -
    - <% phases.each do |phase| %> -
    -
    - -
    -
    -
    - <%= link_to _('Answer questions'), edit_plan_phase_path(plan,phase), :class => 'btn btn-primary' %> - <%= _('Export') %> -
    - <%= render :partial => "plans/export", locals: {plan: plan, phase: phase} %> -
    -

    <%= raw phase.description %> -

    +
    + <%= raw plan.template.description %> +
    + <% phases.each do |phase| %> +
    +
    + +
    +
    +
    + <%= link_to _('Answer questions'), edit_plan_phase_path(plan,phase), :class => 'btn btn-primary' %> + <%= _('Export') %> +
    + <%= render :partial => "plans/export", locals: {plan: plan, phase: phase} %> +
    +

    <%= raw phase.description %> +

    - <% if phase.sections.any? %> - - - - - - - - - <% phase.sections.each do |section| %> - - - - - <%end%> - -
    <%= _('Sections')%><%= _('Questions')%>
    -

    <%= section.title %>

    -
    - <% if section.questions.any? %> -
      - <% section.questions.each do |ques|%> -
    • - - <%= raw ques.text %> -
    • - <%end%> -
    - <%end%> -
    - <%end%> -
    -
    -
    -
    - <%end%> + <% if phase.sections.any? %> + + + + + + + + + <% phase.sections.each do |section| %> + + + + + <%end%> + +
    <%= _('Sections')%><%= _('Questions')%>
    +

    <%= section.title %>

    +
    + <% if section.questions.any? %> +
      + <% section.questions.each do |ques|%> +
    • + - <%= raw ques.text %> +
    • + <%end%> +
    + <%end%> +
    + <%end%> +
    +
    +
    +
    + <%end%>
    diff --git a/app/views/plans/create.js.erb b/app/views/plans/create.js.erb new file mode 100644 index 0000000..11be185 --- /dev/null +++ b/app/views/plans/create.js.erb @@ -0,0 +1,16 @@ +$("#available-templates").fadeOut(); + +<% if @templates.nil? %> + $(".main_page_content").prepend('

    <%= raw notice %>

    '); + +<% elsif @templates.count > 1 %> + // Clear the existing contents of the modal and then display template combobox + $("#available-templates").html("<%= escape_javascript(render partial: 'available_templates') %>").fadeIn(); + +<% else %> + // Only one template so fill in the id + $("#plan_template_id").val("<%= @templates.first.id %>"); +<% end %> + +// Force the submit button toggle +$("#plan_template_id").change(); \ No newline at end of file diff --git a/app/views/plans/new.html.erb b/app/views/plans/new.html.erb index 81d824c..a40b41b 100644 --- a/app/views/plans/new.html.erb +++ b/app/views/plans/new.html.erb @@ -1,10 +1,90 @@ -<% javascript "projects.js" %> +<% javascript "plans/new_plan.js" %> -
    -

    <%= @error %>

    - - <%= render "dropdowns_new_plan" %> +
    +

    <%= _('Create a new plan') %>

    +

    + <%= _("Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs.") %> +

    + + <%= form_for @plan, html: {method: :post, class: "roadmap-form"}, remote: true do |f| %> +
    + + +
    + <%= _('What research project are you planning?') %> + + + + +
    + <%= _('If applying for funding, state the title exactly as in the proposal.') %> +
    +
    + + +
    + <%= _('Primary research organisation') %> + + + + <%= render partial: "shared/accessible_combobox", + locals: {name: 'plan[org_name]', + id: 'plan_org_name', + default_selection: @default_org, + models: @orgs, + attribute: 'name', + classes: 'fixed-width-large'} %> + + + + +
    + + +
    + <%= _('Funding organisation') %> + + + + <%= render partial: "shared/accessible_combobox", + locals: {name: 'plan[funder_name]', + id: 'plan_funder_name', + default_selection: nil, + models: @funders, + attribute: 'name', + classes: 'fixed-width-large'} %> + + + +
    + + +
    +
    + +
    + + + + <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'create_plan_submit', + val: 'Create Plan', + disabled_initially: true, + tooltip: _('You can not continue until you have filled in all of the required information.')} %> + + <% end %>
    - diff --git a/app/views/plans/share.html.erb b/app/views/plans/share.html.erb index bf8837b..42f6988 100644 --- a/app/views/plans/share.html.erb +++ b/app/views/plans/share.html.erb @@ -8,67 +8,72 @@
    - - <%= raw _('

    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.

    ') % { application_name: Rails.configuration.branding[:application][:name] } %> + + <%= raw _('

    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.

    ') % { application_name: Rails.configuration.branding[:application][:name] } %> -
    -

    <%= _('Collaborators')%>

    -
    - <% if @plan.roles.any? then %> +
    +

    <%= _('Collaborators')%>

    +
    + <% if @plan.roles.any? then %> - - - - - - - - - - <% plan_roles = @plan.roles.all %> - <% plan_roles.each do |role| %> - - - - + <% end %> -

    <%= _('Permissions')%>:

    - <%= f.select :access_level, [[_('Co-owner'), 3], [ _('Editor') , 2], [ _('Read only'), 1]], {}, {:class => 'has-tooltip', 'data-toggle' => "tooltip", 'title' => _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %> - <% end %> - <%= f.actions do %> - <%= f.action :submit, :label => _('Add collaborator'), :button_html => { :class => "btn btn-primary" } %> - <% end %> - <% end %> - - + +
    <%= _('Email address')%><%= _('Permissions')%>
    <%= role.user.name %> - <% if role.creator? then %> - <%= _('Owner')%> - <% else %> - <%= form_for role, :url => {:controller => :roles, :action => :update, :id => role.id }, :html=>{:method=>:put} do |f| %> - <%= f.select :access_level, {_('Co-owner') => 3, _('Editor') => 2, _('Read only') => 1}, {}, {:id => "#{role.id}-can-edit", :class => "toggle-existing-user-access has-tooltip", 'data-toggle' => "tooltip", 'title' => _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %> - <% end %> - <% end %> - + + + + + + + + + + <% plan_roles = @plan.roles.all %> + <% plan_roles.each do |role| %> + + + + - - <% end %> - -
    <%= _('Email address')%><%= _('Permissions')%>
    <%= role.user.name %> + <% if role.creator? then %> + <%= _('Owner')%> + <% else %> + <%= form_for role, url: {controller: :roles, action: :update, id: role.id }, html: {method: :put} do |f| %> +
    + <%= f.select :access_level, {"#{_('Co-owner')}": 3, "#{_('Editor')}": 2, "#{_('Read only')}": 1}, {}, {id: "#{role.id}-can-edit", class: "toggle-existing-user-access has-tooltip", 'data-toggle': "tooltip", 'title': _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %> +
    + <% end %> + <% end %> +
    <% unless role.creator? || role.user == current_user then %> - <%= link_to _('Remove user access'), role, method: :delete, data: { confirm: _('Are you sure?') }, :class => "a-orange" %> - <% end %> -
    - <% end %> - - -
    -

    <%= _('Add collaborator')%>

    - -
    - <% new_role = Role.new %> - <% new_role.plan = @plan %> - <%= semantic_form_for new_role, :url => {:controller => :roles, :action => :create }, :html=>{:method=>:post} do |f| %> - <%= f.inputs do %> - <%= f.input :plan_id, :as => :hidden %> - <%= f.semantic_fields_for :user do |user| %> - <%= user.email_field :email, :for => :user, :name => "user", :label => false, placeholder: _('Email') %> + <%= link_to _('Remove user access'), role, method: :delete, data: { confirm: _('Are you sure?') }, :class => "a-orange" %> + <% end %> +
    + <% end %> +
    + +
    + +
    + <% new_role = Role.new %> + <% new_role.plan = @plan %> + <%= form_for new_role, url: {controller: :roles, action: :create }, + html: {method: :post, class: 'roadmap-form'} do |f| %> +
    + <%= _('Add collaborator') %> + + <%= f.hidden_field :plan_id %> + + <%= f.fields_for :user do |user| %> + <%= user.label :email, _('Email') %> + <%= user.email_field :email, for: :user, name: "user", class: "left-indent" %> + <% end %> + + <%= f.label :access_level, _('Permissions') %> + <%= f.select :access_level, [[_('Co-owner'), 3], [ _('Editor') , 2], [ _('Read only'), 1]], {}, {class: 'has-tooltip left-indent', 'data-toggle': "tooltip", 'title': _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %> + +
    + <% end %> +
    +
    diff --git a/app/views/projects/_dropdowns_new_project.html.erb b/app/views/projects/_dropdowns_new_project.html.erb deleted file mode 100644 index f9a91ce..0000000 --- a/app/views/projects/_dropdowns_new_project.html.erb +++ /dev/null @@ -1,110 +0,0 @@ - -<%= semantic_form_for @project, :url => {:controller => :projects, :action => :create }, :html=>{:method=>:post} do |f| %> - <%= f.inputs do %> - <%= hidden_field_tag :default_tag, "false" ,:id => "default_tag" %> -
    -

    <%= _('Create a new plan')%>

    -
    -

    <%= raw _("

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    ")%>

    - -
    - -
    - - <% # - # The following JSON arrays are used to build/filter the contents of - # the select2 dropdown box for dmptemplates and the checkboxes for - # the guidance group selections - # (they are referenced in /app/assets/javascripts/projects.js) - # %> - - <%= hash_to_js_json_variable('funders', - @funders.collect{ |inst| - {'id': inst.id, - 'text': inst.name} - }) %> - - <%= hash_to_js_json_variable('institutions', - @institutions.collect{ |inst| - {'id': inst.id, - 'text': inst.name, - 'default': (current_user.org.id == inst.id)} - }) %> - - <%= hash_to_js_json_variable('templates', - @templates.collect{ |tmplt| - {'organisation': tmplt.organisation_id, - 'id': tmplt.id, - 'text': tmplt.title} - }) %> - - <%= hash_to_js_json_variable('guidance_for_template_or_organisation', - @guidance_groups.collect{ |grp| - {'organisation': grp.organisation_id, - 'templates': grp.dmptemplates.collect{ |t| t.id }, - 'id': grp.id, - 'text': grp.name} - }) %> - - <%= hash_to_js_json_variable('guidance_always_available', - @always_guidance.collect{ |grp| - {'id': grp.id, - 'text': grp.name} - }) %> - - <% end %> - - <%= f.actions do %> - - <% end %> -<% end %> diff --git a/app/views/shared/_accessible_combobox.html.erb b/app/views/shared/_accessible_combobox.html.erb new file mode 100644 index 0000000..c2f99e0 --- /dev/null +++ b/app/views/shared/_accessible_combobox.html.erb @@ -0,0 +1,65 @@ +<% if !models.nil? %> + <% json = {} %> + <% models.map{|m| json[m[attribute]] = m.id} %> + + + + <% models.each do |model| %> + + + + + + " name="<%= name.gsub("_#{attribute}]", "_id]") %>" + value="<%= default_selection.id unless default_selection.nil? %>" /> + + + +<% else %> + <%= _('No items available.') %> +<% end %> \ No newline at end of file diff --git a/app/views/shared/_accessible_submit_button.html.erb b/app/views/shared/_accessible_submit_button.html.erb new file mode 100644 index 0000000..2966a91 --- /dev/null +++ b/app/views/shared/_accessible_submit_button.html.erb @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/app/views/shared/_export_links.html.erb b/app/views/shared/_export_links.html.erb index 6ce39cd..6908e62 100644 --- a/app/views/shared/_export_links.html.erb +++ b/app/views/shared/_export_links.html.erb @@ -1,12 +1,13 @@ <% javascript("export_configure") %>
    - - <%= label_tag(:format, _('format')) %> + <%= label_tag(:format, _('Format')) %> <%= select_tag(:format, options_for_select(ExportedPlan::VALID_FORMATS, :pdf), class: 'export-format-selection') %> - + + +
    -

    Export Settings <%= plan_settings_indicator(plan) -%>

    - <%= render(partial: "settings/phases/export_formatting_form", locals: { plan: plan, phase: phase }) %> +

    Export Settings <%= plan_settings_indicator(plan) -%>

    + <%= render(partial: "settings/phases/export_formatting_form", locals: { plan: plan, phase: phase }) %>
    diff --git a/app/views/user_mailer/permissions_change_notification.html.erb b/app/views/user_mailer/permissions_change_notification.html.erb index 5bd0bfd..92eed7f 100644 --- a/app/views/user_mailer/permissions_change_notification.html.erb +++ b/app/views/user_mailer/permissions_change_notification.html.erb @@ -12,7 +12,7 @@ end %>

    <%= _('Hello ') %><%= @role.user.name %>,

    -

    <%= _('Your permissions relating to ') %> "<%= link_to @role.plan.title, url_for(action: 'show', controller: 'plans', id: @role.plan.id, locale: FastGettext.default_locale) %>" <%= _(' have been changed by') %><%="#{@current_user.firstname} #{@current_user.surname}. " %><%= _('You now have ') %><%= access_level %><%= _(' access. ') %><%= permissions %>

    +

    <%= _('Your permissions relating to ') %> "<%= link_to @role.plan.title, url_for(action: 'show', controller: 'plans', id: @role.plan.id, locale: FastGettext.default_locale) %>" <%= _(' have been changed by') %><%=" #{@current_user.firstname} #{@current_user.surname}. " %><%= _('You now have ') %><%= access_level %><%= _(' access. ') %><%= permissions %>

    <%=_('All the best,')%>
    <%= _('The ')%><%= Rails.configuration.branding[:application][:name] %><%=_(' team')%>.

    <% end %> diff --git a/config/application.rb b/config/application.rb index 9dbff4e..8994e51 100644 --- a/config/application.rb +++ b/config/application.rb @@ -72,11 +72,16 @@ config.assets.precompile += %w(projects.js) config.assets.precompile += %w(jquery.placeholder.js) config.assets.precompile += %w(jquery.tablesorter.js) + config.assets.precompile += %w(jquery-accessible-autocomplet-list-aria.js) config.assets.precompile += %w(export_configure.js) config.assets.precompile += %w(toolbar.js) config.assets.precompile += %w(admin.js) config.assets.precompile += %w(admin.css) + config.assets.precompile += %w(roadmap-form.scss) + config.assets.precompile += %w(plans/new_plan.js) + config.assets.precompile += %w(contacts/new_contact.js) + config.autoload_paths += %W(#{config.root}/lib) config.action_controller.include_all_helpers = true diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb index 4d12559..06f4264 100644 --- a/config/initializers/fast_gettext.rb +++ b/config/initializers/fast_gettext.rb @@ -12,7 +12,7 @@ return language.nil? ? 'en_GB' : language.abbreviation end -FastGettext.add_text_domain 'app', :path => 'config/locale', :type => :po +FastGettext.add_text_domain 'app', :path => 'config/locale', :type => :po, :ignore_fuzzy => true FastGettext.default_text_domain = 'app' FastGettext.default_available_locales = get_available_locales() FastGettext.default_locale = get_default_locale() diff --git a/config/locale/app.pot b/config/locale/app.pot index 3930575..6dd6de5 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-05-12 15:25+0100\n" -"PO-Revision-Date: 2017-05-12 15:25+0100\n" +"POT-Creation-Date: 2017-05-15 20:57+0000\n" +"PO-Revision-Date: 2017-05-15 20:57+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -24,27 +24,21 @@ msgid " - " msgstr "" -msgid " - choosing default template for your institution" -msgstr "" - -msgid " - no funder or institution template, choosing default template" -msgstr "" - -msgid " - there are more than one to choose from" -msgstr "" - -msgid " - using template customised by your institution" -msgstr "" - msgid " I accept the terms and conditions *" msgstr "" +msgid " Plan" +msgstr "" + msgid " access to" msgstr "" msgid " access. " msgstr "" +msgid " and " +msgstr "" + msgid " by" msgstr "" @@ -66,15 +60,24 @@ msgid " once you click save!" msgstr "" +msgid " or " +msgstr "" + msgid " password. You can do this through the link below." msgstr "" +msgid " provided by " +msgstr "" + msgid " saved the following answer:" msgstr "" msgid " team" msgstr "" +msgid " that has been customised by " +msgstr "" + msgid " to accept the invitation, (or copy " msgstr "" @@ -108,6 +111,9 @@ msgid "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." msgstr "" +msgid "%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below." +msgstr "" + msgid "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." msgstr "" @@ -171,15 +177,6 @@ msgid "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " msgstr "" -msgid "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " -msgstr "" - -msgid "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " -msgstr "" - -msgid "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " -msgstr "" - msgid "

    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.

    " msgstr "" @@ -204,6 +201,18 @@ msgid "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " msgstr "" +msgid "" +"
    • %{organisation_name}
    • \n" +"
    • %{organisation_address_line1}
    • \n" +"
    • %{organisation_address_line2}
    • \n" +"
    • %{organisation_address_line3}
    • \n" +"
    • %{organisation_address_line4}
    • \n" +"
    • %{organisation_address_country}
    • \n" +"
    \n" +"

    Helpline: %{organisation_telephone}

    \n" +"

    Email %{organisation_email}

    " +msgstr "" + msgid "A colleague has invited you to contribute to their Data Management Plan at " msgstr "" @@ -213,6 +222,9 @@ msgid "A required setting has not been provided" msgstr "" +msgid "A version of " +msgstr "" + msgid "API Information" msgstr "" @@ -327,6 +339,9 @@ msgid "Before submitting, please consider:" msgstr "" +msgid "Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs." +msgstr "" + msgid "Below is a list of users registered for your organisation. You can sort the data by each field." msgstr "" @@ -351,9 +366,6 @@ msgid "Check this box when you are ready for this guidance to appear on user's plans." msgstr "" -msgid "Choose a template" -msgstr "" - msgid "Click here" msgstr "" @@ -390,6 +402,9 @@ msgid "Contact Email" msgstr "" +msgid "Contact Us" +msgstr "" + msgid "Contact us" msgstr "" @@ -540,6 +555,9 @@ msgid "File Name" msgstr "" +msgid "Fill in the required fields" +msgstr "" + msgid "Filter plans" msgstr "" @@ -552,13 +570,16 @@ msgid "Forgot your password?" msgstr "" +msgid "Format" +msgstr "" + msgid "Funder" msgstr "" -msgid "Funder name" +msgid "Funders templates" msgstr "" -msgid "Funders templates" +msgid "Funding organisation" msgstr "" msgid "Future plans" @@ -627,10 +648,10 @@ msgid "ID" msgstr "" -msgid "If applying for funding, select your research funder." +msgid "If applying for funding, state the name exactly as in the grant proposal." msgstr "" -msgid "If applying for funding, state the name exactly as in the grant proposal." +msgid "If applying for funding, state the title exactly as in the proposal." msgstr "" msgid "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." @@ -699,9 +720,6 @@ msgid "Left" msgstr "" -msgid "Link your %{application_name} account to your institutional credentials (UK users only)" -msgstr "" - msgid "List of users" msgstr "" @@ -726,16 +744,22 @@ msgid "Me" msgstr "" +msgid "Message" +msgstr "" + msgid "Multi select box" msgstr "" +msgid "My Plan" +msgstr "" + msgid "My organisation isn't listed." msgstr "" -msgid "My plan" +msgid "My plans" msgstr "" -msgid "My plans" +msgid "My research organisation is not on the list" msgstr "" msgid "Name" @@ -747,9 +771,6 @@ msgid "Name of Principal Investigator(s) or main researcher(s) on the project." msgstr "" -msgid "Name of funder, if applicable." -msgstr "" - msgid "New guidance" msgstr "" @@ -771,6 +792,12 @@ msgid "No additional comment area will be displayed." msgstr "" +msgid "No funder associated with this plan" +msgstr "" + +msgid "No items available." +msgstr "" + msgid "No matches" msgstr "" @@ -780,9 +807,6 @@ msgid "Not answered yet" msgstr "" -msgid "Not applicable/not listed." -msgstr "" - msgid "Note" msgstr "" @@ -846,9 +870,6 @@ msgid "Other institutions" msgstr "" -msgid "Otherwise leave blank." -msgstr "" - msgid "Own templates" msgstr "" @@ -894,9 +915,6 @@ msgid "Plan name" msgstr "" -msgid "Plan was successfully created." -msgstr "" - msgid "Plan was successfully deleted." msgstr "" @@ -921,6 +939,9 @@ msgid "Please enter your current password" msgstr "" +msgid "Please enter your current password below when changing your email address." +msgstr "" + msgid "Please enter your first name." msgstr "" @@ -933,18 +954,30 @@ msgid "Please enter your surname or family name." msgstr "" +msgid "Please fill in the basic project details below" +msgstr "" + msgid "Please fill in the basic project details below and click 'Update' to save" msgstr "" +msgid "Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in." +msgstr "" + msgid "Please only enter up to 165 characters, you have used" msgstr "" +msgid "Please select one" +msgstr "" + msgid "Policy Expectations" msgstr "" msgid "Preview" msgstr "" +msgid "Primary research organisation" +msgstr "" + msgid "Principal Investigator / Researcher" msgstr "" @@ -963,6 +996,9 @@ msgid "Privileges" msgstr "" +msgid "Project title" +msgstr "" + msgid "Public" msgstr "" @@ -1047,24 +1083,24 @@ msgid "Sections" msgstr "" -msgid "Select Funder" -msgstr "" - -msgid "Select Organisation" +msgid "Select a template" msgstr "" msgid "Select an action" msgstr "" +msgid "Select the funding organisation" +msgstr "" + +msgid "Select the primary research organisation responsible" +msgstr "" + msgid "Select which group this guidance relates to." msgstr "" msgid "Select which theme(s) this guidance relates to." msgstr "" -msgid "Select your research funder or no funder, as appropariate." -msgstr "" - msgid "Selected option(s)" msgstr "" @@ -1104,6 +1140,9 @@ msgid "Status" msgstr "" +msgid "Subject" +msgstr "" + msgid "Successfully unlinked your account from %{is}." msgstr "" @@ -1155,6 +1194,9 @@ msgid "That template is not currently published." msgstr "" +msgid "The" +msgstr "" + msgid "The " msgstr "" @@ -1170,9 +1212,6 @@ msgid "Themes" msgstr "" -msgid "There are a number of possible templates you could use. Please choose one." -msgstr "" - msgid "There are no public DMPs." msgstr "" @@ -1203,21 +1242,18 @@ msgid "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." msgstr "" +msgid "This plan is based on the default template." +msgstr "" + msgid "This plan is based on:" msgstr "" msgid "This section is locked for editing by " msgstr "" -msgid "Tick to select any other sources of guidance you wish to see." -msgstr "" - msgid "Title" msgstr "" -msgid "To see institutional questions and/or guidance, select your organisation." -msgstr "" - msgid "Top" msgstr "" @@ -1248,9 +1284,6 @@ msgid "Unlink institutional credentials alert" msgstr "" -msgid "Unlink your institutional credentials" -msgstr "" - msgid "Unlock my account" msgstr "" @@ -1278,6 +1311,9 @@ msgid "Users" msgstr "" +msgid "Using the generic Data Management Plan" +msgstr "" + msgid "Version" msgstr "" @@ -1299,6 +1335,15 @@ msgid "Visibility" msgstr "" +msgid "We found multiple DMP templates corresponding to the funder." +msgstr "" + +msgid "We found multiple DMP templates corresponding to the research organisation." +msgstr "" + +msgid "We found multiple DMP templates corresponding to your funder." +msgstr "" + msgid "Website" msgstr "" @@ -1311,9 +1356,15 @@ msgid "Welcome." msgstr "" +msgid "What research project are you planning?" +msgstr "" + msgid "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." msgstr "" +msgid "Which DMP template would you like to use?" +msgstr "" + msgid "While you were editing " msgstr "" @@ -1356,6 +1407,9 @@ msgid "You can edit any of the details below." msgstr "" +msgid "You can not continue until you have filled in all of the required information." +msgstr "" + msgid "You can not edit a historical version of this template." msgstr "" @@ -1380,9 +1434,6 @@ msgid "You have unsaved answers in the following sections:" msgstr "" -msgid "You may leave blank or select a different organisation to your own." -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" @@ -1407,9 +1458,6 @@ msgid "Your account has been successfully linked to %{scheme}." msgstr "" -msgid "Your account is linked to your institutional credentials." -msgstr "" - msgid "Your account won't be created until you access the link above and set your password." msgstr "" @@ -1491,10 +1539,10 @@ msgid "e.g. School/ Department" msgstr "" -msgid "format" +msgid "from now" msgstr "" -msgid "from now" +msgid "generic template" msgstr "" msgid "guidance" @@ -1539,6 +1587,9 @@ msgid "must have access to guidances api" msgstr "" +msgid "no research organisation is associated with this plan" +msgstr "" + msgid "note" msgstr "" diff --git a/config/locale/de/app.po b/config/locale/de/app.po index 36ef44b..bdbe788 100644 --- a/config/locale/de/app.po +++ b/config/locale/de/app.po @@ -23,31 +23,22 @@ msgstr " - " #, fuzzy -msgid " - choosing default template for your institution" -msgstr " - " - -#, fuzzy -msgid " - no funder or institution template, choosing default template" -msgstr " - " - -#, fuzzy -msgid " - there are more than one to choose from" -msgstr " - " - -#, fuzzy -msgid " - using template customised by your institution" -msgstr " von " - -#, fuzzy msgid " I accept the terms and conditions *" msgstr "Ich akzeptiere die Nutzungsbedingungen *" +#, fuzzy +msgid " Plan" +msgstr "plans" + msgid " access to" msgstr "" msgid " access. " msgstr "" +msgid " and " +msgstr "" + #, fuzzy msgid " by" msgstr " von " @@ -73,10 +64,17 @@ msgid " once you click save!" msgstr "" +msgid " or " +msgstr "" + #, fuzzy msgid " password. You can do this through the link below." msgstr "password. You can do this through the link below." +#, fuzzy +msgid " provided by " +msgstr " von " + msgid " saved the following answer:" msgstr "" @@ -85,6 +83,10 @@ msgstr "am" #, fuzzy +msgid " that has been customised by " +msgstr " von " + +#, fuzzy msgid " to accept the invitation, (or copy " msgstr "(or copy" @@ -121,6 +123,10 @@ msgid "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." msgstr "DMPonline" +#, fuzzy +msgid "%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below." +msgstr "DMPonline" + msgid "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." msgstr "" @@ -184,15 +190,6 @@ msgid "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " msgstr "

    Falls Sie eine Vorlage für eine Institution anlegen möchten, können Sie den Knopf 'Vorlage erstellen' nutzen. Sie können verschiedene Vorlagen erstellen um auf Spezialisierungen einzugehen, z.B. für Forscher und für Doktoranden.

    " -msgid "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " -msgstr "

    Bitte beachten Sie, dass Ihre Email-Adresse als Nutzername verwendet wird. Vergessen Sie nicht, Ihre neue E-Mail-Adresse beim der nächsten Anmeldung zu verwenden, falls Sie diese geändert haben.

    " - -msgid "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " -msgstr "" - -msgid "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " -msgstr "

    Bitte wählen Sie aus folgendem Drop-Down-Menü, so dass wir bestimmen können, welche Fragen und Hilfestellungen in Ihrem Plan angezeigt werden sollen.

    Falls Sie nicht den spezifischen Anforderungen eines Geldgebers oder einer Institution folgen, wählen Sie hier, um einen generischen DMP zu schreiben , der auf den allgemeinsten Themen basiert.

    " - msgid "

    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.

    " msgstr "

    Wählen Sie die für diese Frage relevanten Themen aus.

    Dies erlaubt es, sowohl generischen Hilfestellungen auf Institutions-Ebene, als auch aus anderen Quellen, wie z.B. der DINI, oder jedweder Institute oder Einrichtungen, für die Sie Unterstützung anbieten, einzubeziehen.

    Sie können mehrere Themen durch klicken und gleichzeitiges Drücken der Steuerungs- bzw. Kommando-Taste auswählen.

    " @@ -220,6 +217,19 @@ msgstr "templates" #, fuzzy +msgid "" +"
    • %{organisation_name}
    • \n" +"
    • %{organisation_address_line1}
    • \n" +"
    • %{organisation_address_line2}
    • \n" +"
    • %{organisation_address_line3}
    • \n" +"
    • %{organisation_address_line4}
    • \n" +"
    • %{organisation_address_country}
    • \n" +"
    \n" +"

    Helpline: %{organisation_telephone}

    \n" +"

    Email %{organisation_email}

    " +msgstr "DMPonline" + +#, fuzzy msgid "A colleague has invited you to contribute to their Data Management Plan at " msgstr "A colleague has invited you to contribute to their Data Management Plan at" @@ -229,6 +239,9 @@ msgid "A required setting has not been provided" msgstr "Eine benötigte Einstellung wurde nicht erbracht" +msgid "A version of " +msgstr "" + msgid "API Information" msgstr "" @@ -347,6 +360,10 @@ msgid "Before submitting, please consider:" msgstr "" +#, fuzzy +msgid "Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs." +msgstr "Fragen" + msgid "Below is a list of users registered for your organisation. You can sort the data by each field." msgstr "Folgend findet sich die Liste von Benutzern registriert bzgl. Ihrer Org. Sie können diese Liste bzgl. aller Felder sortieren." @@ -372,9 +389,6 @@ msgid "Check this box when you are ready for this guidance to appear on user's plans." msgstr "Markieren Sie dieses Kästchen, wenn Sie bereit sind, für diese Anleitung für Benutzer-Pläne zu erscheinen." -msgid "Choose a template" -msgstr "" - msgid "Click here" msgstr "" @@ -414,6 +428,10 @@ msgid "Contact Email" msgstr "Kontakt Email" +#, fuzzy +msgid "Contact Us" +msgstr "Kontakt" + msgid "Contact us" msgstr "Kontakt" @@ -567,6 +585,9 @@ msgid "File Name" msgstr "Dateiname" +msgid "Fill in the required fields" +msgstr "" + msgid "Filter plans" msgstr "Filter Pläne" @@ -579,15 +600,19 @@ msgid "Forgot your password?" msgstr "Passwort vergessen?" +msgid "Format" +msgstr "" + msgid "Funder" msgstr "Funder" -msgid "Funder name" -msgstr "Name des Geldgebers" - msgid "Funders templates" msgstr "Vorlagen der Geldgeber" +#, fuzzy +msgid "Funding organisation" +msgstr "Organisation" + msgid "Future plans" msgstr "" @@ -656,12 +681,13 @@ msgid "ID" msgstr "ID" -msgid "If applying for funding, select your research funder." -msgstr "Falls Sie Fördermittel beantragen, wählen Sie bitte den Förderer aus." - msgid "If applying for funding, state the name exactly as in the grant proposal." msgstr "Falls Sie einen Förderantrag stellen, geben Sie bitte den Namen exakt genau so an, wie im Förderantrag." +#, fuzzy +msgid "If applying for funding, state the title exactly as in the proposal." +msgstr "Falls Sie einen Förderantrag stellen, geben Sie bitte den Namen exakt genau so an, wie im Förderantrag." + msgid "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." msgstr "Falls die Hilfestellung nur für eine bestimmte Nutzergruppe, wie z.B. eine bestimmte Fakultät oder ein Institut, bestimmt ist, wählen Sie diese Option aus. Die Nutzer können die Anzeige von Hilfestellungen dieser Untergruppe im 'Plan erstellen'-Assistenten auswählen." @@ -728,9 +754,6 @@ msgid "Left" msgstr "Links" -msgid "Link your %{application_name} account to your institutional credentials (UK users only)" -msgstr "Link your DMP Builder account to your institutional credentials" - msgid "List of users" msgstr "Liste der Nutzer" @@ -755,18 +778,27 @@ msgid "Me" msgstr "Ich" +#, fuzzy +msgid "Message" +msgstr "Ich" + msgid "Multi select box" msgstr "Mehrfachauswahlliste" +#, fuzzy +msgid "My Plan" +msgstr "Mein Plan" + msgid "My organisation isn't listed." msgstr "Meine Organisation ist nicht in der Auflistung." -msgid "My plan" -msgstr "Mein Plan" - msgid "My plans" msgstr "Meine Pläne" +#, fuzzy +msgid "My research organisation is not on the list" +msgstr "Organisation" + msgid "Name" msgstr "Name" @@ -776,9 +808,6 @@ msgid "Name of Principal Investigator(s) or main researcher(s) on the project." msgstr "Name des Principal Investigators oder der Leitung des Projektes." -msgid "Name of funder, if applicable." -msgstr "Name des Geldgebers, falls anwendbar." - msgid "New guidance" msgstr "Neue Hilfestellung" @@ -800,6 +829,13 @@ msgid "No additional comment area will be displayed." msgstr "" +#, fuzzy +msgid "No funder associated with this plan" +msgstr "plans" + +msgid "No items available." +msgstr "" + msgid "No matches" msgstr "Kein Plan erfüllt '%{filter}'" @@ -809,9 +845,6 @@ msgid "Not answered yet" msgstr "Noch nicht beantwortet" -msgid "Not applicable/not listed." -msgstr "Nicht anwendbar / nicht gelistet." - msgid "Note" msgstr "Kommentar" @@ -876,9 +909,6 @@ msgid "Other institutions" msgstr "" -msgid "Otherwise leave blank." -msgstr "Falls nicht, lassen Sie dieses Feld bitte unberührt." - msgid "Own templates" msgstr "Eigene Vorlagen" @@ -925,9 +955,6 @@ msgid "Plan name" msgstr "Name des Plans" -msgid "Plan was successfully created." -msgstr "Plan wurde erfolgreich angelegt." - #, fuzzy msgid "Plan was successfully deleted." msgstr "Plan wurde erfolgreich angelegt." @@ -953,6 +980,9 @@ msgid "Please enter your current password" msgstr "" +msgid "Please enter your current password below when changing your email address." +msgstr "" + msgid "Please enter your first name." msgstr "Bitte geben Sie ihren Vornamen ein." @@ -965,18 +995,32 @@ msgid "Please enter your surname or family name." msgstr "Bitte geben Sie ihren Familien- bzw. Nachnamen ein." +msgid "Please fill in the basic project details below" +msgstr "" + msgid "Please fill in the basic project details below and click 'Update' to save" msgstr "Bitte geben Sie im Folgenden die Projektdetails an und wählen 'Aktualisieren' aus, um die Änderungen zu speichern." +#, fuzzy +msgid "Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in." +msgstr "

    Bitte beachten Sie, dass Ihre Email-Adresse als Nutzername verwendet wird. Vergessen Sie nicht, Ihre neue E-Mail-Adresse beim der nächsten Anmeldung zu verwenden, falls Sie diese geändert haben.

    " + msgid "Please only enter up to 165 characters, you have used" msgstr "Please only enter up to 165 characters, you have used" +msgid "Please select one" +msgstr "" + msgid "Policy Expectations" msgstr "Policy Expectations" msgid "Preview" msgstr "Vorschau" +#, fuzzy +msgid "Primary research organisation" +msgstr "Organisation" + msgid "Principal Investigator / Researcher" msgstr "Principal Investigator / Forscher" @@ -995,6 +1039,9 @@ msgid "Privileges" msgstr "" +msgid "Project title" +msgstr "" + msgid "Public" msgstr "Öffentlichkeit" @@ -1079,24 +1126,27 @@ msgid "Sections" msgstr "Abschnitte" -msgid "Select Funder" -msgstr "Funder" - -msgid "Select Organisation" -msgstr "Organisation" +#, fuzzy +msgid "Select a template" +msgstr "templates" msgid "Select an action" msgstr "Wählen Sie eine Aktion" +#, fuzzy +msgid "Select the funding organisation" +msgstr "Organisation" + +#, fuzzy +msgid "Select the primary research organisation responsible" +msgstr "Organisation" + msgid "Select which group this guidance relates to." msgstr "Wählen Sie die Gruppe aus, für die diese Hilfestellung relevant ist." msgid "Select which theme(s) this guidance relates to." msgstr "Wählen Sie die Themen aus, für die diese Hilfestellung relevant ist." -msgid "Select your research funder or no funder, as appropariate." -msgstr "" - msgid "Selected option(s)" msgstr "" @@ -1137,6 +1187,9 @@ msgid "Status" msgstr "" +msgid "Subject" +msgstr "" + msgid "Successfully unlinked your account from %{is}." msgstr "" @@ -1190,6 +1243,9 @@ msgid "That template is not currently published." msgstr "templates" +msgid "The" +msgstr "" + msgid "The " msgstr "" @@ -1205,9 +1261,6 @@ msgid "Themes" msgstr "Themen" -msgid "There are a number of possible templates you could use. Please choose one." -msgstr "Es stehen verschiedene mögliche Vorlagen zur Auswahl. Bitte wählen Sie eine aus." - msgid "There are no public DMPs." msgstr "Es wurden noch keine DMPs veröffentlicht." @@ -1238,21 +1291,19 @@ msgid "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." msgstr "Diese Seite bietet Ihnen einen Überblick über Ihren Plan. Sie gibt an, worauf dieser Plan basiert und gibt eine Übersicht über die Fragen, die gestellt werden." +#, fuzzy +msgid "This plan is based on the default template." +msgstr "templates" + 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 "Tick to select any other sources of guidance you wish to see." -msgstr "Wählen Sie jede beliebige andere Quelle für Hilfestellungen." - msgid "Title" msgstr "Titel" -msgid "To see institutional questions and/or guidance, select your organisation." -msgstr "Um Fragen und Hilfestellung einer bestimmten Organisation zu integrieren, wählen Sie diese bitte aus." - msgid "Top" msgstr "Oben" @@ -1284,9 +1335,6 @@ msgid "Unlink institutional credentials alert" msgstr "Unlink institutional credentials alert" -msgid "Unlink your institutional credentials" -msgstr "Unlink your institutional credentials" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1315,6 +1363,9 @@ msgid "Users" msgstr "Nutzer" +msgid "Using the generic Data Management Plan" +msgstr "" + msgid "Version" msgstr "Version" @@ -1336,6 +1387,18 @@ msgid "Visibility" msgstr "Sichtweite" +#, fuzzy +msgid "We found multiple DMP templates corresponding to the funder." +msgstr "templates" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to the research organisation." +msgstr "Organisation" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to your funder." +msgstr "templates" + msgid "Website" msgstr "Web-Seite" @@ -1349,9 +1412,17 @@ msgid "Welcome." msgstr "Willkommen." +#, fuzzy +msgid "What research project are you planning?" +msgstr "plans" + msgid "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." msgstr "Wenn Sie eine neue Phase in einer Vorlage anlegen, wird automatische eine Version erzeugt. Nachdem Sie das folgende Formular ausgefüllt haben, werden Ihnen Optionen zum erstellen von Abschnitten und Fragen angezeigt." +#, fuzzy +msgid "Which DMP template would you like to use?" +msgstr "templates" + msgid "While you were editing " msgstr "" @@ -1395,6 +1466,9 @@ msgid "You can edit any of the details below." msgstr "Alle folgenden Angaben können bearbeitet werden." +msgid "You can not continue until you have filled in all of the required information." +msgstr "" + #, fuzzy msgid "You can not edit a historical version of this template." msgstr "templates" @@ -1425,9 +1499,6 @@ msgstr "" "You have unsaved answers in the following sections:\n" -msgid "You may leave blank or select a different organisation to your own." -msgstr "Sie können eine beliebige Organisation wählen, oder das Feld leer lassen." - msgid "You must accept the terms and conditions to register." msgstr "" @@ -1455,9 +1526,6 @@ msgid "Your account has been successfully linked to %{scheme}." msgstr "Your " -msgid "Your account is linked to your institutional credentials." -msgstr "Your account is linked to your institutional credentials." - #, fuzzy msgid "Your account won't be created until you access the link above and set your password." msgstr "Your " @@ -1553,12 +1621,13 @@ msgid "e.g. School/ Department" msgstr "z.B. Fakultät / Einrichtung" -msgid "format" -msgstr "" - msgid "from now" msgstr "" +#, fuzzy +msgid "generic template" +msgstr "templates" + msgid "guidance" msgstr "" @@ -1606,6 +1675,10 @@ msgstr "guidances" #, fuzzy +msgid "no research organisation is associated with this plan" +msgstr "Organisation" + +#, fuzzy msgid "note" msgstr "Kommentar" diff --git a/config/locale/en_GB/app.po b/config/locale/en_GB/app.po index 26f3a5d..3a2db97 100644 --- a/config/locale/en_GB/app.po +++ b/config/locale/en_GB/app.po @@ -22,21 +22,13 @@ msgid " - " msgstr " - " -msgid " - choosing default template for your institution" -msgstr " - choosing default template for your institution" - -msgid " - no funder or institution template, choosing default template" -msgstr " - no funder or institution template, choosing default template" - -msgid " - there are more than one to choose from" -msgstr " - there are more than one to choose from" - -msgid " - using template customised by your institution" -msgstr " - using template customised by your institution" - msgid " I accept the terms and conditions *" msgstr " I accept the terms and conditions *" +#, fuzzy +msgid " Plan" +msgstr "plan" + msgid " access to" msgstr " access to" @@ -44,6 +36,10 @@ msgid " access. " msgstr " access to" +#, fuzzy +msgid " and " +msgstr " on " + msgid " by" msgstr " by" @@ -66,15 +62,27 @@ msgid " once you click save!" msgstr " once you click save!" +#, fuzzy +msgid " or " +msgstr " on " + msgid " password. You can do this through the link below." msgstr " password. You can do this through the link below." +#, fuzzy +msgid " provided by " +msgstr " by " + msgid " saved the following answer:" msgstr " saved the following answer:" msgid " team" msgstr " team" +#, fuzzy +msgid " that has been customised by " +msgstr " by " + msgid " to accept the invitation, (or copy " msgstr " to accept the invitation, (or copy " @@ -108,6 +116,10 @@ msgid "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." msgstr "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." +#, fuzzy +msgid "%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below." +msgstr "%{application_name}" + msgid "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." msgstr "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." @@ -171,15 +183,6 @@ msgid "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " msgstr "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " -msgid "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " -msgstr "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " - -msgid "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " -msgstr "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " - -msgid "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " -msgstr "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " - msgid "

    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.

    " msgstr "

    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.

    " @@ -204,6 +207,19 @@ msgid "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " msgstr "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " +#, fuzzy +msgid "" +"
    • %{organisation_name}
    • \n" +"
    • %{organisation_address_line1}
    • \n" +"
    • %{organisation_address_line2}
    • \n" +"
    • %{organisation_address_line3}
    • \n" +"
    • %{organisation_address_line4}
    • \n" +"
    • %{organisation_address_country}
    • \n" +"
    \n" +"

    Helpline: %{organisation_telephone}

    \n" +"

    Email %{organisation_email}

    " +msgstr "%{application_name}" + msgid "A colleague has invited you to contribute to their Data Management Plan at " msgstr "A colleague has invited you to contribute to their Data Management Plan at " @@ -213,6 +229,9 @@ msgid "A required setting has not been provided" msgstr "A required setting has not been provided" +msgid "A version of " +msgstr "" + msgid "API Information" msgstr "API Information" @@ -327,6 +346,10 @@ msgid "Before submitting, please consider:" msgstr "Before submitting, please consider:" +#, fuzzy +msgid "Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs." +msgstr "questions" + msgid "Below is a list of users registered for your organisation. You can sort the data by each field." msgstr "Below is a list of users registered for your organisation. You can sort the data by each field." @@ -351,9 +374,6 @@ msgid "Check this box when you are ready for this guidance to appear on user's plans." msgstr "Check this box when you are ready for this guidance to appear on user's plans." -msgid "Choose a template" -msgstr "Choose a template" - msgid "Click here" msgstr "" @@ -390,6 +410,10 @@ msgid "Contact Email" msgstr "Contact Email" +#, fuzzy +msgid "Contact Us" +msgstr "Contact us" + msgid "Contact us" msgstr "Contact us" @@ -540,6 +564,9 @@ msgid "File Name" msgstr "File Name" +msgid "Fill in the required fields" +msgstr "" + msgid "Filter plans" msgstr "Filter plans" @@ -552,15 +579,20 @@ msgid "Forgot your password?" msgstr "Forgot your password?" +#, fuzzy +msgid "Format" +msgstr "format" + msgid "Funder" msgstr "Funder" -msgid "Funder name" -msgstr "Funder name" - msgid "Funders templates" msgstr "Funders templates" +#, fuzzy +msgid "Funding organisation" +msgstr "organisation" + msgid "Future plans" msgstr "Future plans" @@ -627,12 +659,13 @@ msgid "ID" msgstr "ID" -msgid "If applying for funding, select your research funder." -msgstr "If applying for funding, select your research funder." - msgid "If applying for funding, state the name exactly as in the grant proposal." msgstr "If applying for funding, state the name exactly as in the grant proposal." +#, fuzzy +msgid "If applying for funding, state the title exactly as in the proposal." +msgstr "If applying for funding, state the name exactly as in the grant proposal." + msgid "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." msgstr "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." @@ -699,9 +732,6 @@ msgid "Left" msgstr "Left" -msgid "Link your %{application_name} account to your institutional credentials (UK users only)" -msgstr "Link your %{application_name} account to your institutional credentials (UK users only)" - msgid "List of users" msgstr "List of users" @@ -726,18 +756,27 @@ msgid "Me" msgstr "Me" +#, fuzzy +msgid "Message" +msgstr "Me" + msgid "Multi select box" msgstr "Multi select box" +#, fuzzy +msgid "My Plan" +msgstr "My plan" + msgid "My organisation isn't listed." msgstr "My organisation isn't listed." -msgid "My plan" -msgstr "My plan" - msgid "My plans" msgstr "My plans" +#, fuzzy +msgid "My research organisation is not on the list" +msgstr "organisation" + msgid "Name" msgstr "Name" @@ -747,9 +786,6 @@ msgid "Name of Principal Investigator(s) or main researcher(s) on the project." msgstr "Name of Principal Investigator(s) or main researcher(s) on the project." -msgid "Name of funder, if applicable." -msgstr "Name of funder, if applicable." - msgid "New guidance" msgstr "New guidance" @@ -771,6 +807,14 @@ msgid "No additional comment area will be displayed." msgstr "No additional comment area will be displayed." +#, fuzzy +msgid "No funder associated with this plan" +msgstr "plan" + +#, fuzzy +msgid "No items available." +msgstr "No" + msgid "No matches" msgstr "No matches" @@ -780,9 +824,6 @@ msgid "Not answered yet" msgstr "Not answered yet" -msgid "Not applicable/not listed." -msgstr "Not applicable/not listed." - msgid "Note" msgstr "Note" @@ -846,9 +887,6 @@ msgid "Other institutions" msgstr "" -msgid "Otherwise leave blank." -msgstr "Otherwise leave blank." - msgid "Own templates" msgstr "Own templates" @@ -894,9 +932,6 @@ msgid "Plan name" msgstr "Plan name" -msgid "Plan was successfully created." -msgstr "Plan was successfully created." - msgid "Plan was successfully deleted." msgstr "Plan was successfully deleted." @@ -921,6 +956,9 @@ msgid "Please enter your current password" msgstr "" +msgid "Please enter your current password below when changing your email address." +msgstr "" + msgid "Please enter your first name." msgstr "Please enter your first name." @@ -933,18 +971,32 @@ msgid "Please enter your surname or family name." msgstr "Please enter your surname or family name." +msgid "Please fill in the basic project details below" +msgstr "" + msgid "Please fill in the basic project details below and click 'Update' to save" msgstr "Please fill in the basic project details below and click 'Update' to save" +#, fuzzy +msgid "Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in." +msgstr "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " + msgid "Please only enter up to 165 characters, you have used" msgstr "Please only enter up to 165 characters, you have used" +msgid "Please select one" +msgstr "" + msgid "Policy Expectations" msgstr "Policy Expectations" msgid "Preview" msgstr "Preview" +#, fuzzy +msgid "Primary research organisation" +msgstr "organisation" + msgid "Principal Investigator / Researcher" msgstr "Principal Investigator / Researcher" @@ -963,6 +1015,9 @@ msgid "Privileges" msgstr "Privileges" +msgid "Project title" +msgstr "" + msgid "Public" msgstr "Public" @@ -1047,24 +1102,27 @@ msgid "Sections" msgstr "Sections" -msgid "Select Funder" -msgstr "Select Funder" - -msgid "Select Organisation" -msgstr "Select Organisation" +#, fuzzy +msgid "Select a template" +msgstr "template" msgid "Select an action" msgstr "Select an action" +#, fuzzy +msgid "Select the funding organisation" +msgstr "organisation" + +#, fuzzy +msgid "Select the primary research organisation responsible" +msgstr "organisation" + msgid "Select which group this guidance relates to." msgstr "Select which group this guidance relates to." msgid "Select which theme(s) this guidance relates to." msgstr "Select which theme(s) this guidance relates to." -msgid "Select your research funder or no funder, as appropariate." -msgstr "" - msgid "Selected option(s)" msgstr "" @@ -1104,6 +1162,9 @@ msgid "Status" msgstr "" +msgid "Subject" +msgstr "" + msgid "Successfully unlinked your account from %{is}." msgstr "" @@ -1155,6 +1216,10 @@ msgid "That template is not currently published." msgstr "That template is not currently published." +#, fuzzy +msgid "The" +msgstr "The " + msgid "The " msgstr "The " @@ -1170,9 +1235,6 @@ msgid "Themes" msgstr "Themes" -msgid "There are a number of possible templates you could use. Please choose one." -msgstr "There are a number of possible templates you could use. Please choose one." - msgid "There are no public DMPs." msgstr "There are no public DMPs." @@ -1203,21 +1265,19 @@ msgid "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." msgstr "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." +#, fuzzy +msgid "This plan is based on the default template." +msgstr "template" + 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 "Tick to select any other sources of guidance you wish to see." -msgstr "Tick to select any other sources of guidance you wish to see." - msgid "Title" msgstr "Title" -msgid "To see institutional questions and/or guidance, select your organisation." -msgstr "To see institutional questions and/or guidance, select your organisation." - msgid "Top" msgstr "Top" @@ -1248,9 +1308,6 @@ msgid "Unlink institutional credentials alert" msgstr "Unlink institutional credentials alert" -msgid "Unlink your institutional credentials" -msgstr "Unlink your institutional credentials" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1278,6 +1335,9 @@ msgid "Users" msgstr "Users" +msgid "Using the generic Data Management Plan" +msgstr "" + msgid "Version" msgstr "Version" @@ -1299,6 +1359,18 @@ msgid "Visibility" msgstr "Visibility" +#, fuzzy +msgid "We found multiple DMP templates corresponding to the funder." +msgstr "template" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to the research organisation." +msgstr "organisation" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to your funder." +msgstr "template" + msgid "Website" msgstr "Website" @@ -1311,9 +1383,17 @@ msgid "Welcome." msgstr "Welcome." +#, fuzzy +msgid "What research project are you planning?" +msgstr "plan" + msgid "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." msgstr "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." +#, fuzzy +msgid "Which DMP template would you like to use?" +msgstr "template" + msgid "While you were editing " msgstr "" @@ -1356,6 +1436,10 @@ msgid "You can edit any of the details below." msgstr "You can edit any of the details below." +#, fuzzy +msgid "You can not continue until you have filled in all of the required information." +msgstr "format" + msgid "You can not edit a historical version of this template." msgstr "" @@ -1380,9 +1464,6 @@ msgid "You have unsaved answers in the following sections:" msgstr "" -msgid "You may leave blank or select a different organisation to your own." -msgstr "You may leave blank or select a different organisation to your own." - msgid "You must accept the terms and conditions to register." msgstr "You must accept the terms and conditions to register." @@ -1407,9 +1488,6 @@ msgid "Your account has been successfully linked to %{scheme}." msgstr "Your account has been successfully linked to %{scheme}." -msgid "Your account is linked to your institutional credentials." -msgstr "Your account is linked to your institutional credentials." - msgid "Your account won't be created until you access the link above and set your password." msgstr "Your account won't be created until you access the link above and set your password." @@ -1494,12 +1572,13 @@ msgid "e.g. School/ Department" msgstr "e.g. School/ Department" -msgid "format" -msgstr "format" - msgid "from now" msgstr "from now" +#, fuzzy +msgid "generic template" +msgstr "template" + msgid "guidance" msgstr "guidance" @@ -1542,6 +1621,10 @@ msgid "must have access to guidances api" msgstr "must have access to guidances api" +#, fuzzy +msgid "no research organisation is associated with this plan" +msgstr "organisation" + msgid "note" msgstr "note" diff --git a/config/locale/en_US/app.po b/config/locale/en_US/app.po index 078709c..dd2eafe 100644 --- a/config/locale/en_US/app.po +++ b/config/locale/en_US/app.po @@ -22,21 +22,13 @@ msgid " - " msgstr " - " -msgid " - choosing default template for your institution" -msgstr " - choosing default template for your institution" - -msgid " - no funder or institution template, choosing default template" -msgstr " - no funder or institution template, choosing default template" - -msgid " - there are more than one to choose from" -msgstr " - there are more than one to choose from" - -msgid " - using template customised by your institution" -msgstr " - using template customized by your institution" - msgid " I accept the terms and conditions *" msgstr " I accept the terms and conditions *" +#, fuzzy +msgid " Plan" +msgstr "plan" + msgid " access to" msgstr " access to" @@ -44,6 +36,10 @@ msgid " access. " msgstr " access to" +#, fuzzy +msgid " and " +msgstr " on " + msgid " by" msgstr " by" @@ -66,15 +62,27 @@ msgid " once you click save!" msgstr " once you click save!" +#, fuzzy +msgid " or " +msgstr " on " + msgid " password. You can do this through the link below." msgstr " password. You can do this through the link below." +#, fuzzy +msgid " provided by " +msgstr " by " + msgid " saved the following answer:" msgstr " saved the following answer:" msgid " team" msgstr " team" +#, fuzzy +msgid " that has been customised by " +msgstr " by " + msgid " to accept the invitation, (or copy " msgstr " to accept the invitation, (or copy " @@ -108,6 +116,10 @@ msgid "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." msgstr "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." +#, fuzzy +msgid "%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below." +msgstr "%{application_name}" + msgid "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." msgstr "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." @@ -171,15 +183,6 @@ msgid "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " msgstr "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " -msgid "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " -msgstr "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " - -msgid "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " -msgstr "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " - -msgid "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " -msgstr "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " - msgid "

    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.

    " msgstr "

    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.

    " @@ -204,6 +207,19 @@ msgid "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " msgstr "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " +#, fuzzy +msgid "" +"
    • %{organisation_name}
    • \n" +"
    • %{organisation_address_line1}
    • \n" +"
    • %{organisation_address_line2}
    • \n" +"
    • %{organisation_address_line3}
    • \n" +"
    • %{organisation_address_line4}
    • \n" +"
    • %{organisation_address_country}
    • \n" +"
    \n" +"

    Helpline: %{organisation_telephone}

    \n" +"

    Email %{organisation_email}

    " +msgstr "%{application_name}" + msgid "A colleague has invited you to contribute to their Data Management Plan at " msgstr "A colleague has invited you to contribute to their Data Management Plan at " @@ -213,6 +229,9 @@ msgid "A required setting has not been provided" msgstr "A required setting has not been provided" +msgid "A version of " +msgstr "" + msgid "API Information" msgstr "API Information" @@ -327,6 +346,10 @@ msgid "Before submitting, please consider:" msgstr "Before submitting, please consider:" +#, fuzzy +msgid "Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs." +msgstr "questions" + msgid "Below is a list of users registered for your organisation. You can sort the data by each field." msgstr "Below is a list of users registered for your organization. You can sort the data by each field." @@ -351,9 +374,6 @@ msgid "Check this box when you are ready for this guidance to appear on user's plans." msgstr "Check this box when you are ready for this guidance to appear on user's plans." -msgid "Choose a template" -msgstr "Choose a template" - msgid "Click here" msgstr "" @@ -390,6 +410,10 @@ msgid "Contact Email" msgstr "Contact Email" +#, fuzzy +msgid "Contact Us" +msgstr "Contact us" + msgid "Contact us" msgstr "Contact us" @@ -540,6 +564,9 @@ msgid "File Name" msgstr "File Name" +msgid "Fill in the required fields" +msgstr "" + msgid "Filter plans" msgstr "Filter plans" @@ -552,15 +579,20 @@ msgid "Forgot your password?" msgstr "Forgot your password?" +#, fuzzy +msgid "Format" +msgstr "format" + msgid "Funder" msgstr "Funder" -msgid "Funder name" -msgstr "Funder name" - msgid "Funders templates" msgstr "Funders templates" +#, fuzzy +msgid "Funding organisation" +msgstr "organization" + msgid "Future plans" msgstr "Future plans" @@ -627,12 +659,13 @@ msgid "ID" msgstr "ID" -msgid "If applying for funding, select your research funder." -msgstr "If applying for funding, select your research funder." - msgid "If applying for funding, state the name exactly as in the grant proposal." msgstr "If applying for funding, state the name exactly as in the grant proposal." +#, fuzzy +msgid "If applying for funding, state the title exactly as in the proposal." +msgstr "If applying for funding, state the name exactly as in the grant proposal." + msgid "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." msgstr "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." @@ -699,9 +732,6 @@ msgid "Left" msgstr "Left" -msgid "Link your %{application_name} account to your institutional credentials (UK users only)" -msgstr "Link your %{application_name} account to your institutional credentials (UK users only)" - msgid "List of users" msgstr "List of users" @@ -726,18 +756,27 @@ msgid "Me" msgstr "Me" +#, fuzzy +msgid "Message" +msgstr "Me" + msgid "Multi select box" msgstr "Multi select box" +#, fuzzy +msgid "My Plan" +msgstr "My plan" + msgid "My organisation isn't listed." msgstr "My organization isn't listed." -msgid "My plan" -msgstr "My plan" - msgid "My plans" msgstr "My plans" +#, fuzzy +msgid "My research organisation is not on the list" +msgstr "organization" + msgid "Name" msgstr "Name" @@ -747,9 +786,6 @@ msgid "Name of Principal Investigator(s) or main researcher(s) on the project." msgstr "Name of Principal Investigator(s) or main researcher(s) on the project." -msgid "Name of funder, if applicable." -msgstr "Name of funder, if applicable." - msgid "New guidance" msgstr "New guidance" @@ -771,6 +807,14 @@ msgid "No additional comment area will be displayed." msgstr "No additional comment area will be displayed." +#, fuzzy +msgid "No funder associated with this plan" +msgstr "plan" + +#, fuzzy +msgid "No items available." +msgstr "No" + msgid "No matches" msgstr "No matches" @@ -780,9 +824,6 @@ msgid "Not answered yet" msgstr "Not answered yet" -msgid "Not applicable/not listed." -msgstr "Not applicable/not listed." - msgid "Note" msgstr "Note" @@ -846,9 +887,6 @@ msgid "Other institutions" msgstr "" -msgid "Otherwise leave blank." -msgstr "Otherwise leave blank." - msgid "Own templates" msgstr "Own templates" @@ -894,9 +932,6 @@ msgid "Plan name" msgstr "Plan name" -msgid "Plan was successfully created." -msgstr "Plan was successfully created." - msgid "Plan was successfully deleted." msgstr "Plan was successfully deleted." @@ -921,6 +956,9 @@ msgid "Please enter your current password" msgstr "" +msgid "Please enter your current password below when changing your email address." +msgstr "" + msgid "Please enter your first name." msgstr "Please enter your first name." @@ -933,18 +971,32 @@ msgid "Please enter your surname or family name." msgstr "Please enter your surname or family name." +msgid "Please fill in the basic project details below" +msgstr "" + msgid "Please fill in the basic project details below and click 'Update' to save" msgstr "Please fill in the basic project details below and click 'Update' to save" +#, fuzzy +msgid "Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in." +msgstr "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " + msgid "Please only enter up to 165 characters, you have used" msgstr "Please only enter up to 165 characters, you have used" +msgid "Please select one" +msgstr "" + msgid "Policy Expectations" msgstr "Policy Expectations" msgid "Preview" msgstr "Preview" +#, fuzzy +msgid "Primary research organisation" +msgstr "organization" + msgid "Principal Investigator / Researcher" msgstr "Principal Investigator / Researcher" @@ -963,6 +1015,9 @@ msgid "Privileges" msgstr "Permissions" +msgid "Project title" +msgstr "" + msgid "Public" msgstr "Public" @@ -1047,24 +1102,27 @@ msgid "Sections" msgstr "Sections" -msgid "Select Funder" -msgstr "Select Funder" - -msgid "Select Organisation" -msgstr "Select Organization" +#, fuzzy +msgid "Select a template" +msgstr "template" msgid "Select an action" msgstr "Select an action" +#, fuzzy +msgid "Select the funding organisation" +msgstr "organization" + +#, fuzzy +msgid "Select the primary research organisation responsible" +msgstr "organization" + msgid "Select which group this guidance relates to." msgstr "Select which group this guidance relates to." msgid "Select which theme(s) this guidance relates to." msgstr "Select which theme(s) this guidance relates to." -msgid "Select your research funder or no funder, as appropariate." -msgstr "" - msgid "Selected option(s)" msgstr "" @@ -1104,6 +1162,9 @@ msgid "Status" msgstr "" +msgid "Subject" +msgstr "" + msgid "Successfully unlinked your account from %{is}." msgstr "" @@ -1155,6 +1216,10 @@ msgid "That template is not currently published." msgstr "That template is not currently published." +#, fuzzy +msgid "The" +msgstr "The " + msgid "The " msgstr "The " @@ -1170,9 +1235,6 @@ msgid "Themes" msgstr "Themes" -msgid "There are a number of possible templates you could use. Please choose one." -msgstr "There are a number of possible templates you could use. Please choose one." - msgid "There are no public DMPs." msgstr "There are no public DMPs." @@ -1203,21 +1265,19 @@ msgid "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." msgstr "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." +#, fuzzy +msgid "This plan is based on the default template." +msgstr "template" + 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 "Tick to select any other sources of guidance you wish to see." -msgstr "Tick to select any other sources of guidance you wish to see." - msgid "Title" msgstr "Title" -msgid "To see institutional questions and/or guidance, select your organisation." -msgstr "To see institutional questions and/or guidance, select your organization." - msgid "Top" msgstr "Top" @@ -1248,9 +1308,6 @@ msgid "Unlink institutional credentials alert" msgstr "Unlink institutional credentials alert" -msgid "Unlink your institutional credentials" -msgstr "Unlink your institutional credentials" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1278,6 +1335,9 @@ msgid "Users" msgstr "Users" +msgid "Using the generic Data Management Plan" +msgstr "" + msgid "Version" msgstr "Version" @@ -1299,6 +1359,18 @@ msgid "Visibility" msgstr "Visibility" +#, fuzzy +msgid "We found multiple DMP templates corresponding to the funder." +msgstr "template" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to the research organisation." +msgstr "organization" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to your funder." +msgstr "template" + msgid "Website" msgstr "Website" @@ -1311,9 +1383,17 @@ msgid "Welcome." msgstr "Welcome." +#, fuzzy +msgid "What research project are you planning?" +msgstr "plan" + msgid "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." msgstr "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." +#, fuzzy +msgid "Which DMP template would you like to use?" +msgstr "template" + msgid "While you were editing " msgstr "" @@ -1356,6 +1436,10 @@ msgid "You can edit any of the details below." msgstr "You can edit any of the details below." +#, fuzzy +msgid "You can not continue until you have filled in all of the required information." +msgstr "format" + msgid "You can not edit a historical version of this template." msgstr "" @@ -1380,9 +1464,6 @@ msgid "You have unsaved answers in the following sections:" msgstr "" -msgid "You may leave blank or select a different organisation to your own." -msgstr "You may leave blank or select a different organization to your own." - msgid "You must accept the terms and conditions to register." msgstr "You must accept the terms and conditions to register." @@ -1407,9 +1488,6 @@ msgid "Your account has been successfully linked to %{scheme}." msgstr "Your account has been successfully linked to %{scheme}." -msgid "Your account is linked to your institutional credentials." -msgstr "Your account is linked to your institutional credentials." - msgid "Your account won't be created until you access the link above and set your password." msgstr "Your account won't be created until you access the link above and set your password." @@ -1494,12 +1572,13 @@ msgid "e.g. School/ Department" msgstr "e.g. School/ Department" -msgid "format" -msgstr "format" - msgid "from now" msgstr "from now" +#, fuzzy +msgid "generic template" +msgstr "template" + msgid "guidance" msgstr "guidance" @@ -1542,6 +1621,10 @@ msgid "must have access to guidances api" msgstr "must have access to guidances api" +#, fuzzy +msgid "no research organisation is associated with this plan" +msgstr "organization" + msgid "note" msgstr "note" diff --git a/config/locale/es/app.po b/config/locale/es/app.po index debb763..4909cb5 100644 --- a/config/locale/es/app.po +++ b/config/locale/es/app.po @@ -22,29 +22,23 @@ msgid " - " msgstr "" -msgid " - choosing default template for your institution" -msgstr "" - -msgid " - no funder or institution template, choosing default template" -msgstr "" - -msgid " - there are more than one to choose from" -msgstr "" - -#, fuzzy -msgid " - using template customised by your institution" -msgstr " por " - #, fuzzy msgid " I accept the terms and conditions *" msgstr " Acepto los términos y condiciones *" +#, fuzzy +msgid " Plan" +msgstr "plans" + msgid " access to" msgstr "" msgid " access. " msgstr "" +msgid " and " +msgstr "" + #, fuzzy msgid " by" msgstr " por " @@ -69,9 +63,16 @@ msgid " once you click save!" msgstr "" +msgid " or " +msgstr "" + msgid " password. You can do this through the link below." msgstr "" +#, fuzzy +msgid " provided by " +msgstr " por " + msgid " saved the following answer:" msgstr "" @@ -79,6 +80,10 @@ msgid " team" msgstr "am" +#, fuzzy +msgid " that has been customised by " +msgstr " por " + msgid " to accept the invitation, (or copy " msgstr "" @@ -114,6 +119,10 @@ msgid "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." msgstr "DMPonline" +#, fuzzy +msgid "%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below." +msgstr "DMPonline" + msgid "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." msgstr "" @@ -178,15 +187,6 @@ msgid "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " msgstr "

    Si desea añadir una plantilla institucional para un Plan de Gestión de Datos, use el botón 'crear plantilla'. Podrá crear más de una plantilla si lo cree conveniente. Ej: para investigadores y otro para estudiantes de postgrado.

    Su plantilla se presentará a los usuarios de su institución cuando no sean aplicables plantillas de agencias de financiación. Si quiere aññadir preguntas a las plantillas de las agencias de financiación, use las siguientes opciones de 'personalizar plantilla'

    " -msgid "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " -msgstr "

    Por favor, tenga en cuenta que su dirección de correo electrónico se usa como su nombre de usuario. Si cambia esto, recuerde usar su nueva dirección de correo electrónico al conectar.

    " - -msgid "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " -msgstr "" - -msgid "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " -msgstr "

    Por favor, seleccione la información de los siguientes desplegables, de forma que podamos determinar qué preguntas y orientación han de ser mostrados en su plan.

    Si no responde a los requisitos específicos de un financiador o institución, seleccione aquí para crear un PGD genérico basado en los temas más comunes.

    " - msgid "

    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.

    " msgstr "

    Seleccione los temas relevantes para esta pregunta.

    Le permite crear guías genéricas a nivel de institución o de otras fuentes. Ej. para el DCC o cualquier escuela o departamento a la que se dirija la guía.

    Puede seleccionar varios temas usando el botón CTRL.

    " @@ -213,6 +213,19 @@ msgid "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " msgstr "templates" +#, fuzzy +msgid "" +"
    • %{organisation_name}
    • \n" +"
    • %{organisation_address_line1}
    • \n" +"
    • %{organisation_address_line2}
    • \n" +"
    • %{organisation_address_line3}
    • \n" +"
    • %{organisation_address_line4}
    • \n" +"
    • %{organisation_address_country}
    • \n" +"
    \n" +"

    Helpline: %{organisation_telephone}

    \n" +"

    Email %{organisation_email}

    " +msgstr "DMPonline" + msgid "A colleague has invited you to contribute to their Data Management Plan at " msgstr "" @@ -222,6 +235,9 @@ msgid "A required setting has not been provided" msgstr "No se ha indicado un valor obligatorio" +msgid "A version of " +msgstr "" + msgid "API Information" msgstr "" @@ -341,6 +357,10 @@ msgid "Before submitting, please consider:" msgstr "" +#, fuzzy +msgid "Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs." +msgstr "Preguntas" + msgid "Below is a list of users registered for your organisation. You can sort the data by each field." msgstr "Debajo tiene la lista de usuarios registrados en su entidad. Puede ordenar los datos por campo." @@ -366,9 +386,6 @@ msgid "Check this box when you are ready for this guidance to appear on user's plans." msgstr "" -msgid "Choose a template" -msgstr "" - msgid "Click here" msgstr "" @@ -407,6 +424,10 @@ msgid "Contact Email" msgstr "" +#, fuzzy +msgid "Contact Us" +msgstr "Contacto" + msgid "Contact us" msgstr "Contacto" @@ -560,6 +581,9 @@ msgid "File Name" msgstr "Título del plan" +msgid "Fill in the required fields" +msgstr "" + msgid "Filter plans" msgstr "Filtro de planes" @@ -572,15 +596,19 @@ msgid "Forgot your password?" msgstr "¿Olvidó su clave?" +msgid "Format" +msgstr "" + msgid "Funder" msgstr "Financiador" -msgid "Funder name" -msgstr "Nombre del financiador del proyecto" - msgid "Funders templates" msgstr "Plantillas de financiador" +#, fuzzy +msgid "Funding organisation" +msgstr "Organización" + msgid "Future plans" msgstr "Hoja de ruta" @@ -648,12 +676,13 @@ msgid "ID" msgstr "ID" -msgid "If applying for funding, select your research funder." -msgstr "Si se solicita financiación, seleccione el organismo financiador de su investigación." - msgid "If applying for funding, state the name exactly as in the grant proposal." msgstr "Si se solicita financiación, indique el nombre exactamente como en la propuesta de subvención." +#, fuzzy +msgid "If applying for funding, state the title exactly as in the proposal." +msgstr "Si se solicita financiación, indique el nombre exactamente como en la propuesta de subvención." + msgid "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." msgstr "Si la guía está dirigida a un subconjunto de los usuarios (ej: los pertenecientes a un colegio o instituto), seleccione esta opción. Los usuarios serán capaces de seleccionar esta guía cuando respondan sus preguntas durante la creación del plan." @@ -720,9 +749,6 @@ msgid "Left" msgstr "Izquierdo" -msgid "Link your %{application_name} account to your institutional credentials (UK users only)" -msgstr "Vincule su cuenta de DMPonline con las credenciales de su institución (Sólo para usuarios del Reino Unido)" - msgid "List of users" msgstr "Listado de usuarios" @@ -747,18 +773,27 @@ msgid "Me" msgstr "Yo" +#, fuzzy +msgid "Message" +msgstr "Yo" + msgid "Multi select box" msgstr "Multi select box" +#, fuzzy +msgid "My Plan" +msgstr "Mi proyecto" + msgid "My organisation isn't listed." msgstr "No se muestra mi organización." -msgid "My plan" -msgstr "Mi proyecto" - msgid "My plans" msgstr "Mis planes" +#, fuzzy +msgid "My research organisation is not on the list" +msgstr "Organización" + msgid "Name" msgstr "Nombre" @@ -768,9 +803,6 @@ msgid "Name of Principal Investigator(s) or main researcher(s) on the project." msgstr "Nombre del/de los Investigador/es Principal/es o investigador/es principal/es del proyecto." -msgid "Name of funder, if applicable." -msgstr "Nombre del financiador, si corresponde." - msgid "New guidance" msgstr "Nueva orientación" @@ -792,6 +824,13 @@ msgid "No additional comment area will be displayed." msgstr "No se mostrará un área adicional para comentarios." +#, fuzzy +msgid "No funder associated with this plan" +msgstr "plans" + +msgid "No items available." +msgstr "" + msgid "No matches" msgstr "Ningún plan coincide con '%{filter}'" @@ -801,9 +840,6 @@ msgid "Not answered yet" msgstr "Aún no respondido/a" -msgid "Not applicable/not listed." -msgstr "No aplicable / no listado/a." - msgid "Note" msgstr "Nota" @@ -868,9 +904,6 @@ msgid "Other institutions" msgstr "" -msgid "Otherwise leave blank." -msgstr "Si no, déjelo en blanco." - msgid "Own templates" msgstr "Sus plantillas" @@ -917,9 +950,6 @@ msgid "Plan name" msgstr "Nombre de proyecto" -msgid "Plan was successfully created." -msgstr "Plan creado con éxito" - #, fuzzy msgid "Plan was successfully deleted." msgstr "Plan creado con éxito" @@ -945,6 +975,9 @@ msgid "Please enter your current password" msgstr "" +msgid "Please enter your current password below when changing your email address." +msgstr "" + msgid "Please enter your first name." msgstr "Por favor, introduzca su nombre." @@ -957,18 +990,32 @@ msgid "Please enter your surname or family name." msgstr "Por favor, introduzca sus apellidos." +msgid "Please fill in the basic project details below" +msgstr "" + msgid "Please fill in the basic project details below and click 'Update' to save" msgstr "Por favor, rellene los detalles básicos del proyecto y haga clic en 'Actualizar' para guardarlos" +#, fuzzy +msgid "Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in." +msgstr "

    Por favor, tenga en cuenta que su dirección de correo electrónico se usa como su nombre de usuario. Si cambia esto, recuerde usar su nueva dirección de correo electrónico al conectar.

    " + msgid "Please only enter up to 165 characters, you have used" msgstr "" +msgid "Please select one" +msgstr "" + msgid "Policy Expectations" msgstr "Política esperada" msgid "Preview" msgstr "Previsualización" +#, fuzzy +msgid "Primary research organisation" +msgstr "Organización" + msgid "Principal Investigator / Researcher" msgstr "Principal Investigador / Científico" @@ -987,6 +1034,9 @@ msgid "Privileges" msgstr "" +msgid "Project title" +msgstr "" + msgid "Public" msgstr "Público" @@ -1071,24 +1121,27 @@ msgid "Sections" msgstr "Secciones" -msgid "Select Funder" -msgstr "Financiador" - -msgid "Select Organisation" -msgstr "Organización" +#, fuzzy +msgid "Select a template" +msgstr "templates" msgid "Select an action" msgstr "Seleccionar una acción" +#, fuzzy +msgid "Select the funding organisation" +msgstr "Organización" + +#, fuzzy +msgid "Select the primary research organisation responsible" +msgstr "Organización" + msgid "Select which group this guidance relates to." msgstr "Seleccione a que grupo pertenece esta guía." msgid "Select which theme(s) this guidance relates to." msgstr "Seleccione a el/los tema(s) relacionados con esta orientación." -msgid "Select your research funder or no funder, as appropariate." -msgstr "" - msgid "Selected option(s)" msgstr "" @@ -1128,6 +1181,9 @@ msgid "Status" msgstr "" +msgid "Subject" +msgstr "" + msgid "Successfully unlinked your account from %{is}." msgstr "" @@ -1180,6 +1236,9 @@ msgid "That template is not currently published." msgstr "templates" +msgid "The" +msgstr "" + msgid "The " msgstr "" @@ -1195,9 +1254,6 @@ msgid "Themes" msgstr "Temas" -msgid "There are a number of possible templates you could use. Please choose one." -msgstr "Hay varias plantillas que podría usar. Por favor, elija una." - msgid "There are no public DMPs." msgstr "" @@ -1228,21 +1284,19 @@ msgid "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." msgstr "Esta página le proporciona una visión general de su plan. Le dice en qué está basado su plan y le da una visión general de las preguntas que se le harán." +#, fuzzy +msgid "This plan is based on the default template." +msgstr "templates" + 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 "Tick to select any other sources of guidance you wish to see." -msgstr "Marque para seleccionar cualquier otra fuente de orientación que quiera ver." - msgid "Title" msgstr "Título" -msgid "To see institutional questions and/or guidance, select your organisation." -msgstr "Para ver preguntas y/u orientación relativas a su institución, seleccione su entidad." - msgid "Top" msgstr "Superior" @@ -1274,9 +1328,6 @@ msgid "Unlink institutional credentials alert" msgstr "Desvincule las alertas relacionadas con las credenciales de su institución" -msgid "Unlink your institutional credentials" -msgstr "Desvincule las credenciales de su institución" - msgid "Unlock my account" msgstr "" @@ -1305,6 +1356,9 @@ msgid "Users" msgstr "Usuarios" +msgid "Using the generic Data Management Plan" +msgstr "" + msgid "Version" msgstr "Versión" @@ -1326,6 +1380,18 @@ msgid "Visibility" msgstr "Visibilidad" +#, fuzzy +msgid "We found multiple DMP templates corresponding to the funder." +msgstr "templates" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to the research organisation." +msgstr "Organización" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to your funder." +msgstr "templates" + msgid "Website" msgstr "Sitio web" @@ -1339,9 +1405,17 @@ msgid "Welcome." msgstr "Bienvenido/a." +#, fuzzy +msgid "What research project are you planning?" +msgstr "plans" + msgid "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." msgstr "Cuando crea una fase nueva para su plantilla, se creará automáticamente una versión. Una vez complete el siguiente formulario se le darán las opciones para crear secciones y preguntas." +#, fuzzy +msgid "Which DMP template would you like to use?" +msgstr "templates" + msgid "While you were editing " msgstr "" @@ -1385,6 +1459,9 @@ msgid "You can edit any of the details below." msgstr "Puede editar cualquiera de los siguientes datos." +msgid "You can not continue until you have filled in all of the required information." +msgstr "" + #, fuzzy msgid "You can not edit a historical version of this template." msgstr "templates" @@ -1413,9 +1490,6 @@ msgid "You have unsaved answers in the following sections:" msgstr "" -msgid "You may leave blank or select a different organisation to your own." -msgstr "Puede dejar en blanco o seleccionar una entidad distinta a la suya." - msgid "You must accept the terms and conditions to register." msgstr "" @@ -1440,9 +1514,6 @@ msgid "Your account has been successfully linked to %{scheme}." msgstr "" -msgid "Your account is linked to your institutional credentials." -msgstr "Su cuenta enstá vinculada con las credenciales de su institución." - msgid "Your account won't be created until you access the link above and set your password." msgstr "" @@ -1535,12 +1606,13 @@ msgid "e.g. School/ Department" msgstr "ej: Escuela / Departmento" -msgid "format" -msgstr "" - msgid "from now" msgstr "" +#, fuzzy +msgid "generic template" +msgstr "templates" + msgid "guidance" msgstr "" @@ -1587,6 +1659,10 @@ msgstr "guidances" #, fuzzy +msgid "no research organisation is associated with this plan" +msgstr "Organización" + +#, fuzzy msgid "note" msgstr "Nota" diff --git a/config/locale/fr/app.po b/config/locale/fr/app.po index c41d966..e582167 100644 --- a/config/locale/fr/app.po +++ b/config/locale/fr/app.po @@ -22,29 +22,23 @@ msgid " - " msgstr "" -msgid " - choosing default template for your institution" -msgstr "" - -msgid " - no funder or institution template, choosing default template" -msgstr "" - -msgid " - there are more than one to choose from" -msgstr "" - -#, fuzzy -msgid " - using template customised by your institution" -msgstr " par " - #, fuzzy msgid " I accept the terms and conditions *" msgstr " Jaccepte les Conditions générales dutilisation. *" +#, fuzzy +msgid " Plan" +msgstr "plans" + msgid " access to" msgstr "" msgid " access. " msgstr "" +msgid " and " +msgstr "" + #, fuzzy msgid " by" msgstr " par " @@ -69,9 +63,16 @@ msgid " once you click save!" msgstr "" +msgid " or " +msgstr "" + msgid " password. You can do this through the link below." msgstr "" +#, fuzzy +msgid " provided by " +msgstr " par " + msgid " saved the following answer:" msgstr "" @@ -79,6 +80,10 @@ msgid " team" msgstr "am" +#, fuzzy +msgid " that has been customised by " +msgstr " par " + msgid " to accept the invitation, (or copy " msgstr "" @@ -114,6 +119,10 @@ msgid "%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
    * If you do not have an account with %{application_name}, please complete the form below.
    * If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
    Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly." msgstr "DMPonline" +#, fuzzy +msgid "%{application_name} is provided by the %{organisation_name}. You can find out more about us on our website. If you would like to contact us about %{application_name}, please fill out the form below." +msgstr "DMPonline" + msgid "%{format} is not a valid exporting format. Available formats to export are %{available_formats}." msgstr "" @@ -177,15 +186,6 @@ msgid "

    If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

    Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

    " msgstr "

    Si vous souhaitez ajouter un modèle institutionnel propre à un plan de gestion de données, utilisez le bouton créer un modèle. Vous pouvez au besoin créer plusieurs modèles, par ex. : un pour des chercheurs et un pour des thésards.

    Votre modèle apparaîtra aux utilisateurs de votre établissement quand aucun modèle propre à un bailleur de subvention ne sapplique. Si vous souhaitez ajouter des questions dans un modèle de bailleur de subventions, utilisez les options de personalisation de modèle ci-après.

    " -msgid "

    Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.

    " -msgstr "

    À noter que votre courriel est à utiliser comme nom dutilisateur. Si vous modifiez ces informations, rappelez-vous dutiliser votre courriel en vous connectant.

    " - -msgid "

    Please select from the following drop-down so we can determine what questions and guidance should be displayed in your plan.

    " -msgstr "" - -msgid "

    Please select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.

    If you aren't responding to specific requirements from a funder or an institution, select here to write a generic DMP based on the most common themes.

    " -msgstr "

    Veuillez sélectionner des éléments dans les menus déroulants ci-après pour pouvoir identifier les questions et conseils à afficher dans votre plan.

    Si votre soumission doit répondre à des prescriptions propres à un organisme financeur ou un établissement, sélectionnez ici la rédaction dun DMP à partir des thèmes les plus courants.

    " - msgid "

    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.

    " msgstr "

    Sélectionnez les thèmes relatifs à cette question.

    Cette fonction permet dintégrer une documentation générale dassistance de votre établissement, comme encore issue dautres sources comme le DCC et des facultés ou départements auxquels vous fournissez des conseils.

    Vous pouvez sélectionner plusieurs thèmes avec la touche CTRL.

    " @@ -212,6 +212,19 @@ msgid "

    You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.

    If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.

    " msgstr "templates" +#, fuzzy +msgid "" +"
    • %{organisation_name}
    • \n" +"
    • %{organisation_address_line1}
    • \n" +"
    • %{organisation_address_line2}
    • \n" +"
    • %{organisation_address_line3}
    • \n" +"
    • %{organisation_address_line4}
    • \n" +"
    • %{organisation_address_country}
    • \n" +"
    \n" +"

    Helpline: %{organisation_telephone}

    \n" +"

    Email %{organisation_email}

    " +msgstr "DMPonline" + msgid "A colleague has invited you to contribute to their Data Management Plan at " msgstr "" @@ -221,6 +234,9 @@ msgid "A required setting has not been provided" msgstr "Vous navez pas précisé un réglage obligatoire" +msgid "A version of " +msgstr "" + msgid "API Information" msgstr "" @@ -340,6 +356,10 @@ msgid "Before submitting, please consider:" msgstr "" +#, fuzzy +msgid "Before you get started, we need to ask a few questions to set you up with the best DMP template for your needs." +msgstr "Questions" + msgid "Below is a list of users registered for your organisation. You can sort the data by each field." msgstr "La liste ci-dessous indique les utilisateurs de votre organisme. Ces informations peuvent être triées par champ." @@ -364,9 +384,6 @@ msgid "Check this box when you are ready for this guidance to appear on user's plans." msgstr "" -msgid "Choose a template" -msgstr "" - msgid "Click here" msgstr "" @@ -405,6 +422,10 @@ msgid "Contact Email" msgstr "" +#, fuzzy +msgid "Contact Us" +msgstr "Communiquez avec nous" + msgid "Contact us" msgstr "Communiquez avec nous" @@ -558,6 +579,9 @@ msgid "File Name" msgstr "Titre du plan" +msgid "Fill in the required fields" +msgstr "" + msgid "Filter plans" msgstr "Filtrer les plans" @@ -570,15 +594,19 @@ msgid "Forgot your password?" msgstr "" +msgid "Format" +msgstr "" + msgid "Funder" msgstr "Funder" -msgid "Funder name" -msgstr "Nom de lorganisme financeur" - msgid "Funders templates" msgstr "Modèles des bailleurs de subventions" +#, fuzzy +msgid "Funding organisation" +msgstr "Organisation" + msgid "Future plans" msgstr "" @@ -646,12 +674,13 @@ msgid "ID" msgstr "Identifiant" -msgid "If applying for funding, select your research funder." -msgstr "Si vous soumettez une demande de subvention, sélectionnez lorganisme financeur." - msgid "If applying for funding, state the name exactly as in the grant proposal." msgstr "En cas de demande de financement, indiquer le nom exactement comme dans la demande de subvention." +#, fuzzy +msgid "If applying for funding, state the title exactly as in the proposal." +msgstr "En cas de demande de financement, indiquer le nom exactement comme dans la demande de subvention." + msgid "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." msgstr "Si les conseils ne sont destinés quà un sous-ensemble dutilisateurs (par ex. : faisant partie dune faculté ou dun institut), cochez cette case. Les utilisateurs pourront sélectionner ce sous-groupe de conseils lorquils répondront aux questions dans lassistant de création de plan." @@ -718,9 +747,6 @@ msgid "Left" msgstr "Gauche" -msgid "Link your %{application_name} account to your institutional credentials (UK users only)" -msgstr "Reliez votre compte DMPonline à votre authentifiant détablissement" - msgid "List of users" msgstr "Liste des utilisateurs" @@ -745,18 +771,27 @@ msgid "Me" msgstr "Moi" +#, fuzzy +msgid "Message" +msgstr "Moi" + msgid "Multi select box" msgstr "Boîte de sélections multiples" +#, fuzzy +msgid "My Plan" +msgstr "Mon plan" + msgid "My organisation isn't listed." msgstr "Mon établissement nest pas listé." -msgid "My plan" -msgstr "Mon plan" - msgid "My plans" msgstr "Mes plans" +#, fuzzy +msgid "My research organisation is not on the list" +msgstr "Organisation" + msgid "Name" msgstr "Prénom" @@ -766,9 +801,6 @@ msgid "Name of Principal Investigator(s) or main researcher(s) on the project." msgstr "Nom du ou des directeurs de recherche ou du ou des principaux chercheurs du projet." -msgid "Name of funder, if applicable." -msgstr "Nom de lorganisme financeur, le cas échéant." - msgid "New guidance" msgstr "Nouveaux conseils" @@ -790,6 +822,13 @@ msgid "No additional comment area will be displayed." msgstr "" +#, fuzzy +msgid "No funder associated with this plan" +msgstr "plans" + +msgid "No items available." +msgstr "" + msgid "No matches" msgstr "Pas de plans pour %{filter}" @@ -799,9 +838,6 @@ msgid "Not answered yet" msgstr "Pas encore de réponse" -msgid "Not applicable/not listed." -msgstr "Non pertinent/non répertorié." - msgid "Note" msgstr "Note" @@ -866,9 +902,6 @@ msgid "Other institutions" msgstr "" -msgid "Otherwise leave blank." -msgstr "Sinon laissez ce champ vide." - msgid "Own templates" msgstr "Modèles propres" @@ -914,9 +947,6 @@ msgid "Plan name" msgstr "Nom du plan" -msgid "Plan was successfully created." -msgstr "Création du plan effectuée." - #, fuzzy msgid "Plan was successfully deleted." msgstr "Création du plan effectuée." @@ -942,6 +972,9 @@ msgid "Please enter your current password" msgstr "" +msgid "Please enter your current password below when changing your email address." +msgstr "" + msgid "Please enter your first name." msgstr "Entrez votre prénom, svp." @@ -954,18 +987,32 @@ msgid "Please enter your surname or family name." msgstr "Entrez votre nom dusage ou de famille, svp." +msgid "Please fill in the basic project details below" +msgstr "" + msgid "Please fill in the basic project details below and click 'Update' to save" msgstr "Veuillez renseigner les premiers détails ci-après et cliquez sur 'Mettre à jour' pour enregistrer" +#, fuzzy +msgid "Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in." +msgstr "

    À noter que votre courriel est à utiliser comme nom dutilisateur. Si vous modifiez ces informations, rappelez-vous dutiliser votre courriel en vous connectant.

    " + msgid "Please only enter up to 165 characters, you have used" msgstr "" +msgid "Please select one" +msgstr "" + msgid "Policy Expectations" msgstr "Résultats attendus du plan" msgid "Preview" msgstr "Aperçu" +#, fuzzy +msgid "Primary research organisation" +msgstr "Organisation" + msgid "Principal Investigator / Researcher" msgstr "Directeur de recherche / chercheur" @@ -984,6 +1031,9 @@ msgid "Privileges" msgstr "" +msgid "Project title" +msgstr "" + msgid "Public" msgstr "Public" @@ -1068,24 +1118,27 @@ msgid "Sections" msgstr "Sections" -msgid "Select Funder" -msgstr "Funder" - -msgid "Select Organisation" -msgstr "Organisation" +#, fuzzy +msgid "Select a template" +msgstr "templates" msgid "Select an action" msgstr "Sélectionnez une action" +#, fuzzy +msgid "Select the funding organisation" +msgstr "Organisation" + +#, fuzzy +msgid "Select the primary research organisation responsible" +msgstr "Organisation" + msgid "Select which group this guidance relates to." msgstr "Sélectionnez le groupe auxquel ces conseils sont liés." msgid "Select which theme(s) this guidance relates to." msgstr "Sélectionnez le ou les thèmes liés à ces conseils." -msgid "Select your research funder or no funder, as appropariate." -msgstr "" - msgid "Selected option(s)" msgstr "" @@ -1125,6 +1178,9 @@ msgid "Status" msgstr "" +msgid "Subject" +msgstr "" + msgid "Successfully unlinked your account from %{is}." msgstr "" @@ -1177,6 +1233,9 @@ msgid "That template is not currently published." msgstr "templates" +msgid "The" +msgstr "" + msgid "The " msgstr "" @@ -1192,9 +1251,6 @@ msgid "Themes" msgstr "Thèmes" -msgid "There are a number of possible templates you could use. Please choose one." -msgstr "Un certain nombre de modèle vous sont proposés. Choisissez." - msgid "There are no public DMPs." msgstr "Aucun DMP n'a été rendu public." @@ -1225,21 +1281,19 @@ msgid "This page gives you an overview of your plan. It tells what your plan is based on and gives an overview of the questions that you will be asked." msgstr "Cette page vous donne un aperçu de votre plan. Elle indique de quoi il s'inspire et donne une idée générale des questions auxquelles vous devrez répondre." +#, fuzzy +msgid "This plan is based on the default template." +msgstr "templates" + 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 "Tick to select any other sources of guidance you wish to see." -msgstr "Cochez une ou plusieurs des sources de conseils que vous voulez voir." - msgid "Title" msgstr "Titre" -msgid "To see institutional questions and/or guidance, select your organisation." -msgstr "Sélectionnez votre organisme pour voir les questions et conseils de votre établissement." - msgid "Top" msgstr "Haut" @@ -1271,9 +1325,6 @@ msgid "Unlink institutional credentials alert" msgstr "Alerte de détachement dauthentifiant détablissement" -msgid "Unlink your institutional credentials" -msgstr "Détachez votre authentifiant détablissement" - msgid "Unlock my account" msgstr "" @@ -1302,6 +1353,9 @@ msgid "Users" msgstr "Utilisateurs" +msgid "Using the generic Data Management Plan" +msgstr "" + msgid "Version" msgstr "Version" @@ -1323,6 +1377,18 @@ msgid "Visibility" msgstr "Visibilité" +#, fuzzy +msgid "We found multiple DMP templates corresponding to the funder." +msgstr "templates" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to the research organisation." +msgstr "Organisation" + +#, fuzzy +msgid "We found multiple DMP templates corresponding to your funder." +msgstr "templates" + msgid "Website" msgstr "Site web" @@ -1336,9 +1402,17 @@ msgid "Welcome." msgstr "Bienvenue !" +#, fuzzy +msgid "What research project are you planning?" +msgstr "plans" + msgid "When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions." msgstr "Quand vous créez une nouvelle phase dans votre modèle, une version sera créée automatiquement. Quand vous remplirez la grille ci-dessous, le système affichera des options pour créer des sections et des questions." +#, fuzzy +msgid "Which DMP template would you like to use?" +msgstr "templates" + msgid "While you were editing " msgstr "" @@ -1382,6 +1456,9 @@ msgid "You can edit any of the details below." msgstr "Vous pouvez modifiez les informations ci-dessous." +msgid "You can not continue until you have filled in all of the required information." +msgstr "" + #, fuzzy msgid "You can not edit a historical version of this template." msgstr "templates" @@ -1410,9 +1487,6 @@ msgid "You have unsaved answers in the following sections:" msgstr "" -msgid "You may leave blank or select a different organisation to your own." -msgstr "Ce champ peut rester vide, ou vous pouvez sélectionner un autre organisme que le vôtre." - msgid "You must accept the terms and conditions to register." msgstr "" @@ -1437,9 +1511,6 @@ msgid "Your account has been successfully linked to %{scheme}." msgstr "" -msgid "Your account is linked to your institutional credentials." -msgstr "Votre compte est lié à votre authentifiant détablissement." - msgid "Your account won't be created until you access the link above and set your password." msgstr "" @@ -1532,12 +1603,13 @@ msgid "e.g. School/ Department" msgstr "par ex. : Faculté/Département" -msgid "format" -msgstr "" - msgid "from now" msgstr "" +#, fuzzy +msgid "generic template" +msgstr "templates" + msgid "guidance" msgstr "" @@ -1584,6 +1656,10 @@ msgstr "guidances" #, fuzzy +msgid "no research organisation is associated with this plan" +msgstr "Organisation" + +#, fuzzy msgid "note" msgstr "Note" diff --git a/config/routes.rb b/config/routes.rb index 1f4d9a1..c09d22f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,7 +19,7 @@ resources :themes resources :notes resources :plans - resources :plans_guidance_groups + # resources :plans_guidance_groups resources :identifier_schemes resources :exported_plans resources :regions diff --git a/lib/assets/javascripts/application.js b/lib/assets/javascripts/application.js index fe85da0..59b9a26 100644 --- a/lib/assets/javascripts/application.js +++ b/lib/assets/javascripts/application.js @@ -21,6 +21,7 @@ //= require i18n/translations //= require_tree ./locale //= require gettext/all +//= require jquery-accessible-autocomplet-list-aria.js $( document ).ready(function() { diff --git a/lib/assets/javascripts/contacts/new_contact.js b/lib/assets/javascripts/contacts/new_contact.js new file mode 100644 index 0000000..1b692e2 --- /dev/null +++ b/lib/assets/javascripts/contacts/new_contact.js @@ -0,0 +1,14 @@ +var RecaptchaOptions = { + theme : "clean" +}; + +$(document).ready(function(){ + $("input[type='text'], input[type='email'], textarea").change(function(e){ + var enable = ($("#contact_us_contact_name").val().trim().length > 0 && + $("#contact_us_contact_email").val().trim().length > 0 && + $("#contact_us_contact_subject").val().trim().length > 0 && + $("#contact_us_contact_message").val().trim().length > 0); + + $("#create_contact_submit").attr('aria-disabled', !enable); + }); +}); \ No newline at end of file diff --git a/lib/assets/javascripts/jquery-accessible-autocomplet-list-aria.js b/lib/assets/javascripts/jquery-accessible-autocomplet-list-aria.js new file mode 100755 index 0000000..dfb04c9 --- /dev/null +++ b/lib/assets/javascripts/jquery-accessible-autocomplet-list-aria.js @@ -0,0 +1,354 @@ +$(document).ready(function(){ + + /* + * jQuery accessible and keyboard-enhanced autocomplete list + * Website: http://a11y.nicolas-hoffmann.net/autocomplet-list/ + * License MIT: https://github.com/nico3333fr/jquery-accessible-autocomplete-list-aria/blob/master/LICENSE + */ + // loading combobox ------------------------------------------------------------------------------------------------------------ + // init + var $js_combobox = $('.js-combobox'), + $body = $('body'), + default_text_help = 'Use tabulation (or down) key to access and browse suggestions after input. Confirm your choice with enter key, or esc key to close suggestions box.', + default_class_for_invisible_text = 'invisible', + suggestion_single = 'There is ', + suggestion_plural = 'There are ', + suggestion_word = 'suggestion', + button_clear_title = 'clear this field', + button_clear_text = 'X', + case_sensitive = 'yes', + min_length = 0, + limit_number_suggestions = 666, + search_option = 'beginning', // or 'containing' + see_more_text = 'See more results…', + tablo_suggestions = []; + + if ( $js_combobox.length ) { // if there are at least one :) + + // init + $js_combobox.each( function(index_combo) { + var $this = $(this), + $this_id = $this.attr('id'), + $label_this = $( 'label[for="' + $this_id + '"]' ), + index_lisible = index_combo+1, + options = $this.data() + $combobox_prefix_class = typeof options.comboboxPrefixClass !== 'undefined' ? options.comboboxPrefixClass + '-' : '', + $combobox_help_text = typeof options.comboboxHelpText !== 'undefined' ? options.comboboxHelpText : default_text_help, + $list_suggestions = $( '#' + $this.attr('list') ), + $combobox_button_title = typeof options.comboboxButtonTitle !== 'undefined' ? options.comboboxButtonTitle : button_clear_title, + $combobox_button_text = typeof options.comboboxButtonText !== 'undefined' ? options.comboboxButtonText : button_clear_text, + $combobox_case_sensitive = typeof options.comboboxCaseSensitive !== 'undefined' ? options.comboboxCaseSensitive : case_sensitive, + tablo_temp_suggestions = [] ; + + // input + $this.attr({ + 'data-number' : index_lisible, + 'autocorrect' : 'off', + 'autocapitalize' : 'off', + 'spellcheck' : 'off', + 'autocomplete' : 'off', + 'aria-describedby' : $combobox_prefix_class + 'help-text' + index_lisible, + 'aria-autocomplete' : 'list', + 'data-lastval' : '', + 'aria-owns' : $combobox_prefix_class + 'suggest_' + index_lisible + }); + // stock into tables + $list_suggestions.find('option').each( function(index_option, index_element) { + tablo_temp_suggestions.push(index_element.value); + }); + if ($combobox_case_sensitive === 'no'){ + // order case tablo_temp_suggestions + tablo_suggestions[index_lisible] = tablo_temp_suggestions.sort(function(a,b) { + a = a.toLowerCase(); + b = b.toLowerCase(); + if ( a == b) { + return 0; + } + if ( a > b) { + return 1; + } + return -1; + }); + } + else { tablo_suggestions[index_lisible] = tablo_temp_suggestions.sort(); } + + // wrap into a container + $this.wrap('
    '); + + var $combobox_container = $this.parent(); + + // custom datalist/listbox linked to input + $combobox_container.append( '
    ' ); + $list_suggestions.remove(); + + // status zone + $combobox_container.prepend( '
    ' ); + + // help text + $combobox_container.prepend( '' + $combobox_help_text + '' ); + + // label id + $label_this.attr('id', 'label-id-' + $this_id); + + // button clear + $this.after(''); + + }); + + function do_see_more_option ( ) { + var $output_content = $('#js-codeit'); + $output_content.html('You have to code a function or a redirection to display more results ;)'); + } + + // listeners + // keydown on field + $body.on( 'keyup', '.js-combobox', function( event ) { + var $this = $(this), + options_combo = $this.data(), + $container = $this.parent(), + $form = $container.parents('form'), + options = $container.data(), + $combobox_prefix_class = typeof options.comboboxPrefixClass !== 'undefined' ? options.comboboxPrefixClass : '', // no "-"" because already generated + $suggestions = $container.find('.js-suggest div'), + $suggestion_list = $suggestions.find('.js-suggestion'), + $suggestions_text = $container.find('.js-suggestion-text'), + $combobox_suggestion_single = typeof options_combo.suggestionSingle !== 'undefined' ? options_combo.suggestionSingle : suggestion_single, + $combobox_suggestion_plural = typeof options_combo.suggestionPlural !== 'undefined' ? options_combo.suggestionPlural : suggestion_plural, + $combobox_suggestion_word = typeof options_combo.suggestionWord !== 'undefined' ? options_combo.suggestionWord : suggestion_word, + combobox_min_length = typeof options_combo.comboboxMinLength !== 'undefined' ? Math.abs(options_combo.comboboxMinLength) : min_length, + $combobox_case_sensitive = typeof options_combo.comboboxCaseSensitive !== 'undefined' ? options_combo.comboboxCaseSensitive : case_sensitive, + combobox_limit_number_suggestions = typeof options_combo.comboboxLimitNumberSuggestions !== 'undefined' ? Math.abs(options_combo.comboboxLimitNumberSuggestions) : limit_number_suggestions, + $combobox_search_option = typeof options_combo.comboboxSearchOption !== 'undefined' ? options_combo.comboboxSearchOption : search_option, + $combobox_see_more_text = typeof options_combo.comboboxSeeMoreText !== 'undefined' ? options_combo.comboboxSeeMoreText : see_more_text, + index_table = $this.attr('data-number'), + value_to_search = $this.val(), + text_number_suggestions = ''; + + if ( event.keyCode === 13 ) { + $form.submit(); + } + else { + + if ( event.keyCode !== 27 ) { // No Escape + + $this.attr( 'data-lastval', value_to_search ); + // search for text suggestion in the array tablo_suggestions[index_table] + var size_tablo = tablo_suggestions[index_table].length, + i = 0, + counter = 0; + + $suggestions.empty(); + + if ( value_to_search != '' && value_to_search.length >= combobox_min_length ){ + while ( i= 0) ) + || + ( $combobox_case_sensitive==='no' && (tablo_suggestions[index_table][i].toUpperCase().indexOf(value_to_search.toUpperCase()) >= 0) ) + ) + || + ( + $combobox_search_option === 'beginning' && + ( $combobox_case_sensitive==='yes' && tablo_suggestions[index_table][i].substring(0,value_to_search.length) === value_to_search ) + || + ( $combobox_case_sensitive==='no' && tablo_suggestions[index_table][i].substring(0,value_to_search.length).toUpperCase() === value_to_search.toUpperCase() ) + ) + ) { + $suggestions.append( '
    ' + tablo_suggestions[index_table][i] + '
    ' ); + counter++; + } + } + i++; + } + if ( counter >= combobox_limit_number_suggestions ) { + $suggestions.append( '
    ' + $combobox_see_more_text + '
    ' ); + counter++; + } + // update number of suggestions + if ( counter > 1 ){ + text_number_suggestions = $combobox_suggestion_plural + counter + ' ' + $combobox_suggestion_word + 's.'; + } + if ( counter === 1 ){ + text_number_suggestions = $combobox_suggestion_single + counter + ' ' + $combobox_suggestion_word + '.'; + } + if ( counter === 0 ){ + text_number_suggestions = $combobox_suggestion_single + counter + ' ' + $combobox_suggestion_word + '.'; + } + if ( counter >= 0 ){ + var text_number_suggestions_default = $suggestions_text.text(); + if (text_number_suggestions != text_number_suggestions_default) { // @Goestu trick to make it work on all AT + suggestions_to_add=$("

    ").text(text_number_suggestions); + $suggestions_text.attr('aria-live','polite'); + $suggestions_text.empty(); + $suggestions_text.append(suggestions_to_add); + } + } + + } + + } + } + + }) + .on('click', function(event) { + var $target = $(event.target), + $suggestions_text = $('.js-suggestion-text:not(:empty)'), // if a suggestion text is not empty => suggestion opened somewhere + $container = $suggestions_text.parents('.js-container'), + $input_text = $container.find('.js-combobox'), + $suggestions = $container.find('.js-suggest div'); + + // if click outside => close opened suggestions + if ( !$target.is('.js-suggestion') && !$target.is('.js-combobox') && $suggestions_text.length) { + $input_text.val( $input_text.attr('data-lastval') ); + $suggestions.empty(); + $suggestions_text.empty(); + } + }) + // tab + down management for autocomplete (when list of suggestion) + .on( 'keydown', '.js-combobox', function( event ) { + var $this = $(this), + $container = $this.parent(), + $input_text = $container.find('.js-combobox'), + $suggestions = $container.find('.js-suggest div'), + $suggestion_list = $suggestions.find('.js-suggestion'), + $suggestions_text = $container.find('.js-suggestion-text'), + $autorise_tab_options = typeof $this.attr('data-combobox-notab-options') !== 'undefined' ? false : true, + $first_suggestion = $suggestion_list.first(); + + if ( ( !event.shiftKey && event.keyCode == 9 && $autorise_tab_options ) || event.keyCode == 40 ) { // tab (if authorised) or bottom + // See if there are suggestions, and yes => focus on first one + if ($suggestion_list.length) { + $input_text.val($first_suggestion.html()); + $suggestion_list.first().focus(); + event.preventDefault(); + } + } + if ( event.keyCode == 27 || ($autorise_tab_options === false && event.keyCode == 9 ) ) { // esc or (tab/shift tab + notab option) = close + $input_text.val( $input_text.attr('data-lastval') ); + $suggestions.empty(); + $suggestions_text.empty(); + if ( event.keyCode == 27) { // Esc prevented only, tab can go :) + event.preventDefault(); + setTimeout(function(){ $input_text.focus(); }, 300); // timeout to avoid problem in suggestions display + } + } + }) + // tab + down management in list of suggestions + .on( 'keydown', '.js-suggestion', function( event ) { + var $this = $(this), + $container = $this.parents('.js-container'), + $input_text = $container.find('.js-combobox'), + $autorise_tab_options = typeof $input_text.attr('data-combobox-notab-options') !== 'undefined' ? false : true, + $suggestions = $container.find('.js-suggest div'), + $suggestions_text = $container.find('.js-suggestion-text'), + $next_suggestion = $this.next(), + $previous_suggestion = $this.prev(); + + if ( event.keyCode == 27 || ($autorise_tab_options === false && event.keyCode == 9 ) ) { // esc or (tab/shift tab + notab option) = close + if ( event.keyCode == 27) { // Esc prevented only, tab can go :) + $input_text.val( $input_text.attr('data-lastval') ); + $suggestions.empty(); + $suggestions_text.empty(); + setTimeout(function(){ $input_text.focus(); }, 300); // timeout to avoid problem in suggestions display + event.preventDefault(); + } + if ( $autorise_tab_options === false && event.keyCode == 9 ) { + $suggestions.empty(); + $suggestions_text.empty(); + $input_text.focus(); + } + } + if ( event.keyCode == 13 || event.keyCode == 32 ) { // Enter or space + if ( $this.hasClass('js-seemore') ) { + $input_text.val($input_text.attr('data-lastval')); + $suggestions.empty(); + $suggestions_text.empty(); + setTimeout(function(){ $input_text.focus(); }, 300); // timeout to avoid problem in suggestions display + // go define the function you need when we click the see_more option + setTimeout(function(){ do_see_more_option(); }, 301); // timeout to avoid problem in suggestions display + event.preventDefault(); + } + else { + $input_text.val( $this.html() ); + $input_text.attr('data-lastval', $this.html() ); + $suggestions.empty(); + $suggestions_text.empty(); + setTimeout(function(){ $input_text.focus(); }, 300); // timeout to avoid problem in suggestions display + event.preventDefault(); + } + + } + if ( ( !event.shiftKey && event.keyCode == 9 && $autorise_tab_options ) || event.keyCode == 40 ) { // tab (if authorised) or bottom + if ($next_suggestion.length) { + $input_text.val($next_suggestion.html()); + $next_suggestion.focus(); + } + else { + $input_text.val( $input_text.attr('data-lastval') ); + if ( !event.shiftKey && event.keyCode == 9 ) { // tab closes the list + var e = jQuery.Event("keydown"); + e.which = 27; // # Some key code value + e.keyCode = 27; + $this.trigger(e); + } + else { setTimeout(function(){ $input_text.focus(); }, 300); } // timeout to avoid problem in suggestions display + + } + event.preventDefault(); + } + + if ( ( event.shiftKey && event.keyCode == 9 && $autorise_tab_options ) || event.keyCode == 38 ) { // top or Maj+tab (if authorised) + if ($previous_suggestion.length) { + $input_text.val($previous_suggestion.html()); + $previous_suggestion.focus(); + } + else { + $input_text.val( $input_text.attr('data-lastval') ).focus(); + } + event.preventDefault(); + } + }) + // clear button + .on( 'click', '.js-clear-button', function( event ) { + var $this = $(this), + $container = $this.parent(), + $input_text = $container.find('.js-combobox'), + $suggestions = $container.find('.js-suggest div'), + $suggestions_text = $container.find('.js-suggestion-text'); + + $suggestions.empty(); + $suggestions_text.empty(); + $input_text.val(''); + $input_text.attr( 'data-lastval', ''); + + }) + .on( 'click', '.js-suggestion', function( event ) { + var $this = $(this), + value = $this.html(), + $container = $this.parents('.js-container'), + $input_text = $container.find('.js-combobox'), + $suggestions = $container.find('.js-suggest div'), + $suggestions_text = $container.find('.js-suggestion-text'); + + if ( $this.hasClass('js-seemore') ) { + $suggestions.empty(); + $suggestions_text.empty(); + $input_text.focus(); + // go define the function you need when we click the see_more option + do_see_more_option( ); + } + else { + $input_text.val(value).focus(); + $suggestions.empty(); + $suggestions_text.empty(); + } + + }); + + + } + +}); diff --git a/lib/assets/javascripts/plans.js b/lib/assets/javascripts/plans.js index db33faa..1a690e4 100644 --- a/lib/assets/javascripts/plans.js +++ b/lib/assets/javascripts/plans.js @@ -119,7 +119,7 @@ $("form.answer").submit(function(){ var submit_button = $(this).find('input[type="submit"]'); var saving_message = $(this).find('.saving-message'); - submit_button.parent().hide(); + submit_button.hide(); q_id = $(this).find(".question_id").val(); saving_message.show(); s_status = $(this).closest(".accordion-group").find(".section-status:first"); diff --git a/lib/assets/javascripts/plans/new_plan.js b/lib/assets/javascripts/plans/new_plan.js new file mode 100644 index 0000000..7bf6e19 --- /dev/null +++ b/lib/assets/javascripts/plans/new_plan.js @@ -0,0 +1,65 @@ +$(document).ready(function(){ + $("#available-templates").hide(); + + // retrieve the template options and toggle the submit button on page reload + handleComboboxChange(); + handleCheckboxClick("org", $("#plan_no_org").prop("checked")); + handleCheckboxClick("funder", $("#plan_no_funder").prop("checked")); + + // When the hidden org and funder id fields change toogle the submit button + $("#plan_org_id, #plan_funder_id").change(function(){ + handleComboboxChange(); + }); + + // Make sure the checkbox is unchecked if we're entering text + $(".js-combobox").keyup(function(){ + var whichOne = $(this).prop('id').split('_')[1]; + $("#plan_no_" + whichOne).prop("checked", false); + }); + + // If the user clicks the no Org/Funder checkbox disable the dropdown + // and hide clear button + $("#plan_no_org, #plan_no_funder").click(function(){ + var whichOne = $(this).prop('id').split('_')[2]; + handleCheckboxClick(whichOne, this.checked); + }); + + $("#plan_template_id").change(function(){ + $("#create_plan_submit").attr('aria-disabled', ($(this).val().trim().length <= 0)); + }); +}); + +// Only display the submit button if the user has made each decision +// ------------------------------------------------------------- +function handleComboboxChange(){ + // If the (no_org checkbox is checked OR an org was selected) AND + // (no_funder checkbox is checked OR a funder was selected) AND + // (the template selector is not visible OR a template has been selected) + var retrieve = ($("#plan_no_org").prop("checked") || + $("#plan_org_id").val().trim().length > 0) && + ($("#plan_no_funder").prop("checked") || + $("#plan_funder_id").val().trim().length > 0); + + if(retrieve){ + if($("#plan_template_id").val().trim().length <= 0){ + $("form").submit(); + } + + }else{ + $("#available-templates").fadeOut(); + $("#plan_template_id").val(""); + } +} + +// Clear the combobox and disable it if the box was checked +// ------------------------------------------------------------- +function handleCheckboxClick(name, checked){ + $("#plan_" + name + "_name").prop("disabled", checked); + $("#plan_template_id").val("").change(); + + if(checked){ + $("#plan_" + name + "_name").val(""); + $("#plan_" + name + "_id").val("").change(); + $("#plan_" + name + "_name").siblings(".combobox-clear-button").hide(); + } +} diff --git a/lib/assets/stylesheets/application.css b/lib/assets/stylesheets/application.css index 8635967..becfdeb 100644 --- a/lib/assets/stylesheets/application.css +++ b/lib/assets/stylesheets/application.css @@ -14,4 +14,5 @@ *= require bootstrap.css *= require select2.css *= require bootstrap_and_overrides.css.less + *= require roadmap-form.scss */ \ No newline at end of file diff --git a/lib/assets/stylesheets/roadmap-form.scss b/lib/assets/stylesheets/roadmap-form.scss new file mode 100644 index 0000000..9abd90a --- /dev/null +++ b/lib/assets/stylesheets/roadmap-form.scss @@ -0,0 +1,260 @@ +@import "font-awesome"; + +$font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; +$header-font: "GillSansLight"; + +$white: #FFF; +$dark-grey: #333; + +$primary-color: #F49700; +$primary-admin-color: #0057A7; +$disabled-button-color: #CCC; +$cancel-button-color: #827D7E; +$reverse-text: #FFF; + +/* See `.combobox-clear-button` for an example of this mixin in use */ +@mixin icon($icon) { + @extend .fa; + @extend .fa-#{$icon}:before; +} + +.arrow-left { + display: inline-block; + width: 0; + height: 0; + border-top: 12px solid transparent; + border-bottom: 12px solid transparent; + border-right: 12px solid $dark-grey; +} + +.main_header { + margin-bottom: 20px; +} + +.content-box { + +} + +/* Roadmap Form Styling */ +/* ------------------------------------------------ */ +form.roadmap-form { + + fieldset.padded { + padding: 10px 10px 25px 10px; + } + + /* Fieldset with labels over inputs */ + fieldset.standard { + background-color: $white; + + margin-bottom: 25px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + + label, + input[type="checkbox"], + .combobox-container, + .left-indent { + margin-left: 15px; + } + + input[type="text"], select { + margin-bottom: 15px; + } + + input[type="checkbox"] { + vertical-align: top; + } + + .checkbox-label { + display: inline-block; + margin-left: 5px; + } + } + + /* Fieldset with labels to the left of inputs */ + fieldset.side-by-side { + .mce-tinymce { + display: inline-block; + } + + div { + label, + input[type="checkbox"], + .combobox-container, + .identifier-scheme { + display: inline-block; + } + + .identifier-scheme-indent { + margin-left: -5px; + } + + label { + width: 25%; + text-align: right; + margin-right: 10px; + vertical-align: middle; + } + + input.form-submit, + button.form-cancel { + font-size: 10pt; + } + } + + .button-spacer { + display: inline-block; + width: 21%; + } + } + + /* Generic Fieldset Settings */ + fieldset legend { + font-family: $header-font; + color: $primary-color; + font-size: 26px; + font-weight: normal; + text-decoration: none; + + float: left; /* positions the legend within the fieldset box */ + border-bottom: none; + } + + div.inline { + display: inline-block; + } + .left-indent { + margin-left: 15px; + } + .input-extra-large { + width: 70%; + } + .input-large { + width: 50%; + } + .input-medium { + width: 30%; + } + .input-small { + width: 10%; + } + /* Used for the jquery autocomplete combobox on side-by-side fieldsets */ + .fixed-width-large { + width: 550px; + } + + /* Accessible Form Buttons */ + input.form-submit { + background-color: $primary-color; + color: $reverse-text; + padding: 10px 30px; + font-size: 12pt; + margin-top: 15px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + } + /* Override the button color for the Org Admin sections */ + input[type="submit"].admin{ + background-color: $primary-admin-color; + } + input.form-submit[aria-disabled='true'] { + background-color: $disabled-button-color; + } + input.form-submit:focus + [role="tooltip"] { + display: inline-block; + } + button.form-cancel { + background-color: $cancel-button-color; + color: $reverse-text; + padding: 10px 30px; + font-size: 12pt; + margin-top: 15px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + } + .submit-tooltip { + display: none; + margin-left: 5px; + + .arrow-left { + vertical-align: middle; + margin-right: -5px; + } + .submit-tooltip-msg { + color: $white; + background-color: $dark-grey; + padding: 5px 5px 8px 5px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + } +} + +/* Accessible JQuery combobox */ +/* ------------------------------------------------------ */ +.invisible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.combobox-container { + position: relative; + max-width: 585px; + + font-family: $font-family; +} + +.combobox-suggestions { + position: absolute; + left: 0; + width: 562px; + margin-top: -10px; + background: #fff; + z-index: 99; +} +.combobox-suggestion { + color: #666; + border-bottom: 1px solid #000; + border-left: 1px solid #000; + border-right: 1px solid #000; + padding: 5px 10px 5px 10px; + cursor: pointer; + text-align: left; +} +.combobox-suggestion:first-child { + border-top: 1px solid #000; +} +.combobox-suggestion:hover, +.combobox-suggestion:focus { + color: $white; + background-color: $primary-color; +} + +.combobox-clear-button { + @include icon(times-circle); + display: inline; + position: absolute; + border: none; + background: transparent; + padding-top: 3px; + font-size: 16pt; +} + +/* http://geektnt.com/how-to-remove-x-from-search-input-field-on-chrome-and-ie.html */ +.js-combobox[type=text]::-ms-clear { display: none; width: 0; height: 0; } +.js-combobox[type=text]::-ms-reveal { display: none; width: 0; height: 0; } \ No newline at end of file diff --git a/test/functional/plans_controller_test.rb b/test/functional/plans_controller_test.rb index 7386a2f..259bfbf 100644 --- a/test/functional/plans_controller_test.rb +++ b/test/functional/plans_controller_test.rb @@ -71,34 +71,26 @@ get new_plan_path assert_response :success assert assigns(:plan) + assert assigns(:orgs) assert assigns(:funders) + assert assigns(:default_org) end # POST /plans (plans_path) # ---------------------------------------------------------- test "create a new plan" do - params = {template_id: @template.id} + params = {plan: {org_id: @template.org.id, template_id: @template.id, title: 'Testing Create'}} # Should redirect user to the root path if they are not logged in! - post plans_path, params + post plans_path(format: :js), params assert_unauthorized_redirect_to_root_path sign_in @user - post plans_path, params - assert_equal _('Plan was successfully created.'), flash[:notice] - assert_response :redirect - assert_redirected_to "#{plan_url(Plan.last)}?editing=true" + post plans_path(format: :js), params + assert flash[:notice].include?(_('Plan was successfully created.')) + assert_response :success assert assigns(:plan) - assert_equal "#{_('My plan')} (#{@template.title})", Plan.last.title, "expected the record to have been created" - -# TODO: We should also test the various template routes: funder, institution, generic - -# TODO: Reactivate this once the validations on the model are in place! - # Invalid object -# post plans_path, {plan: {title: nil, template: @template}} -# assert flash[:notice].starts_with?(_('Could not create your')) -# assert_response :success -# assert assigns(:plan) + assert_equal "Testing Create", Plan.last.title, "expected the record to have been created" end # GET /plan/:id (plan_path) diff --git a/test/functional/users/omniauth_callbacks_controller_test.rb b/test/functional/users/omniauth_callbacks_controller_test.rb index 9086351..3dca1ca 100644 --- a/test/functional/users/omniauth_callbacks_controller_test.rb +++ b/test/functional/users/omniauth_callbacks_controller_test.rb @@ -13,7 +13,7 @@ @schemes.each do |scheme| @callback_uris[scheme.name] = Rails.application.routes.url_helpers.send( "user_#{scheme.name.downcase}_omniauth_callback_path") - + OmniAuth.config.mock_auth[:"#{scheme.name.downcase}"] = OmniAuth::AuthHash.new({ :provider => "#{scheme.name.downcase}", :uid => 'foo:bar' diff --git a/test/integration/template_selection_test.rb b/test/integration/template_selection_test.rb new file mode 100644 index 0000000..055db21 --- /dev/null +++ b/test/integration/template_selection_test.rb @@ -0,0 +1,140 @@ +require 'test_helper' + +class TemplateSelectionTest < ActionDispatch::IntegrationTest + include Devise::Test::IntegrationHelpers + + setup do + scaffold_template + @template.is_default = true + @template.published = true + @template.save! + + @researcher = User.last + + scaffold_org_admin(@template.org) + + @funder = Org.find_by(org_type: 2) + @funder_template = Template.create(title: 'Funder template', org: @funder) + # Template can't be published on creation so do it afterward + @funder_template.published = true + @funder_template.save + + @org = @researcher.org + @org_template = Template.create(title: 'Org template', org: @org) + # Template can't be published on creation so do it afterward + @org_template.published = true + @org_template.save + end + + # ---------------------------------------------------------- + test 'plan gets publish versions of templates' do + original_id = @template.id + template = version_template(@template) + + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: @template.org.id}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{original_id}\");") + assert_equal original_id, Template.live(@template.dmptemplate_id).id + + # Version the template again + original_id = template.id + template = version_template(template) + + # Make sure the published version is used + post plans_path(format: :js), {plan: {org_id: @template.org.id}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{original_id}\");") + assert_equal original_id, Template.live(@template.dmptemplate_id).id + + # Update the template and make sure the published version stayed the same + sign_in @user + put admin_update_template_path(template), {template: {title: "Blah blah blah"}} + + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: @template.org.id}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{original_id}\");") + assert_equal original_id, Template.live(@template.dmptemplate_id).id + end + + # ---------------------------------------------------------- + test 'plan gets generic template when no funder or org' do + @template.is_default = true + @template.save! + + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: nil}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{@template.id}\");"), @response.body + end + + # ---------------------------------------------------------- + test 'plan gets org template when no funder' do + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: @org.id, funder_id: nil}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{@org_template.id}\");"), @response.body + end + + # ---------------------------------------------------------- + test 'plan gets funder template when no org' do + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: nil, funder_id: @funder.id}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{@funder_template.id}\");"), @response.body + end + + # ---------------------------------------------------------- + test 'plan gets funder template when org has no customization' do + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: @org.id, funder_id: @funder.id}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{@funder_template.id}\");"), @response.body + end + + # ---------------------------------------------------------- + test 'plan gets customized version of funder template' do + customization = Template.create(title: 'Customization', org: @org) + # Template can't be published on creation so do it afterward + customization.published = true + customization.customization_of = @funder_template.dmptemplate_id + customization.save + + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: @org.id, funder_id: @funder.id}} + assert_response :success + assert @response.body.include?("$(\"#plan_template_id\").val(\"#{customization.id}\");"), @response.body + end + + # ---------------------------------------------------------- + test 'list of templates is returned when the funder has multiples' do + funder_template2 = Template.create(title: 'Funder template 2', org: @funder) + # Template can't be published on creation so do it afterward + funder_template2.published = true + funder_template2.save + + sign_in @researcher + + post plans_path(format: :js), {plan: {org_id: @org.id, funder_id: @funder.id}} + assert_response :success + assert_select "option", 3, "expected a dropdown with 2 templates and a 'please select' option" + assert @response.body.include?("