diff --git a/.gitignore b/.gitignore index 67282e5..2f4bf9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,41 +1,44 @@ - -# Ignore bundler config -/.bundle - -# Ignore all logfiles, tempfiles, public assets, -/log/*.log -/tmp -public/assets/* -public/apidocs/* - -# Ignore gemfile.lock -Gemfile.lock - -# Ignore db schema.rb -# db/schema.rb - -# Ignore database configuration and token secrets -config/database.yml -config/secrets.yml - -# Ignore some of the initializers -config/initializers/recaptcha.rb -config/initializers/devise.rb -config/initializers/contact_us.rb - -# Ignore enviroments settings -config/environments/development.rb -config/environments/production.rb -config/environments/test.rb - -config/initializers/contact_us.rb - -# ignore IDE files -.idea/* - -# ignore yard doc files -.yardoc/* - -# ignore yard generated documents -/doc/* -!/doc/README_FOR_APP \ No newline at end of file + +# Ignore rbenv files +.ruby-version + +# Ignore bundler config +/.bundle + +# Ignore all logfiles, tempfiles, public assets, +/log/*.log +/tmp +public/assets/* +public/apidocs/* + +# Ignore gemfile.lock +Gemfile.lock + +# Ignore db schema.rb +# db/schema.rb + +# Ignore database configuration and token secrets +config/database.yml +config/secrets.yml + +# Ignore some of the initializers +config/initializers/recaptcha.rb +#config/initializers/devise.rb +#config/initializers/contact_us.rb + +# Ignore enviroments settings +#config/environments/development.rb +#config/environments/production.rb +#config/environments/test.rb + +#config/initializers/contact_us.rb + +# ignore IDE files +.idea/* + +# ignore yard doc files +.yardoc/* + +# ignore yard generated documents +/doc/* +!/doc/README_FOR_APP diff --git a/Gemfile b/Gemfile index 7bfac46..ea11542 100644 --- a/Gemfile +++ b/Gemfile @@ -75,7 +75,7 @@ gem 'jquery-rails' gem 'tinymce-rails' gem 'friendly_id' -gem 'contact_us', '>= 1.1.0' +gem 'contact_us', '>= 1.2.0' gem 'recaptcha' gem 'turbolinks' #implementation of forms @@ -117,3 +117,11 @@ # gem 'yard' gem 'redcarpet' + +# ======================================================================================= +# DMPTool specific configuration (DO NOT contribute back to the DMPRoadmap/roadmap repo) +# ======================================================================================= +gem 'capistrano' +gem 'capistrano-bundler' +gem 'capistrano-passenger' +gem 'capistrano-rails' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 223b5d2..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,385 +0,0 @@ -GIT - remote: git://github.com/activeadmin/activeadmin.git - revision: 3941e1550c4d5d8a6df51057d0517f1a51b609e4 - specs: - activeadmin (1.0.0.pre4) - arbre (~> 1.0, >= 1.0.2) - bourbon - coffee-rails - formtastic (~> 3.1) - formtastic_i18n - inherited_resources (~> 1.6) - jquery-rails - jquery-ui-rails - kaminari (~> 0.15) - rails (>= 3.2, < 5.1) - ransack (~> 1.3) - sass-rails - sprockets (< 4.1) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionpack-action_caching (1.1.1) - actionpack (>= 4.0.0, < 5.0) - actionpack-page_caching (1.0.2) - actionpack (>= 4.0.0, < 5) - actionview (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) - globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) - arel (~> 6.0) - activesupport (4.2.0) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - addressable (2.4.0) - amoeba (3.0.0) - activerecord (>= 3.2.6) - ansi (1.5.0) - arbre (1.1.1) - activesupport (>= 3.0.0) - arel (6.0.3) - bcrypt (3.1.11) - better_errors (2.1.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - rack (>= 0.9.0) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bourbon (4.2.7) - sass (~> 3.4) - thor (~> 0.19) - builder (3.2.2) - byebug (9.0.5) - cancancan (1.15.0) - capybara (2.7.1) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - caracal (1.0.6) - nokogiri (~> 1.6) - rubyzip (~> 1.1) - tilt (>= 1.4) - caracal-rails (1.0.1) - caracal (~> 1.0) - rails (>= 3.2) - coderay (1.1.1) - coffee-rails (4.2.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.2.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - commonjs (0.2.7) - concurrent-ruby (1.0.2) - contact_us (1.1.0) - rails (>= 4.2.0) - daemons (1.2.4) - debug_inspector (0.0.2) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise_invitable (1.7.0) - actionmailer (>= 4.0.0) - devise (>= 4.0.0) - email_validator (1.6.0) - activemodel - erubis (2.7.0) - eventmachine (1.2.0.1) - exception_notification (4.2.1) - actionmailer (>= 4.0, < 6) - activesupport (>= 4.0, < 6) - execjs (2.7.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - feedjira (2.0.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - loofah (~> 2.0) - sax-machine (~> 1.0) - formtastic (3.1.4) - actionpack (>= 3.2.13) - formtastic_i18n (0.6.0) - friendly_id (5.1.0) - activerecord (>= 4.0.0) - globalid (0.3.7) - activesupport (>= 4.1.0) - has_scope (0.6.0) - actionpack (>= 3.2, < 5) - activesupport (>= 3.2, < 5) - hashie (3.4.4) - htmltoword (0.5.1) - actionpack - nokogiri - rubyzip (>= 1.0) - i18n (0.7.0) - i18n-js (3.0.0.rc13) - i18n (~> 0.6, >= 0.6.6) - inherited_resources (1.6.0) - actionpack (>= 3.2, < 5) - has_scope (~> 0.6.0.rc) - railties (>= 3.2, < 5) - responders - jbuilder (2.6.0) - activesupport (>= 3.0.0, < 5.1) - multi_json (~> 1.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - ledermann-rails-settings (2.4.2) - activerecord (>= 3.1) - less (2.6.0) - commonjs (~> 0.2.7) - less-rails (2.7.1) - actionpack (>= 4.0) - less (~> 2.6.0) - sprockets (> 2, < 4) - tilt - libv8 (3.16.14.15) - loofah (2.0.3) - nokogiri (>= 1.5.9) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.1.0) - minitest (5.9.0) - minitest-capybara (0.8.2) - capybara (~> 2.2) - minitest (~> 5.0) - rake - minitest-metadata (0.6.0) - minitest (>= 4.7, < 6.0) - minitest-rails (2.2.1) - minitest (~> 5.7) - railties (~> 4.1) - minitest-rails-capybara (2.1.2) - capybara (~> 2.7) - minitest-capybara (~> 0.8) - minitest-metadata (~> 0.6) - minitest-rails (~> 2.1) - minitest-reporters (1.1.11) - ansi - builder - minitest (>= 5.0) - ruby-progressbar - multi_json (1.12.1) - multipart-post (2.0.0) - mysql2 (0.3.21) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - orm_adapter (0.5.0) - pkg-config (1.1.7) - polyamorous (1.3.1) - activerecord (>= 3.0) - protected_attributes (1.1.3) - activemodel (>= 4.0.1, < 5.0) - rack (1.6.4) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - rails-observers (0.1.2) - activemodel (~> 4.0) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (11.2.2) - ransack (1.8.2) - actionpack (>= 3.0) - activerecord (>= 3.0) - activesupport (>= 3.0) - i18n - polyamorous (~> 1.3) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - ref (2.0.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rolify (5.1.0) - ruby-progressbar (1.8.1) - rubyzip (1.2.0) - sass (3.4.22) - sass-rails (5.0.6) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sax-machine (1.3.2) - sprockets (3.7.0) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - swagger-docs (0.2.8) - activesupport (>= 3, < 5) - rails (>= 3, < 5) - therubyracer (0.12.2) - libv8 (~> 3.16.14.0) - ref - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - tinymce-rails (4.4.1) - railties (>= 3.1.1) - turbolinks (5.0.1) - turbolinks-source (~> 5) - turbolinks-source (5.0.0) - twitter-bootstrap-rails (2.2.8) - actionpack (>= 3.1) - execjs - rails (>= 3.1) - railties (>= 3.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) - uglifier (3.0.1) - execjs (>= 0.3.0, < 3) - validate_url (1.0.2) - activemodel (>= 3.0.0) - addressable - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - wicked_pdf (1.0.6) - xpath (2.0.0) - nokogiri (~> 1.3) - yard (0.9.5) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack-action_caching - actionpack-page_caching - activeadmin! - amoeba - better_errors - binding_of_caller - byebug - cancancan - caracal - caracal-rails - contact_us (>= 1.1.0) - devise - devise_invitable - email_validator - exception_notification - feedjira - friendly_id - htmltoword - i18n-js (>= 3.0.0.rc11) - jbuilder - jquery-rails - ledermann-rails-settings - less-rails - libv8 - minitest-rails-capybara - minitest-reporters - mysql2 (~> 0.3.18) - omniauth - omniauth-shibboleth - protected_attributes - rack-test - rails (= 4.2.0) - rails-observers - railties - recaptcha - redcarpet - responders (~> 2.0) - rolify - sass-rails - swagger-docs - therubyracer (>= 0.11.4) - thin - tinymce-rails - turbolinks - twitter-bootstrap-rails (= 2.2.8) - uglifier - validate_url - web-console (~> 2.0) - wicked_pdf - yard - -BUNDLED WITH - 1.12.5 diff --git a/Rakefile b/Rakefile index 757e6a8..df102db 100755 --- a/Rakefile +++ b/Rakefile @@ -1,21 +1,21 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. -require 'rake/testtask' -require File.expand_path('../config/application', __FILE__) - -DMPonline4::Application.load_tasks - -# TODO: destroy rdoc rake task once finished with new documentation - -RDoc::Task.new :rdoc do |rdoc| - rdoc.main = "README.rdoc" - - rdoc.rdoc_files.include("README.rdoc", "doc/*.rdoc", "app/**/*.rb", "lib/*.rb", "config/**/*.rb") - #change above to fit needs - - rdoc.title = "DMPonline4 Documentation" - rdoc.options << "--all" -end - -task default: :test +#!/usr/bin/env rake +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. +require 'rake/testtask' +require File.expand_path('../config/application', __FILE__) + +DMPRoadmap::Application.load_tasks + +# TODO: destroy rdoc rake task once finished with new documentation + +RDoc::Task.new :rdoc do |rdoc| + rdoc.main = "README.rdoc" + + rdoc.rdoc_files.include("README.rdoc", "doc/*.rdoc", "app/**/*.rb", "lib/*.rb", "config/**/*.rb") + #change above to fit needs + + rdoc.title = "DMPRoadmap Documentation" + rdoc.options << "--all" +end + +task default: :test diff --git a/app/admin/dashboard.rb b/app/admin/dashboard.rb index 8b1c9bb..3aa2b89 100644 --- a/app/admin/dashboard.rb +++ b/app/admin/dashboard.rb @@ -1,39 +1,39 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Copyright:+] Digital Curation Centre - - -ActiveAdmin.register_page "Dashboard" do - - menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") } - - content title: proc{ I18n.t("active_admin.dashboard") } do - #div class: "blank_slate_container", id: "dashboard_default_message" do - # span class: "blank_slate" do - # span I18n.t("active_admin.dashboard_welcome.welcome") - # small I18n.t("active_admin.dashboard_welcome.call_to_action") - # end - #end - - # Here is an example of a simple dashboard with columns and panels. - # - # columns do - # column do - # panel "Recent Posts" do - # ul do - # Post.recent(5).map do |post| - # li link_to(post.title, admin_post_path(post)) - # end - # end - # end - # end - - # column do - # panel "Info" do - # para "Welcome to ActiveAdmin." - # end - # end - # end - end # content +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + + +ActiveAdmin.register_page "Dashboard" do + + menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") } + + content title: proc{ I18n.t("active_admin.dashboard") } do + #div class: "blank_slate_container", id: "dashboard_default_message" do + # span class: "blank_slate" do + # span I18n.t("active_admin.dashboard_welcome.welcome") + # small I18n.t("active_admin.dashboard_welcome.call_to_action") + # end + #end + + # Here is an example of a simple dashboard with columns and panels. + # + # columns do + # column do + # panel "Recent Posts" do + # ul do + # Post.recent(5).map do |post| + # li link_to(post.title, admin_post_path(post)) + # end + # end + # end + # end + + # column do + # panel "Info" do + # para "Welcome to ActiveAdmin." + # end + # end + # end + end # content end \ No newline at end of file diff --git a/app/admin/dmptemplate.rb b/app/admin/dmptemplate.rb index b9d711e..e0cd394 100644 --- a/app/admin/dmptemplate.rb +++ b/app/admin/dmptemplate.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Dmptemplate do permit_params :title, :description, :organisation_id, :published, :is_default diff --git a/app/admin/guidance.rb b/app/admin/guidance.rb index 53c8049..f4400e9 100644 --- a/app/admin/guidance.rb +++ b/app/admin/guidance.rb @@ -1,81 +1,81 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Guidance do - permit_params :text, :guidance_group_id, :question_id - - menu :priority => 13, :label => proc{ I18n.t('admin.guidance')}, :parent => "Guidance list" - - index do - column (:text) { |guidance| raw(guidance.text) } - column I18n.t('admin.theme') do |t| - (t.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe - end - - column I18n.t('admin.question'), :sortable => :question_id do |que| - if !que.nil? then - que.question - else - '-' - end - end - - column I18n.t('admin.guidance_group') do |guidance| - (guidance.guidance_groups.map{|t_q| link_to t_q.name, [:admin, t_q]}).join(', ').html_safe - end - actions - end - - #show details of a question - show do - attributes_table do - row (:text) { |guidance| raw(guidance.text) } - - row I18n.t('admin.theme') do - (guidance.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe - end - row I18n.t('admin.question'), :question_id do |question| - question.question - end - row I18n.t('admin.guidance_group') do |guidance| - (guidance.guidance_groups.map{|t_q| link_to t_q.name, [:admin, t_q]}).join(', ').html_safe - end - - row :created_at - row :updated_at - end - end - - #form - form do |f| - f.inputs "Details" do - f.input :text - f.input :question_id, :as => :select, - :collection => Question.order('text').map{|que|[que.text, que.id]} - f.input :guidance_group_ids, :label => I18n.t('admin.guidance_group'), - :as => :select, - :collection => GuidanceGroup.order('name').map{|gui|[gui.name, gui.id]} - - end - f.inputs "Themes" do - f.input :theme_ids, :label => I18n.t('admin.selected_themes'), - :as => :select, - :include_blank => I18n.t('admin.all_themes'), - :multiple => true, - :collection => Theme.order('title').map{|the| [the.title, the.id]}, - :hint => I18n.t('admin.choose_themes') - end - - f.actions - end - - controller do - def permitted_params - params.permit! - end - end - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Guidance do + permit_params :text, :guidance_group_id, :question_id + + menu :priority => 13, :label => proc{ I18n.t('admin.guidance')}, :parent => "Guidance list" + + index do + column (:text) { |guidance| raw(guidance.text) } + column I18n.t('admin.theme') do |t| + (t.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe + end + + column I18n.t('admin.question'), :sortable => :question_id do |que| + if !que.nil? then + que.question + else + '-' + end + end + + column I18n.t('admin.guidance_group') do |guidance| + (guidance.guidance_groups.map{|t_q| link_to t_q.name, [:admin, t_q]}).join(', ').html_safe + end + actions + end + + #show details of a question + show do + attributes_table do + row (:text) { |guidance| raw(guidance.text) } + + row I18n.t('admin.theme') do + (guidance.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe + end + row I18n.t('admin.question'), :question_id do |question| + question.question + end + row I18n.t('admin.guidance_group') do |guidance| + (guidance.guidance_groups.map{|t_q| link_to t_q.name, [:admin, t_q]}).join(', ').html_safe + end + + row :created_at + row :updated_at + end + end + + #form + form do |f| + f.inputs "Details" do + f.input :text + f.input :question_id, :as => :select, + :collection => Question.order('text').map{|que|[que.text, que.id]} + f.input :guidance_group_ids, :label => I18n.t('admin.guidance_group'), + :as => :select, + :collection => GuidanceGroup.order('name').map{|gui|[gui.name, gui.id]} + + end + f.inputs "Themes" do + f.input :theme_ids, :label => I18n.t('admin.selected_themes'), + :as => :select, + :include_blank => I18n.t('admin.all_themes'), + :multiple => true, + :collection => Theme.order('title').map{|the| [the.title, the.id]}, + :hint => I18n.t('admin.choose_themes') + end + + f.actions + end + + controller do + def permitted_params + params.permit! + end + end + +end diff --git a/app/admin/guidance_group.rb b/app/admin/guidance_group.rb index 639792d..76667f7 100644 --- a/app/admin/guidance_group.rb +++ b/app/admin/guidance_group.rb @@ -1,80 +1,80 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register GuidanceGroup do - permit_params :organisation_id, :name, :published, :optional_subset - - menu :priority => 2, :label => proc{I18n.t('admin.guidance_group')}, :parent => "Guidance list" - - index do - column I18n.t('admin.name'), :sortable => :name do |ggn| - link_to ggn.name, [:admin, ggn] - end - column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| - link_to org_title.organisation.name, [:admin, org_title.organisation] - end - column I18n.t('admin.template') do |t| - (t.dmptemplates.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe - end - - actions - end - - #show details of guidance group - show do - attributes_table do - row :name - row :organisation_id do |org_title| - link_to org_title.organisation.name, [:admin, org_title.organisation] - end - row I18n.t('admin.template') do - (guidance_group.dmptemplates.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe - end - row :created_at - row :updated_at - end - end - - #guidance list - sidebar I18n.t('admin.guidance'), :only => :show, :if => proc { guidance_group.guidances.count >= 1} do - table_for guidance_group.guidances.order("text asc") do |guis| - column :text do |gtext| - link_to gtext.text.html_safe, [:admin, gtext] - end - column I18n.t('admin.theme') do |themelist| - (themelist.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe - end - end - end - - #form - form do |f| - f.inputs "Details" do - f.input :name - f.input :organisation_id, :label => I18n.t('admin.org_title'), - :as => :select, - :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} - f.input :published - f.input :optional_subset - end - - f.inputs "Templates" do - f.input :dmptemplate_ids, :label => I18n.t('admin.selected_templates'), - :as => :select, - :include_blank => I18n.t('admin.all_templates'), - :multiple => true, - :collection => Dmptemplate.order('title').map{|the| [the.title, the.id]}, - :hint => I18n.t('admin.choose_templates') - end - f.actions - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register GuidanceGroup do + permit_params :organisation_id, :name, :published, :optional_subset + + menu :priority => 2, :label => proc{I18n.t('admin.guidance_group')}, :parent => "Guidance list" + + index do + column I18n.t('admin.name'), :sortable => :name do |ggn| + link_to ggn.name, [:admin, ggn] + end + column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| + link_to org_title.organisation.name, [:admin, org_title.organisation] + end + column I18n.t('admin.template') do |t| + (t.dmptemplates.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe + end + + actions + end + + #show details of guidance group + show do + attributes_table do + row :name + row :organisation_id do |org_title| + link_to org_title.organisation.name, [:admin, org_title.organisation] + end + row I18n.t('admin.template') do + (guidance_group.dmptemplates.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe + end + row :created_at + row :updated_at + end + end + + #guidance list + sidebar I18n.t('admin.guidance'), :only => :show, :if => proc { guidance_group.guidances.count >= 1} do + table_for guidance_group.guidances.order("text asc") do |guis| + column :text do |gtext| + link_to gtext.text.html_safe, [:admin, gtext] + end + column I18n.t('admin.theme') do |themelist| + (themelist.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe + end + end + end + + #form + form do |f| + f.inputs "Details" do + f.input :name + f.input :organisation_id, :label => I18n.t('admin.org_title'), + :as => :select, + :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} + f.input :published + f.input :optional_subset + end + + f.inputs "Templates" do + f.input :dmptemplate_ids, :label => I18n.t('admin.selected_templates'), + :as => :select, + :include_blank => I18n.t('admin.all_templates'), + :multiple => true, + :collection => Dmptemplate.order('title').map{|the| [the.title, the.id]}, + :hint => I18n.t('admin.choose_templates') + end + f.actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/option.rb b/app/admin/option.rb index 5cc1fbb..ce44cfc 100644 --- a/app/admin/option.rb +++ b/app/admin/option.rb @@ -1,79 +1,79 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Option do - permit_params :question_id, :text, :number, :is_default - menu :priority => 6, :label => proc{I18n.t('admin.multi_options')}, :parent => "Templates management" - - index do - column :text - column I18n.t('admin.questions'), :sortable => :question_id do |ques| - if !ques.question_id.nil? then - link_to ques.question.text, [:admin, ques.question] - end - end - column I18n.t('admin.sections'), :sortable => :question_id do |ques| - if !ques.question_id.nil? then - link_to ques.question.section.title, [:admin, ques.question.section] - end - end - column I18n.t('admin.template'), :sortable => :question_id do |ques| - if !ques.question_id.nil? then - link_to ques.question.section.version.phase.dmptemplate.title, [:admin, ques.question.section.version.phase.dmptemplate] - end - end - - actions - end - - #show details of a section - show do - attributes_table do - row :text - row :number - row I18n.t('admin.questions'), :question_id do |ques| - if !ques.question_id.nil? then - link_to ques.question.text, [:admin, ques.question] - end - end - row I18n.t('admin.sections'), :question_id do |ques| - if !ques.question_id.nil? then - link_to ques.question.section.title, [:admin, ques.question.section] - end - end - row I18n.t('admin.template'), :question_id do |ques| - if !ques.question_id.nil? then - link_to ques.question.section.version.phase.dmptemplate.title, [:admin, ques.question.section.version.phase.dmptemplate] - end - end - row :is_default - row :created_at - row :updated_at - end - end - - - #form - form do |f| - f.inputs "Details" do - f.input :text - f.input :number - f.input :question, - :as => :select, - :collection => Question.order('text').map{ |sec| ["#{truncate(sec.section.version.phase.dmptemplate.title, :lengh => 20)} - #{truncate(sec.section.title, :lengh => 50)} - #{truncate(sec.text, :lengh => 20)}", sec.id] } - f.input :is_default - end - - f.actions - end - - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Option do + permit_params :question_id, :text, :number, :is_default + menu :priority => 6, :label => proc{I18n.t('admin.multi_options')}, :parent => "Templates management" + + index do + column :text + column I18n.t('admin.questions'), :sortable => :question_id do |ques| + if !ques.question_id.nil? then + link_to ques.question.text, [:admin, ques.question] + end + end + column I18n.t('admin.sections'), :sortable => :question_id do |ques| + if !ques.question_id.nil? then + link_to ques.question.section.title, [:admin, ques.question.section] + end + end + column I18n.t('admin.template'), :sortable => :question_id do |ques| + if !ques.question_id.nil? then + link_to ques.question.section.version.phase.dmptemplate.title, [:admin, ques.question.section.version.phase.dmptemplate] + end + end + + actions + end + + #show details of a section + show do + attributes_table do + row :text + row :number + row I18n.t('admin.questions'), :question_id do |ques| + if !ques.question_id.nil? then + link_to ques.question.text, [:admin, ques.question] + end + end + row I18n.t('admin.sections'), :question_id do |ques| + if !ques.question_id.nil? then + link_to ques.question.section.title, [:admin, ques.question.section] + end + end + row I18n.t('admin.template'), :question_id do |ques| + if !ques.question_id.nil? then + link_to ques.question.section.version.phase.dmptemplate.title, [:admin, ques.question.section.version.phase.dmptemplate] + end + end + row :is_default + row :created_at + row :updated_at + end + end + + + #form + form do |f| + f.inputs "Details" do + f.input :text + f.input :number + f.input :question, + :as => :select, + :collection => Question.order('text').map{ |sec| ["#{truncate(sec.section.version.phase.dmptemplate.title, :lengh => 20)} - #{truncate(sec.section.title, :lengh => 50)} - #{truncate(sec.text, :lengh => 20)}", sec.id] } + f.input :is_default + end + + f.actions + end + + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/organisation.rb b/app/admin/organisation.rb index 15eeb31..07f1bb8 100644 --- a/app/admin/organisation.rb +++ b/app/admin/organisation.rb @@ -1,125 +1,125 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Organisation do - permit_params :abbreviation, :banner_file_id, :description, :domain, :logo_file_id, :name, :stylesheet_file_id, :target_url, :organisation_type_id, :wayfless_entity, :parent_id - - menu :priority => 14, :label => proc{I18n.t('admin.org')}, :parent => "Organisations management" - - index do - column I18n.t('admin.org_title'), :sortable => :name do |ggn| - link_to ggn.name, [:admin, ggn] - end - column I18n.t('admin.abbrev'), :sortable => :abbreviation do |ggn| - if !ggn.abbreviation.nil? - link_to ggn.abbreviation, [:admin, ggn] - else - '-' - end - end - column I18n.t('admin.org_type'), :sortable => :organisation_type_id do |org_type| - if !org_type.organisation_type_id.nil? then - link_to org_type.organisation_type.name, [:admin, org_type] - end - end - - actions - end - - - #show details of an organisation - show do - resource.check_api_credentials - attributes_table do - row I18n.t('admin.org_title'), :sortable => :name do |gn| - if !gn.name.nil? then - link_to gn.name, [:admin, gn] - end - end - row I18n.t('admin.abbrev'), :abbreviation do |ggn| - if !ggn.abbreviation.nil? - link_to ggn.abbreviation, [:admin, ggn] - else - '-' - end - end - row :sort_name - row I18n.t('admin.org_type'), :organisation_type_id do |org_type| - if !org_type.organisation_type_id.nil? then - link_to org_type.organisation_type.name, [:admin, org_type] - end - end - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row :banner_text do |banner| - if !banner.banner_text.nil? then - banner.banner_text.html_safe - end - end - # row :target_url - row :logo_file_name - row :domain - row :wayfless_entity - row I18n.t('admin.token_permission_type') do - (organisation.token_permission_types.map{|tpt| link_to tpt.token_type, [:admin, tpt]}).join(', ').html_safe - end - # row I18n.t('admin.org_parent'), :parent_id do |org_parent| - # if !org_parent.parent_id.nil? then - # parent_org = Organisation.find(org_parent.parent_id) - # link_to parent_org.name, [:admin, parent_org] - # end - # end - # row :stylesheet_file_id - row :created_at - row :updated_at - end - end - - #templates sidebar - sidebar I18n.t('admin.templates'), :only => :show, :if => proc { organisation.dmptemplates.count >= 1} do - table_for organisation.dmptemplates.order("title asc") do |temp| - column :title do |dmptemp| - link_to dmptemp.title, [:admin, dmptemp] - end - column :published - end - end - - #form - form do |f| - f.inputs "Details" do - f.input :name - f.input :abbreviation - f.input :sort_name - f.input :description - f.input :organisation_type_id, :label => I18n.t('admin.org_type'), :as => :select, :collection => OrganisationType.order('name').map{|orgt|[orgt.name, orgt.id]} - # f.input :target_url - f.input :banner_text - f.input :logo_file_name - f.input :domain - f.input :wayfless_entity - f.input :token_permission_types, label: I18n.t('admin.token_permission_type'), - as: :select, multiple: true, include_blank: I18n.t('helpers.none'), - collection: TokenPermissionType.order(:token_type).map{|token| [token.token_type, token.id]}, - hint: I18n.t('admin.choose_api_permissions') - # f.input :parent_id, :label => I18n.t('admin.org_parent'), :as => :select, :collection => Organisation.find(:all, :order => 'name ASC').map{|orgp|[orgp.name, orgp.id]} - # f.input :stylesheet_file_id - end - f.actions - end - - - controller do - def permitted_params - params.permit! - end - end - - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Organisation do + permit_params :abbreviation, :banner_file_id, :description, :domain, :logo_file_id, :name, :stylesheet_file_id, :target_url, :organisation_type_id, :wayfless_entity, :parent_id + + menu :priority => 14, :label => proc{I18n.t('admin.org')}, :parent => "Organisations management" + + index do + column I18n.t('admin.org_title'), :sortable => :name do |ggn| + link_to ggn.name, [:admin, ggn] + end + column I18n.t('admin.abbrev'), :sortable => :abbreviation do |ggn| + if !ggn.abbreviation.nil? + link_to ggn.abbreviation, [:admin, ggn] + else + '-' + end + end + column I18n.t('admin.org_type'), :sortable => :organisation_type_id do |org_type| + if !org_type.organisation_type_id.nil? then + link_to org_type.organisation_type.name, [:admin, org_type] + end + end + + actions + end + + + #show details of an organisation + show do + resource.check_api_credentials + attributes_table do + row I18n.t('admin.org_title'), :sortable => :name do |gn| + if !gn.name.nil? then + link_to gn.name, [:admin, gn] + end + end + row I18n.t('admin.abbrev'), :abbreviation do |ggn| + if !ggn.abbreviation.nil? + link_to ggn.abbreviation, [:admin, ggn] + else + '-' + end + end + row :sort_name + row I18n.t('admin.org_type'), :organisation_type_id do |org_type| + if !org_type.organisation_type_id.nil? then + link_to org_type.organisation_type.name, [:admin, org_type] + end + end + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row :banner_text do |banner| + if !banner.banner_text.nil? then + banner.banner_text.html_safe + end + end + # row :target_url + row :logo_file_name + row :domain + row :wayfless_entity + row I18n.t('admin.token_permission_type') do + (organisation.token_permission_types.map{|tpt| link_to tpt.token_type, [:admin, tpt]}).join(', ').html_safe + end + # row I18n.t('admin.org_parent'), :parent_id do |org_parent| + # if !org_parent.parent_id.nil? then + # parent_org = Organisation.find(org_parent.parent_id) + # link_to parent_org.name, [:admin, parent_org] + # end + # end + # row :stylesheet_file_id + row :created_at + row :updated_at + end + end + + #templates sidebar + sidebar I18n.t('admin.templates'), :only => :show, :if => proc { organisation.dmptemplates.count >= 1} do + table_for organisation.dmptemplates.order("title asc") do |temp| + column :title do |dmptemp| + link_to dmptemp.title, [:admin, dmptemp] + end + column :published + end + end + + #form + form do |f| + f.inputs "Details" do + f.input :name + f.input :abbreviation + f.input :sort_name + f.input :description + f.input :organisation_type_id, :label => I18n.t('admin.org_type'), :as => :select, :collection => OrganisationType.order('name').map{|orgt|[orgt.name, orgt.id]} + # f.input :target_url + f.input :banner_text + f.input :logo_file_name + f.input :domain + f.input :wayfless_entity + f.input :token_permission_types, label: I18n.t('admin.token_permission_type'), + as: :select, multiple: true, include_blank: I18n.t('helpers.none'), + collection: TokenPermissionType.order(:token_type).map{|token| [token.token_type, token.id]}, + hint: I18n.t('admin.choose_api_permissions') + # f.input :parent_id, :label => I18n.t('admin.org_parent'), :as => :select, :collection => Organisation.find(:all, :order => 'name ASC').map{|orgp|[orgp.name, orgp.id]} + # f.input :stylesheet_file_id + end + f.actions + end + + + controller do + def permitted_params + params.permit! + end + end + + +end diff --git a/app/admin/organisation_type.rb b/app/admin/organisation_type.rb index 74b0813..4575f54 100644 --- a/app/admin/organisation_type.rb +++ b/app/admin/organisation_type.rb @@ -1,55 +1,55 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register OrganisationType do - permit_params :organisation_id, :name - - menu :priority => 4, :label => proc{I18n.t('admin.org_type')}, :parent => "Organisations management" - - index do - column I18n.t('admin.title'), :sortable => :name do |ggn| - link_to ggn.name, [:admin, ggn] - end - column I18n.t('admin.desc'), :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - - actions - end - - - #show organisation type details - show do - attributes_table do - row :name - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row :created_at - row :updated_at - end - end - - #organisations sidebar - sidebar I18n.t('admin.orgs'), :only => :show, :if => proc { organisation_type.organisations.count >= 1} do - table_for organisation_type.organisations.order("name") do |org_list| - column I18n.t('admin.org_title'), :sortable => :name do |ggn| - link_to ggn.name, [:admin, ggn] - end - end - end - - controller do - def permitted_params - params.permit! - end - end - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register OrganisationType do + permit_params :organisation_id, :name + + menu :priority => 4, :label => proc{I18n.t('admin.org_type')}, :parent => "Organisations management" + + index do + column I18n.t('admin.title'), :sortable => :name do |ggn| + link_to ggn.name, [:admin, ggn] + end + column I18n.t('admin.desc'), :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + + actions + end + + + #show organisation type details + show do + attributes_table do + row :name + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row :created_at + row :updated_at + end + end + + #organisations sidebar + sidebar I18n.t('admin.orgs'), :only => :show, :if => proc { organisation_type.organisations.count >= 1} do + table_for organisation_type.organisations.order("name") do |org_list| + column I18n.t('admin.org_title'), :sortable => :name do |ggn| + link_to ggn.name, [:admin, ggn] + end + end + end + + controller do + def permitted_params + params.permit! + end + end + +end diff --git a/app/admin/phase.rb b/app/admin/phase.rb index 59ec07a..d7d061e 100644 --- a/app/admin/phase.rb +++ b/app/admin/phase.rb @@ -1,83 +1,83 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Phase do - permit_params :description, :number, :title, :dmptemplate_id - - menu :priority => 10, :label => proc{I18n.t('admin.phase')}, :parent => "Templates management" - - index do - column :title, :sortable => :title do |ph| - if !ph.title.nil? then - link_to ph.title, [:admin, ph] - end - end - column :number - column I18n.t('admin.template'), :sortable => :dmptemplate_id do |temp_title| - if !temp_title.nil? then - if !temp_title.dmptemplate.nil? then - link_to temp_title.dmptemplate.title, [:admin, temp_title.dmptemplate] - else - "-" - end - end - end - - actions - end - - #show details of a phase - show do - attributes_table do - row :title - row :number - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row I18n.t('admin.template'), :sortable => :dmptemplate_id do |temp_title| - link_to temp_title.dmptemplate.title, [:admin, temp_title.dmptemplate] - end - row :created_at - row :updated_at - end - - end - - #versions sidebar - sidebar I18n.t('admin.version'), :only => :show, :if => proc { phase.versions.count >= 1} do - table_for phase.versions.order("number asc") do |temp_phases| - column :number - column :title do |row| - link_to row.title, [:admin, row] - end - column :published - end - end - - - #form - form do |f| - f.inputs "Details" do - f.input :title - f.input :number - f.input :description - f.input :dmptemplate_id, :label => I18n.t('admin.template'), - :as => :select, - :collection => Dmptemplate.order('title').map{|temp|[temp.title, temp.id]} - - end - f.actions - end - - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Phase do + permit_params :description, :number, :title, :dmptemplate_id + + menu :priority => 10, :label => proc{I18n.t('admin.phase')}, :parent => "Templates management" + + index do + column :title, :sortable => :title do |ph| + if !ph.title.nil? then + link_to ph.title, [:admin, ph] + end + end + column :number + column I18n.t('admin.template'), :sortable => :dmptemplate_id do |temp_title| + if !temp_title.nil? then + if !temp_title.dmptemplate.nil? then + link_to temp_title.dmptemplate.title, [:admin, temp_title.dmptemplate] + else + "-" + end + end + end + + actions + end + + #show details of a phase + show do + attributes_table do + row :title + row :number + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row I18n.t('admin.template'), :sortable => :dmptemplate_id do |temp_title| + link_to temp_title.dmptemplate.title, [:admin, temp_title.dmptemplate] + end + row :created_at + row :updated_at + end + + end + + #versions sidebar + sidebar I18n.t('admin.version'), :only => :show, :if => proc { phase.versions.count >= 1} do + table_for phase.versions.order("number asc") do |temp_phases| + column :number + column :title do |row| + link_to row.title, [:admin, row] + end + column :published + end + end + + + #form + form do |f| + f.inputs "Details" do + f.input :title + f.input :number + f.input :description + f.input :dmptemplate_id, :label => I18n.t('admin.template'), + :as => :select, + :collection => Dmptemplate.order('title').map{|temp|[temp.title, temp.id]} + + end + f.actions + end + + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/project.rb b/app/admin/project.rb index 816911d..2028428 100644 --- a/app/admin/project.rb +++ b/app/admin/project.rb @@ -1,39 +1,39 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Project do - permit_params :dmptemplate_id, :title, :organisation_id, :unit_id, :guidance_group_ids, :project_group_ids, :funder_id, :institution_id, :grant_number,:identifier, :description, :principal_investigator, :principal_investigator_identifier, :data_contact - - menu :priority => 25, :label => proc{I18n.t('admin.plans')} - - - index do - column :title - column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| - if !org_title.organisation.nil? then - link_to org_title.organisation.name, [:admin, org_title.organisation] - else - '-' - end - end - column I18n.t('admin.template_title'), :sortable => :dmptemplate_id do |dmptemp| - if !dmptemp.dmptemplate.nil? then - link_to dmptemp.dmptemplate.title, [:admin, dmptemp.dmptemplate] - else - '-' - end - end - - actions - end - - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Project do + permit_params :dmptemplate_id, :title, :organisation_id, :unit_id, :guidance_group_ids, :project_group_ids, :funder_id, :institution_id, :grant_number,:identifier, :description, :principal_investigator, :principal_investigator_identifier, :data_contact + + menu :priority => 25, :label => proc{I18n.t('admin.plans')} + + + index do + column :title + column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| + if !org_title.organisation.nil? then + link_to org_title.organisation.name, [:admin, org_title.organisation] + else + '-' + end + end + column I18n.t('admin.template_title'), :sortable => :dmptemplate_id do |dmptemp| + if !dmptemp.dmptemplate.nil? then + link_to dmptemp.dmptemplate.title, [:admin, dmptemp.dmptemplate] + else + '-' + end + end + + actions + end + + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/project_group.rb b/app/admin/project_group.rb index 62f63d0..67c681c 100644 --- a/app/admin/project_group.rb +++ b/app/admin/project_group.rb @@ -1,9 +1,9 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register ProjectGroup do - menu false -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register ProjectGroup do + menu false +end diff --git a/app/admin/question.rb b/app/admin/question.rb index f15df75..8d46df1 100644 --- a/app/admin/question.rb +++ b/app/admin/question.rb @@ -1,131 +1,131 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Question do - permit_params :default_value, :dependency_id, :dependency_text, :guidance, :number, :parent_id, :suggested_answer, :text, :question_type, :section_id - - menu :priority => 7, :label => proc{I18n.t('admin.question')}, :parent => "Templates management" - - index do - column I18n.t('admin.question'), :sortable => :text do |descr| - if !descr.text.nil? then - descr.text.html_safe - end - end - column I18n.t('admin.section_title'), :sortable => :section_id do |dmptemplate| - if !dmptemplate.section_id.nil? then - link_to dmptemplate.section.title, [:admin, dmptemplate.section] - end - end - column :number, :sortable => :number do |question_n| - if !question_n.number.nil? then - question_n.number - end - end - column I18n.t('admin.template_title'), :sortable => true do |dmptemplate| - if !dmptemplate.section_id.nil? then - if !dmptemplate.section.version.phase.dmptemplate.nil? then - link_to dmptemplate.section.version.phase.dmptemplate.title, [:admin, dmptemplate.section.version.phase.dmptemplate] - else - "-" - end - end - end - actions - end - - - #show details of a question - show do - attributes_table do - row :text do |descr| - if !descr.text.nil? then - descr.text.html_safe - end - end - row :section_id do |question| - link_to question.section.title, [:admin, question.section] - end - row :number - row :default_value - row I18n.t('admin.question_format') do |format| - link_to format.question_format.title, [:admin, format.question_format] - end - #row :guidance do |qguidance| - # if !qguidance.guidance.nil? then - # qguidance.guidance.html_safe - # end - #end - #row :parent_id do |qparent| - # if !qparent.parent_id.nil? then - # parent_q = Question.where('id = ?', qparent.parent_id) - # link_to parent_q.text, [:admin, parent_q] - # end - #end - #row :dependency_id do |qdepend| - # if !qdepend.dependency_id.nil? then - # qdep = Question.where('id = ?', qparent.dependency_id) - # link_to qdep.text, [:admin, qdep] - # end - #end - #row :dependency_text do |dep_text| - # if !dep_text.dependency_text.nil? then - # dep_text.dependency_text.html_safe - # end - #end - row I18n.t('admin.themes') do - (question.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe - end - row :created_at - row :updated_at - - end - end - - - #form - form do |f| - f.inputs "Details" do - f.input :text - f.input :number - f.input :section, - :as => :select, - :collection => Section.order('title').map{ |sec| ["#{sec.version.phase.dmptemplate.title} - #{sec.title}", sec.id] } - f.input :default_value - # f.input :guidance - # f.input :parent_id, :label => "Parent", - # :as => :select, - # :collection => Question.find(:all, :order => 'text ASC').map{|que|[que.text, que.id]} - #f.input :dependency_id, :label => "Dependency question", - # :as => :select, - # :collection => Question.find(:all, :order => 'text ASC').map{|que|[que.text, que.id]} - # f.input :dependency_text - - end - f.inputs "Question Format" do - f.input :question_format_id, :label => I18n.t('admin.select_question_format'), - :as => :select, - :collection => QuestionFormat.order('title').map{|format| [format.title, format.id]} - end - f.inputs "Themes" do - f.input :theme_ids, :label => I18n.t('admin.selected_themes'), - :as => :select, - :multiple => true, - :include_blank => I18n.t('helpers.none'), - :collection => Theme.order('title').map{|the| [the.title, the.id]} , - :hint => I18n.t('admin.choose_themes') - - end - f.actions - end - - controller do - def permitted_params - params.permit! - end - end - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Question do + permit_params :default_value, :dependency_id, :dependency_text, :guidance, :number, :parent_id, :suggested_answer, :text, :question_type, :section_id + + menu :priority => 7, :label => proc{I18n.t('admin.question')}, :parent => "Templates management" + + index do + column I18n.t('admin.question'), :sortable => :text do |descr| + if !descr.text.nil? then + descr.text.html_safe + end + end + column I18n.t('admin.section_title'), :sortable => :section_id do |dmptemplate| + if !dmptemplate.section_id.nil? then + link_to dmptemplate.section.title, [:admin, dmptemplate.section] + end + end + column :number, :sortable => :number do |question_n| + if !question_n.number.nil? then + question_n.number + end + end + column I18n.t('admin.template_title'), :sortable => true do |dmptemplate| + if !dmptemplate.section_id.nil? then + if !dmptemplate.section.version.phase.dmptemplate.nil? then + link_to dmptemplate.section.version.phase.dmptemplate.title, [:admin, dmptemplate.section.version.phase.dmptemplate] + else + "-" + end + end + end + actions + end + + + #show details of a question + show do + attributes_table do + row :text do |descr| + if !descr.text.nil? then + descr.text.html_safe + end + end + row :section_id do |question| + link_to question.section.title, [:admin, question.section] + end + row :number + row :default_value + row I18n.t('admin.question_format') do |format| + link_to format.question_format.title, [:admin, format.question_format] + end + #row :guidance do |qguidance| + # if !qguidance.guidance.nil? then + # qguidance.guidance.html_safe + # end + #end + #row :parent_id do |qparent| + # if !qparent.parent_id.nil? then + # parent_q = Question.where('id = ?', qparent.parent_id) + # link_to parent_q.text, [:admin, parent_q] + # end + #end + #row :dependency_id do |qdepend| + # if !qdepend.dependency_id.nil? then + # qdep = Question.where('id = ?', qparent.dependency_id) + # link_to qdep.text, [:admin, qdep] + # end + #end + #row :dependency_text do |dep_text| + # if !dep_text.dependency_text.nil? then + # dep_text.dependency_text.html_safe + # end + #end + row I18n.t('admin.themes') do + (question.themes.map{|t_q| link_to t_q.title, [:admin, t_q]}).join(', ').html_safe + end + row :created_at + row :updated_at + + end + end + + + #form + form do |f| + f.inputs "Details" do + f.input :text + f.input :number + f.input :section, + :as => :select, + :collection => Section.order('title').map{ |sec| ["#{sec.version.phase.dmptemplate.title} - #{sec.title}", sec.id] } + f.input :default_value + # f.input :guidance + # f.input :parent_id, :label => "Parent", + # :as => :select, + # :collection => Question.find(:all, :order => 'text ASC').map{|que|[que.text, que.id]} + #f.input :dependency_id, :label => "Dependency question", + # :as => :select, + # :collection => Question.find(:all, :order => 'text ASC').map{|que|[que.text, que.id]} + # f.input :dependency_text + + end + f.inputs "Question Format" do + f.input :question_format_id, :label => I18n.t('admin.select_question_format'), + :as => :select, + :collection => QuestionFormat.order('title').map{|format| [format.title, format.id]} + end + f.inputs "Themes" do + f.input :theme_ids, :label => I18n.t('admin.selected_themes'), + :as => :select, + :multiple => true, + :include_blank => I18n.t('helpers.none'), + :collection => Theme.order('title').map{|the| [the.title, the.id]} , + :hint => I18n.t('admin.choose_themes') + + end + f.actions + end + + controller do + def permitted_params + params.permit! + end + end + +end diff --git a/app/admin/question_format.rb b/app/admin/question_format.rb index b73592c..a5b9523 100644 --- a/app/admin/question_format.rb +++ b/app/admin/question_format.rb @@ -1,39 +1,39 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register QuestionFormat do - permit_params :description, :title - - menu :priority => 5, :label => proc{I18n.t('admin.question_format')}, :parent => "Templates management" - - index do - column I18n.t('admin.question_format'), :sortable => :title do |n| - link_to n.title, [:admin, n] - end - - actions - end - - # show Template details - show do - attributes_table do - row :title - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row :created_at - row :updated_at - end - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register QuestionFormat do + permit_params :description, :title + + menu :priority => 5, :label => proc{I18n.t('admin.question_format')}, :parent => "Templates management" + + index do + column I18n.t('admin.question_format'), :sortable => :title do |n| + link_to n.title, [:admin, n] + end + + actions + end + + # show Template details + show do + attributes_table do + row :title + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row :created_at + row :updated_at + end + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/role.rb b/app/admin/role.rb index 076a3d7..dc386de 100644 --- a/app/admin/role.rb +++ b/app/admin/role.rb @@ -1,62 +1,62 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Role do - permit_params :name, :role_in_plans - - menu :priority => 5, :label => proc{I18n.t('admin.role')}, :parent => "User management" - - index do - column I18n.t('admin.title'), :sortable => :name do |role_name| - link_to role_name.name, [:admin, role_name] - end - - actions - end - - - show do - attributes_table do - row :name - row :role_in_plans - row :created_at - row :updated_at - end - - table_for( (Role.find(params[:id]).users)) do - column (:email){|user| link_to user.email, [:admin, user]} - column (:firstname){|user| user.firstname} - column (:surname){|user| user.surname} - column (:last_sign_in_at){|user| user.last_sign_in_at} - column (I18n.t('admin.org_title')){|user| - if !user.organisation.nil? then - if user.other_organisation.nil? || user.other_organisation == "" then - link_to user.organisation.name, [:admin, user.organisation] - else - I18n.t('helpers.org_type.org_name') + ' - ' + user.other_organisation - - end - end - } - end - - end - - form do |f| - f.inputs "Details" do - f.input :name - f.input :role_in_plans - end - - f.actions - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Role do + permit_params :name, :role_in_plans + + menu :priority => 5, :label => proc{I18n.t('admin.role')}, :parent => "User management" + + index do + column I18n.t('admin.title'), :sortable => :name do |role_name| + link_to role_name.name, [:admin, role_name] + end + + actions + end + + + show do + attributes_table do + row :name + row :role_in_plans + row :created_at + row :updated_at + end + + table_for( (Role.find(params[:id]).users)) do + column (:email){|user| link_to user.email, [:admin, user]} + column (:firstname){|user| user.firstname} + column (:surname){|user| user.surname} + column (:last_sign_in_at){|user| user.last_sign_in_at} + column (I18n.t('admin.org_title')){|user| + if !user.organisation.nil? then + if user.other_organisation.nil? || user.other_organisation == "" then + link_to user.organisation.name, [:admin, user.organisation] + else + I18n.t('helpers.org_type.org_name') + ' - ' + user.other_organisation + + end + end + } + end + + end + + form do |f| + f.inputs "Details" do + f.input :name + f.input :role_in_plans + end + + f.actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/section.rb b/app/admin/section.rb index 5cff27b..c8ceab8 100644 --- a/app/admin/section.rb +++ b/app/admin/section.rb @@ -1,93 +1,93 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Section do - permit_params :organisation_id, :description, :number, :title, :version_id - - menu :priority => 8, :label => proc{I18n.t('admin.section')}, :parent => "Templates management" - - filter :title - filter :organisation - filter :version - filter :created_at - filter :updated_at - - - index do - column :title , :sortable => :title do |section| - if !section.title.nil? then - link_to section.title, [:admin, section] - end - end - column I18n.t('admin.version'), :sortable => :version_id do |version_title| - if !version_title.version_id.nil? then - link_to version_title.version.title, [:admin, version_title.version] - end - end - column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| - if !org_title.organisation_id.nil? then - link_to org_title.organisation.name, [:admin, org_title.organisation] - end - end - - actions - end - - #show details of a section - show do - attributes_table do - row :title - row :number - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row I18n.t('admin.version'), :sortable => :version_id do |version_title| - if !version_title.version_id.nil? then - link_to version_title.version.title, [:admin, version_title.version] - end - end - row I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| - if !org_title.organisation_id.nil? then - link_to org_title.organisation.name, [:admin, org_title.organisation] - end - end - row :created_at - row :updated_at - end - - end - - - #questions sidebar(:default_value, :dependency_id, :dependency_text, :guidance, :number, :parent_id, :suggested_answer, :text, :question_type, :section_id) - sidebar proc{I18n.t("admin.questions")}, :only => :show, :if => proc { (Question.where("section_id = ?", params[:id])).count >= 1} do - table_for( Question.where("section_id = ?", params[:id] ).order("number")) do - column (:number){|question| question.number} - column (I18n.t("admin.question")){|question| link_to question.text, [:admin, question]} - end - - end - - #form - form do |f| - f.inputs "Details" do - f.input :title - f.input :number - f.input :version, :collection => Version.all.map{ |ver| [ver.title, ver.id] } - f.input :organisation, :as => :select, :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} - f.input :description - end - - f.actions - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Section do + permit_params :organisation_id, :description, :number, :title, :version_id + + menu :priority => 8, :label => proc{I18n.t('admin.section')}, :parent => "Templates management" + + filter :title + filter :organisation + filter :version + filter :created_at + filter :updated_at + + + index do + column :title , :sortable => :title do |section| + if !section.title.nil? then + link_to section.title, [:admin, section] + end + end + column I18n.t('admin.version'), :sortable => :version_id do |version_title| + if !version_title.version_id.nil? then + link_to version_title.version.title, [:admin, version_title.version] + end + end + column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| + if !org_title.organisation_id.nil? then + link_to org_title.organisation.name, [:admin, org_title.organisation] + end + end + + actions + end + + #show details of a section + show do + attributes_table do + row :title + row :number + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row I18n.t('admin.version'), :sortable => :version_id do |version_title| + if !version_title.version_id.nil? then + link_to version_title.version.title, [:admin, version_title.version] + end + end + row I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| + if !org_title.organisation_id.nil? then + link_to org_title.organisation.name, [:admin, org_title.organisation] + end + end + row :created_at + row :updated_at + end + + end + + + #questions sidebar(:default_value, :dependency_id, :dependency_text, :guidance, :number, :parent_id, :suggested_answer, :text, :question_type, :section_id) + sidebar proc{I18n.t("admin.questions")}, :only => :show, :if => proc { (Question.where("section_id = ?", params[:id])).count >= 1} do + table_for( Question.where("section_id = ?", params[:id] ).order("number")) do + column (:number){|question| question.number} + column (I18n.t("admin.question")){|question| link_to question.text, [:admin, question]} + end + + end + + #form + form do |f| + f.inputs "Details" do + f.input :title + f.input :number + f.input :version, :collection => Version.all.map{ |ver| [ver.title, ver.id] } + f.input :organisation, :as => :select, :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} + f.input :description + end + + f.actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/suggested_answer.rb b/app/admin/suggested_answer.rb index 93421cc..ab957eb 100644 --- a/app/admin/suggested_answer.rb +++ b/app/admin/suggested_answer.rb @@ -1,33 +1,33 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register SuggestedAnswer do - permit_params :question_id, :organisation_id - - menu :priority => 4, :label => proc{I18n.t('admin.sug_answer')}, :parent => "Templates management" - - - #form - form do |f| - f.inputs "Details" do - f.input :question_id, :label => I18n.t('admin.question'), - :as => :select, - :collection => Question.order('text').map{|ques|[ques.text, ques.id]} - f.input :organisation_id, :label => I18n.t('admin.org_title'), - :as => :select, - :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} - f.input :text - f.input :is_example - end - f.actions - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register SuggestedAnswer do + permit_params :question_id, :organisation_id + + menu :priority => 4, :label => proc{I18n.t('admin.sug_answer')}, :parent => "Templates management" + + + #form + form do |f| + f.inputs "Details" do + f.input :question_id, :label => I18n.t('admin.question'), + :as => :select, + :collection => Question.order('text').map{|ques|[ques.text, ques.id]} + f.input :organisation_id, :label => I18n.t('admin.org_title'), + :as => :select, + :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} + f.input :text + f.input :is_example + end + f.actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/theme.rb b/app/admin/theme.rb index 0b1ea5b..913f32e 100644 --- a/app/admin/theme.rb +++ b/app/admin/theme.rb @@ -1,77 +1,77 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Theme do - permit_params :description, :title, :locale - - menu :priority => 12, :label => "Themes" - - index do - column :title , :sortable => :title do |theme| - link_to theme.title, [:admin, theme] - end - column :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - - actions - end - - #show details of a theme - show do - attributes_table do - row :title - row :description - row :created_at - row :updated_at - end - - table_for( (Theme.find(params[:id]).questions).order('number')) do - column (:number){|question| question.number} - column (I18n.t("admin.question")){|question| link_to question.text, [:admin, question]} - column (I18n.t("admin.template")){|question| - if !question.section.nil? then - if !question.section.version.nil? then - if !question.section.version.phase.nil? then - if !question.section.version.phase.dmptemplate.nil? then - link_to question.section.version.phase.dmptemplate.title, [:admin, question.section.version.phase.dmptemplate] - else - I18n.t('admin.no_template') - end - else - I18n.t('admin.no_phase') - end - else - I18n.t('admin.no_version') - end - else - I18n.t('admin.no_section') - end - } - end - end - - - - #form - form do |f| - f.inputs "Details" do - f.input :title - f.input :description - end - f.actions - end - - - controller do - def permitted_params - params.permit! - end - end - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Theme do + permit_params :description, :title, :locale + + menu :priority => 12, :label => "Themes" + + index do + column :title , :sortable => :title do |theme| + link_to theme.title, [:admin, theme] + end + column :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + + actions + end + + #show details of a theme + show do + attributes_table do + row :title + row :description + row :created_at + row :updated_at + end + + table_for( (Theme.find(params[:id]).questions).order('number')) do + column (:number){|question| question.number} + column (I18n.t("admin.question")){|question| link_to question.text, [:admin, question]} + column (I18n.t("admin.template")){|question| + if !question.section.nil? then + if !question.section.version.nil? then + if !question.section.version.phase.nil? then + if !question.section.version.phase.dmptemplate.nil? then + link_to question.section.version.phase.dmptemplate.title, [:admin, question.section.version.phase.dmptemplate] + else + I18n.t('admin.no_template') + end + else + I18n.t('admin.no_phase') + end + else + I18n.t('admin.no_version') + end + else + I18n.t('admin.no_section') + end + } + end + end + + + + #form + form do |f| + f.inputs "Details" do + f.input :title + f.input :description + end + f.actions + end + + + controller do + def permitted_params + params.permit! + end + end + +end diff --git a/app/admin/user.rb b/app/admin/user.rb index 18aca07..3e80251 100644 --- a/app/admin/user.rb +++ b/app/admin/user.rb @@ -1,127 +1,127 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register User do - permit_params :api_token, :password_confirmation, :encrypted_password, :remember_me, :id, :email, :firstname, :orcid_id, :shibboleth_id, :user_status_id, :surname, :user_type_id, :organisation_id, :skip_invitation, :other_organisation, :accept_terms, :role_ids - - menu :priority => 15, :label => proc{ I18n.t('admin.user')}, :parent => "User management" - - filter :firstname - filter :surname - filter :email - filter :organisations - filter :other_organisation - filter :created_at - filter :updated_at - - - - index do - - column I18n.t('admin.user_name'), :sortable => :email do |user_email| - link_to user_email.email, [:admin, user_email] - end - column I18n.t('admin.firstname'), :sortable => :firstname do |use_first| - link_to use_first.firstname, [:admin, use_first] - end - column I18n.t('admin.surname'), :sortable => :surname do |user| - link_to user.surname, [:admin, user] - end - column I18n.t('admin.last_logged_in'), :last_sign_in_at - column I18n.t('admin.org_title'), :sortable => 'organisations.name' do |org_title| - if !org_title.organisation.nil? then - if org_title.other_organisation.nil? || org_title.other_organisation == "" then - link_to org_title.organisation.name, [:admin, org_title.organisation] - else - I18n.t('helpers.org_type.org_name') + ' - ' + org_title.other_organisation - - end - end - end - - actions - end - - show do - attributes_table do - row :firstname - row :surname - row :email - row :orcid_id - row I18n.t('admin.org_title'), :organisation_id do |org_title| - if !org_title.organisation_id.nil? then - link_to org_title.organisation.name, [:admin, org_title.organisation] - end - end - row :other_organisation - # row I18n.t('admin.user_status'), :user_status_id do |us| - # if !us.user_status.nil? then - # link_to us.user_status.name, [:admin, us.user_status] - # end - # end - # row I18n.t('admin.user_type'), :user_type_id do |ut| - # if !ut.user_type.nil? then - # link_to ut.user_type.name, [:admin, ut.user_type] - # else - # '-' - # end - # end - row I18n.t('admin.user_role') do - (user.roles.map{|ro| link_to ro.name, [:admin, ro]}).join(', ').html_safe - end - # row :shibboleth_id - row :last_sign_in_at - row :sign_in_count - row :api_token - - end - end - - - form do |f| - f.inputs "Details" do - f.input :firstname - f.input :surname - f.input :email - f.input :orcid_id - f.input :api_token - # f.input :shibboleth_id - f.input :organisation_id ,:label => I18n.t('admin.org_title'), - :as => :select, - :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} - f.input :other_organisation - # f.input :user_status_id, :label => I18n.t('admin.user_status'), - # :as => :select, - # :collection => UserStatus.find(:all, :order => 'name ASC').map{|us|[us.name, us.id]} - # f.input :user_type_id, :label => I18n.t('admin.user_type'), - # :as => :select, - # :collection => UserType.find(:all, :order => 'name ASC').map{|ut|[ut.name, ut.id]} - f.input :role_ids, :label => I18n.t('admin.user_role'), - :as => :select, - :multiple => true, - :include_blank => I18n.t('helpers.none'), - :collection => Role.order('name').map{|ro| [ro.name, ro.id]} - - f.input :api_token - end - - f.actions - end - - - - controller do - def scoped_collection - resource_class.includes(:organisations) # prevents N+1 queries to your database - end - - def permitted_params - params.permit! - end - - end - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register User do + permit_params :api_token, :password_confirmation, :encrypted_password, :remember_me, :id, :email, :firstname, :orcid_id, :shibboleth_id, :user_status_id, :surname, :user_type_id, :organisation_id, :skip_invitation, :other_organisation, :accept_terms, :role_ids + + menu :priority => 15, :label => proc{ I18n.t('admin.user')}, :parent => "User management" + + filter :firstname + filter :surname + filter :email + filter :organisations + filter :other_organisation + filter :created_at + filter :updated_at + + + + index do + + column I18n.t('admin.user_name'), :sortable => :email do |user_email| + link_to user_email.email, [:admin, user_email] + end + column I18n.t('admin.firstname'), :sortable => :firstname do |use_first| + link_to use_first.firstname, [:admin, use_first] + end + column I18n.t('admin.surname'), :sortable => :surname do |user| + link_to user.surname, [:admin, user] + end + column I18n.t('admin.last_logged_in'), :last_sign_in_at + column I18n.t('admin.org_title'), :sortable => 'organisations.name' do |org_title| + if !org_title.organisation.nil? then + if org_title.other_organisation.nil? || org_title.other_organisation == "" then + link_to org_title.organisation.name, [:admin, org_title.organisation] + else + I18n.t('helpers.org_type.org_name') + ' - ' + org_title.other_organisation + + end + end + end + + actions + end + + show do + attributes_table do + row :firstname + row :surname + row :email + row :orcid_id + row I18n.t('admin.org_title'), :organisation_id do |org_title| + if !org_title.organisation_id.nil? then + link_to org_title.organisation.name, [:admin, org_title.organisation] + end + end + row :other_organisation + # row I18n.t('admin.user_status'), :user_status_id do |us| + # if !us.user_status.nil? then + # link_to us.user_status.name, [:admin, us.user_status] + # end + # end + # row I18n.t('admin.user_type'), :user_type_id do |ut| + # if !ut.user_type.nil? then + # link_to ut.user_type.name, [:admin, ut.user_type] + # else + # '-' + # end + # end + row I18n.t('admin.user_role') do + (user.roles.map{|ro| link_to ro.name, [:admin, ro]}).join(', ').html_safe + end + # row :shibboleth_id + row :last_sign_in_at + row :sign_in_count + row :api_token + + end + end + + + form do |f| + f.inputs "Details" do + f.input :firstname + f.input :surname + f.input :email + f.input :orcid_id + f.input :api_token + # f.input :shibboleth_id + f.input :organisation_id ,:label => I18n.t('admin.org_title'), + :as => :select, + :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} + f.input :other_organisation + # f.input :user_status_id, :label => I18n.t('admin.user_status'), + # :as => :select, + # :collection => UserStatus.find(:all, :order => 'name ASC').map{|us|[us.name, us.id]} + # f.input :user_type_id, :label => I18n.t('admin.user_type'), + # :as => :select, + # :collection => UserType.find(:all, :order => 'name ASC').map{|ut|[ut.name, ut.id]} + f.input :role_ids, :label => I18n.t('admin.user_role'), + :as => :select, + :multiple => true, + :include_blank => I18n.t('helpers.none'), + :collection => Role.order('name').map{|ro| [ro.name, ro.id]} + + f.input :api_token + end + + f.actions + end + + + + controller do + def scoped_collection + resource_class.includes(:organisations) # prevents N+1 queries to your database + end + + def permitted_params + params.permit! + end + + end + +end diff --git a/app/admin/user_org_role.rb b/app/admin/user_org_role.rb index f6830d1..e5d9793 100644 --- a/app/admin/user_org_role.rb +++ b/app/admin/user_org_role.rb @@ -1,54 +1,54 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register UserOrgRole do - permit_params :user_id, :organisation_id, :user_role_type_id - - menu false - #:priority => 5, :label => proc{I18n.t('admin.user_org_role')}, :parent => "User management" - - index do - column I18n.t('admin.user'), :sortable => :user_id do |user_n| - if !user_n.user.nil? then - link_to user_n.user.firstname, [:admin, user_n.user] - end - end - column I18n.t('admin.org'), :sortable => :organisation_id do |org| - if !org.organisation.nil? then - link_to org.organisation.name, [:admin, org.organisation] - end - end - column I18n.t('admin.user_role_type'), :sortable => :user_role_type_id do |role| - if !role.user_role_type.nil? then - link_to role.user_role_type.name, [:admin, role.user_role_type] - end - end - - actions - end - - show do - attributes_table do - row I18n.t('admin.user'), :user_id do |user_n| - link_to user_n.user.firstname, [:admin, user_n.user] - end - row I18n.t('admin.org'), :organisation_id do |org| - link_to org.organisation.name, [:admin, org.organisation] - end - row I18n.t('admin.user_role_type'), :user_role_type_id do |role| - link_to role.user_role_type.name, [:admin, role.user_role_type] - end - row :created_at - row :updated_at - end - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register UserOrgRole do + permit_params :user_id, :organisation_id, :user_role_type_id + + menu false + #:priority => 5, :label => proc{I18n.t('admin.user_org_role')}, :parent => "User management" + + index do + column I18n.t('admin.user'), :sortable => :user_id do |user_n| + if !user_n.user.nil? then + link_to user_n.user.firstname, [:admin, user_n.user] + end + end + column I18n.t('admin.org'), :sortable => :organisation_id do |org| + if !org.organisation.nil? then + link_to org.organisation.name, [:admin, org.organisation] + end + end + column I18n.t('admin.user_role_type'), :sortable => :user_role_type_id do |role| + if !role.user_role_type.nil? then + link_to role.user_role_type.name, [:admin, role.user_role_type] + end + end + + actions + end + + show do + attributes_table do + row I18n.t('admin.user'), :user_id do |user_n| + link_to user_n.user.firstname, [:admin, user_n.user] + end + row I18n.t('admin.org'), :organisation_id do |org| + link_to org.organisation.name, [:admin, org.organisation] + end + row I18n.t('admin.user_role_type'), :user_role_type_id do |role| + link_to role.user_role_type.name, [:admin, role.user_role_type] + end + row :created_at + row :updated_at + end + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/user_role_type.rb b/app/admin/user_role_type.rb index 9bf0e53..c5ce15d 100644 --- a/app/admin/user_role_type.rb +++ b/app/admin/user_role_type.rb @@ -1,30 +1,31 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register UserRoleType do - permit_params :description, :name - menu false - #:priority => 5, :label => proc{I18n.t('admin.user_role_type')}, :parent => "User management" - - index do - column I18n.t('admin.title'), :sortable => :name do |user_n| - link_to user_n.name, [:admin, user_n] - end - column I18n.t('admin.desc'),:description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - - actions - end - - controller do - def permitted_params - params.permit! - end - end -end + +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register UserRoleType do + permit_params :description, :name + menu false + #:priority => 5, :label => proc{I18n.t('admin.user_role_type')}, :parent => "User management" + + index do + column I18n.t('admin.title'), :sortable => :name do |user_n| + link_to user_n.name, [:admin, user_n] + end + column I18n.t('admin.desc'),:description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + + actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/user_status.rb b/app/admin/user_status.rb index d50bf3e..3c0977a 100644 --- a/app/admin/user_status.rb +++ b/app/admin/user_status.rb @@ -1,31 +1,32 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register UserStatus do - permit_params :description, :name - - menu false - #:priority => 5, :label => proc{I18n.t('admin.user_status')}, :parent => "User management" - - index do - column I18n.t('admin.title'), :sortable => :name do |user_n| - link_to user_n.name, [:admin, user_n] - end - column I18n.t('admin.desc'),:description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - - actions - end - - controller do - def permitted_params - params.permit! - end - end -end + +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register UserStatus do + permit_params :description, :name + + menu false + #:priority => 5, :label => proc{I18n.t('admin.user_status')}, :parent => "User management" + + index do + column I18n.t('admin.title'), :sortable => :name do |user_n| + link_to user_n.name, [:admin, user_n] + end + column I18n.t('admin.desc'),:description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + + actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/admin/user_type.rb b/app/admin/user_type.rb index df26a74..7836401 100644 --- a/app/admin/user_type.rb +++ b/app/admin/user_type.rb @@ -1,42 +1,42 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register UserType do - permit_params :description, :name - - menu false - #:priority => 5, :label => proc{I18n.t('admin.user_type')}, :parent => "User management" - - index do - column I18n.t('admin.user_type'), :sortable => :name do |user_n| - link_to user_n.name, [:admin, user_n] - end - - actions - end - - # show Template details - show do - attributes_table do - row :name - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row :created_at - row :updated_at - end - end - - controller do - def permitted_params - params.permit! - end - end - - -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register UserType do + permit_params :description, :name + + menu false + #:priority => 5, :label => proc{I18n.t('admin.user_type')}, :parent => "User management" + + index do + column I18n.t('admin.user_type'), :sortable => :name do |user_n| + link_to user_n.name, [:admin, user_n] + end + + actions + end + + # show Template details + show do + attributes_table do + row :name + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row :created_at + row :updated_at + end + end + + controller do + def permitted_params + params.permit! + end + end + + +end diff --git a/app/admin/version.rb b/app/admin/version.rb index 1df7893..7dbed51 100644 --- a/app/admin/version.rb +++ b/app/admin/version.rb @@ -1,86 +1,86 @@ -# [+Project:+] DMPonline -# [+Description:+] -# -# [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre - -ActiveAdmin.register Version do - permit_params :description, :number, :published, :title, :phase_id - - menu :priority => 9, :label => proc{I18n.t('admin.version')}, :parent => "Templates management" - - index do - column I18n.t('admin.title'), :sortable => :title do |version_used| - if !version_used.title.nil? then - link_to version_used.title, [:admin, version_used] - end - end - column I18n.t('admin.version_numb'), :number - column :published - column I18n.t('admin.phase'), :sortable => :phase_id do |phase_title| - if !phase_title.phase_id.nil? then - link_to phase_title.phase.title, [:admin, phase_title.phase] - else - '-' - end - end - - actions - end - - #show details of a version - show do - attributes_table do - row :title - row :number - row :description do |descr| - if !descr.description.nil? then - descr.description.html_safe - end - end - row I18n.t('admin.phase'), :sortable => :phase_id do |phase_title| - if !phase_title.phase_id.nil? then - link_to phase_title.phase.title, [:admin, phase_title.phase] - end - end - row :published - row :created_at - row :updated_at - end - - end - - #sections sidebar (:organisation_id, :description, :number, :title, :version_id) - sidebar I18n.t('admin.sections'), :only => :show, :if => proc { version.sections.count >= 1} do - table_for version.sections.order("number") do |temp_phases| - column :number - column :title do |row| - link_to row.title, [:admin, row] - end - column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| - link_to org_title.organisation.name, [:admin, org_title.organisation] - end - - end - end - - #form - form do |f| - f.inputs "Details" do - f.input :title - f.input :number - f.input :description - f.input :phase, :label => I18n.t('admin.phase_title'), - :as => :select, - :collection => Phase.order('title').map{|ph|[ph.title, ph.id]} - f.input :published - end - f.actions - end - - controller do - def permitted_params - params.permit! - end - end -end +# [+Project:+] DMPRoadmap +# [+Description:+] +# +# [+Created:+] 03/09/2014 +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +ActiveAdmin.register Version do + permit_params :description, :number, :published, :title, :phase_id + + menu :priority => 9, :label => proc{I18n.t('admin.version')}, :parent => "Templates management" + + index do + column I18n.t('admin.title'), :sortable => :title do |version_used| + if !version_used.title.nil? then + link_to version_used.title, [:admin, version_used] + end + end + column I18n.t('admin.version_numb'), :number + column :published + column I18n.t('admin.phase'), :sortable => :phase_id do |phase_title| + if !phase_title.phase_id.nil? then + link_to phase_title.phase.title, [:admin, phase_title.phase] + else + '-' + end + end + + actions + end + + #show details of a version + show do + attributes_table do + row :title + row :number + row :description do |descr| + if !descr.description.nil? then + descr.description.html_safe + end + end + row I18n.t('admin.phase'), :sortable => :phase_id do |phase_title| + if !phase_title.phase_id.nil? then + link_to phase_title.phase.title, [:admin, phase_title.phase] + end + end + row :published + row :created_at + row :updated_at + end + + end + + #sections sidebar (:organisation_id, :description, :number, :title, :version_id) + sidebar I18n.t('admin.sections'), :only => :show, :if => proc { version.sections.count >= 1} do + table_for version.sections.order("number") do |temp_phases| + column :number + column :title do |row| + link_to row.title, [:admin, row] + end + column I18n.t('admin.org_title'), :sortable => :organisation_id do |org_title| + link_to org_title.organisation.name, [:admin, org_title.organisation] + end + + end + end + + #form + form do |f| + f.inputs "Details" do + f.input :title + f.input :number + f.input :description + f.input :phase, :label => I18n.t('admin.phase_title'), + :as => :select, + :collection => Phase.order('title').map{|ph|[ph.title, ph.id]} + f.input :published + end + f.actions + end + + controller do + def permitted_params + params.permit! + end + end +end diff --git a/app/assets/images/logo.jpg b/app/assets/images/logo.jpg index 58be19e..b45a9a3 100644 --- a/app/assets/images/logo.jpg +++ b/app/assets/images/logo.jpg Binary files differ diff --git a/app/assets/images/uc3_logo.jpg b/app/assets/images/uc3_logo.jpg new file mode 100644 index 0000000..46ac993 --- /dev/null +++ b/app/assets/images/uc3_logo.jpg Binary files differ diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js index bf2b1d9..c0aac55 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -1,473 +1,473 @@ -//= require tinymce -/* -**Project: DMPonline v4 -**Description: This file include all javascript regarding admin interface -**Copyright: Digital Curation Centre -*/ - - -$( document ).ready(function() { - - if($('.in').length > 0) { - if ($('.in .current_question').length > 0) { - $(document.body).animate({ - 'scrollTop': $('.in .current_question').offset().top - }, 1000); - } - else { - $(document.body).animate({ - 'scrollTop': $('.in').offset().top - }, 1000); - } - } - - //set the tinymce popover help text - $(".template_desc_popover, .phase_desc_popover, .version_desc_popover, .section_desc_popover, .question_format_popover," + - " .default_answer_popover, .suggested_answer_popover, .question_guidance_popover, .question_themes_popover," + - " .question_options_popover, .guidance_group_title_popover, .guidance_group_template_popover," + - " .guidance_group_subset_popover, .guidance_text_popover, .guidance_apply_to_popover, .guidance_by_themes_popover," + - " .guidance_by_question_popover, .guidance_group_select_popover, .org_abbr_popover").on('click', function(e) { - e.preventDefault(); - }).popover(); - - //show or hide divs based on what the user selects from the question format. New question - $('.ques_format').on("change", function(e) { - var s_id = $(this).prev(".section_id").val(); - - var selected_format = $('#new-select-format-'+ s_id).val(); - - //text area - if (selected_format == 1){ - $("#new-options-"+ s_id).hide(); - $("#new-default-text-field-"+ s_id).hide(); - $("#new-default-text-area-"+ s_id).show(); - $("#new-default-value-field-"+ s_id).show(); - } - //text field - else if (selected_format == 2){ - $("#new-options-"+ s_id).hide(); - $("#new-default-text-field-"+ s_id).show(); - $("#new-default-value-field-"+ s_id).show(); - $("#new-default-text-area-"+ s_id).hide(); - } - //checkbox,radio button, dropdown, multi select - else if (selected_format == 3 ||selected_format == 4 || selected_format == 5 || selected_format == 6){ - $("#new-options-"+ s_id).show(); - $("#new-default-text-field-"+ s_id).hide(); - $("#new-default-text-area-"+ s_id).hide(); - $("#new-default-value-field-"+ s_id).hide(); - } - delete selected_format; - }).trigger('change'); - - - //show or hide divs based on what the user selects from the question format - $('.ques_format').on("change", function(e) { - var q_id = $(this).find('.quest_id').val(); - - var selected_format = $('#'+ q_id +'-select-format').val(); - //text area - if (selected_format == 1){ - $("#options-"+ q_id).hide(); - $("#default-text-field-"+ q_id).hide(); - $("#default-text-area-"+ q_id).show(); - $("#default-value-field-"+ q_id).show(); - } - //text field - else if (selected_format == 2){ - $("#options-"+ q_id).hide(); - $("#default-text-field-"+ q_id).show(); - $("#default-value-field-"+ q_id).show(); - $("#default-text-area-"+ q_id).hide(); - } - //checkbox,radio button, dropdown, multi select - else if (selected_format == 3 ||selected_format == 4 || selected_format == 5 || selected_format == 6){ - $("#options-"+ q_id).show(); - $("#default-text-field-"+ q_id).hide(); - $("#default-text-area-"+ q_id).hide(); - $("#default-value-field-"+ q_id).hide(); - } - delete selected_format; - delete q_id; - }).trigger('change'); - - - //Code to show/hide divs on new guidance (by themes or by question) - $('#g_options').on("change", function (){ - var g_t_q = $(this).val(); - - e_g_q_f = $("#edit_guid_ques_flag").val(); - - if (g_t_q == 1){ - $(".guindace_by_question").hide(); - $(".guindance_by_theme").show(); - } - else if (g_t_q == 2){ - $(".guindace_by_question").show(); - $(".guindance_by_theme").hide(); - //check if editing - if( e_g_q_f != 2){ - $('#phases_select').hide(); - $('#versions_select').hide(); - $('#sections_select').hide(); - $('#questions_select').hide(); - - } - } - - }).trigger('change'); - - - //filter from template to question 5 dropdowns - $('#templates_select').change(function() { - $.ajax({ - type: 'GET', - url: "update_phases", - dataType: 'script', - data: { - dmptemplate_id : $('#templates_select').val() - } - }); - $('#phases_select').show(); - $('#versions_select').hide(); - $('#sections_select').hide(); - $('#questions_select').hide(); - - }); - $('#phases_select').change(function() { - $.ajax({ - type: 'GET', - url: "update_versions", - dataType: 'script', - data: { - phase_id : $('#phases_select').val() - } - }); - $('#phases_select').show(); - $('#versions_select').show(); - $('#sections_select').hide(); - $('#questions_select').hide(); - }); - $('#versions_select').change(function() { - $.ajax({ - type: 'GET', - url: "update_sections", - dataType: 'script', - data: { - version_id : $('#versions_select').val() - } - }); - $('#phases_select').show(); - $('#versions_select').show(); - $('#sections_select').show(); - $('#questions_select').hide(); - }); - $('#sections_select').change(function() { - $.ajax({ - type: 'GET', - url: "update_questions", - dataType: 'script', - data: { - section_id : $('#sections_select').val() - } - }); - $('#phases_select').show(); - $('#versions_select').show(); - $('#sections_select').show(); - $('#questions_select').show(); - }); - - - //action for show or hide template editing display - $('#edit_template_button').click(function(e){ - e.preventDefault(); - - $('#edit_template_div').show(); - $('#show_template_div').hide(); - }); - - - //action for show or hide phase display - $('#edit_phase_button').click(function(e){ - e.preventDefault(); - $('#edit_phase_div').show(); - $('#show_phase_div').hide(); - }); - - //action to hide the alert to edit a version - $("#edit-version-confirmed").click(function (e){ - e.preventDefault(); - $("#version_edit_alert").modal("hide"); - }); - - //action to clone/add a version - $("#clone-version-confirmed").click(function (){ - $("#new_project").submit(); - }); - - //action for show question editing display - $('.edit_question_button').click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#edit_question_div_'+ q_id).show(); - $('#show_question_div_'+ q_id).hide(); - e.preventDefault(); - }); - - - $(".cancel_edit_question").click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#edit_question_div_'+ q_id).hide(); - $('#show_question_div_'+ q_id).show(); - e.preventDefault(); - }); - - //action for adding a new question - $('.add_question_button').click(function(e){ - var s_id = $(this).prev(".section_id").val(); - $('#add_question_block_div_'+ s_id).show(); - $('#add_question_button_div_'+ s_id).hide(); - e.preventDefault(); - - }); - - //if question text area is empty send alert - $('.new_question_save_button').click(function(e){ - var s_id = $(this).prev(".section_id").val(); - if ($('#new_question_text_'+ s_id).val() == ''){ - alert(I18n.t("js.question_text_empty")); - return false; - } - }); - - //action for cancelling a new question - $('.cancel_add_new_question').click(function(e){ - var s_id_new = $(this).prev(".section_id_new").val(); - $('#add_question_block_div_'+ s_id_new).hide(); - $('#add_question_button_div_'+ s_id_new).show(); - e.preventDefault(); - }); - - //action for adding a new section - $('#add_section_button').click(function(e){ - $('#add_section_block_div').show(); - $('#add_section_button_div').hide(); - e.preventDefault(); - }); - - - //action for cancelling a new section - $('#cancel_add_section').click(function(e){ - $('#add_section_block_div').hide(); - $('#add_section_button_div').show(); - e.preventDefault(); - }); - - //SUGGESTED ANSWERS - //action for adding a new suggested answer - $('.add_suggested_answer_button').click(function(e){ - var q_id = $(this).prev(".question_id").val(); - - $('#add_suggested_answer_block_'+ q_id).show(); - $('#add_suggested_answer_button_'+ q_id).hide(); - e.preventDefault(); - }); - - //cancelling edit of a suggested answer - $(".cancel_edit_suggested_answer").click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#edit_suggested_answer_div_'+ q_id).hide(); - $('#show_suggested_answer_div_'+ q_id).show(); - e.preventDefault(); - }); - - //edit a suggested answer - $('.edit_form_for_suggested_answer').click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#edit_suggested_answer_div_'+ q_id).show(); - $('#show_suggested_answer_div_'+ q_id).hide(); - e.preventDefault(); - }); - - //GUIDANCE - //action for adding a new guidance next to the question - $('.add_guidance_button').click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#add_guidance_block_'+ q_id).show(); - $('#add_guidance_button_'+ q_id).hide(); - e.preventDefault(); - }); - - //cancelling edit of guidance next to the question - $(".cancel_guidance_answer").click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#edit_guidance_div_'+ q_id).hide(); - $('#show_guidance_div_'+ q_id).show(); - e.preventDefault(); - }); - - //edit guidance next to the question - $('.edit_form_for_guidance').click(function(e){ - var q_id = $(this).prev(".question_id").val(); - $('#edit_guidance_div_'+ q_id).show(); - $('#show_guidance_div_'+ q_id).hide(); - e.preventDefault(); - }); - - - //Add new guidance Alerts - $("#return_to_new_guidance").click(function(){ - $('#new_guidance_alert_dialog').modal("hide"); - }); - - - $('#new_guidance_submit').click( function(e){ - // $('#new_guidance_alert_dialog').on("hide", function(){ - - var alert_message = []; - //verify if text area is not nil - var editorContent = tinyMCE.get('guidance-text').getContent(); - if (editorContent == ''){ - alert_message.push(I18n.t("js.add_guidance_text")); - } - //verify dropdown with questions has a selected option if guidance for a question being used - if ($('#g_options').val() == '2') { - if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ - alert_message.push(I18n.t("js.select_question")); - } - } - - //verify dropdown with questions has a selected option if guidance for a question being used - if ($('#g_options').val() == '1' ){ - if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ - alert_message.push(I18n.t("js.select_at_least_one_theme")); - } - } - //verify if guidance group is selected - if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { - alert_message.push(I18n.t("js.select_guidance_group")); - } - if(alert_message.length == 0){ - //clear dropdowns before submission - $('#new_guidance_alert_dialog').modal("hide"); - - if ($('#g_options').val() == '2'){ - $('#guidance_theme_ids').val(null); - } - if($('#g_options').val() == '1'){ - $('#questions_select').val(null); - } - $('#new_guidance_form').submit(); - return false; - - } - else if (alert_message.length != 0){ - var message = ''; - $('#new_guidance_alert_dialog').on("show", function(){ - - $("#missing_fields_new_guidance").empty(); - $.each(alert_message, function(key, value){ - message += "
  • "+value+"
  • "; - }); - $("#missing_fields_new_guidance").append(message); - }); - delete message; - } - delete alert_message; - e.preventDefault(); - }); - - //edit guidance alerts - $("#return_to_edit_guidance").click(function(){ - $('#edit_guidance_alert_dialog').modal("hide"); - }); - - - $('#edit_guidance_submit').click( function(e){ - // $('#new_guidance_alert_dialog').on("hide", function(){ - - var alert_message = []; - //verify if text area is not nil - var editorContent = tinyMCE.get('guidance-text').getContent(); - if (editorContent == ''){ - alert_message.push(I18n.t("js.add_guidance_text")); - } - //verify dropdown with questions has a selected option if guidance for a question being used - if ($('#g_options').val() == '2') { - if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ - alert_message.push(I18n.t("js.select_question")); - } - } - //verify dropdown with questions has a selected option if guidance for a question being used - if ($('#g_options').val() == '1' ){ - if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ - alert_message.push(I18n.t("js.select_at_least_one_theme")); - } - } - //verify if guidance group is selected - if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { - alert_message.push(I18n.t("js.select_guidance_group")); - } - - if(alert_message.length == 0){ - //clear dropdowns before submission - $('#edit_guidance_alert_dialog').modal("hide"); - - if ($('#g_options').val() == '2'){ $('#guidance_theme_ids').val(null);} - if($('#g_options').val() == '1'){$('#questions_select').val(null);} - $('#edit_guidance_form').submit(); - return false; - } - else if (alert_message.length != 0){ - var message = ''; - $('#edit_guidance_alert_dialog').on("show", function(){ - - $("#missing_fields_edit_guidance").empty(); - $.each(alert_message, function(key, value){ - message += "
  • "+value+"
  • "; - }); - $("#missing_fields_edit_guidance").append(message); - }); - delete message; - } - delete alert_message; - e.preventDefault(); - }); - - - //Validate banner_text area for less than 165 character - $("form#edit_org_details").submit(function(){ - if (getStats('org_banner_text').chars > 165) { - alert(I18n.t("js.enter_up_to") + " " + getStats('org_banner_text').chars + ". " + I18n.t("js.if_using_url_try")); - return false; - } - }); - - - - - }); - - -//remove option when question format is base on a choice -function remove_object(link){ - $(link).prev("input[type=hidden]").val("1"); - $(link).closest(".options_content").hide(); - -} -function add_object(link, association, content) { - var new_id = new Date().getTime(); - var regexp = new RegExp("new_" + association, "g"); - - if (association == 'options') { - $(link).parent().children('.options_table').children('.options_tbody').children('.new_option_before').before(content.replace(regexp, new_id)); - } -} - -// Returns text statistics for the specified editor by id -function getStats(id) { - var body = tinymce.get(id).getBody(), text = tinymce.trim(body.innerText || body.textContent); - - return { - chars: text.length - }; +//= require tinymce +/* +**Project: DMPRoadmap +**Description: This file include all javascript regarding admin interface +**Copyright: Digital Curation Centre and University of California Curation Center +*/ + + +$( document ).ready(function() { + + if($('.in').length > 0) { + if ($('.in .current_question').length > 0) { + $(document.body).animate({ + 'scrollTop': $('.in .current_question').offset().top + }, 1000); + } + else { + $(document.body).animate({ + 'scrollTop': $('.in').offset().top + }, 1000); + } + } + + //set the tinymce popover help text + $(".template_desc_popover, .phase_desc_popover, .version_desc_popover, .section_desc_popover, .question_format_popover," + + " .default_answer_popover, .suggested_answer_popover, .question_guidance_popover, .question_themes_popover," + + " .question_options_popover, .guidance_group_title_popover, .guidance_group_template_popover," + + " .guidance_group_subset_popover, .guidance_text_popover, .guidance_apply_to_popover, .guidance_by_themes_popover," + + " .guidance_by_question_popover, .guidance_group_select_popover, .org_abbr_popover").on('click', function(e) { + e.preventDefault(); + }).popover(); + + //show or hide divs based on what the user selects from the question format. New question + $('.ques_format').on("change", function(e) { + var s_id = $(this).prev(".section_id").val(); + + var selected_format = $('#new-select-format-'+ s_id).val(); + + //text area + if (selected_format == 1){ + $("#new-options-"+ s_id).hide(); + $("#new-default-text-field-"+ s_id).hide(); + $("#new-default-text-area-"+ s_id).show(); + $("#new-default-value-field-"+ s_id).show(); + } + //text field + else if (selected_format == 2){ + $("#new-options-"+ s_id).hide(); + $("#new-default-text-field-"+ s_id).show(); + $("#new-default-value-field-"+ s_id).show(); + $("#new-default-text-area-"+ s_id).hide(); + } + //checkbox,radio button, dropdown, multi select + else if (selected_format == 3 ||selected_format == 4 || selected_format == 5 || selected_format == 6){ + $("#new-options-"+ s_id).show(); + $("#new-default-text-field-"+ s_id).hide(); + $("#new-default-text-area-"+ s_id).hide(); + $("#new-default-value-field-"+ s_id).hide(); + } + delete selected_format; + }).trigger('change'); + + + //show or hide divs based on what the user selects from the question format + $('.ques_format').on("change", function(e) { + var q_id = $(this).find('.quest_id').val(); + + var selected_format = $('#'+ q_id +'-select-format').val(); + //text area + if (selected_format == 1){ + $("#options-"+ q_id).hide(); + $("#default-text-field-"+ q_id).hide(); + $("#default-text-area-"+ q_id).show(); + $("#default-value-field-"+ q_id).show(); + } + //text field + else if (selected_format == 2){ + $("#options-"+ q_id).hide(); + $("#default-text-field-"+ q_id).show(); + $("#default-value-field-"+ q_id).show(); + $("#default-text-area-"+ q_id).hide(); + } + //checkbox,radio button, dropdown, multi select + else if (selected_format == 3 ||selected_format == 4 || selected_format == 5 || selected_format == 6){ + $("#options-"+ q_id).show(); + $("#default-text-field-"+ q_id).hide(); + $("#default-text-area-"+ q_id).hide(); + $("#default-value-field-"+ q_id).hide(); + } + delete selected_format; + delete q_id; + }).trigger('change'); + + + //Code to show/hide divs on new guidance (by themes or by question) + $('#g_options').on("change", function (){ + var g_t_q = $(this).val(); + + e_g_q_f = $("#edit_guid_ques_flag").val(); + + if (g_t_q == 1){ + $(".guindace_by_question").hide(); + $(".guindance_by_theme").show(); + } + else if (g_t_q == 2){ + $(".guindace_by_question").show(); + $(".guindance_by_theme").hide(); + //check if editing + if( e_g_q_f != 2){ + $('#phases_select').hide(); + $('#versions_select').hide(); + $('#sections_select').hide(); + $('#questions_select').hide(); + + } + } + + }).trigger('change'); + + + //filter from template to question 5 dropdowns + $('#templates_select').change(function() { + $.ajax({ + type: 'GET', + url: "update_phases", + dataType: 'script', + data: { + dmptemplate_id : $('#templates_select').val() + } + }); + $('#phases_select').show(); + $('#versions_select').hide(); + $('#sections_select').hide(); + $('#questions_select').hide(); + + }); + $('#phases_select').change(function() { + $.ajax({ + type: 'GET', + url: "update_versions", + dataType: 'script', + data: { + phase_id : $('#phases_select').val() + } + }); + $('#phases_select').show(); + $('#versions_select').show(); + $('#sections_select').hide(); + $('#questions_select').hide(); + }); + $('#versions_select').change(function() { + $.ajax({ + type: 'GET', + url: "update_sections", + dataType: 'script', + data: { + version_id : $('#versions_select').val() + } + }); + $('#phases_select').show(); + $('#versions_select').show(); + $('#sections_select').show(); + $('#questions_select').hide(); + }); + $('#sections_select').change(function() { + $.ajax({ + type: 'GET', + url: "update_questions", + dataType: 'script', + data: { + section_id : $('#sections_select').val() + } + }); + $('#phases_select').show(); + $('#versions_select').show(); + $('#sections_select').show(); + $('#questions_select').show(); + }); + + + //action for show or hide template editing display + $('#edit_template_button').click(function(e){ + e.preventDefault(); + + $('#edit_template_div').show(); + $('#show_template_div').hide(); + }); + + + //action for show or hide phase display + $('#edit_phase_button').click(function(e){ + e.preventDefault(); + $('#edit_phase_div').show(); + $('#show_phase_div').hide(); + }); + + //action to hide the alert to edit a version + $("#edit-version-confirmed").click(function (e){ + e.preventDefault(); + $("#version_edit_alert").modal("hide"); + }); + + //action to clone/add a version + $("#clone-version-confirmed").click(function (){ + $("#new_project").submit(); + }); + + //action for show question editing display + $('.edit_question_button').click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#edit_question_div_'+ q_id).show(); + $('#show_question_div_'+ q_id).hide(); + e.preventDefault(); + }); + + + $(".cancel_edit_question").click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#edit_question_div_'+ q_id).hide(); + $('#show_question_div_'+ q_id).show(); + e.preventDefault(); + }); + + //action for adding a new question + $('.add_question_button').click(function(e){ + var s_id = $(this).prev(".section_id").val(); + $('#add_question_block_div_'+ s_id).show(); + $('#add_question_button_div_'+ s_id).hide(); + e.preventDefault(); + + }); + + //if question text area is empty send alert + $('.new_question_save_button').click(function(e){ + var s_id = $(this).prev(".section_id").val(); + if ($('#new_question_text_'+ s_id).val() == ''){ + alert(I18n.t("js.question_text_empty")); + return false; + } + }); + + //action for cancelling a new question + $('.cancel_add_new_question').click(function(e){ + var s_id_new = $(this).prev(".section_id_new").val(); + $('#add_question_block_div_'+ s_id_new).hide(); + $('#add_question_button_div_'+ s_id_new).show(); + e.preventDefault(); + }); + + //action for adding a new section + $('#add_section_button').click(function(e){ + $('#add_section_block_div').show(); + $('#add_section_button_div').hide(); + e.preventDefault(); + }); + + + //action for cancelling a new section + $('#cancel_add_section').click(function(e){ + $('#add_section_block_div').hide(); + $('#add_section_button_div').show(); + e.preventDefault(); + }); + + //SUGGESTED ANSWERS + //action for adding a new suggested answer + $('.add_suggested_answer_button').click(function(e){ + var q_id = $(this).prev(".question_id").val(); + + $('#add_suggested_answer_block_'+ q_id).show(); + $('#add_suggested_answer_button_'+ q_id).hide(); + e.preventDefault(); + }); + + //cancelling edit of a suggested answer + $(".cancel_edit_suggested_answer").click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#edit_suggested_answer_div_'+ q_id).hide(); + $('#show_suggested_answer_div_'+ q_id).show(); + e.preventDefault(); + }); + + //edit a suggested answer + $('.edit_form_for_suggested_answer').click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#edit_suggested_answer_div_'+ q_id).show(); + $('#show_suggested_answer_div_'+ q_id).hide(); + e.preventDefault(); + }); + + //GUIDANCE + //action for adding a new guidance next to the question + $('.add_guidance_button').click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#add_guidance_block_'+ q_id).show(); + $('#add_guidance_button_'+ q_id).hide(); + e.preventDefault(); + }); + + //cancelling edit of guidance next to the question + $(".cancel_guidance_answer").click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#edit_guidance_div_'+ q_id).hide(); + $('#show_guidance_div_'+ q_id).show(); + e.preventDefault(); + }); + + //edit guidance next to the question + $('.edit_form_for_guidance').click(function(e){ + var q_id = $(this).prev(".question_id").val(); + $('#edit_guidance_div_'+ q_id).show(); + $('#show_guidance_div_'+ q_id).hide(); + e.preventDefault(); + }); + + + //Add new guidance Alerts + $("#return_to_new_guidance").click(function(){ + $('#new_guidance_alert_dialog').modal("hide"); + }); + + + $('#new_guidance_submit').click( function(e){ + // $('#new_guidance_alert_dialog').on("hide", function(){ + + var alert_message = []; + //verify if text area is not nil + var editorContent = tinyMCE.get('guidance-text').getContent(); + if (editorContent == ''){ + alert_message.push(I18n.t("js.add_guidance_text")); + } + //verify dropdown with questions has a selected option if guidance for a question being used + if ($('#g_options').val() == '2') { + if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ + alert_message.push(I18n.t("js.select_question")); + } + } + + //verify dropdown with questions has a selected option if guidance for a question being used + if ($('#g_options').val() == '1' ){ + if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ + alert_message.push(I18n.t("js.select_at_least_one_theme")); + } + } + //verify if guidance group is selected + if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { + alert_message.push(I18n.t("js.select_guidance_group")); + } + if(alert_message.length == 0){ + //clear dropdowns before submission + $('#new_guidance_alert_dialog').modal("hide"); + + if ($('#g_options').val() == '2'){ + $('#guidance_theme_ids').val(null); + } + if($('#g_options').val() == '1'){ + $('#questions_select').val(null); + } + $('#new_guidance_form').submit(); + return false; + + } + else if (alert_message.length != 0){ + var message = ''; + $('#new_guidance_alert_dialog').on("show", function(){ + + $("#missing_fields_new_guidance").empty(); + $.each(alert_message, function(key, value){ + message += "
  • "+value+"
  • "; + }); + $("#missing_fields_new_guidance").append(message); + }); + delete message; + } + delete alert_message; + e.preventDefault(); + }); + + //edit guidance alerts + $("#return_to_edit_guidance").click(function(){ + $('#edit_guidance_alert_dialog').modal("hide"); + }); + + + $('#edit_guidance_submit').click( function(e){ + // $('#new_guidance_alert_dialog').on("hide", function(){ + + var alert_message = []; + //verify if text area is not nil + var editorContent = tinyMCE.get('guidance-text').getContent(); + if (editorContent == ''){ + alert_message.push(I18n.t("js.add_guidance_text")); + } + //verify dropdown with questions has a selected option if guidance for a question being used + if ($('#g_options').val() == '2') { + if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ + alert_message.push(I18n.t("js.select_question")); + } + } + //verify dropdown with questions has a selected option if guidance for a question being used + if ($('#g_options').val() == '1' ){ + if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ + alert_message.push(I18n.t("js.select_at_least_one_theme")); + } + } + //verify if guidance group is selected + if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { + alert_message.push(I18n.t("js.select_guidance_group")); + } + + if(alert_message.length == 0){ + //clear dropdowns before submission + $('#edit_guidance_alert_dialog').modal("hide"); + + if ($('#g_options').val() == '2'){ $('#guidance_theme_ids').val(null);} + if($('#g_options').val() == '1'){$('#questions_select').val(null);} + $('#edit_guidance_form').submit(); + return false; + } + else if (alert_message.length != 0){ + var message = ''; + $('#edit_guidance_alert_dialog').on("show", function(){ + + $("#missing_fields_edit_guidance").empty(); + $.each(alert_message, function(key, value){ + message += "
  • "+value+"
  • "; + }); + $("#missing_fields_edit_guidance").append(message); + }); + delete message; + } + delete alert_message; + e.preventDefault(); + }); + + + //Validate banner_text area for less than 165 character + $("form#edit_org_details").submit(function(){ + if (getStats('org_banner_text').chars > 165) { + alert(I18n.t("js.enter_up_to") + " " + getStats('org_banner_text').chars + ". " + I18n.t("js.if_using_url_try")); + return false; + } + }); + + + + + }); + + +//remove option when question format is base on a choice +function remove_object(link){ + $(link).prev("input[type=hidden]").val("1"); + $(link).closest(".options_content").hide(); + +} +function add_object(link, association, content) { + var new_id = new Date().getTime(); + var regexp = new RegExp("new_" + association, "g"); + + if (association == 'options') { + $(link).parent().children('.options_table').children('.options_tbody').children('.new_option_before').before(content.replace(regexp, new_id)); + } +} + +// Returns text statistics for the specified editor by id +function getStats(id) { + var body = tinymce.get(id).getBody(), text = tinymce.trim(body.innerText || body.textContent); + + return { + chars: text.length + }; } \ No newline at end of file diff --git a/app/assets/stylesheets/admin.css.less b/app/assets/stylesheets/admin.css.less index e004b14..0bc94b4 100644 --- a/app/assets/stylesheets/admin.css.less +++ b/app/assets/stylesheets/admin.css.less @@ -21,7 +21,7 @@ // Your custom LESS stylesheets goes here /******************************* - * DMPonline v4 stylesheet + * DMPRoadmap stylesheet * * * starting date: June 2013 @@ -1712,7 +1712,3 @@ } - - - - diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less index 177b595..2e43862 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -21,7 +21,7 @@ // Your custom LESS stylesheets goes here /******************************* - * DMPonline v4 stylesheet + * DMPRoadmap stylesheet * * * starting date: June 2013 @@ -721,7 +721,7 @@ float:left; } -#s2id_user_organisation_id, #s2id_user_language_id { +#s2id_user_organisation_id, #s2id_user_language_id{ min-width:84% !important; clear:both; float:left; @@ -729,7 +729,7 @@ } #s2id__organisation_language_id { - float: none; + float:none; } #other-org-link { @@ -1899,5 +1899,5 @@ .settings-accordion span.minus-laranja:before { line-height: inherit; } tr.new_option_before { - display: none; + display: none; } \ No newline at end of file diff --git a/app/controllers/api/v0/projects_controller.rb b/app/controllers/api/v0/projects_controller.rb index 7a60704..47bae8d 100644 --- a/app/controllers/api/v0/projects_controller.rb +++ b/app/controllers/api/v0/projects_controller.rb @@ -66,7 +66,7 @@ user = User.find_by email: params[:project][:email] # if user does not exist if user.nil? - # invite user to DMPonline + # invite user to DMPRoadmap User.invite!({email: params[:project][:email]}, ( @user)) # set project owner to user associated w/email user = (User.find_by email: params[:project][:email]) diff --git a/app/controllers/dmptemplates_controller.rb b/app/controllers/dmptemplates_controller.rb index e2358f1..c4e7a9a 100644 --- a/app/controllers/dmptemplates_controller.rb +++ b/app/controllers/dmptemplates_controller.rb @@ -1,6 +1,6 @@ -# [+Project:+] DMPonline v4 +# [+Project:+] DMPRoadmap # [+Description:+] This controller is responsible for all the actions in the admin interface under templates (e.g. phases, versions, sections, questions, suggested answer) (index; show; create; edit; delete) -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center class DmptemplatesController < ApplicationController diff --git a/app/models/guidance.rb b/app/models/guidance.rb index 287a49a..ac1e886 100644 --- a/app/models/guidance.rb +++ b/app/models/guidance.rb @@ -1,9 +1,9 @@ -# [+Project:+] DMPonline v4 +# [+Project:+] DMPRoadmap # [+Description:+] # This class keeps the information organisations enter to support users when answering questions. # It always belongs to a guidance group class and it can be linked directly to a question or through one or more themes # [+Created:+] 07/07/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center diff --git a/app/models/phase.rb b/app/models/phase.rb index 7e45cb6..20cfb6f 100644 --- a/app/models/phase.rb +++ b/app/models/phase.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline v4 +# [+Project:+] DMPRoadmap # [+Description:+] This model describes informmation about the phase of a plan, it's title, order of display and which template it belongs to. # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center class Phase < ActiveRecord::Base extend FriendlyId diff --git a/app/views/contact_us/contacts/new.html.erb b/app/views/contact_us/contacts/new.html.erb index 6bd79d5..73562ec 100644 --- a/app/views/contact_us/contacts/new.html.erb +++ b/app/views/contact_us/contacts/new.html.erb @@ -1,105 +1,114 @@ - -

    - <%= t("contact_page.title") %> -

    -

    - <%= raw t("contact_page.intro_text_html") %> - <%= raw t("contact_page.github_text_html") %> -

    -
    - -
    -
    - <%= 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('admin.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('helpers.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('helpers.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('helpers.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 => "Submit" %> -
    - <% end %> -
    -
    - -
    -
    - <%= raw t("contact_page.address_text_html") %> - -
    - - -
    -
    -
    -
    + +

    + <%= t("contact_page.title") %> +

    +

    + <%= 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") %> +

    +
    + +
    +
    + <%= 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],) %> + +
    + + +
    +
    +
    +
    diff --git a/app/views/dmptemplates/_add_question.html.erb b/app/views/dmptemplates/_add_question.html.erb index 98c15ed..1caf54c 100644 --- a/app/views/dmptemplates/_add_question.html.erb +++ b/app/views/dmptemplates/_add_question.html.erb @@ -1,181 +1,179 @@ - - -<% @new_question = Question.new %> -<% @new_question.number = section.questions.count + 1 %> - - -<%= form_for @new_question, :url => {:action => "admin_createquestion"}, :html => {:id => "new_question_#{section.id}"} do |f| %> -<%= f.hidden_field :section_id, :value => section.id %> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <%= t("org_admin.questions.question_number_label")%><%= f.number_field :number, :in => 1..50, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.questions.number_help_text") %> - -
    -
    <%= t("org_admin.questions.question_text_label")%><%= f.text_area :text, :rows => "5", :id => "new_question_text_#{section.id}" %> -
    -
    <%= t("org_admin.questions.answer_format_label")%><%= f.hidden_field :section_id, :value => section.id, :class => "section_id" %> -
    -
    - <%= f.select :question_format_id, - options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title(t("helpers.text_area")).id), - {}, :id => "new-select-format-#{section.id}"%> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "question_format_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_format_help_text_html"))%> -
    - -
    -
    - - -
    - - -
    - - -
    - -
    -
    -
    -
    <%= t("org_admin.questions.suggested_or_example_answer_label")%>
    - <% suggested_answer = @new_question.suggested_answers.build %> - <%= f.fields_for :suggested_answers, suggested_answer do |s|%> - <%= s.hidden_field :organisation_id, :value => current_user.organisation.id %> -
      -
    • <%= s.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
    • -
    • <%= s.text_area :text, :rows => 5 %>
    • -
    - <%end%> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "suggested_answer_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.suggested_answer_help_text_html"))%> -
    -
    -
    - -
    <%= t("org_admin.questions.guidance_label")%>
    - <%= text_area_tag("new-question-guidance", "", class: "tinymce") %> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "question_guidance_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_guidance_help_text_html"))%> -
    -
    -
    -
    <%= t("org_admin.questions.themes_label")%>
    - <%= f.collection_select(:theme_ids, - Theme.all.order("title"), - :id, :title, {:prompt => false, :include_blank => t('helpers.none')}, {:multiple => true})%> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "question_themes_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_themes_help_text_html"))%> -
    - - -
    -
    - - -
    - <%= hidden_field_tag :section_id, section.id, :class => "section_id" %> - <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary new_question_save_button" %> - <%= hidden_field_tag :section_id, section.id, :class => "section_id_new" %> - <%= link_to t("helpers.submit.cancel"), '#', :class => "btn cancel cancel_add_new_question" %> -
    -
    - -<%end%> - - - + + +<% @new_question = Question.new %> +<% @new_question.number = section.questions.count + 1 %> + + +<%= form_for @new_question, :url => {:action => "admin_createquestion"}, :html => {:id => "new_question_#{section.id}"} do |f| %> +<%= f.hidden_field :section_id, :value => section.id %> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%= t("org_admin.questions.question_number_label")%><%= f.number_field :number, :in => 1..50, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.questions.number_help_text") %> + +
    +
    <%= t("org_admin.questions.question_text_label")%><%= f.text_area :text, :rows => "5", :id => "new_question_text_#{section.id}" %> +
    +
    <%= t("org_admin.questions.answer_format_label")%><%= f.hidden_field :section_id, :value => section.id, :class => "section_id" %> +
    +
    + <%= f.select :question_format_id, + options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title(t("helpers.text_area")).id), + {}, :id => "new-select-format-#{section.id}"%> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "question_format_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_format_help_text_html"))%> +
    + +
    +
    + + +
    + + +
    + + +
    + +
    +
    +
    +
    <%= t("org_admin.questions.suggested_or_example_answer_label")%>
    + <% suggested_answer = @new_question.suggested_answers.build %> + <%= f.fields_for :suggested_answers, suggested_answer do |s|%> + <%= s.hidden_field :organisation_id, :value => current_user.organisation.id %> +
      +
    • <%= s.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
    • +
    • <%= s.text_area :text, :rows => 5 %>
    • +
    + <%end%> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "suggested_answer_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.suggested_answer_help_text_html"))%> +
    +
    +
    + +
    <%= t("org_admin.questions.guidance_label")%>
    + <%= text_area_tag("new-question-guidance", "", class: "tinymce") %> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "question_guidance_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_guidance_help_text_html"))%> +
    +
    +
    +
    <%= t("org_admin.questions.themes_label")%>
    + <%= f.collection_select(:theme_ids, + Theme.all.order("title"), + :id, :title, {:prompt => false, :include_blank => t('helpers.none')}, {:multiple => true})%> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "question_themes_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_themes_help_text_html"))%> +
    + + +
    +
    + + +
    + <%= hidden_field_tag :section_id, section.id, :class => "section_id" %> + <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary new_question_save_button" %> + <%= hidden_field_tag :section_id, section.id, :class => "section_id_new" %> + <%= link_to t("helpers.submit.cancel"), '#', :class => "btn cancel cancel_add_new_question" %> +
    +
    + +<%end%> + diff --git a/app/views/dmptemplates/_edit_question.html.erb b/app/views/dmptemplates/_edit_question.html.erb index e26abba..ab12c02 100644 --- a/app/views/dmptemplates/_edit_question.html.erb +++ b/app/views/dmptemplates/_edit_question.html.erb @@ -1,174 +1,174 @@ - - -<%= form_for(question, :url => admin_updatequestion_dmptemplate_path(question), :html => { :method => :put}) do |f| %> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <%= t("org_admin.questions.question_number_label")%><%= f.number_field :number, :in => 1..50, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.questions.number_help_text") %> -
    -
    <%= t("org_admin.questions.question_text_label")%><%= f.text_area :text, :rows => "5" %> -
    -
    <%= t("org_admin.questions.answer_format_label")%>
    -
    - <%= f.hidden_field :id,{ :class => "quest_id" } %> - <%= f.select :question_format_id, - options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, question.question_format_id), - {}, :id => "#{question.id}-select-format"%> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "question_format_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_format_help_text_html"))%> -
    - -
    - - - -
    - - -
    - - -
    - -
    -
    -
    -
    <%= t("org_admin.questions.suggested_or_example_answer_label")%>
    - <% suggested_answer = question.suggested_answers.find_by_organisation_id(current_user.organisation.id) %> - <% if suggested_answer.nil? then %> - <% suggested_answer = question.suggested_answers.build %> - <%end%> - <%= f.fields_for :suggested_answers, suggested_answer do |s|%> - <%= s.hidden_field :organisation_id, :value => current_user.organisation.id %> -
      -
    • <%= s.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
    • -
    • <%= s.text_area :text, :rows => 5 %> -
    • -
    - <%end%> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "suggested_answer_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.suggested_answer_help_text_html"))%> -
    -
    -
    -
    <%= t("org_admin.questions.guidance_label")%>
    - <%= text_area_tag("question-guidance-#{question.id}", question.guidance , class: "tinymce") %> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "question_guidance_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_guidance_help_text_html"))%> -
    -
    -
    -
    <%= t("org_admin.questions.themes_label")%>
    - <%= f.collection_select(:theme_ids, - Theme.all.order("title"), - :id, :title, {:prompt => false, :include_blank => "None"}, {:multiple => true})%> -
    -
    - <%= link_to( image_tag("help_button.png"), "#", :class => "question_themes_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_themes_help_text_html"))%> -
    -
    -
    - -
    - <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %> - <% if !question.section.version.published? then%> - <%= link_to t("helpers.submit.delete"), admin_destroyquestion_dmptemplate_path(:question_id => question.id), - :confirm => t("org_admin.questions.delete_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%> - <%end%> - <%= hidden_field_tag :question_id, question.id, :class => "question_id" %> - <%= link_to t("helpers.submit.cancel"), "#", :class => "btn cancel cancel_edit_question" %> -
    -
    - - - -<%= render :partial => "guidance_display", locals: {question: question}%> -<%end%> + + +<%= form_for(question, :url => admin_updatequestion_dmptemplate_path(question), :html => { :method => :put}) do |f| %> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%= t("org_admin.questions.question_number_label")%><%= f.number_field :number, :in => 1..50, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.questions.number_help_text") %> +
    +
    <%= t("org_admin.questions.question_text_label")%><%= f.text_area :text, :rows => "5" %> +
    +
    <%= t("org_admin.questions.answer_format_label")%>
    +
    + <%= f.hidden_field :id,{ :class => "quest_id" } %> + <%= f.select :question_format_id, + options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, question.question_format_id), + {}, :id => "#{question.id}-select-format"%> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "question_format_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_format_help_text_html"))%> +
    + +
    + + + +
    + + +
    + + +
    + +
    +
    +
    +
    <%= t("org_admin.questions.suggested_or_example_answer_label")%>
    + <% suggested_answer = question.suggested_answers.find_by_organisation_id(current_user.organisation.id) %> + <% if suggested_answer.nil? then %> + <% suggested_answer = question.suggested_answers.build %> + <%end%> + <%= f.fields_for :suggested_answers, suggested_answer do |s|%> + <%= s.hidden_field :organisation_id, :value => current_user.organisation.id %> +
      +
    • <%= s.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
    • +
    • <%= s.text_area :text, :rows => 5 %> +
    • +
    + <%end%> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "suggested_answer_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.suggested_answer_help_text_html"))%> +
    +
    +
    +
    <%= t("org_admin.questions.guidance_label")%>
    + <%= text_area_tag("question-guidance-#{question.id}", question.guidance , class: "tinymce") %> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "question_guidance_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_guidance_help_text_html"))%> +
    +
    +
    +
    <%= t("org_admin.questions.themes_label")%>
    + <%= f.collection_select(:theme_ids, + Theme.all.order("title"), + :id, :title, {:prompt => false, :include_blank => "None"}, {:multiple => true})%> +
    +
    + <%= link_to( image_tag("help_button.png"), "#", :class => "question_themes_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_themes_help_text_html"))%> +
    +
    +
    + +
    + <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %> + <% if !question.section.version.published? then%> + <%= link_to t("helpers.submit.delete"), admin_destroyquestion_dmptemplate_path(:question_id => question.id), + :confirm => t("org_admin.questions.delete_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%> + <%end%> + <%= hidden_field_tag :question_id, question.id, :class => "question_id" %> + <%= link_to t("helpers.submit.cancel"), "#", :class => "btn cancel cancel_edit_question" %> +
    +
    + + + +<%= render :partial => "guidance_display", locals: {question: question}%> +<%end%> diff --git a/app/views/dmptemplates/_edit_section.html.erb b/app/views/dmptemplates/_edit_section.html.erb index f85a6ce..8f7f8b4 100644 --- a/app/views/dmptemplates/_edit_section.html.erb +++ b/app/views/dmptemplates/_edit_section.html.erb @@ -1,8 +1,8 @@ - diff --git a/app/views/dmptemplates/_show_question.html.erb b/app/views/dmptemplates/_show_question.html.erb index 53d3f06..df79c2b 100644 --- a/app/views/dmptemplates/_show_question.html.erb +++ b/app/views/dmptemplates/_show_question.html.erb @@ -1,8 +1,8 @@ -
    diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index bb29bd7..4c03d50 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,56 +1,59 @@ -
    -
    -
    - -

    <%= raw t('welcome_title')%>

    - <%= raw t('welcome_text')%> -
    -

    <%= t('screencast_text') %>

    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - <%= render :partial => 'shared/login_form' %> -
    -
    -
    -
    -
    - - <%= t('helpers.sign_up') %> -

    - <%= t('helpers.sign_up_text')%> -

    - -
    -
    -
    - <%= render :partial => 'shared/register_form', locals: {extended: false} %> -
    -
    -
    -
    -
    -
    +
    +
    +
    + +

    <%= raw t('welcome_title')%>

    + <%= raw t('welcome_text', + application_name: Rails.configuration.branding[:application][:name], + organisation_name: Rails.configuration.branding[:organisation][:name])%> + +
    +

    <%= t('screencast_text', application_name: Rails.configuration.branding[:application][:name]) %>

    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + <%= render :partial => 'shared/login_form' %> +
    +
    +
    +
    +
    + + <%= t('helpers.sign_up') %> +

    + <%= t('helpers.sign_up_text', application_name: Rails.configuration.branding[:application][:name])%> +

    + +
    +
    +
    + <%= render :partial => 'shared/register_form', locals: {extended: false} %> +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/layouts/_dmponline_footer.html.erb b/app/views/layouts/_dmponline_footer.html.erb index 0e017bc..2502460 100644 --- a/app/views/layouts/_dmponline_footer.html.erb +++ b/app/views/layouts/_dmponline_footer.html.erb @@ -9,13 +9,13 @@
    -
    diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8307d8d..7015dcd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - <%= t('tool_title')%> + <%= t('tool_title', application_name: Rails.configuration.branding[:application][:name])%> <%= favicon_link_tag "favicon.ico" %> - + + <%= render "layouts/dmponline_header" %> diff --git a/app/views/plans/_answer_form.html.erb b/app/views/plans/_answer_form.html.erb index eaa6b2c..c6135bb 100644 --- a/app/views/plans/_answer_form.html.erb +++ b/app/views/plans/_answer_form.html.erb @@ -1,262 +1,262 @@ - -<% answer = @plan.answer(question.id) %> - -
    - - <% 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" } %> - - - <%= label_tag("answer-text-#{question.id}".to_sym, question.text) %> - - - <% suggested_answer = question.suggested_answers.find_by_organisation_id(@plan.project.organisation_id) %> - <% if !suggested_answer.nil? && suggested_answer.text != "" then %> -
    - - <% if suggested_answer.is_example? then %> - <%= t("org_admin.questions.example_answer_label")%> - <%else%> - <%= t("org_admin.questions.suggested_answer_label")%> - <%end%> - -
    -

    - <%= raw suggested_answer.text %> -

    -
    -
    - <% end %> - - - <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") then%> - <% options = question.options.order("number") %> - - <% if q_format.title == t("helpers.checkbox") 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 == t("helpers.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 == t("helpers.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}"%> - <% end %> - <%else%> - <% if readonly then %> - <%= 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}"%> - <% end %> - <%end%> - <%= op.text %>
    2. - <%end%> -
    - - <% elsif q_format.title == t("helpers.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 %> - - - - - <% if question.option_comment_display == true then%> - <%= label_tag("answer-text-#{question.id}".to_sym, t("helpers.comment")) %> - <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> - <%end%> - - - <% elsif q_format.title == t("helpers.text_field") then %> - <%= text_field_tag("answer-text-#{question.id}".to_sym, strip_tags(answer.text), class: "question_text_field") %> - - <% elsif q_format.title == t("helpers.text_area") then%> - <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> - <% end %> - - <% end %> - - - <%= f.actions do %> - <% if readonly then %> - <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"}, :input_html => { :disabled => true } %> - <% else %> - <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"} %> - <% end %> - - <% end %> - <% end %> -
    - <% end %> - - -
    > -

    <%= question.text %>

    -
    - <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") %> -
      - <% if answer.options.is_a? Option then %> -
    • <%= answer.options.text %>
    • - <% else %> - <% answer.options.each do |o| %> -
    • <%= o.text %>
    • - <% end %> - <% end %> -
    - <% end %> -
    - <%= raw answer.text %> -
    -
    -
    - - <% if answer.created_at.nil? then %> - <%= t("helpers.notanswered") %> - <% else %> - <%= t("helpers.answered_by")%><%= answer.created_at %><%= t("helpers.answered_by_part2")%><%= answer.user.name %> - <% end %> - - -
    - - - -
    - -
    - <% @comments = Comment.where("question_id = ? && plan_id = ?", question.id, answer.plan_id ) %> - <%= hidden_field_tag :question_id, question.id, :class => "question_id" %> - -
    - - - -
    -
    - - <% if !question.guidance.nil? && question.guidance != "" then %> - - <% end %> - - <% @plan.guidance_for_question(question).each_pair do |group,themes| %> - <% themes.each_pair do |theme,guidances| %> - <% guidances.each do |guidance| %> - - <% end %> - <% end %> - <% end %> - - -
    -
    - - -
    - <%= render :partial => "comments", locals: {questionId: question.id, plan_id: answer.plan_id }%> - -
    - - - -
    - -<% if last_question_id == question.id then %> -
    -<% else %> -
    -<% end %> + +<% answer = @plan.answer(question.id) %> + +
    + + <% 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" } %> + + + <%= label_tag("answer-text-#{question.id}".to_sym, question.text) %> + + + <% suggested_answer = question.suggested_answers.find_by_organisation_id(@plan.project.organisation_id) %> + <% if !suggested_answer.nil? && suggested_answer.text != "" then %> +
    + + <% if suggested_answer.is_example? then %> + <%= t("org_admin.questions.example_answer_label")%> + <%else%> + <%= t("org_admin.questions.suggested_answer_label")%> + <%end%> + +
    +

    + <%= raw suggested_answer.text %> +

    +
    +
    + <% end %> + + + <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") then%> + <% options = question.options.order("number") %> + + <% if q_format.title == t("helpers.checkbox") 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 == t("helpers.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 == t("helpers.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}"%> + <% end %> + <%else%> + <% if readonly then %> + <%= 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}"%> + <% end %> + <%end%> + <%= op.text %>
    2. + <%end%> +
    + + <% elsif q_format.title == t("helpers.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 %> + + + + + <% if question.option_comment_display == true then%> + <%= label_tag("answer-text-#{question.id}".to_sym, t("helpers.comment")) %> + <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> + <%end%> + + + <% elsif q_format.title == t("helpers.text_field") then %> + <%= text_field_tag("answer-text-#{question.id}".to_sym, strip_tags(answer.text), class: "question_text_field") %> + + <% elsif q_format.title == t("helpers.text_area") then%> + <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> + <% end %> + + <% end %> + + + <%= f.actions do %> + <% if readonly then %> + <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"}, :input_html => { :disabled => true } %> + <% else %> + <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"} %> + <% end %> + + <% end %> + <% end %> +
    + <% end %> + + +
    > +

    <%= question.text %>

    +
    + <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") %> +
      + <% if answer.options.is_a? Option then %> +
    • <%= answer.options.text %>
    • + <% else %> + <% answer.options.each do |o| %> +
    • <%= o.text %>
    • + <% end %> + <% end %> +
    + <% end %> +
    + <%= raw answer.text %> +
    +
    +
    + + <% if answer.created_at.nil? then %> + <%= t("helpers.notanswered") %> + <% else %> + <%= t("helpers.answered_by")%><%= answer.created_at %><%= t("helpers.answered_by_part2")%><%= answer.user.name %> + <% end %> + + +
    + + + +
    + +
    + <% @comments = Comment.where("question_id = ? && plan_id = ?", question.id, answer.plan_id ) %> + <%= hidden_field_tag :question_id, question.id, :class => "question_id" %> + +
    + + + +
    +
    + + <% if !question.guidance.nil? && question.guidance != "" then %> + + <% end %> + + <% @plan.guidance_for_question(question).each_pair do |group,themes| %> + <% themes.each_pair do |theme,guidances| %> + <% guidances.each do |guidance| %> + + <% end %> + <% end %> + <% end %> + + +
    +
    + + +
    + <%= render :partial => "comments", locals: {questionId: question.id, plan_id: answer.plan_id }%> + +
    + + + +
    + +<% if last_question_id == question.id then %> +
    +<% else %> +
    +<% end %> diff --git a/app/views/static_pages/about_us.html.erb b/app/views/static_pages/about_us.html.erb index c875fda..6b26a5f 100644 --- a/app/views/static_pages/about_us.html.erb +++ b/app/views/static_pages/about_us.html.erb @@ -1,60 +1,67 @@ - - - -

    - <%= t("about_page.title")%> -

    - -
    -
    -
    - <%= raw t("about_page.body_text_tab_1_html")%> -
    -
    - <%= raw t("about_page.body_text_tab_2_html")%> - <% news_left = @dcc_news_feed.entries.count %> - - <% @dcc_news_feed.entries.each do |entry| %> -

    <%= entry.title.sanitize %>

    - <% summary = entry.summary.sanitize %> - <% summary = summary.gsub(/\A])+>/, "") %> - <% summary = summary.gsub(/\A])+>/, "") %> - <% name = summary[/\A[\s\w]*([^,])/].strip %> - <% summary = summary.gsub(/\A.*div>/, "") %> - <% summary = summary.gsub(/

    .*\z/, "") %> -

    <%= raw summary.strip %>

    -

    <%= t('helpers.about.by') %><%= entry.author %><%= t('helpers.about.on') %><%= entry.published.strftime("%d/%m/%Y") %>

    -

    <%= t('helpers.about.read_more') %><%= link_to "DCC Website", entry.url %>

    -
    - - <%if news_left.to_i > 1 then %> -
    - <%else%> -
    - <%end%> - <% news_left = news_left - 1 %> - <% end %> -
    -
    -
    - + + + +

    + <%= t("about_page.title", application_name: Rails.configuration.branding[:application][:name])%> +

    + +
    +
    +
    + <%= raw t("about_page.body_text_tab_1_html", + organisation_name: Rails.configuration.branding[:organisation][:name], + organisation_abbreviation: Rails.configuration.branding[:organisation][:abbreviation], + organisation_email: Rails.configuration.branding[:organisation][:email], + application_name: Rails.configuration.branding[:application][:name], + application_url: Rails.configuration.branding[:application][:url])%> +
    +
    + <%= raw t("about_page.body_text_tab_2_html", + organisation_abbreviation: Rails.configuration.branding[:organisation][:abbreviation], + application_name: Rails.configuration.branding[:application][:name])%> + + <% news_left = @dcc_news_feed.entries.count %> + + <% @dcc_news_feed.entries.each do |entry| %> +

    <%= entry.title.sanitize %>

    + <% summary = entry.summary.sanitize %> + <% summary = summary.gsub(/\A])+>/, "") %> + <% summary = summary.gsub(/\A])+>/, "") %> + <% name = summary[/\A[\s\w]*([^,])/].strip %> + <% summary = summary.gsub(/\A.*div>/, "") %> + <% summary = summary.gsub(/

    .*\z/, "") %> +

    <%= raw summary.strip %>

    +

    <%= t('helpers.about.by') %><%= entry.author %><%= t('helpers.about.on') %><%= entry.published.strftime("%d/%m/%Y") %>

    +

    <%= t('helpers.about.read_more') %><%= link_to "DCC Website", entry.url %>

    +
    + + <%if news_left.to_i > 1 then %> +
    + <%else%> +
    + <%end%> + <% news_left = news_left - 1 %> + <% end %> +
    +
    +
    diff --git a/app/views/static_pages/help.html.erb b/app/views/static_pages/help.html.erb index a53ec7f..528370c 100644 --- a/app/views/static_pages/help.html.erb +++ b/app/views/static_pages/help.html.erb @@ -1,35 +1,36 @@ - - -

    - <%= t('help_page.title')%> -

    - - -
    -
    -
    - <%= raw t('help_page.body_text_tab_1_html')%> -
    -
    - <%= raw t('help_page.body_text_tab_2_html')%> -
    -
    -
    + + +

    + <%= t('help_page.title')%> +

    + + +
    +
    +
    + <%= raw t('help_page.body_text_tab_1_html', + application_name: Rails.configuration.branding[:application][:name])%> +
    +
    + <%= raw t('help_page.body_text_tab_2_html')%> +
    +
    +
    diff --git a/app/views/static_pages/roadmap.html.erb b/app/views/static_pages/roadmap.html.erb index ad3d95f..311ca4b 100644 --- a/app/views/static_pages/roadmap.html.erb +++ b/app/views/static_pages/roadmap.html.erb @@ -1,35 +1,48 @@ - - -

    - <%= t("roadmap_page.title")%> -

    - - -
    -
    -
    - <%= raw t("roadmap_page.body_text_tab_1_html")%> -
    -
    - <%= raw t("roadmap_page.body_text_tab_2_html")%> -
    -
    -
    \ No newline at end of file + + +

    + <%= t("roadmap_page.title")%> +

    + + +
    +
    +
    + <%= raw t("roadmap_page.body_text_tab_1_html", + organisation_email: Rails.configuration.branding[:organisation][:email], + organisation_abbreviation: Rails.configuration.branding[:organisation][:abbreviation], + application_name: Rails.configuration.branding[:application][:name], + application_url: Rails.configuration.branding[:application][:url], + application_version: Rails.configuration.branding[:application][:version], + application_release_notes_url: Rails.configuration.branding[:application][:release_notes_url])%> +
    +
    + <%= raw t("roadmap_page.body_text_tab_2_html", + organisation_name: Rails.configuration.branding[:organisation][:name], + organisation_email: Rails.configuration.branding[:organisation][:email], + organisation_url: Rails.configuration.branding[:organisation][:url], + organisation_abbreviation: Rails.configuration.branding[:organisation][:abbreviation], + application_name: Rails.configuration.branding[:application][:name], + application_url: Rails.configuration.branding[:application][:url], + application_user_group_subscription_url: Rails.configuration.branding[:application][:user_group_subscription_url])%> +
    +
    +
    \ No newline at end of file diff --git a/app/views/static_pages/termsuse.html.erb b/app/views/static_pages/termsuse.html.erb index 0e0c535..bf943a1 100644 --- a/app/views/static_pages/termsuse.html.erb +++ b/app/views/static_pages/termsuse.html.erb @@ -1,5 +1,10 @@ -

    - <%= t('terms_page.title')%> -

    - -<%= raw t('terms_page.body_text_html')%> +

    + <%= t('terms_page.title')%> +

    + +<%= raw t('terms_page.body_text_html', + legal_entity: Rails.configuration.branding[:legal_entity], + organisation_name: Rails.configuration.branding[:organisation][:name], + organisation_abbreviation: Rails.configuration.branding[:organisation][:abbreviation], + organisation_url: Rails.configuration.branding[:organisation][:url], + application_name: Rails.configuration.branding[:application][:name])%> diff --git a/config.ru b/config.ru index 06e0595..9b659c1 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,4 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run DMPonline4::Application +# This file is used by Rack-based servers to start the application. + +require ::File.expand_path('../config/environment', __FILE__) +run DMPRoadmap::Application diff --git a/config/application.rb b/config/application.rb index 97e7ed3..3400116 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,7 +17,7 @@ #Changed when migrated to rails 4.0.0 Bundler.require(*Rails.groups) -module DMPonline4 +module DMPRoadmap class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/config/branding.yml b/config/branding.yml new file mode 100644 index 0000000..c22c15a --- /dev/null +++ b/config/branding.yml @@ -0,0 +1,29 @@ +defaults: &defaults + legal_entity: 'the University of Edinburgh, University of Glasgow and the University of California' + + organisation: + name: 'Digital Curation Center and University of California Curation Center' + abbreviation: 'DCC and UC3' + url: 'https://github.com/DMPRoadmap/roadmap/wiki' + copywrite_name: 'DCC and UC3' + email: 'ROADMAP-L@listserv.ucop.edu' + + application: + name: 'DMPRoadmap' + url: 'https://github.com/DMPRoadmap/roadmap' + version: '0.1.0' + release_notes_url: 'https://github.com/DMPRoadmap/roadmap/wiki/Releases' + issue_list_url: 'https://github.com/DMPRoadmap/roadmap/issues' + user_group_subscription_url: 'http://listserv.ucop.edu/cgi-bin/wa.exe?SUBED1=ROADMAP-L&A=1' + +development: + <<: *defaults + +test: + <<: *defaults + +staging: + <<: *defaults + +production: + <<: *defaults \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index 4f4a327..ece8ff4 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,19 +6,24 @@ config.cache_classes = false # Do not eager load code on boot. config.eager_load = false + # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log + # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true + # Asset digests allow you to set far-future HTTP expiration dates on all assets, # yet still be able to expire them through the digest params. config.assets.digest = true @@ -28,26 +33,29 @@ config.assets.raise_runtime_errors = true # Raises error for missing translations # config.action_view.raise_on_missing_translations = true - + # Log error messages when you accidentally call methods on nil. config.whiny_nils = true - + # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin + # Raise exception on mass assignment protection for Active Record models config.active_record.mass_assignment_sanitizer = :strict - + config.assets.compress = false - + config.action_mailer.perform_deliveries = false - + config.web_console.whitelisted_ips = '192.168.33.1' - + # Load Branded terminology (e.g. organization name, application name, etc.) - #config.branding = config_for(:branding).deep_symbolize_keys + + config.branding = config_for(:branding).deep_symbolize_keys #config.branding = YAML.load_file(Rails.root.join('config/branding.yml'))[Rails.env] - -#puts "YAML: #{config_for(:branding)}" - + + puts "YAML: #{config_for(:branding)}" + + + BetterErrors::Midleware.allow_ip! "10.0.2.2" if defined?(BetterErrors) && Rails.env == :development end -BetterErrors::Midleware.allow_ip! "10.0.2.2" if defined?(BetterErrors) && Rails.env == :development \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 0000000..c55a7cf --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,84 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like + # NGINX, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them through the digest params. + config.assets.digest = true + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + # config.log_tags = [ :subdomain, :uuid ] + + # Use a different logger for distributed setups. + # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false + + # Load Branded terminology (e.g. organization name, application name, etc.) + #config.branding = YAML.load_file(File.join(Rails.root, 'config', 'branding.yml')) + config.branding = config_for(:branding).deep_symbolize_keys + #config.branding = YAML.load_file(Rails.root.join('config/branding.yml'))[Rails.env] +end \ No newline at end of file diff --git a/config/environments/test.rb b/config/environments/test.rb index 053f5b6..7dcd3a6 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -12,8 +12,9 @@ # preloads Rails for running tests, you may have to set it to true. config.eager_load = false - # Configure static asset server for tests with Cache-Control for performance. - config.serve_static_assets = true + # Configure static file server for tests with Cache-Control for performance. + config.serve_static_files = true + config.static_cache_control = 'public, max-age=3600' # Show full error reports and disable caching. @@ -31,9 +32,12 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Randomize the order test cases are executed. + config.active_support.test_order = :random + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations # config.action_view.raise_on_missing_translations = true -end + diff --git a/config/initializers/active_admin.rb b/config/initializers/active_admin.rb index af34a3e..2e1c9c6 100644 --- a/config/initializers/active_admin.rb +++ b/config/initializers/active_admin.rb @@ -1,274 +1,274 @@ -ActiveAdmin.setup do |config| - # == Site Title - # - # Set the title that is displayed on the main layout - # for each of the active admin pages. - # - config.site_title = "DMPonline" - - # Set the link url for the title. For example, to take - # users to your main site. Defaults to no link. - # - config.site_title_link = "/" - - # Set an optional image to be displayed for the header - # instead of a string (overrides :site_title) - # - # Note: Aim for an image that's 21px high so it fits in the header. - # - # config.site_title_image = "logo.png" - - # == Default Namespace - # - # Set the default namespace each administration resource - # will be added to. - # - # eg: - # config.default_namespace = :hello_world - # - # This will create resources in the HelloWorld module and - # will namespace routes to /hello_world/* - # - # To set no namespace by default, use: - # config.default_namespace = false - # - # Default: - # config.default_namespace = :admin - # - # You can customize the settings for each namespace by using - # a namespace block. For example, to change the site title - # within a namespace: - # - # config.namespace :admin do |admin| - # admin.site_title = "Custom Admin Title" - # end - # - # This will ONLY change the title for the admin section. Other - # namespaces will continue to use the main "site_title" configuration. - - # == User Authentication - # - # Active Admin will automatically call an authentication - # method in a before filter of all controller actions to - # ensure that there is a currently logged in admin user. - # - # This setting changes the method which Active Admin calls - # within the application controller. - # config.authentication_method = :authenticate_admin_user! - config.authentication_method = :authenticate_admin! - - # == User Authorization - # - # Active Admin will automatically call an authorization - # method in a before filter of all controller actions to - # ensure that there is a user with proper rights. You can use - # CanCanAdapter or make your own. Please refer to documentation. - # config.authorization_adapter = ActiveAdmin::CanCanAdapter - - # In case you prefer Pundit over other solutions you can here pass - # the name of default policy class. This policy will be used in every - # case when Pundit is unable to find suitable policy. - # config.pundit_default_policy = "MyDefaultPunditPolicy" - - # You can customize your CanCan Ability class name here. - # config.cancan_ability_class = "Ability" - - # You can specify a method to be called on unauthorized access. - # This is necessary in order to prevent a redirect loop which happens - # because, by default, user gets redirected to Dashboard. If user - # doesn't have access to Dashboard, he'll end up in a redirect loop. - # Method provided here should be defined in application_controller.rb. - # config.on_unauthorized_access = :access_denied - - # == Current User - # - # Active Admin will associate actions with the current - # user performing them. - # - # This setting changes the method which Active Admin calls - # (within the application controller) to return the currently logged in user. - # config.current_user_method = :current_admin_user - config.current_user_method = :current_user - - # == Logging Out - # - # Active Admin displays a logout link on each screen. These - # settings configure the location and method used for the link. - # - # This setting changes the path where the link points to. If it's - # a string, the strings is used as the path. If it's a Symbol, we - # will call the method to return the path. - # - # Default: - config.logout_link_path = :destroy_user_session_path - - # This setting changes the http method used when rendering the - # link. For example :get, :delete, :put, etc.. - # - # Default: - # config.logout_link_method = :get - - # == Root - # - # Set the action to call for the root path. You can set different - # roots for each namespace. - # - # Default: - # config.root_to = 'dashboard#index' - - # == Admin Comments - # - # This allows your users to comment on any resource registered with Active Admin. - # - # You can completely disable comments: - # config.comments = false - # - # You can change the name under which comments are registered: - # config.comments_registration_name = 'AdminComment' - # - # You can change the order for the comments and you can change the column - # to be used for ordering: - # config.comments_order = 'created_at ASC' - # - # You can disable the menu item for the comments index page: - config.comments_menu = false - # - # You can customize the comment menu: - # config.comments_menu = { parent: 'Admin', priority: 1 } - - # == Batch Actions - # - # Enable and disable Batch Actions - # - config.batch_actions = true - - # == Controller Filters - # - # You can add before, after and around filters to all of your - # Active Admin resources and pages from here. - # - # config.before_filter :do_something_awesome - - # == Localize Date/Time Format - # - # Set the localize format to display dates and times. - # To understand how to localize your app with I18n, read more at - # https://github.com/svenfuchs/i18n/blob/master/lib%2Fi18n%2Fbackend%2Fbase.rb#L52 - # - config.localize_format = :long - - # == Setting a Favicon - # - # config.favicon = 'favicon.ico' - - # == Meta Tags - # - # Add additional meta tags to the head element of active admin pages. - # - # Add tags to all pages logged in users see: - # config.meta_tags = { author: 'My Company' } - - # By default, sign up/sign in/recover password pages are excluded - # from showing up in search engine results by adding a robots meta - # tag. You can reset the hash of meta tags included in logged out - # pages: - # config.meta_tags_for_logged_out_pages = {} - - # == Removing Breadcrumbs - # - # Breadcrumbs are enabled by default. You can customize them for individual - # resources or you can disable them globally from here. - # - # config.breadcrumb = false - - # == Register Stylesheets & Javascripts - # - # We recommend using the built in Active Admin layout and loading - # up your own stylesheets / javascripts to customize the look - # and feel. - # - # To load a stylesheet: - # config.register_stylesheet 'my_stylesheet.css' - # - # You can provide an options hash for more control, which is passed along to stylesheet_link_tag(): - # config.register_stylesheet 'my_print_stylesheet.css', media: :print - # - # To load a javascript file: - # config.register_javascript 'my_javascript.js' - - # == CSV options - # - # Set the CSV builder separator - # config.csv_options = { col_sep: ';' } - # - # Force the use of quotes - # config.csv_options = { force_quotes: true } - - # == Menu System - # - # You can add a navigation menu to be used in your application, or configure a provided menu - # - # To change the default utility navigation to show a link to your website & a logout btn - # - # config.namespace :admin do |admin| - # admin.build_menu :utility_navigation do |menu| - # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } - # admin.add_logout_button_to_menu menu - # end - # end - # - # If you wanted to add a static menu item to the default menu provided: - # - # config.namespace :admin do |admin| - # admin.build_menu :default do |menu| - # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } - # end - # end - - # == Download Links - # - # You can disable download links on resource listing pages, - # or customize the formats shown per namespace/globally - # - # To disable/customize for the :admin namespace: - # - # config.namespace :admin do |admin| - # - # # Disable the links entirely - # admin.download_links = false - # - # # Only show XML & PDF options - # admin.download_links = [:xml, :pdf] - # - # # Enable/disable the links based on block - # # (for example, with cancan) - # admin.download_links = proc { can?(:view_download_links) } - # - # end - - # == Pagination - # - # Pagination is enabled by default for all resources. - # You can control the default per page count for all resources here. - # - # config.default_per_page = 30 - # - # You can control the max per page count too. - # - # config.max_per_page = 10_000 - - # == Filters - # - # By default the index screen includes a "Filters" sidebar on the right - # hand side with a filter for each attribute of the registered model. - # You can enable or disable them for all resources here. - # - # config.filters = true - # - # By default the filters include associations in a select, which means - # that every record will be loaded for each association. - # You can enabled or disable the inclusion - # of those filters by default here. - # - # config.include_default_association_filters = true -end +ActiveAdmin.setup do |config| + # == Site Title + # + # Set the title that is displayed on the main layout + # for each of the active admin pages. + # + config.site_title = "DMPRoadmap" + + # Set the link url for the title. For example, to take + # users to your main site. Defaults to no link. + # + config.site_title_link = "/" + + # Set an optional image to be displayed for the header + # instead of a string (overrides :site_title) + # + # Note: Aim for an image that's 21px high so it fits in the header. + # + # config.site_title_image = "logo.png" + + # == Default Namespace + # + # Set the default namespace each administration resource + # will be added to. + # + # eg: + # config.default_namespace = :hello_world + # + # This will create resources in the HelloWorld module and + # will namespace routes to /hello_world/* + # + # To set no namespace by default, use: + # config.default_namespace = false + # + # Default: + # config.default_namespace = :admin + # + # You can customize the settings for each namespace by using + # a namespace block. For example, to change the site title + # within a namespace: + # + # config.namespace :admin do |admin| + # admin.site_title = "Custom Admin Title" + # end + # + # This will ONLY change the title for the admin section. Other + # namespaces will continue to use the main "site_title" configuration. + + # == User Authentication + # + # Active Admin will automatically call an authentication + # method in a before filter of all controller actions to + # ensure that there is a currently logged in admin user. + # + # This setting changes the method which Active Admin calls + # within the application controller. + # config.authentication_method = :authenticate_admin_user! + config.authentication_method = :authenticate_admin! + + # == User Authorization + # + # Active Admin will automatically call an authorization + # method in a before filter of all controller actions to + # ensure that there is a user with proper rights. You can use + # CanCanAdapter or make your own. Please refer to documentation. + # config.authorization_adapter = ActiveAdmin::CanCanAdapter + + # In case you prefer Pundit over other solutions you can here pass + # the name of default policy class. This policy will be used in every + # case when Pundit is unable to find suitable policy. + # config.pundit_default_policy = "MyDefaultPunditPolicy" + + # You can customize your CanCan Ability class name here. + # config.cancan_ability_class = "Ability" + + # You can specify a method to be called on unauthorized access. + # This is necessary in order to prevent a redirect loop which happens + # because, by default, user gets redirected to Dashboard. If user + # doesn't have access to Dashboard, he'll end up in a redirect loop. + # Method provided here should be defined in application_controller.rb. + # config.on_unauthorized_access = :access_denied + + # == Current User + # + # Active Admin will associate actions with the current + # user performing them. + # + # This setting changes the method which Active Admin calls + # (within the application controller) to return the currently logged in user. + # config.current_user_method = :current_admin_user + config.current_user_method = :current_user + + # == Logging Out + # + # Active Admin displays a logout link on each screen. These + # settings configure the location and method used for the link. + # + # This setting changes the path where the link points to. If it's + # a string, the strings is used as the path. If it's a Symbol, we + # will call the method to return the path. + # + # Default: + config.logout_link_path = :destroy_user_session_path + + # This setting changes the http method used when rendering the + # link. For example :get, :delete, :put, etc.. + # + # Default: + # config.logout_link_method = :get + + # == Root + # + # Set the action to call for the root path. You can set different + # roots for each namespace. + # + # Default: + # config.root_to = 'dashboard#index' + + # == Admin Comments + # + # This allows your users to comment on any resource registered with Active Admin. + # + # You can completely disable comments: + # config.comments = false + # + # You can change the name under which comments are registered: + # config.comments_registration_name = 'AdminComment' + # + # You can change the order for the comments and you can change the column + # to be used for ordering: + # config.comments_order = 'created_at ASC' + # + # You can disable the menu item for the comments index page: + config.comments_menu = false + # + # You can customize the comment menu: + # config.comments_menu = { parent: 'Admin', priority: 1 } + + # == Batch Actions + # + # Enable and disable Batch Actions + # + config.batch_actions = true + + # == Controller Filters + # + # You can add before, after and around filters to all of your + # Active Admin resources and pages from here. + # + # config.before_filter :do_something_awesome + + # == Localize Date/Time Format + # + # Set the localize format to display dates and times. + # To understand how to localize your app with I18n, read more at + # https://github.com/svenfuchs/i18n/blob/master/lib%2Fi18n%2Fbackend%2Fbase.rb#L52 + # + config.localize_format = :long + + # == Setting a Favicon + # + # config.favicon = 'favicon.ico' + + # == Meta Tags + # + # Add additional meta tags to the head element of active admin pages. + # + # Add tags to all pages logged in users see: + # config.meta_tags = { author: 'My Company' } + + # By default, sign up/sign in/recover password pages are excluded + # from showing up in search engine results by adding a robots meta + # tag. You can reset the hash of meta tags included in logged out + # pages: + # config.meta_tags_for_logged_out_pages = {} + + # == Removing Breadcrumbs + # + # Breadcrumbs are enabled by default. You can customize them for individual + # resources or you can disable them globally from here. + # + # config.breadcrumb = false + + # == Register Stylesheets & Javascripts + # + # We recommend using the built in Active Admin layout and loading + # up your own stylesheets / javascripts to customize the look + # and feel. + # + # To load a stylesheet: + # config.register_stylesheet 'my_stylesheet.css' + # + # You can provide an options hash for more control, which is passed along to stylesheet_link_tag(): + # config.register_stylesheet 'my_print_stylesheet.css', media: :print + # + # To load a javascript file: + # config.register_javascript 'my_javascript.js' + + # == CSV options + # + # Set the CSV builder separator + # config.csv_options = { col_sep: ';' } + # + # Force the use of quotes + # config.csv_options = { force_quotes: true } + + # == Menu System + # + # You can add a navigation menu to be used in your application, or configure a provided menu + # + # To change the default utility navigation to show a link to your website & a logout btn + # + # config.namespace :admin do |admin| + # admin.build_menu :utility_navigation do |menu| + # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } + # admin.add_logout_button_to_menu menu + # end + # end + # + # If you wanted to add a static menu item to the default menu provided: + # + # config.namespace :admin do |admin| + # admin.build_menu :default do |menu| + # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } + # end + # end + + # == Download Links + # + # You can disable download links on resource listing pages, + # or customize the formats shown per namespace/globally + # + # To disable/customize for the :admin namespace: + # + # config.namespace :admin do |admin| + # + # # Disable the links entirely + # admin.download_links = false + # + # # Only show XML & PDF options + # admin.download_links = [:xml, :pdf] + # + # # Enable/disable the links based on block + # # (for example, with cancan) + # admin.download_links = proc { can?(:view_download_links) } + # + # end + + # == Pagination + # + # Pagination is enabled by default for all resources. + # You can control the default per page count for all resources here. + # + # config.default_per_page = 30 + # + # You can control the max per page count too. + # + # config.max_per_page = 10_000 + + # == Filters + # + # By default the index screen includes a "Filters" sidebar on the right + # hand side with a filter for each attribute of the registered model. + # You can enable or disable them for all resources here. + # + # config.filters = true + # + # By default the filters include associations in a select, which means + # that every record will be loaded for each association. + # You can enabled or disable the inclusion + # of those filters by default here. + # + # config.include_default_association_filters = true +end \ No newline at end of file diff --git a/config/initializers/contact_us.rb b/config/initializers/contact_us.rb new file mode 100644 index 0000000..3f12697 --- /dev/null +++ b/config/initializers/contact_us.rb @@ -0,0 +1,30 @@ +# Use this hook to configure contact mailer. +ContactUs.setup do |config| + + # ==> Mailer Configuration + + # Configure the e-mail address which email notifications should be sent from. If emails must be sent from a verified email address you may set it here. + # Example: + # config.mailer_from = "contact@please-change-me.com" + config.mailer_from = nil + + # Configure the e-mail address which should receive the contact form email notifications. + config.mailer_to = "roadmap-l@listserv.ucop.edu" + + # ==> Form Configuration + + # Configure the form to ask for the users name. + config.require_name = true + + # Configure the form to ask for a subject. + config.require_subject = true + + # Configure the form gem to use. + # Example: + # config.form_gem = 'formtastic + # config.form_gem = 'formtastic' + + # Set the following variable to true if you are using localized paths + # e.g. /en/contact-us OR /fr/contact-us + config.localize_routes = true +end diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index dce5150..52deedb 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -1,15 +1,21 @@ # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| + # The secret key used by Devise. Devise uses this key to generate + # random tokens. Changing this key will render invalid all existing + # confirmation, reset password and unlock tokens in the database. + # Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key` + # by default. You can change it below and use your own secret key. + # config.secret_key = '65991d837d53ee81812e8c15598e3f691d03d5517d9e0073b6f6eab94df0e8a8c3d6a8bc3c11f1972520187f233bf5e355645a0c7224108ed2a578e45af759cd' - config.secret_key = '{secret_key}' # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, - # note that it will be overwritten if you use your own mailer class with default "from" parameter. - config.mailer_sender = "info@dcc.ac.uk" + # note that it will be overwritten if you use your own mailer class + # with default "from" parameter. + config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com' # Configure the class responsible to send e-mails. - # config.mailer = "Devise::Mailer" + # config.mailer = 'Devise::Mailer' # ==> ORM configuration # Load and configure the ORM. Supports :active_record (default) and @@ -25,7 +31,7 @@ # session. If you need permissions, you should implement that in a before filter. # You can also supply a hash where the value is a boolean determining whether # or not authentication should be aborted when the value is not present. - # config.authentication_keys = [ :email ] + # config.authentication_keys = [:email] # Configure parameters from the request object used for authentication. Each entry # given should be a request method and it will automatically be passed to the @@ -37,12 +43,12 @@ # Configure which authentication keys should be case-insensitive. # These keys will be downcased upon creating or modifying a user and when used # to authenticate or find a user. Default is :email. - config.case_insensitive_keys = [ :email ] + config.case_insensitive_keys = [:email] # Configure which authentication keys should have whitespace stripped. # These keys will have whitespace before and after removed upon creating or # modifying a user and when used to authenticate or find a user. Default is :email. - config.strip_whitespace_keys = [ :email ] + config.strip_whitespace_keys = [:email] # Tell if authentication through request.params is enabled. True by default. # It can be set to an array that will enable params authentication only for the @@ -52,19 +58,16 @@ # Tell if authentication through HTTP Auth is enabled. False by default. # It can be set to an array that will enable http authentication only for the - # given strategies, for example, `config.http_authenticatable = [:token]` will - # enable it only for token authentication. The supported strategies are: + # given strategies, for example, `config.http_authenticatable = [:database]` will + # enable it only for database authentication. The supported strategies are: # :database = Support basic authentication with authentication key + password - # :token = Support basic authentication with token authentication key - # :token_options = Support token authentication with options as defined in - # http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Token.html # config.http_authenticatable = false - # If http headers should be returned for AJAX requests. True by default. + # If 401 status code should be returned for AJAX requests. True by default. # config.http_authenticatable_on_xhr = true - # The realm used in Http Basic Authentication. "Application" by default. - # config.http_authentication_realm = "Application" + # The realm used in Http Basic Authentication. 'Application' by default. + # config.http_authentication_realm = 'Application' # It will change confirmation, password recovery and other workflows # to behave the same regardless if the e-mail provided was right or wrong. @@ -72,55 +75,41 @@ # config.paranoid = true # By default Devise will store the user in session. You can skip storage for - # :http_auth and :token_auth by adding those symbols to the array below. + # particular strategies by setting this option. # Notice that if you are skipping storage for all authentication paths, you # may want to disable generating routes to Devise's sessions controller by - # passing :skip => :sessions to `devise_for` in your config/routes.rb + # passing skip: :sessions to `devise_for` in your config/routes.rb config.skip_session_storage = [:http_auth] + # By default, Devise cleans up the CSRF token on authentication to + # avoid CSRF token fixation attacks. This means that, when using AJAX + # requests for sign in and sign up, you need to get a new CSRF token + # from the server. You can disable this option at your own risk. + # config.clean_up_csrf_token_on_authentication = true + # ==> Configuration for :database_authenticatable # For bcrypt, this is the cost for hashing the password and defaults to 10. If # using other encryptors, it sets how many times you want the password re-encrypted. # # Limiting the stretches to just one in testing will increase the performance of # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use - # a value less than 10 in other environments. - config.stretches = Rails.env.test? ? 1 : 10 + # a value less than 10 in other environments. Note that, for bcrypt (the default + # encryptor), the cost increases exponentially with the number of stretches (e.g. + # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation). + config.stretches = Rails.env.test? ? 1 : 10 # Setup a pepper to generate the encrypted password. - config.pepper = "de451fa8d44af2c286d922f753d1b10fd23b99c10747143d9ba118988b9fa9601fea66bfe31266ffc6a331dc7331c71ebe845af8abcdb84c24b42b8063386530" - - # ==> Configuration for :invitable - # The period the generated invitation token is valid, after - # this period, the invited resource won't be able to accept the invitation. - # When invite_for is 0 (the default), the invitation won't expire. - # config.invite_for = 2.weeks + # config.pepper = 'fce14df8477896bd9cc8ea3724d97270a5f19cb6544173d17b7e148cf360bf16449d96318275bfb3efde7b3b377db06cede2b64efb0a6d07dd02dd5076f639c9' - # Number of invitations users can send. - # - If invitation_limit is nil, there is no limit for invitations, users can - # send unlimited invitations, invitation_limit column is not used. - # - If invitation_limit is 0, users can't send invitations by default. - # - If invitation_limit n > 0, users can send n invitations. - # You can change invitation_limit column for some users so they can send more - # or less invitations, even with global invitation_limit = 0 - # Default: nil - # config.invitation_limit = 5 - - # The key to be used to check existing users when sending an invitation - # and the regexp used to test it when validate_on_invite is not set. - # config.invite_key = {:email => /\A[^@]+@[^@]+\z/} - # config.invite_key = {:email => /\A[^@]+@[^@]+\z/, :username => nil} - - # Flag that force a record to be valid before being actually invited - # Default: false - # config.validate_on_invite = true + # Send a notification email when the user's password is changed + # config.send_password_change_notification = false # ==> Configuration for :confirmable # A period that the user is allowed to access the website even without - # confirming his account. For instance, if set to 2.days, the user will be - # able to access the website for two days without confirming his account, + # confirming their account. For instance, if set to 2.days, the user will be + # able to access the website for two days without confirming their account, # access will be blocked just in the third day. Default is 0.days, meaning - # the user cannot access the website without confirming his account. + # the user cannot access the website without confirming their account. # config.allow_unconfirmed_access_for = 2.days # A period that the user is allowed to confirm their account before their @@ -133,27 +122,30 @@ # If true, requires any email changes to be confirmed (exactly the same way as # initial account confirmation) to be applied. Requires additional unconfirmed_email - # db field (see migrations). Until confirmed new email is stored in - # unconfirmed email column, and copied to email column on successful confirmation. - config.reconfirmable = false + # db field (see migrations). Until confirmed, new email is stored in + # unconfirmed_email column, and copied to email column on successful confirmation. + config.reconfirmable = true # Defines which key will be used when confirming an account - # config.confirmation_keys = [ :email ] + # config.confirmation_keys = [:email] # ==> Configuration for :rememberable # The time the user will be remembered without asking for credentials again. # config.remember_for = 2.weeks + # Invalidates all the remember me tokens when the user signs out. + config.expire_all_remember_me_on_sign_out = true + # If true, extends the user's remember period when remembered via cookie. # config.extend_remember_period = false # Options to be passed to the created cookie. For instance, you can set - # :secure => true in order to force SSL only cookies. + # secure: true in order to force SSL only cookies. # config.rememberable_options = {} # ==> Configuration for :validatable - # Range for password length. Default is 8..128. - config.password_length = 8..128 + # Range for password length. + config.password_length = 8..72 # Email regex used to validate email formats. It simply asserts that # one (and only one) @ exists in the given string. This is mainly @@ -163,10 +155,7 @@ # ==> Configuration for :timeoutable # The time you want to timeout the user session without activity. After this # time the user will be asked for credentials again. Default is 30 minutes. - config.timeout_in = 3.hours - - # If true, expires auth token on session timeout. - # config.expire_auth_token_on_timeout = false + # config.timeout_in = 30.minutes # ==> Configuration for :lockable # Defines which strategy will be used to lock an account. @@ -175,7 +164,7 @@ # config.lock_strategy = :failed_attempts # Defines which key will be used when locking and unlocking an account - # config.unlock_keys = [ :email ] + # config.unlock_keys = [:email] # Defines which strategy will be used to unlock an account. # :email = Sends an unlock link to the user email @@ -191,16 +180,23 @@ # Time interval to unlock the account if :time is enabled as unlock_strategy. # config.unlock_in = 1.hour + # Warn on the last attempt before the account is locked. + # config.last_attempt_warning = true + # ==> Configuration for :recoverable # # Defines which key will be used when recovering the password for an account - # config.reset_password_keys = [ :email ] + # config.reset_password_keys = [:email] # Time interval you can reset your password with a reset password key. # Don't put a too small interval or your users won't have the time to # change their passwords. config.reset_password_within = 6.hours + # When set to false, does not sign a user in automatically after their password is + # reset. Defaults to true, so a user is signed in automatically after a reset. + # config.sign_in_after_reset_password = true + # ==> Configuration for :encryptable # Allow you to use another encryption algorithm besides bcrypt (default). You can use # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1, @@ -211,10 +207,6 @@ # Require the `devise-encryptable` gem when using anything other than bcrypt # config.encryptor = :sha512 - # ==> Configuration for :token_authenticatable - # Defines name of the authentication token params key - # config.token_authentication_key = :auth_token - # ==> Scopes configuration # Turn scoped views on. Before rendering "sessions/new", it will first check for # "users/sessions/new". It's turned off by default because it's slower if you @@ -238,7 +230,7 @@ # should add them to the navigational formats lists. # # The "*/*" below is required to match Internet Explorer requests. - # config.navigational_formats = ["*/*", :html] + # config.navigational_formats = ['*/*', :html] # The default HTTP method used to sign out a resource. Default is :delete. config.sign_out_via = :delete @@ -246,7 +238,7 @@ # ==> OmniAuth # Add a new OmniAuth provider. Check the wiki for more information on setting # up on your models and hooks. - # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo' + # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo' # ==> Warden configuration # If you want to use other strategies, that are not supported by Devise, or @@ -254,7 +246,7 @@ # # config.warden do |manager| # manager.intercept_401 = false - # manager.default_strategies(:scope => :user).unshift :some_external_strategy + # manager.default_strategies(scope: :user).unshift :some_external_strategy # end # ==> Mountable engine configurations @@ -262,17 +254,12 @@ # is mountable, there are some extra configurations to be taken into account. # The following options are available, assuming the engine is mounted as: # - # mount MyEngine, at: "/my_engine" + # mount MyEngine, at: '/my_engine' # # The router that invoked `devise_for`, in the example above, would be: # config.router_name = :my_engine # - # When using omniauth, Devise cannot automatically set Omniauth path, + # When using OmniAuth, Devise cannot automatically set OmniAuth path, # so you need to do it manually. For the users scope, it would be: - # config.omniauth_path_prefix = "/my_engine/users/auth" - - config.warden do |manager| - manager.failure_app = CustomFailure - end - + # config.omniauth_path_prefix = '/my_engine/users/auth' end diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index 3eacb19..a2e0323 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -1,17 +1,17 @@ -module DMPonline4 - class Application < Rails::Application - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # Set the list of locales that we will support here (ie those for which we have translations for the DMPOnline application) - # tell the I18n library where to find your translations - config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # set default locale - # in config/initializers/locale.rb - - # set default locale to something other than :en - config.i18n.default_locale = Language.where(default_language: true).first.abbreviation - - # set fallback locale - config.i18n.fallbacks = true - end -end +module DMPonline4 + class Application < Rails::Application + + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # Set the list of locales that we will support here (ie those for which we have translations for the DMPOnline application) + # tell the I18n library where to find your translations + config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # set default locale + # in config/initializers/locale.rb + + # set default locale to something other than :en + config.i18n.default_locale = Language.where(default_language: true).first.abbreviation + + # set fallback locale + config.i18n.fallbacks = true + end +end \ No newline at end of file diff --git a/config/locales/bootstrap/de.bootstrap.yml b/config/locales/bootstrap/de.bootstrap.yml new file mode 100644 index 0000000..00d724e --- /dev/null +++ b/config/locales/bootstrap/de.bootstrap.yml @@ -0,0 +1,18 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +de: + helpers: + actions: "Aktionen" + links: + back: "Zurück" + cancel: "Abbrechen" + confirm: "Sind Sie sicher?" + destroy: "Löschen" + new: "Neu" + edit: "Bearbeiten" + titles: + edit: "Bearbeiten" + save: "Speichern" + new: "Neu" + delete: "Löschen" diff --git a/config/locales/bootstrap/en-UK.bootstrap.yml b/config/locales/bootstrap/en-UK.bootstrap.yml new file mode 100644 index 0000000..b19a32b --- /dev/null +++ b/config/locales/bootstrap/en-UK.bootstrap.yml @@ -0,0 +1,18 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en-UK: + helpers: + actions: "Actions" + links: + back: "Back" + cancel: "Cancel" + confirm: "Are you sure?" + destroy: "Delete" + new: "New" + edit: "Edit" + titles: + edit: "Edit" + save: "Save" + new: "New" + delete: "Delete" \ No newline at end of file diff --git a/config/locales/bootstrap/en-US.bootstrap.yml b/config/locales/bootstrap/en-US.bootstrap.yml new file mode 100644 index 0000000..4d377ce --- /dev/null +++ b/config/locales/bootstrap/en-US.bootstrap.yml @@ -0,0 +1,18 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en-US: + helpers: + actions: "Actions" + links: + back: "Back" + cancel: "Cancel" + confirm: "Are you sure?" + destroy: "Delete" + new: "New" + edit: "Edit" + titles: + edit: "Edit" + save: "Save" + new: "New" + delete: "Delete" diff --git a/config/locales/bootstrap/fr.bootstrap.yml b/config/locales/bootstrap/fr.bootstrap.yml new file mode 100644 index 0000000..b71db6a --- /dev/null +++ b/config/locales/bootstrap/fr.bootstrap.yml @@ -0,0 +1,17 @@ + +fr: + helpers: + actions: "Actions" + links: + back: "Retour" + cancel: "Annuler" + confirm: "Êtes-vous sûr?" + destroy: "Supprimer" + new: "Nouveau" + edit: "Modifier" + titles: + edit: "Modifier" + save: "Enregistrer" + new: "Nouveau" + delete: "Supprimer" + diff --git a/config/locales/contact_us/contact_us.de.yml b/config/locales/contact_us/contact_us.de.yml new file mode 100644 index 0000000..64aab87 --- /dev/null +++ b/config/locales/contact_us/contact_us.de.yml @@ -0,0 +1,25 @@ +# Sample localization file for German. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +de: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Gesendet durch das Kontaktformular. %{email}" + sent_by_name: "Nachricht von %{name} mit der E-Mail Adresse %{email}" + subject: "Nachricht von %{email}" + contacts: + new: &new + contact_us: "Kontaktiere Uns" + email: "E-Mail" + message: "Nachricht" + name: "Name" + subject: "Betreff" + submit: "Abschicken" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Beide Felder müssen ausgefüllt werden." + success: "Die Nachricht wurde erfolgreich versendet." diff --git a/config/locales/contact_us/contact_us.el.yml b/config/locales/contact_us/contact_us.el.yml new file mode 100644 index 0000000..1fd85d1 --- /dev/null +++ b/config/locales/contact_us/contact_us.el.yml @@ -0,0 +1,24 @@ +# Localization file for Greek + +el: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Εστάλη μέσω της φόρμας επικοινωνίας από τον/την %{email}" + sent_by_name: "Εστάλη από τον/την %{name} από τη διεύθυνση %{email}" + subject: "Μήνυμα φόρμας επικοινωνίας από %{email}" + contacts: + new: &new + contact_us: "Επικοινωνία" + email: "Διεύθυνση ηλεκτρονικού ταχυδρομείου" + message: "Μήνυμα" + name: "Όνομα" + subject: "Θέμα" + submit: "Αποστολή" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Πρέπει να συμπληρώσετε και τα δύο πεδία." + success: "Το μήνυμά σας εστάλη επιτυχώς." diff --git a/config/locales/contact_us/contact_us.en-UK.yml b/config/locales/contact_us/contact_us.en-UK.yml new file mode 100644 index 0000000..045a445 --- /dev/null +++ b/config/locales/contact_us/contact_us.en-UK.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en-UK: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Sent by contact form from %{email}" + sent_by_name: "Sent by %{name} from %{email}" + subject: "Contact Us message from %{email}" + contacts: + new: &new + contact_us: "Contact Us" + email: "Email" + message: "Message" + name: "Name" + subject: "Subjecteee" + submit: "Submit" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "You must enter both fields." + success: "Contact email was successfully sent." diff --git a/config/locales/contact_us/contact_us.en-US.yml b/config/locales/contact_us/contact_us.en-US.yml new file mode 100644 index 0000000..33f5573 --- /dev/null +++ b/config/locales/contact_us/contact_us.en-US.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en-US: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Sent by contact form from %{email}" + sent_by_name: "Sent by %{name} from %{email}" + subject: "Contact Us message from %{email}" + contacts: + new: &new + contact_us: "Contact Us" + email: "Email" + message: "Message" + name: "Name" + subject: "Subjecter" + submit: "Submit" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "You must enter both fields." + success: "Contact email was successfully sent." diff --git a/config/locales/contact_us/contact_us.es.yml b/config/locales/contact_us/contact_us.es.yml new file mode 100644 index 0000000..a4ac8ed --- /dev/null +++ b/config/locales/contact_us/contact_us.es.yml @@ -0,0 +1,25 @@ +# Sample localization file for Spanish. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +es: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Enviado por el formulario de contacto desde %{email}" + sent_by_name: "Enviado por %{name} con la dirección %{email}" + subject: "Mensaje de contacto de %{email}" + contacts: + new: &new + contact_us: "Contactanos" + email: "Correo electrónico" + message: "Mensaje" + name: "Nombre" + subject: "Tema" + submit: "Enviar" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Debes de ingresar ambos campos." + success: "El correo electrónico de contacto fue enviado con éxito." diff --git a/config/locales/contact_us/contact_us.fr.yml b/config/locales/contact_us/contact_us.fr.yml new file mode 100644 index 0000000..d3e78a2 --- /dev/null +++ b/config/locales/contact_us/contact_us.fr.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +fr: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Envoyé depuis le fomulaire de contact par %{email}" + sent_by_name: "Envoyé par %{name} depuis %{email}" + subject: "Message 'Contactez nous' de %{email}" + contacts: + new: &new + contact_us: "Contactez Nous" + email: "Email" + message: "Message" + name: "Nom" + subject: "Sujet" + submit: "Envoyer" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Merci de saisir les deux champs." + success: "Votre message a bien été envoyé." diff --git a/config/locales/contact_us/contact_us.he.yml b/config/locales/contact_us/contact_us.he.yml new file mode 100644 index 0000000..72b254c --- /dev/null +++ b/config/locales/contact_us/contact_us.he.yml @@ -0,0 +1,22 @@ +he: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "נשלח על ידי קונטקט פורם מאת %{email}" + sent_by_name: "נשלח על ידי %{name} מאת %{email}" + subject: "צור קשר, הודעה מאת %{email}" + contacts: + new: &new + contact_us: "צור קשר" + email: "מייל" + message: "הודעה" + name: "שם" + subject: "נושא" + submit: "שלח" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "הנך צריך למלא את שתי השדות." + success: "הטופס נשלח בהצלחה." diff --git a/config/locales/contact_us/contact_us.it.yml b/config/locales/contact_us/contact_us.it.yml new file mode 100644 index 0000000..9b0a490 --- /dev/null +++ b/config/locales/contact_us/contact_us.it.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +it: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Inviato dal formato di contatto. %{email}" + sent_by_name: "Sent by %{name} from %{email}" + subject: "Contact Us message from %{email}" + contacts: + new: &new + contact_us: "Contattaci" + email: "Email" + message: "Messaggio" + name: "Name" + subject: "Subject" + submit: "Inviare" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Devi inserire entrambi i campi." + success: "La mail di contatto è stata inviata." diff --git a/config/locales/contact_us/contact_us.ja.yml b/config/locales/contact_us/contact_us.ja.yml new file mode 100644 index 0000000..e1d6e1b --- /dev/null +++ b/config/locales/contact_us/contact_us.ja.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +ja: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "お問い合せメールを送信しました : %{email}" + sent_by_name: "%{name} さんがお問い合せメールを送信しました : %{email}" + subject: "お問い合わせメール : %{email}" + contacts: + new: &new + contact_us: "お問い合わせ" + email: "メールアドレス" + message: "お問い合せ内容" + name: "お名前" + subject: "件名" + submit: "送信する" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "すべての項目を入力してください。" + success: "お問い合わせを送信しました。" diff --git a/config/locales/contact_us/contact_us.pl.yml b/config/locales/contact_us/contact_us.pl.yml new file mode 100644 index 0000000..81b7fd3 --- /dev/null +++ b/config/locales/contact_us/contact_us.pl.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +pl: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Wysłane przez formularz kontaktowy z %{email}" + sent_by_name: "Wysłane przez %{name} z %{email}" + subject: "Wiadomość od %{email}" + contacts: + new: &new + contact_us: "Kontakt z nami" + email: "Email" + message: "Wiadomość" + name: "Imię" + subject: "Temat" + submit: "Wyślij" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Musisz wypełnić oba pola." + success: "Twój email został wysłany" diff --git a/config/locales/contact_us/contact_us.pt-BR.yml b/config/locales/contact_us/contact_us.pt-BR.yml new file mode 100644 index 0000000..d53e2e1 --- /dev/null +++ b/config/locales/contact_us/contact_us.pt-BR.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +pt-BR: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Enviado pelo formulário de contato. %{email}" + sent_by_name: "Enviado por %{name} de %{email}" + subject: "Contate-nos: nova mensagem de %{email}" + contacts: + new: &new + contact_us: "Contate-nos" + email: "Email" + message: "Mensagem" + name: "Nome" + subject: "Assunto" + submit: "Enviar" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Você tem de preencher ambos os campos." + success: "Email de contato foi enviado com sucesso." diff --git a/config/locales/contact_us/contact_us.pt-PT.yml b/config/locales/contact_us/contact_us.pt-PT.yml new file mode 100644 index 0000000..ccd6a60 --- /dev/null +++ b/config/locales/contact_us/contact_us.pt-PT.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +pt-PT: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Enviado pelo formulário de contacto. %{email}" + sent_by_name: "Enviado por %{name} de %{email}" + subject: "Contacte-nos: nova mensagem de %{email}" + contacts: + new: &new + contact_us: "Contacte-nos" + email: "Email" + message: "Mensagem" + name: "Nome" + subject: "Assunto" + submit: "Enviar" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Tem de preencher ambos os campos." + success: "Email de contacto foi enviado com sucesso." diff --git a/config/locales/contact_us/contact_us.ru.yml b/config/locales/contact_us/contact_us.ru.yml new file mode 100644 index 0000000..2b46fe5 --- /dev/null +++ b/config/locales/contact_us/contact_us.ru.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +ru: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "Отправлено через контактную форму через %{email}" + sent_by_name: "Отправлено от %{name} через %{email}" + subject: "Контактное сообщение от %{email}" + contacts: + new: &new + contact_us: "Свяжитесь с Нами" + email: "Электронная Почта" + message: "Сообщение" + name: "Имя" + subject: "Тематика" + submit: "Отправить" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "Вы должны заполнить оба поля." + success: "Контактное сообщение отправлено." diff --git a/config/locales/contact_us/contact_us.zh-TW.yml b/config/locales/contact_us/contact_us.zh-TW.yml new file mode 100644 index 0000000..3dde793 --- /dev/null +++ b/config/locales/contact_us/contact_us.zh-TW.yml @@ -0,0 +1,22 @@ +zh: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "由【聯絡我們】頁發送 %{email}" + sent_by_name: "由 %{name} 寄出 從 %{email}" + subject: "由 %{email} 寄出的訊息" + contacts: + new: &new + contact_us: "聯絡我們" + email: "電子郵件" + message: "訊息" + name: "姓名" + subject: "主題" + submit: "發送" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "請檢查是否正確填寫所有欄位。" + success: "訊息已成功送出。" diff --git a/config/locales/contact_us/contact_us.zh.yml b/config/locales/contact_us/contact_us.zh.yml new file mode 100644 index 0000000..73a0a71 --- /dev/null +++ b/config/locales/contact_us/contact_us.zh.yml @@ -0,0 +1,25 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +zh: + contact_us: + contact_mailer: + contact_email: + sent_by_contact_form: "由contact form发送。 %{email}" + sent_by_name: "Sent by %{name} from %{email}" + subject: "Contact Us message from %{email}" + contacts: + new: &new + contact_us: "联系我们" + email: "邮箱" + message: "消息" + name: "Name" + subject: "Subject" + submit: "发送" + new_formtastic: + <<: *new + new_simple_form: + <<: *new + notices: + error: "请正确输入邮箱与信息。" + success: "邮件已成功发送。" diff --git a/config/locales/de.bootstrap.yml b/config/locales/de.bootstrap.yml deleted file mode 100644 index 00d724e..0000000 --- a/config/locales/de.bootstrap.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -de: - helpers: - actions: "Aktionen" - links: - back: "Zurück" - cancel: "Abbrechen" - confirm: "Sind Sie sicher?" - destroy: "Löschen" - new: "Neu" - edit: "Bearbeiten" - titles: - edit: "Bearbeiten" - save: "Speichern" - new: "Neu" - delete: "Löschen" diff --git a/config/locales/devise.de.yml b/config/locales/devise.de.yml deleted file mode 100644 index 72df6c7..0000000 --- a/config/locales/devise.de.yml +++ /dev/null @@ -1,78 +0,0 @@ -# Additional translations at https://github.com/plataformatec/devise/wiki/I18n - -de: - devise: - confirmations: - confirmed: "Vielen Dank für Ihre Registrierung. Bitte melden Sie sich an." - send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit einer Anleitung zur Bestätigung Ihres Zugangs." - resend_instructions: "Sende Anleitung zur Bestätigung erneut" - confirmed_and_signed_in: "Vielen Dank für Ihre Registrierung. Sie sind jetzt angemeldet." - send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert, erhalten Sie in wenigen Minuten eine E-Mail mit einer Anleitung zur Bestätigung Ihres Zugangs." - failure: - already_authenticated: "Sie sind bereits angemeldet." - inactive: "Ihr Zugang ist noch nicht aktiviert worden." - invalid: "E-Mail-Adresse oder Passwort ungültig." - invalid_token: "Ungültiges Authentifizierungs-Token." - locked: "Ihr Zugang ist gesperrt." - not_found_in_database: "E-Mail-Adresse oder Passwort ungültig." - timeout: "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an." - unauthenticated: "Sie müssen sich anmelden oder registrieren, um fortzufahren." - unconfirmed: "Sie müssen Ihren Zugang bestätigen, um fortzufahren." - mailer: - app_name: "DMPonline" - confirmation_instructions: - subject: "DMPonline - Bestätigung Ihres Zugangs" - link: "Klicken Sie hier, um Ihren Zugang zu bestätigen" - email: "

    Willkommen zu DMPonline, %{email}

    -

    Danke für Ihre Registrierung bei %{app_link}. Bitte bestätigen Sie Ihre E-Mail-Adresse:

    -

    %{confirmation_link} (oder kopieren Sie %{confirmation_direct_url} in Ihren Browser).

    " - reset_password_instructions: - subject: "DMPonline - Passwort zurücksetzen" - link: "Ändere mein Passwort" - email: "

    Hallo %{resource_email}!

    -

    Jemand hat einen Link angefordert, um Ihr Passwort für %{app_link} zurückzusetzen. Dies kann durch den unteren Link geschehen.

    -

    %{reset_password_link}

    -

    Wenn diese Anfrage nicht von Ihnen ist, können Sie diese Email ignorieren.

    -

    Ihr Passwort ändert sich erst, wenn Sie obigen Link verwenden, um ein Neues zu setzen.

    " - unlock_instructions: - subject: "DMPonline - Zugang entsperren" - link: "Entsperre meinen Zugang" - email: "

    Hallo %{resource_email}!

    -

    Ihr %{app_link} Zugang würde wegen übermäßiger Anmeldungsversuche gesperrt.

    -

    Verwenden Sie den unteren Link, um Ihren Zugang zu entsperren:

    -

    %{unlock_link}

    " - omniauth_callbacks: - failure: "Sie konnten mit Ihrem %{kind}-Zugang nicht authentifiziert werden, da '%{reason}'." - success: "Sie haben sich erfolgreich mit Ihrem %{kind}-Zugang angemeldet." - passwords: - no_token: "Sie können diese Seite nur über einen Verweis in einer E-Mail zum Zurücksetzen des Passworts aufrufen. Sollten Sie einen solchen Verweis aufgerufen haben, stellen Sie bitte sicher, dass Sie die vollständige URL aufgerufen haben." - send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit einer Anleitung zum Zurücksetzen Ihres Passworts." - send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert, erhalten Sie in wenigen Minuten eine E-Mail mit einer Anleitung zum Zurücksetzen Ihres Passworts." - updated: "Ihr Passwort wurde geändert. Sie sind jetzt angemeldet." - updated_not_active: "Ihr Passwort wurde geändert." - registrations: - destroyed: "Ihr Zugang wurde gelöscht." - signed_up: "Sie haben sich erfolgreich registriert." - signed_up_but_inactive: "Sie haben sich erfolgreich registriert. Sie können sich jedoch z.Z. nicht anmelden, da Ihr Zugang inaktiv ist." - signed_up_but_locked: "Sie haben sich erfolgreich registriert. Sie können sich jedoch z.Z. nicht anmelden, da Ihr Zugang gesperrt ist." - signed_up_but_unconfirmed: "Sie haben kürzlich eine E-Mail mit einer Anleitung zur Bestätigung Ihres Zugangs erhalten. Bitte öffnen Sie den dort angegebenen URL um Ihren Zugang zu aktivieren." - update_needs_confirmation: "Sie haben erfoglreich die Nutzerdetails geändert, jedoch muss Ihre neue E-Mail-Adresse überprüft werden. Sie haben eine entsprechende E-Mail erhalten; bitte öffnen Sie den dort angegebenen URL um Ihre neue E-Mail-Adresse zu bestätigen." - updated: "Ihre Zugang wurde erfolgreich aktualisiert." - sessions: - signed_in: "Erfolgreich angemeldet." - signed_out: "Erfolgreich abgemeldet." - unlocks: - send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit einer Anleitung zur Entsperrung Ihres Zugangs." - send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert, erhalten Sie in wenigen Minuten eine E-Mail mit einer Anleitung zur Entsperrung Ihres Zugangs." - resend_unlock_instructions: "Sende erneut Anleitung zur Entsperrung." - unlocked: "Ihr Zugang wurde erfolgreich entsperrt. Bitte melden Sie sich an um fortzufahren." - errors: - messages: - already_confirmed: "wurde bereits bestätigt. Bitte versuchen Sie, sich anzumelden." - confirmation_period_expired: "muss innerhalb %{period} bestätigt werden, bitte wiederholen Sie den Vorgang." - expired: "ist abgelaufen, bitte erneut anfordern" - not_found: "nicht gefunden" - not_locked: "war nicht gesperrt" - not_saved: - one: "Ein Fehler hat verhindert, dass %{resource} gespeichert werden konnte:" - other: "%{count} Fehler haben verhindert, dass %{resource} gespeichert werden konnte:" diff --git a/config/locales/devise.en-UK.yml b/config/locales/devise.en-UK.yml deleted file mode 100644 index e4e844f..0000000 --- a/config/locales/devise.en-UK.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Additional translations at https://github.com/plataformatec/devise/wiki/I18n - -en: - devise: - confirmations: - confirmed: "Your account was successfully confirmed. Please sign in." - send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." - send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." - failure: - already_authenticated: "You are already signed in." - inactive: "Your account was not activated yet." - invalid: "Invalid email or password." - invalid_token: "Invalid authentication token." - locked: "Your account is locked." - not_found_in_database: "Invalid email or password." - timeout: "Your session expired, please sign in again to continue." - unauthenticated: "You need to sign in or sign up before continuing." - unconfirmed: "You have to confirm your account before continuing." - mailer: - confirmation_instructions: - subject: "Confirm your DMPonline account" - reset_password_instructions: - subject: "Reset password instructions" - unlock_instructions: - subject: "Unlock Instructions" - omniauth_callbacks: - failure: "Could not authenticate you from %{kind} because \"%{reason}\"." - success: "Successfully authenticated from %{kind} account." - passwords: - no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." - send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes." - send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." - updated: "Your password was changed successfully. You are now signed in." - updated_not_active: "Your password was changed successfully." - registrations: - destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." - signed_up: "Welcome! You have signed up successfully." - signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." - signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." - signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account. If you do not receive the confirmation email, please check your spam filter." - update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." - updated: "You updated your account successfully." - sessions: - signed_in: "Signed in successfully." - signed_out: "Signed out successfully." - unlocks: - send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes." - send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." - unlocked: "Your account has been unlocked successfully. Please sign in to continue." - errors: - messages: - already_confirmed: "was already confirmed, please try signing in" - confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" - expired: "has expired, please request a new one" - not_found: "not found" - not_locked: "was not locked" - not_saved: - one: "1 error prohibited this %{resource} from being saved:" - other: "%{count} errors prohibited this %{resource} from being saved:" diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml deleted file mode 100644 index 59c4f02..0000000 --- a/config/locales/devise.fr.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Additional translations at https://github.com/plataformatec/devise/wiki/I18n - -fr: - devise: - confirmations: - confirmed: "Votre compte a bien été validé. Veuillez vous connecter." - send_instructions: "Vous recevrez dans quelques minutes un courriel contenant les directives pour activer votre compte." - resend_instructions: "Envoyer de nouveau les directives" - send_paranoid_instructions: "Si votre adresse électronique existe dans notre base de données, vous recevrez dans quelques minutes un courriel contenant les directives pour valider votre compte." - failure: - already_authenticated: "Vous êtes déjà connecté(e)." - inactive: "Votre compte n'est pas encore activé." - invalid: "Courriel ou mot de passe incorrect." - invalid_token: "Jeton d'authentification incorrect." - locked: "Votre compte est verrouillé." - not_found_in_database: "Courriel ou mot de passe incorrect." - timeout: "Votre session est expirée. Veuillez vous reconnecter pour continuer." - unauthenticated: "Vous devez vous connecter ou vous inscrire pour continuer." - unconfirmed: "Vous devez confirmer votre compte pour continuer." - mailer: - app_name: "Assistant PGD" - confirmation_instructions: - subject: "Valider votre compte Assistant PGD" - link: "Cliquer ici pour activer votre compte" - email: "

    Bienvenue dans l'Assistant PGD, %{email}

    -

    Merci de vous être inscrit(e) à %{app_link}. Veuillez confirmer votre adresse électronique :

    -

    %{confirmation_link} (ou copier %{confirmation_direct_url} dans votre navigateur).

    " - reset_password_instructions: - subject: "Directives pour réinitialiser le mot de passe" - link: "Réinitialiser mon mot de passe" - email: "

    Bonjour %{resource_email}!

    -

    Un changement de mot de passe a été demandé pour %{app_link}. Vous pouvez le faire en cliquant sur le lien ci-dessous.

    -

    %{reset_password_link}

    -

    Si vous n'avez pas demandé ce changement, veuillez ignorer ce message.

    -

    Votre mot de passe ne sera pas changé tant que vous n'aurez pas accédé au lien ci-dessus pour en créer un nouveau.

    " - unlock_instructions: - subject: "Directives de déverrouillage" - link: "Déverrouiller mon compte" - email: "

    Bonjour %{resource_email}!

    -

    Votre compte %{app_link} a été verrouillé à la suite d'un trop grand nombre de tentatives d'authentification.

    -

    Cliquez sur le lien ci-dessous pour déverrouiller votre compte :

    -

    %{unlock_link}

    " - omniauth_callbacks: - failure: "Nous n'avons pas pu vous authentifier à partir de %{kind} parce que '%{reason}'." - success: "Authentification réussie à partir du compte %{kind}." - passwords: - no_token: "Vous ne pouvez pas accéder à cette page sans y avoir été dirigé par un courriel de réinitialisation du mot de passe. Si vous avez été dirigé vers cette page à partir d’un courriel de réinitialisation, assurez-vous d'utiliser l'adresse URL complète fournie." - send_instructions: "Vous recevrez dans quelques minutes un courriel contenant les directives pour réinitialiser le mot de passe." - send_paranoid_instructions: "Si votre adresse électronique existe dans notre base de données, vous recevrez dans quelques minutes un lien de récupération du mot de passe par courriel." - updated: "Votre mot de passe a bien été modifié. Vous êtes maintenant connecté." - updated_not_active: "Votre mot de passe a bien été modifié." - registrations: - destroyed: "Votre compte a bien été supprimé. Nous espérons vous revoir bientôt." - signed_up: "Bienvenu(e)! Vous êtes bien inscrit(e)." - signed_up_but_inactive: "Vous êtes bien inscrit(e). Cependant, vous ne pouvez pas vous connecter, car votre compte n'est pas encore activé." - signed_up_but_locked: "Vous êtes bien inscrit(e). Cependant, vous ne pouvez pas vous connecter, car votre compte est verrouillé." - signed_up_but_unconfirmed: "Un message contenant un lien de confirmation a été envoyé à votre adresse électronique. Ouvrez ce lien pour activer votre compte. Si vous n’avez pas reçu le courriel de confirmation, vérifiez votre filtre antipourriel." - update_needs_confirmation: "Votre compte a bien été mis à jour, mais nous devons vérifier votre nouvelle adresse électronique. Vérifiez vos courriels et cliquez sur le lien de confirmation pour finaliser la validation de votre nouvelle adresse électronique." - updated: "Votre compte a bien été modifié." - sessions: - signed_in: "Connecté" - signed_out: "Déconnecté" - unlocks: - send_instructions: "Vous recevrez dans quelques minutes un courriel contenant les directives pour déverrouiller votre compte." - send_paranoid_instructions: "Si votre compte existe, vous recevrez dans quelques minutes un courriel contenant les directives pour le déverrouiller." - resend_unlock_instructions: "Envoyer de nouveau les directives de déverouillage." - unlocked: "Votre compte a bien été déverrouillé. Veuillez vous connecter pour continuer." - errors: - messages: - already_confirmed: "a déjà été validé, essayez de vous connecter." - confirmation_period_expired: "à confirmer dans les %{period}. Veuillez faire une nouvelle demande." - expired: "a expiré, veuillez faire une nouvelle demande." - not_found: "n'a pas été trouvé" - not_locked: "n'était pas verrouillé" - not_saved: - one: "Une erreur a empêché d’enregistrer ce(tte) %{resource} :" - other: "%{count} erreurs ont empêché d’enregistrer ce(tte) %{resource} :" - blank: "Ce champ ne peut être vide" - activerecord: - attributes: - user: - email: "Courriel: " diff --git a/config/locales/devise/devise.de.yml b/config/locales/devise/devise.de.yml new file mode 100644 index 0000000..72df6c7 --- /dev/null +++ b/config/locales/devise/devise.de.yml @@ -0,0 +1,78 @@ +# Additional translations at https://github.com/plataformatec/devise/wiki/I18n + +de: + devise: + confirmations: + confirmed: "Vielen Dank für Ihre Registrierung. Bitte melden Sie sich an." + send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit einer Anleitung zur Bestätigung Ihres Zugangs." + resend_instructions: "Sende Anleitung zur Bestätigung erneut" + confirmed_and_signed_in: "Vielen Dank für Ihre Registrierung. Sie sind jetzt angemeldet." + send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert, erhalten Sie in wenigen Minuten eine E-Mail mit einer Anleitung zur Bestätigung Ihres Zugangs." + failure: + already_authenticated: "Sie sind bereits angemeldet." + inactive: "Ihr Zugang ist noch nicht aktiviert worden." + invalid: "E-Mail-Adresse oder Passwort ungültig." + invalid_token: "Ungültiges Authentifizierungs-Token." + locked: "Ihr Zugang ist gesperrt." + not_found_in_database: "E-Mail-Adresse oder Passwort ungültig." + timeout: "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an." + unauthenticated: "Sie müssen sich anmelden oder registrieren, um fortzufahren." + unconfirmed: "Sie müssen Ihren Zugang bestätigen, um fortzufahren." + mailer: + app_name: "DMPonline" + confirmation_instructions: + subject: "DMPonline - Bestätigung Ihres Zugangs" + link: "Klicken Sie hier, um Ihren Zugang zu bestätigen" + email: "

    Willkommen zu DMPonline, %{email}

    +

    Danke für Ihre Registrierung bei %{app_link}. Bitte bestätigen Sie Ihre E-Mail-Adresse:

    +

    %{confirmation_link} (oder kopieren Sie %{confirmation_direct_url} in Ihren Browser).

    " + reset_password_instructions: + subject: "DMPonline - Passwort zurücksetzen" + link: "Ändere mein Passwort" + email: "

    Hallo %{resource_email}!

    +

    Jemand hat einen Link angefordert, um Ihr Passwort für %{app_link} zurückzusetzen. Dies kann durch den unteren Link geschehen.

    +

    %{reset_password_link}

    +

    Wenn diese Anfrage nicht von Ihnen ist, können Sie diese Email ignorieren.

    +

    Ihr Passwort ändert sich erst, wenn Sie obigen Link verwenden, um ein Neues zu setzen.

    " + unlock_instructions: + subject: "DMPonline - Zugang entsperren" + link: "Entsperre meinen Zugang" + email: "

    Hallo %{resource_email}!

    +

    Ihr %{app_link} Zugang würde wegen übermäßiger Anmeldungsversuche gesperrt.

    +

    Verwenden Sie den unteren Link, um Ihren Zugang zu entsperren:

    +

    %{unlock_link}

    " + omniauth_callbacks: + failure: "Sie konnten mit Ihrem %{kind}-Zugang nicht authentifiziert werden, da '%{reason}'." + success: "Sie haben sich erfolgreich mit Ihrem %{kind}-Zugang angemeldet." + passwords: + no_token: "Sie können diese Seite nur über einen Verweis in einer E-Mail zum Zurücksetzen des Passworts aufrufen. Sollten Sie einen solchen Verweis aufgerufen haben, stellen Sie bitte sicher, dass Sie die vollständige URL aufgerufen haben." + send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit einer Anleitung zum Zurücksetzen Ihres Passworts." + send_paranoid_instructions: "Falls Ihre E-Mail-Adresse in unserer Datenbank existiert, erhalten Sie in wenigen Minuten eine E-Mail mit einer Anleitung zum Zurücksetzen Ihres Passworts." + updated: "Ihr Passwort wurde geändert. Sie sind jetzt angemeldet." + updated_not_active: "Ihr Passwort wurde geändert." + registrations: + destroyed: "Ihr Zugang wurde gelöscht." + signed_up: "Sie haben sich erfolgreich registriert." + signed_up_but_inactive: "Sie haben sich erfolgreich registriert. Sie können sich jedoch z.Z. nicht anmelden, da Ihr Zugang inaktiv ist." + signed_up_but_locked: "Sie haben sich erfolgreich registriert. Sie können sich jedoch z.Z. nicht anmelden, da Ihr Zugang gesperrt ist." + signed_up_but_unconfirmed: "Sie haben kürzlich eine E-Mail mit einer Anleitung zur Bestätigung Ihres Zugangs erhalten. Bitte öffnen Sie den dort angegebenen URL um Ihren Zugang zu aktivieren." + update_needs_confirmation: "Sie haben erfoglreich die Nutzerdetails geändert, jedoch muss Ihre neue E-Mail-Adresse überprüft werden. Sie haben eine entsprechende E-Mail erhalten; bitte öffnen Sie den dort angegebenen URL um Ihre neue E-Mail-Adresse zu bestätigen." + updated: "Ihre Zugang wurde erfolgreich aktualisiert." + sessions: + signed_in: "Erfolgreich angemeldet." + signed_out: "Erfolgreich abgemeldet." + unlocks: + send_instructions: "Sie erhalten in wenigen Minuten eine E-Mail mit einer Anleitung zur Entsperrung Ihres Zugangs." + send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert, erhalten Sie in wenigen Minuten eine E-Mail mit einer Anleitung zur Entsperrung Ihres Zugangs." + resend_unlock_instructions: "Sende erneut Anleitung zur Entsperrung." + unlocked: "Ihr Zugang wurde erfolgreich entsperrt. Bitte melden Sie sich an um fortzufahren." + errors: + messages: + already_confirmed: "wurde bereits bestätigt. Bitte versuchen Sie, sich anzumelden." + confirmation_period_expired: "muss innerhalb %{period} bestätigt werden, bitte wiederholen Sie den Vorgang." + expired: "ist abgelaufen, bitte erneut anfordern" + not_found: "nicht gefunden" + not_locked: "war nicht gesperrt" + not_saved: + one: "Ein Fehler hat verhindert, dass %{resource} gespeichert werden konnte:" + other: "%{count} Fehler haben verhindert, dass %{resource} gespeichert werden konnte:" diff --git a/config/locales/devise/devise.en-UK.yml b/config/locales/devise/devise.en-UK.yml new file mode 100644 index 0000000..e4e844f --- /dev/null +++ b/config/locales/devise/devise.en-UK.yml @@ -0,0 +1,59 @@ +# Additional translations at https://github.com/plataformatec/devise/wiki/I18n + +en: + devise: + confirmations: + confirmed: "Your account was successfully confirmed. Please sign in." + send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." + send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." + failure: + already_authenticated: "You are already signed in." + inactive: "Your account was not activated yet." + invalid: "Invalid email or password." + invalid_token: "Invalid authentication token." + locked: "Your account is locked." + not_found_in_database: "Invalid email or password." + timeout: "Your session expired, please sign in again to continue." + unauthenticated: "You need to sign in or sign up before continuing." + unconfirmed: "You have to confirm your account before continuing." + mailer: + confirmation_instructions: + subject: "Confirm your DMPonline account" + reset_password_instructions: + subject: "Reset password instructions" + unlock_instructions: + subject: "Unlock Instructions" + omniauth_callbacks: + failure: "Could not authenticate you from %{kind} because \"%{reason}\"." + success: "Successfully authenticated from %{kind} account." + passwords: + no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." + send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes." + send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." + updated: "Your password was changed successfully. You are now signed in." + updated_not_active: "Your password was changed successfully." + registrations: + destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." + signed_up: "Welcome! You have signed up successfully." + signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." + signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." + signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account. If you do not receive the confirmation email, please check your spam filter." + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." + updated: "You updated your account successfully." + sessions: + signed_in: "Signed in successfully." + signed_out: "Signed out successfully." + unlocks: + send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes." + send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." + unlocked: "Your account has been unlocked successfully. Please sign in to continue." + errors: + messages: + already_confirmed: "was already confirmed, please try signing in" + confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" + expired: "has expired, please request a new one" + not_found: "not found" + not_locked: "was not locked" + not_saved: + one: "1 error prohibited this %{resource} from being saved:" + other: "%{count} errors prohibited this %{resource} from being saved:" diff --git a/config/locales/devise/devise.en-US.yml b/config/locales/devise/devise.en-US.yml new file mode 100644 index 0000000..b19053b --- /dev/null +++ b/config/locales/devise/devise.en-US.yml @@ -0,0 +1,59 @@ +# Additional translations at https://github.com/plataformatec/devise/wiki/I18n + +en: + devise: + confirmations: + confirmed: "Your account was successfully confirmed. Please sign in." + send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." + send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." + failure: + already_authenticated: "You are already signed in." + inactive: "Your account was not activated yet." + invalid: "Invalid email or password." + invalid_token: "Invalid authentication token." + locked: "Your account is locked." + not_found_in_database: "Invalid email or password." + timeout: "Your session expired, please sign in again to continue." + unauthenticated: "You need to sign in or sign up before continuing." + unconfirmed: "You have to confirm your account before continuing." + mailer: + confirmation_instructions: + subject: "Confirm your DMPonline account" + reset_password_instructions: + subject: "Reset password instructions" + unlock_instructions: + subject: "Unlock Instructions" + omniauth_callbacks: + failure: "Could not authenticate you from %{kind} because \"%{reason}\"." + success: "Successfully authenticated from %{kind} account." + passwords: + no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." + send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes." + send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." + updated: "Your password was changed successfully. You are now signed in." + updated_not_active: "Your password was changed successfully." + registrations: + destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." + signed_up: "Welcome! You have signed up successfully." + signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." + signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." + signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account. If you do not receive the confirmation email, please check your spam filter." + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." + updated: "You updated your account successfully." + sessions: + signed_in: "Signed in successfully." + signed_out: "Signed out successfully." + unlocks: + send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes." + send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." + unlocked: "Your account has been unlocked successfully. Please sign in to continue." + errors: + messages: + already_confirmed: "was already confirmed, please try signing in" + confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" + expired: "has expired, please request a new one" + not_found: "not found" + not_locked: "was not locked" + not_saved: + one: "1 error prohibited this %{resource} from being saved:" + other: "%{count} errors prohibited this %{resource} from being saved:" diff --git a/config/locales/devise/devise.fr.yml b/config/locales/devise/devise.fr.yml new file mode 100644 index 0000000..59c4f02 --- /dev/null +++ b/config/locales/devise/devise.fr.yml @@ -0,0 +1,82 @@ +# Additional translations at https://github.com/plataformatec/devise/wiki/I18n + +fr: + devise: + confirmations: + confirmed: "Votre compte a bien été validé. Veuillez vous connecter." + send_instructions: "Vous recevrez dans quelques minutes un courriel contenant les directives pour activer votre compte." + resend_instructions: "Envoyer de nouveau les directives" + send_paranoid_instructions: "Si votre adresse électronique existe dans notre base de données, vous recevrez dans quelques minutes un courriel contenant les directives pour valider votre compte." + failure: + already_authenticated: "Vous êtes déjà connecté(e)." + inactive: "Votre compte n'est pas encore activé." + invalid: "Courriel ou mot de passe incorrect." + invalid_token: "Jeton d'authentification incorrect." + locked: "Votre compte est verrouillé." + not_found_in_database: "Courriel ou mot de passe incorrect." + timeout: "Votre session est expirée. Veuillez vous reconnecter pour continuer." + unauthenticated: "Vous devez vous connecter ou vous inscrire pour continuer." + unconfirmed: "Vous devez confirmer votre compte pour continuer." + mailer: + app_name: "Assistant PGD" + confirmation_instructions: + subject: "Valider votre compte Assistant PGD" + link: "Cliquer ici pour activer votre compte" + email: "

    Bienvenue dans l'Assistant PGD, %{email}

    +

    Merci de vous être inscrit(e) à %{app_link}. Veuillez confirmer votre adresse électronique :

    +

    %{confirmation_link} (ou copier %{confirmation_direct_url} dans votre navigateur).

    " + reset_password_instructions: + subject: "Directives pour réinitialiser le mot de passe" + link: "Réinitialiser mon mot de passe" + email: "

    Bonjour %{resource_email}!

    +

    Un changement de mot de passe a été demandé pour %{app_link}. Vous pouvez le faire en cliquant sur le lien ci-dessous.

    +

    %{reset_password_link}

    +

    Si vous n'avez pas demandé ce changement, veuillez ignorer ce message.

    +

    Votre mot de passe ne sera pas changé tant que vous n'aurez pas accédé au lien ci-dessus pour en créer un nouveau.

    " + unlock_instructions: + subject: "Directives de déverrouillage" + link: "Déverrouiller mon compte" + email: "

    Bonjour %{resource_email}!

    +

    Votre compte %{app_link} a été verrouillé à la suite d'un trop grand nombre de tentatives d'authentification.

    +

    Cliquez sur le lien ci-dessous pour déverrouiller votre compte :

    +

    %{unlock_link}

    " + omniauth_callbacks: + failure: "Nous n'avons pas pu vous authentifier à partir de %{kind} parce que '%{reason}'." + success: "Authentification réussie à partir du compte %{kind}." + passwords: + no_token: "Vous ne pouvez pas accéder à cette page sans y avoir été dirigé par un courriel de réinitialisation du mot de passe. Si vous avez été dirigé vers cette page à partir d’un courriel de réinitialisation, assurez-vous d'utiliser l'adresse URL complète fournie." + send_instructions: "Vous recevrez dans quelques minutes un courriel contenant les directives pour réinitialiser le mot de passe." + send_paranoid_instructions: "Si votre adresse électronique existe dans notre base de données, vous recevrez dans quelques minutes un lien de récupération du mot de passe par courriel." + updated: "Votre mot de passe a bien été modifié. Vous êtes maintenant connecté." + updated_not_active: "Votre mot de passe a bien été modifié." + registrations: + destroyed: "Votre compte a bien été supprimé. Nous espérons vous revoir bientôt." + signed_up: "Bienvenu(e)! Vous êtes bien inscrit(e)." + signed_up_but_inactive: "Vous êtes bien inscrit(e). Cependant, vous ne pouvez pas vous connecter, car votre compte n'est pas encore activé." + signed_up_but_locked: "Vous êtes bien inscrit(e). Cependant, vous ne pouvez pas vous connecter, car votre compte est verrouillé." + signed_up_but_unconfirmed: "Un message contenant un lien de confirmation a été envoyé à votre adresse électronique. Ouvrez ce lien pour activer votre compte. Si vous n’avez pas reçu le courriel de confirmation, vérifiez votre filtre antipourriel." + update_needs_confirmation: "Votre compte a bien été mis à jour, mais nous devons vérifier votre nouvelle adresse électronique. Vérifiez vos courriels et cliquez sur le lien de confirmation pour finaliser la validation de votre nouvelle adresse électronique." + updated: "Votre compte a bien été modifié." + sessions: + signed_in: "Connecté" + signed_out: "Déconnecté" + unlocks: + send_instructions: "Vous recevrez dans quelques minutes un courriel contenant les directives pour déverrouiller votre compte." + send_paranoid_instructions: "Si votre compte existe, vous recevrez dans quelques minutes un courriel contenant les directives pour le déverrouiller." + resend_unlock_instructions: "Envoyer de nouveau les directives de déverouillage." + unlocked: "Votre compte a bien été déverrouillé. Veuillez vous connecter pour continuer." + errors: + messages: + already_confirmed: "a déjà été validé, essayez de vous connecter." + confirmation_period_expired: "à confirmer dans les %{period}. Veuillez faire une nouvelle demande." + expired: "a expiré, veuillez faire une nouvelle demande." + not_found: "n'a pas été trouvé" + not_locked: "n'était pas verrouillé" + not_saved: + one: "Une erreur a empêché d’enregistrer ce(tte) %{resource} :" + other: "%{count} erreurs ont empêché d’enregistrer ce(tte) %{resource} :" + blank: "Ce champ ne peut être vide" + activerecord: + attributes: + user: + email: "Courriel: " diff --git a/config/locales/devise/devise_invitable.de.yml b/config/locales/devise/devise_invitable.de.yml new file mode 100644 index 0000000..dccce7d --- /dev/null +++ b/config/locales/devise/devise_invitable.de.yml @@ -0,0 +1,23 @@ +de: + devise: + invitations: + send_instructions: 'Eine Einladungs-E-Mail wurde an %{email} versendet.' + invitation_token_invalid: 'Das bereitgestellte Einladungs-Token ist ungültig.' + updated: 'Ihr Passwort wurde erfolgreich gesetzt. Sie sind jetzt angemeldet.' + no_invitations_remaining: "Keine Einladungen verbleibend." + invitation_removed: 'Ihre Einladung wurde entfernt.' + new: + header: "Einladung versenden" + submit_button: "Einladung senden" + edit: + header: "Passwort setzen" + submit_button: "Passwort setzen" + mailer: + invitation_instructions: + subject: 'DMPonline - Anleitung zur Einladung' + link: "Klicken Sie hier, um die Einladung anzunehmen" + email: "

    Hallo %{resource_email}!

    +

    Ein Kollege hat Sie eingeladen, um an seinem Datenmanagementplan (DMP) %{app_link}

    +

    %{invitation_link} (oder kopiere %{invitation_direct_url} in Deinen Browser).

    +

    Falls Sie die Einladung nicht annehmen wollen, ignorieren Sie bitte diese E-Mail.
    + Ihr Zugang wird nicht erstellt, bevor sie obigen Link besuchen und Ihr Passwort setzen.

    " diff --git a/config/locales/devise/devise_invitable.en-UK.yml b/config/locales/devise/devise_invitable.en-UK.yml new file mode 100644 index 0000000..d0f4ebd --- /dev/null +++ b/config/locales/devise/devise_invitable.en-UK.yml @@ -0,0 +1,17 @@ +en-UK: + devise: + invitations: + send_instructions: 'An invitation email has been sent to %{email}.' + invitation_token_invalid: 'The invitation token provided is not valid!' + updated: 'Your password was set successfully. You are now signed in.' + no_invitations_remaining: "No invitations remaining" + invitation_removed: 'Your invitation was removed.' + new: + header: "Send invitation" + submit_button: "Send an invitation" + edit: + header: "Set your password" + submit_button: "Set my password" + mailer: + invitation_instructions: + subject: 'Invitation instructions' \ No newline at end of file diff --git a/config/locales/devise/devise_invitable.en-US.yml b/config/locales/devise/devise_invitable.en-US.yml new file mode 100644 index 0000000..117862f --- /dev/null +++ b/config/locales/devise/devise_invitable.en-US.yml @@ -0,0 +1,17 @@ +en-US: + devise: + invitations: + send_instructions: 'An invitation email has been sent to %{email}.' + invitation_token_invalid: 'The invitation token provided is not valid!' + updated: 'Your password was set successfully. You are now signed in.' + no_invitations_remaining: "No invitations remaining" + invitation_removed: 'Your invitation was removed.' + new: + header: "Send invitation" + submit_button: "Send an invitation" + edit: + header: "Set your password" + submit_button: "Set my password" + mailer: + invitation_instructions: + subject: 'Invitation instructions' diff --git a/config/locales/devise/devise_invitable.fr.yml b/config/locales/devise/devise_invitable.fr.yml new file mode 100644 index 0000000..35272db --- /dev/null +++ b/config/locales/devise/devise_invitable.fr.yml @@ -0,0 +1,23 @@ +fr: + devise: + invitations: + send_instructions: "Un courriel d'invitation a été envoyé à %{email}." + invitation_token_invalid: "Le jeton d'invitation fourni n'est pas valide!" + updated: "Votre mot de passe a été défini avec succès. Vous êtes maintenant connecté(e)." + no_invitations_remaining: "Aucune invitation restante" + invitation_removed: "Votre invitation a été supprimée." + new: + header: "Envoyer une invitation" + submit_button: "Envoyer une invitation" + edit: + header: "Définir votre mot de passe" + submit_button: "Définir mon mot de passe" + mailer: + invitation_instructions: + subject: "Directives de confirmation" + link: "Cliquez ici pour accepter cette invitation" + email: "

    Bonjour %{resource_email}!

    +

    Vous avez été invité(e) par un(e) de vos collègues à contribuer à son plan de gestion de données (PGD) dans %{app_link}

    +

    %{invitation_link} (ou copier %{invitation_direct_url} dans votre navigateur).

    +

    Si vous ne voulez pas accepter l'invitation, veuillez ignorer ce message.
    + Votre compte ne sera pas créé tant que vous n'aurez pas accédé au lien ci-dessus et choisi un mot de passe.

    " diff --git a/config/locales/devise_invitable.de.yml b/config/locales/devise_invitable.de.yml deleted file mode 100644 index dccce7d..0000000 --- a/config/locales/devise_invitable.de.yml +++ /dev/null @@ -1,23 +0,0 @@ -de: - devise: - invitations: - send_instructions: 'Eine Einladungs-E-Mail wurde an %{email} versendet.' - invitation_token_invalid: 'Das bereitgestellte Einladungs-Token ist ungültig.' - updated: 'Ihr Passwort wurde erfolgreich gesetzt. Sie sind jetzt angemeldet.' - no_invitations_remaining: "Keine Einladungen verbleibend." - invitation_removed: 'Ihre Einladung wurde entfernt.' - new: - header: "Einladung versenden" - submit_button: "Einladung senden" - edit: - header: "Passwort setzen" - submit_button: "Passwort setzen" - mailer: - invitation_instructions: - subject: 'DMPonline - Anleitung zur Einladung' - link: "Klicken Sie hier, um die Einladung anzunehmen" - email: "

    Hallo %{resource_email}!

    -

    Ein Kollege hat Sie eingeladen, um an seinem Datenmanagementplan (DMP) %{app_link}

    -

    %{invitation_link} (oder kopiere %{invitation_direct_url} in Deinen Browser).

    -

    Falls Sie die Einladung nicht annehmen wollen, ignorieren Sie bitte diese E-Mail.
    - Ihr Zugang wird nicht erstellt, bevor sie obigen Link besuchen und Ihr Passwort setzen.

    " diff --git a/config/locales/devise_invitable.en-UK.yml b/config/locales/devise_invitable.en-UK.yml deleted file mode 100644 index 2b8f293..0000000 --- a/config/locales/devise_invitable.en-UK.yml +++ /dev/null @@ -1,17 +0,0 @@ -en: - devise: - invitations: - send_instructions: 'An invitation email has been sent to %{email}.' - invitation_token_invalid: 'The invitation token provided is not valid!' - updated: 'Your password was set successfully. You are now signed in.' - no_invitations_remaining: "No invitations remaining" - invitation_removed: 'Your invitation was removed.' - new: - header: "Send invitation" - submit_button: "Send an invitation" - edit: - header: "Set your password" - submit_button: "Set my password" - mailer: - invitation_instructions: - subject: 'Invitation instructions' diff --git a/config/locales/devise_invitable.fr.yml b/config/locales/devise_invitable.fr.yml deleted file mode 100644 index 35272db..0000000 --- a/config/locales/devise_invitable.fr.yml +++ /dev/null @@ -1,23 +0,0 @@ -fr: - devise: - invitations: - send_instructions: "Un courriel d'invitation a été envoyé à %{email}." - invitation_token_invalid: "Le jeton d'invitation fourni n'est pas valide!" - updated: "Votre mot de passe a été défini avec succès. Vous êtes maintenant connecté(e)." - no_invitations_remaining: "Aucune invitation restante" - invitation_removed: "Votre invitation a été supprimée." - new: - header: "Envoyer une invitation" - submit_button: "Envoyer une invitation" - edit: - header: "Définir votre mot de passe" - submit_button: "Définir mon mot de passe" - mailer: - invitation_instructions: - subject: "Directives de confirmation" - link: "Cliquez ici pour accepter cette invitation" - email: "

    Bonjour %{resource_email}!

    -

    Vous avez été invité(e) par un(e) de vos collègues à contribuer à son plan de gestion de données (PGD) dans %{app_link}

    -

    %{invitation_link} (ou copier %{invitation_direct_url} dans votre navigateur).

    -

    Si vous ne voulez pas accepter l'invitation, veuillez ignorer ce message.
    - Votre compte ne sera pas créé tant que vous n'aurez pas accédé au lien ci-dessus et choisi un mot de passe.

    " diff --git a/config/locales/en-UK.bootstrap.yml b/config/locales/en-UK.bootstrap.yml deleted file mode 100644 index e420b9f..0000000 --- a/config/locales/en-UK.bootstrap.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - helpers: - actions: "Actions" - links: - back: "Back" - cancel: "Cancel" - confirm: "Are you sure?" - destroy: "Delete" - new: "New" - edit: "Edit" - titles: - edit: "Edit" - save: "Save" - new: "New" - delete: "Delete" diff --git a/config/locales/en-UK.yml b/config/locales/en-UK.yml index f2ecbbe..ad8b06f 100644 --- a/config/locales/en-UK.yml +++ b/config/locales/en-UK.yml @@ -1,6 +1,6 @@ -# [+Project:+] DMPonline v4 -# [+Description:+] This file contains all the text present on DMPonline that is not being retrieve from the database. -# [+Copyright:+] Digital Curation Centre +# [+Project:+] DMPRoadmap +# [+Description:+] This file contains all the text present on DMPRoadmap that is not being retrieve from the database. +# [+Copyright:+] Digital Curation Centre and University of California Curation Center en-UK: date: @@ -26,20 +26,19 @@ time: formats: - default: "%a, %d %b %Y %H:%M:%S %z" + default: "%a, %b %d %Y %H:%M:%S %z" short: "%d %b %H:%M" custom: "%d/%m/%Y %H:%M" long: "%B %d, %Y %H:%M" am: "am" pm: "pm" - tool_title: "DMPonline" + tool_title: "%{application_name}" tool_title2: "DMP title" - dmponline3_text: "DMPonline previous version" - dcc_name: "Digital Curation Centre" + dcc_name: "%{organisation_name}" welcome_title: "Welcome." - welcome_text: "

    DMPonline has been developed by the Digital Curation Centre to help you write data management plans.

    " - screencast_text: "Screencast on how to use DMPonline" + welcome_text: "

    %{application_name} has been jointly developed by the %{organisation_name} to help you write data management plans.

    " + screencast_text: "Screencast on how to use %{application_name}" screencast_error_text: "Your browser does not support the video tag." admin: @@ -299,7 +298,7 @@ default_answer_help_text_html: "Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here." themes_label: "Themes" question_themes_help_text_html: "

    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 DCC or any Schools/Departments that you provide guidance for.

    +

    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.

    " default_answer_label: "Default answer" guidance_label: "Guidance" @@ -322,14 +321,14 @@ roadmap_label: "Future plans" help_label: "Help" contact_label: "Contact" - jisc: "The DCC is funded by" + jisc: "The %{organisation_abbreviation} is funded by" format: "format" change_language: "Change language" sign_in: "Sign in" sign_out: "Sign out" sign_up: "Sign up" - sign_up_text: "New to DMPonline? Sign up today." + sign_up_text: "New to %{application_name}? Sign up today." signed_in: "Signed in as " institution_sign_in_link: "Or, sign in with your institutional credentials" institution_sign_in: " (UK users only)" @@ -434,15 +433,15 @@ owner: "Owner" orcid_id: "ORCID number" orcid_html: "ORCID number is a persistent digital identifier that distinguishes each researcher, more info." - sign_up_shibboleth_alert_text_html: "DMPonline 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 DMPonline, please complete the form below.
    - --> If you have an account with DMPonline, please Sign in so we can link your account to your institutional credentials.
    + sign_up_shibboleth_alert_text_html: "%{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." shibboleth_linked_text: "Your account is linked to your institutional credentials." - shibboleth_to_link_text: "Link your DMPonline account to your institutional credentials (UK users only)" + shibboleth_to_link_text: "Link your %{application_name} account to your institutional credentials (UK users only)" shibboleth_unlink_label: "Unlink your institutional credentials" shibboleth_unlink_alert: "Unlink institutional credentials alert" - shibboleth_unlink_dialog_text: "

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

    " + shibboleth_unlink_dialog_text: "

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

    " select_phase: "Select a phase" select_version: "Select a version" @@ -557,15 +556,15 @@ project_details_editing_text_html: "Please fill in the basic project details below and click 'Update' to save" confirm_delete_text: "Are you sure you wish to delete this plan? If the plan is being shared with other users, by deleting it from your list, the plan will be deleted from their plan list as well" confirmation_text: "Confirm plan details" - confirmation_text_desc: "Where your funder or institution doesn't have specific requirements (or if you left these options blank), you will see the DCC Checklist. This offers a generic set of DMP questions and guidance. For more details see: DMP checklist 2013." + confirmation_text_desc: "Where your funder or institution doesn't have specific requirements (or if you left these options blank), you will see the %{organisation_abbreviation} Checklist. This offers a generic set of DMP questions and guidance. For more details see: DMP checklist 2013." confirmation_button_text: "Yes, create plan" - default_confirmation_text_desc: "You have selected the Default DMP, which is based on the DCC Checklist. This offers a generic set of DMP questions and guidance. For more details see: DMP checklist 2013." + default_confirmation_text_desc: "You have selected the Default DMP, which is based on the %{organisation_abbreviation} Checklist. This offers a generic set of DMP questions and guidance. For more details see: DMP checklist 2013." default_confirmation_button_text: "Create plan" alert_default_template_text_html: "Please note: %{org_name} provides a DMP template. If you wish to use it select 'Cancel', otherwise select 'Create plan'" share: tab_share: "Share" shared_label: "Shared?" - share_text_html: "

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

    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 DMPonline if they don't already have an account. A notification is also issued when a user's permission level is changed.

    " + share_text_html: "

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

    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.

    " collaborators: "Collaborators" add_collaborator: "Add collaborator" add: "Add" @@ -621,7 +620,7 @@ export: pdf: question_not_answered: "Question not answered." - generated_by: "This document was generated by DMPonline (http://dmponline.dcc.ac.uk)" + generated_by: "This document was generated by %{application_name} (http://dmponline.dcc.ac.uk)" space_used: "approx. %{space_used}% of available space used (max %{num_pages} pages)" space_used_without_max: "approx. %{space_used}% of available space used" project_name: "Project Name" @@ -674,37 +673,36 @@ no_access_account: "This account does not have access to that plan." about_page: - title: "About DMPonline" + title: "About %{application_name}" tab_1: "Background" tab_2: "Latest news" - body_text_tab_1_html: "

    Funding bodies increasingly require their grant-holders to produce Data Management Plans(DMP), both during the bid-preparation stage and after funding has been secured. DMPonline has been produced by the UK's Digital Curation Centre to help research teams respond to this requirement, and any expectations that their institution or others may apply.

    -

    The DCC has worked closely with research funders and universities to produce a tool that assists researchers to produce an effective data management plan (DMP) to cater for the whole lifecycle of a project, from bid-preparation stage through to completion.

    + body_text_tab_1_html: "

    Funding bodies increasingly require their grant-holders to produce Data Management Plans(DMP), both during the bid-preparation stage and after funding has been secured. %{application_name} has been produced by the %{organisation_name} to help research teams respond to this requirement, and any expectations that their institution or others may apply.

    +

    The %{organisation_abbreviation} worked closely with research funders and universities to produce a tool that assists researchers to produce an effective data management plan (DMP) to cater for the whole lifecycle of a project, from bid-preparation stage through to completion.


    How the tool works

    There are a number of templates within the tool that represent the requirements of different funders and institutions. Users are asked three questions at the outset so we can determine the appropriate template to display (e.g. the ESRC template when applying for an ESRC grant). Guidance is provided to help you interpret and answer the questions. This guidance is provided by researcher funders, universities and disciplines.


    Getting Started

    If you have an account please sign in and start creating or editing your DMP.

    -

    If you do not have a DMPonline account, click on 'Sign up' on the homepage.

    +

    If you do not have a %{application_name} account, click on 'Sign up' on the homepage.

    Please visit the 'Help' page for guidance.


    Additional Information

    -

    We are constantly improving the user interface and functionality of DMPonline. +

    We are constantly improving the user interface and functionality of %{application_name}. If you would like to contribute with feedback and suggestions, please contact us by emailing - dmponline@dcc.ac.uk. You can also report bugs and request new features directly on GitHub

    -

    If you need to access plans from the earlier version of the tool please visit DMPonline v3.

    " + %{organisation_email}. You can also report bugs and request new features directly on GitHub

    " - body_text_tab_2_html: "

    DMPonline stories from the DCC website


    " + body_text_tab_2_html: "

    %{application_name} stories from the %{organisation_abbreviation} website


    " help_page: title: "Help" - tab_1: "On DMPonline" + tab_1: "On %{application_name}" tab_2: "On data management planning" body_text_tab_2_html: "

    Useful resources on Data Management Planning

    Example Data Management Plans

    @@ -726,7 +724,7 @@ A DMP submitted by a researcher from the University of Bristol, also including comments from the reviewers
  • - Two social science DMPs [PDF, 7 pages]
    + Two social science DMPs [PDF, 7 pages]
    Example plans from researchers at the University of Leeds, shared as part of the Leeds RoaDMaP training materials
  • @@ -734,7 +732,7 @@ Example DMP produced by the DATUM for Health RDM training project
  • - Psychology DMP [PDF, 11 pages]
    + Psychology DMP [PDF, 11 pages]
    A very detailed, fictional psychology DMP produced by the DMTpsych RDM training project, based on a seminal psychology experiment
  • @@ -761,23 +759,23 @@ A guide by the UK Data Service covering a range of topics including data formats, documentaion, ethics, copyright and data sharing.
  • - How to Cite Datasets and Link to Publications [PDF, 12 pages]
    - A guide by the Digital Curation Centre giving practical guidelines on how to cite data and the different tools and infrastructure that can be used to support data citation. + How to Cite Datasets and Link to Publications [PDF, 12 pages]
    + A guide by the %{organisation_name} giving practical guidelines on how to cite data and the different tools and infrastructure that can be used to support data citation.
  • - How to License Research Data [PDF, 16 pages]
    - A guide by the Digital Curation Centre that outlines different types of licenses, the pros and cons of each and how they can be applied. + How to License Research Data [PDF, 16 pages]
    + A guide by the %{organisation_name} that outlines different types of licenses, the pros and cons of each and how they can be applied.
  • - How to Appraise and Select Research Data for Curation [PDF, 8 pages]
    - A guide by ANDS and the DCC on how to select which data to keep for long-term preservation, sharing and reuse. The guide puts forward several criteria to aid selection decisions. + How to Appraise and Select Research Data for Curation [PDF, 8 pages]
    + A guide by ANDS and the %{organisation_abbreviation} on how to select which data to keep for long-term preservation, sharing and reuse. The guide puts forward several criteria to aid selection decisions.
  • Research Data MANTRA [online resource]
    An online training course designed for researchers or others planning to manage digital data as part of the research process. The course includes a number of software practicals on using SPSS, R, ArcGIS and NVivo.
  • " - body_text_tab_1_html: "

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

    + body_text_tab_1_html: "

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

    Create a plan

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

    Write your plan

    @@ -794,16 +792,14 @@

    Share plans

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

    Export plans

    -

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

    -

    Legacy data

    -

    If you need to access plans from the earlier version of the tool please visit DMPonline v3.

    " +

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

    " contact_page: title: "Contact us" - intro_text_html: "

    DMPonline is provided by the Digital Curation Centre. You can find out more about us on our website. If you would like to contact us about DMPonline, please enter your query in the form below or email dmponline@dcc.ac.uk.

    " - github_text_html: "

    If you have a feature request or think you have found a bug, please check out the list of issues on GitHub. If your issue isn't listed there, please add it; if it is, please add a comment if you have more information or just to let us know how important it is to you. This will help us to help us prioritise future developments.

    " + intro_text_html: "

    %{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 enter your query in the form below or email %{organisation_email}.

    " + github_text_html: "

    If you have a feature request or think you have found a bug, please check out the list of issues on GitHub. If your issue isn't listed there, please add it; if it is, please add a comment if you have more information or just to let us know how important it is to you. This will help us to help us prioritise future developments.

    " address_text_html: "

    Tel. +44 (0) 131 651 1239

    -

    Email dmponline@dcc.ac.uk

    " +

    Email %{organisation_email}

    " roadmap_page: title: "Future plans" tab_1: "Releases" tab_2: "Get involved" - body_text_tab_1_html: "

    The DCC is collaborating with the DMPTool team to develop a joint codebase for Data Management Planning called DMP Roadmap. Both of our tools will be delivered using this in the future. We've agreed what features need to be included and are planning a few sprints to deliver these. The initial release will include all of the main priorities we already had flagged, including:

    + body_text_tab_1_html: "

    The %{organisation_abbreviation} are now collaborating to develop a joint codebase for Data Management Planning called DMP Roadmap. Both of our tools will be delivered using this in the future. We've agreed what features need to be included and are planning a few sprints to deliver these. The initial release will include all of the main priorities we already had flagged, including:

    -

    DMPonline has an active and growing user base, and we are grateful to the members who suggest ideas for new and improved features. If you would like to help shape our future plans, please join the user group. More information on how you can engage with us is available under the 'Get involved' tab.

    +

    %{application_name} has an active and growing user base, and we are grateful to the members who suggest ideas for new and improved features. If you would like to help shape our future plans, please join the user group. More information on how you can engage with us is available under the 'Get involved' tab.


    Current release

    -

    The current version of DMPonline is 4.2. This was released in August 2015 and included Institutional branding, optional guidance for funders, improvements to the question area, improvements to the admin interface, GitHub pull requests, new seed file, and an update of the gemfile.

    +

    The current version of %{application_name} is %{application_version}.

    -

    The code is available on GitHub

    -
    -

    Previous release

    -

    The previous version of DMPonline is 4.1. This was released in May 2015 and included a comment feature, improved guidance on signing in with institutional credentials, enhanced deployment guidance and proposed methods for internationalisation. Full details can be found in the release note and associated documents.

    - +

    The code is available on GitHub


    " - body_text_tab_2_html: "

    DMPonline is developed and maintained by the UK Digital Curation Centre. We’re a small team, and are happy to collaborate with others. There are various ways you can get involved:

    + body_text_tab_2_html: "

    %{application_name} is developed and maintained by the UK %{organisation_name}. We’re a small team, and are happy to collaborate with others. There are various ways you can get involved:

    Join the user group

    -

    We run a listserv for the DMPonline user group that you can request to join. We also host periodic meetings to consult on our plans. Being part of the user group gives you the opportunity to be informed about future developments and to provide feedback to help shape our plans.

    +

    We run a listserv for the %{application_name} user group that you can request to join. We also host periodic meetings to consult on our plans. Being part of the user group gives you the opportunity to be informed about future developments and to provide feedback to help shape our plans.

    Our user group sessions are usually focused around a certain topic (e.g. fleshing out use cases for an API) so invites are sent based on your areas of expertise. It is helpful for us to know your role and interests to invite relevant people to each session. Please introduce yourself on the list and share your ideas.

    Notes from previous user group sessions are provided below:

    Please let us know your interests and share your ideas for future developments via the mailing list so the community as a whole can feedback on them.


    -

    Customise DMPonline

    -

    DMPonline can be customised by institutions and disciplines. You can add templates for users in your organisation and tailored guidance that explains local support and services. Example answers can also be offered to help users understand what to write in a Data Management Plan. To do this you’ll need to request admin access, so please email us on dmponline@dcc.ac.uk.

    -

    Futher guidance on customising DMPonline is available on the DCC website.

    +

    Customise %{application_name}

    +

    %{application_name} can be customised by institutions and disciplines. You can add templates for users in your organisation and tailored guidance that explains local support and services. Example answers can also be offered to help users understand what to write in a Data Management Plan. To do this you’ll need to request admin access, so please email us on %{organisation_email}.

    +

    Futher guidance on customising %{application_name} is available on the %{organisation_abbreviation} website.


    Contribute to the code

    -

    DMPonline is a Ruby on Rails application. The source code is made available under a GNU Affero General Public License. This permits others to reuse the code freely, but obligates you to share the source code for any extensions in the same way. Please inform us if you install an instance of DMPonline and offer your contributions back to the community.

    -

    If you install an instance of DMPonline we require that you credit the DCC as originators of the tool. We recommend that the acknowledgement takes the form of the DMPonline logo with a link back to the DCC-hosted version of the tool.

    -

    We are willing to work with external developers to add new features to the tool. We are also open to delivering new features on a chargeable basis. If there are extensions you would like to see prioritised and have resource to support additional developer effort, please contact us on dmponline@dcc.ac.uk to negotiate terms.

    -
    +

    %{application_name} is a Ruby on Rails application. The source code is made available under a GNU Affero General Public License. This permits others to reuse the code freely, but obligates you to share the source code for any extensions in the same way. Please inform us if you install an instance of %{application_name} and offer your contributions back to the community.

    +

    If you install an instance of %{application_name} we require that you credit the %{organisation_abbreviation} as originators of the tool. We recommend that the acknowledgement takes the form of the %{application_name} logo with a link back to the %{organisation_abbreviation}-hosted version of the tool.

    +

    We are willing to work with external developers to add new features to the tool. We are also open to delivering new features on a chargeable basis. If there are extensions you would like to see prioritised and have resource to support additional developer effort, please contact us on %{organisation_email} to negotiate terms.

    +

    The code is available on GitHub

    Support our work

    -

    We are impressed by the uptake of DMPonline both in the UK and internationally and are really keen to hear how you are using the tool and promoting it in your context. We are aware that others have run training courses, developed guidance materials and advocated use of the tool. Please notify us of this as it helps to show impact.

    -

    We are currently investigating options for revenue generation. This will help us serve the increased demand more effectively and safeguard the long-term sustainability of DMPonline. Plans will be released for consultation soon but we also welcome your suggestions on how best to support our work.

    " +

    We are impressed by the uptake of %{application_name} both in the UK and internationally and are really keen to hear how you are using the tool and promoting it in your context. We are aware that others have run training courses, developed guidance materials and advocated use of the tool. Please notify us of this as it helps to show impact.

    +

    We are currently investigating options for revenue generation. This will help us serve the increased demand more effectively and safeguard the long-term sustainability of %{application_name}. Plans will be released for consultation soon but we also welcome your suggestions on how best to support our work.

    " terms_page: title: "Terms of use" body_text_html: "
    -

    The Digital Curation Centre ('DCC') is a consortium supported by Jisc and based at the Universities of Edinburgh, Glasgow and Bath. Our primary constituency is the UK research community, particularly the higher and further education sector.

    +

    The %{organisation_name} ('%{organisation_abbreviation}') are consortia supported by %{legal_entity}. Our primary constituency is the research community, particularly the higher and further education sector.

    -

    DMPonline

    +

    %{application_name}

    -

    DMPonline ('the tool', 'the system') is a tool developed by the DCC as a shared resource for the research community. It is hosted at the University of Edinburgh.

    +

    %{application_name} ('the tool', 'the system') is a tool developed by the %{organisation_abbreviation} as a shared resource for the research community. It is hosted by %{legal_entity}.

    Your personal details

    -

    In order to help identify and administer your account with DMPonline, we need to store your email address. We may also use it to contact you to obtain feedback on your use of the tool, or to inform you of the latest developments or releases. The information may be transferred between the DCC partner institutions but only for legitimate DCC purposes. We will not sell, rent or trade any personal information you provide to us.

    +

    In order to help identify and administer your account with %{application_name}, we need to store your email address. We may also use it to contact you to obtain feedback on your use of the tool, or to inform you of the latest developments or releases. The information may be transferred between the %{organisation_abbreviation} partner institutions but only for legitimate %{organisation_abbreviation} purposes. We will not sell, rent or trade any personal information you provide to us.

    Privacy policy

    -

    The information you enter into this system can be seen by you, people you have chosen to share access with, and - solely for the purposes of maintaining the service - system administrators at the University of Edinburgh. We compile anonymised, automated and aggregated information from plans, but we will not directly access, make use of, or share your content with anyone else without your permission. Authorised officers of your home institution may access your plans for specific purposes - for example, to track compliance with funder/institutional requirements or to calculate storage requirements.

    +

    The information you enter into this system can be seen by you, people you have chosen to share access with, and - solely for the purposes of maintaining the service - system administrators at %{legal_entity}. We compile anonymised, automated and aggregated information from plans, but we will not directly access, make use of, or share your content with anyone else without your permission. Authorised officers of your home institution may access your plans for specific purposes - for example, to track compliance with funder/institutional requirements or to calculate storage requirements.

    Freedom of Information

    -

    The University of Edinburgh holds your plans on your behalf, but they are your property and responsibility. Any FOI applicants will be referred back to your home institution.

    +

    %{legal_entity} holds your plans on your behalf, but they are your property and responsibility. Any FOI applicants will be referred back to your home institution.

    Passwords

    @@ -895,7 +883,7 @@

    Cookies

    -

    Please note that DMPonline uses Cookies. Further information about Cookies and how we use them is available on the main DCC website.

    +

    Please note that %{application_name} uses Cookies. Further information about Cookies and how we use them is available on the main %{organisation_abbreviation} website.


    @@ -913,8 +901,8 @@ custom_devise: resend_confirmation: "Resend confirmation instructions" - welcome_to_DMP: "Welcome to DMPonline" - thank_you_and_confirm: "Thank you for registering at DMPonline. Please confirm your email address:" + welcome_to_DMP: "Welcome to %{application_name}" + thank_you_and_confirm: "Thank you for registering at %{application_name}. Please confirm your email address:" click_to_confirm: "Click here to confirm your account" 1st_part_copy: "(or copy" 2nd_part_copy: "into your browser)." diff --git a/config/locales/en-US.yml b/config/locales/en-US.yml new file mode 100644 index 0000000..f4e2bea --- /dev/null +++ b/config/locales/en-US.yml @@ -0,0 +1,927 @@ +# [+Project:+] DMPRoadmap +# [+Description:+] This file contains all the text present on DMPRoadmap that is not being retrieve from the database. +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +en-US: + date: + formats: + # Use the strftime parameters for formats. + # When no format has been given, it uses default. + # You can provide other formats here if you like! + default: "%m-%d-%Y" + short: "%m/%d/%Y" + long: "%B %d, %Y" + + day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday] + abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat] + + # Don't forget the nil at the beginning; there's no such thing as a 0th month + month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December] + abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] + # Used in date_select and datetime_select. + order: + - day + - month + - year + + time: + formats: + default: "%a, %b %d %Y %H:%M:%S %z" + short: "%d %b %H:%M" + custom: "%m/%d/%Y %H:%M" + long: "%B %d, %Y %H:%M" + am: "am" + pm: "pm" + + tool_title: "%{application_name}" + tool_title2: "DMP title" + dcc_name: "%{organisation_name}" + welcome_title: "Welcome." + welcome_text: "

    %{application_name} has been jointly developed by the %{organisation_name} to help you write data management plans.

    " + screencast_text: "Screencast on how to use %{application_name}" + screencast_error_text: "Your browser does not support the video tag." + + admin: + org_title: "Organization name" + org: "Organization" + orgs: "Organizations" + org_type: "Organization type" + org_parent: "Parent organization" + org_created_message: "Organization was successfully created." + org_updated_message: "Organization was successfully updated." + plans: "Plans" + title: "Title" + desc: "Description" + guidance_group: "Guidance group" + no_guidance_group: "No guidance group" + guidance: "Guidance" + guidance_lowercase: "guidance" + guidance_lowercase_on: "guidance on" + name: "Name" + abbrev: "Abbreviation" + question: "Question" + question_format: "Question Format" + questions: "Questions" + template_title: "Template title" + section_title: "Section title" + formatting: "Formatting" + max_pages: "Max Pages" + phase_title: "Phase title" + version_title: "Version title" + user_name: "Username" + firstname: "First name" + surname: "Surname" + user: "User" + user_created: 'User was successfully created.' + user_org_role: "User role on an Organization" + user_role_type: "User role type" + user_role_type_created: 'User role type was successfully created.' + user_role_type_updated: 'User role type was successfully updated.' + user_role: "User role" + role: "Role" + user_status: "User status" + user_status_created: 'User status was successfully created.' + user_status_updated: 'User status was successfully updated.' + user_type: "User type" + user_type_created: 'User type was successfully created.' + user_type_updated: 'User type was successfully created.' + last_logged_in: "Last logged in" + version_numb: "Version number" + details: "Details" + phases: "Phases" + phase: "Phase" + version: "Version" + versions: "Versions" + sections: "Sections" + section: "Section" + multi_options: "Multiple question options" + templates: "Templates" + template: "Template" + themes: "Themes" + theme: "Theme" + theme_created: 'Theme was successfully created.' + theme_updated: 'Theme was successfully updated.' + sug_answer: "Suggested answer" + sug_answers: "Suggested answers" + old_temp_field: "old template field" + old_theme_field: "old theme field" + token_permission_type: "Token Permission Type" + permission_description: "Permission Description" + token_permission: "Token Permission" + org_token_permission: "Organization Token Permission" + +# choose_api_permissions: "Choose all API Permissions that apply." + + settings_updated: 'Settings updated successfully' + choose_themes: 'Choose all themes that apply.' + all_themes: 'All themes' + selected_themes: "Selected themes" + choose_templates: 'Choose all templates that apply.' + all_templates: 'All templates' + selected_templates: "Selected templates" + select_question_format: "Select question format" + no_template: 'No template' + no_phase: 'No phase' + no_version: 'No version' + no_section: 'No section' + + org_admin: + admin_area: "Admin area" + admin_details: "Admin Details" + template_label: "Templates" + user_list_label: "Users" + org_details_label: "Organization details" + org_text: "These are the basic details for your organization." + org_abbr_help_text_html: "This is what displays as a label on your guidance, e.g. 'Glasgow guidance on Metadata'. It's best to use an abbreviation or short name." + users_list: "List of users" + user_full_name: "Name" + user_name: "Email address" + last_logged_in: "Last logged in" + how_many_plans: "How many plans?" + user_text_html: "Below is a list of users registered for your organization. You can sort the data by each field." + org_name: "Name" + org_abbr: "Abbreviation" + org_desc: "Description" + org_banner_text: "Top banner text" + org_target_url: "Website" + org_type: "Organization type" + parent_org: "Main organization" + last_updated: "Last updated" + desc_help_text_html: "
    Please enter information describing your organization.
    " + top_banner_help_text_html: "
    Please enter information you would like your users to see while sign in. Do not enter more than 165 characteres.
    " + template_desc_help_text_html: "
    Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.
    " + abbre_help_text: "Please enter an abbreviation to your organization's name." + target_url_help_text: "Please enter a web address valid." + name_help_text: "Please enter your organization's name." + guidance_label: "Guidance" + templates_label: "Templates" + add_option_label: "Add option" + add_question_label: "Add question" + add_section_label: "Add section" + remove_option_label: "Remove" + option_order_label: "Order" + option_text_label: "Text" + option_default_label: "Default" + user_org_created: 'User org role was successfully created.' + user_org_updated: 'User org role was successfully updated.' + api_privleges: 'API Privleges?' + + guidance: + guidance_list: "Guidance list" + text_label: "Text" + themes_label: "Themes" + question_label: "Question" + by_theme_or_by_question: "Should this guidance apply:" + by_themes_label: "by themes" + by_question_label: "by question" + template: "Template" + templates: "Templates" + guidance_group_label: "Guidance group" + published: "Published" + created: "Created" + last_updated: "Last updated" + actions: "Actions" + add_guidance: "Add guidance" + created_message: "Guidance was successfully created." + updated_message: "Guidance was successfully updated." + help_text_html: "
    Please enter guidance text for this theme.
    " + new_label: "New guidance" + view_all_guidance: "View all guidance" + text_help_text_html: "Enter your guidance here. You can include links where needed." + apply_to_help_text_html: "Decide whether your guidance should display by themes (default) or if it only pertains to a specific question in one of the funder templates." + by_themes_help_text_html: "Select which theme(s) this guidance relates to." + by_question_help_text_html: "Select the relevant template, phase, version, section and question from the following dropdown options to define which specific question this guidance should display on." + guidance_group_select_help_text_html: "Select which group this guidance relates to." + guidance_text_html: "

    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) or you can write guidance for specific questions. 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.

    +

    You will usually want your guidance to display on all templates, however there may be cases where you only want it to show for specific funders e.g. if you have specific instructions for applicants to BBSRC for example. This can be set too if needed.

    " + delete_message_html: "You are about to delete '%{guidance_summary}'. Are you sure?" + guidance_group: + add_guidance_group: "Add guidance group" + guidance_group_list: "Guidance group list" + name_label: "Name" + subset: "Optional subset" + subset_eg: "e.g. School/ Department" + all_temp: "All templates" + help_text_add: "Please enter the group title" + subset_option_help_text: "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." + template_help_text_html: "Select which templates you want the guidance to display on. This will usually be all templates." + title_help_text_html: "Add an appropriate name for your guidance group e.g. Glasgow guidance. This name will be used to tell the end user where the guidance has come from e.g. 'Glasgow Guidance on Metadata'" + guidance_group_text_html: "

    First create a guidance group. This could be institution wide or a subset e.g. a particular College / School, Institute or department. When you create guidance you'll be asked to assign it to a guidance group.

    " + delete_message: "You are about to delete '%{guidance_group_name}'. This will affect guidance. Are you sure?" + created_message: "Guidance group was successfully created." + updated_message: "Guidance group was successfully updated." + destroyed_message: "Guidance group was successfully deleted." + templates: + create_template: "Create a template" + new_label: "New template" + template_details: "Template details" + edit_details: "Edit template details" + view_all_templates: "View all templates" + funders_temp: "Funders templates" + title_help_text: "Please enter a title for your template." + section_title_help_text: "Please enter section title" + help_text_html: "
    Please enter template description for this theme.
    " + create_own_template_text_html: "

    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.

    " + create_new_template_text_html: "

    To create a new template, first enter a title and description. Once you have saved this you will be presented with options to add one or more phases.

    " + desc_help_text_html: "Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences" + own_temp: "Own templates" + add_phase_label: "Add new phase +" + view_phase_label: "View phase" + edit_phase_label: "Edit phase" + back_to_edit_phase_label: "Back to edit view" + edit_phase_details_label: "Edit phase details" + phase_details_label: "Phase details" + phase_order_label: "Order of display" + phase_details_text_html: "

    Here you set the title that users will see. If you intend to have multiple phases for you DMP, this should be clear in the title and description.

    " + phase_title_help_text: "Enter a title for the phase e.g. intial DMP, full DMP... This is what users will see in the tabs when completing a plan. If you only have one phase, call it something generic e.g. Glasgow DMP" + phase_number_help_text: "This allows you to order the phases of your template." + phase_desc_help_text_html: "Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer." + phase_delete_message: "You are about to delete '%{phase_title}'. This will affect versions, sections and questions linked to this phase. Are you sure?" + phase_new_text_html: "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." + versions_label: "Versions" + version_details_label: "Version details" + add_section: "Add section" + new_section: "New section title" + section_title_placeholder: "New section title" + section_desc_help_text_html: "

    Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
    " + section_number_help_text: "This allows you to order sections." + add_question: "Add question" + created: "Created at" + last_updated: "Last updated" + published_label: "Published" + cannot_publish: "Please ensure you have created at least one phase with a published version." + title_label: "Title" + desc_label: "Description" + actions: "Actions" + customise: "Customise" + edit_customisation: "Edit customisation" + created_message: "Information was successfully created." + updated_message: "Information was successfully updated." + destroyed_message: "Information was successfully deleted." + section_delete_message: "You are about to delete '%{section_title}'. This will affect questions linked to this section. Are you sure?" + versions: + clone_versions_label: "Make big changes" + edit_versions_label: "Make small changes" + edit_label: "Edit" + versions_text_html: "A first version is created automatically. If you want to make major changes to published versions later (e.g. add section or questions) please create a new version. If you only want to fix typos or make small changes that do not alter meanings, edit the current version." + desc_help_text_html: "Enter a basic description as an internal reference to describe the difference between versions" + delete_message: "You are about to delete '%{version_title}'. This will affect sections and questions linked to this version. Are you sure?" + edit_alert_label: "Edit alert" + edit_alert_text: "Please consider the kind of changes you are about to make as this plan is already published and might be in use" + questions: + quidance_button: "Guidance" + question_text_label: "Question text" + question_number_label: "Question number" + question_edit_button: "Edit question" + question_delete_button: "Delete question" + answer_format_label: "Answer format" + option_comment_display_checkbox: "Display additional comment area." + option_comment_display: "Additional comment area will be displayed." + option_comment_hide: "No additional comment area will be displayed." + example_answer_label: "Example of answer" + suggested_answer_label: "Suggested answer" + suggested_answer_help_text_html: "You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted." + suggested_or_example_answer_label: "Suggested answer/ Example" + suggested_or_example_answer_button: "Add suggested answer/ example" + edit_suggested_answer_button: "Edit suggested answer/ example" + delete_suggested_answer_message: "You are about to delete a suggested answer/ example for '%{question_text}'. Are you sure?" + default_value_label: "Default value" + number_help_text: "This allows you to order questions within a section." + question_format_help_text_html: "You can choose from:" + default_answer_help_text_html: "Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here." + themes_label: "Themes" + question_themes_help_text_html: "

    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.

    " + default_answer_label: "Default answer" + guidance_label: "Guidance" + question_guidance_help_text_html: "Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text." + delete_message: "You are about to delete '%{question_text}'. Are you sure?" + question_options_help_text_html: "Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box." + + + + + + helpers: + home: "Home" + return_home: "Return to the home page" + admin_area: "Super admin area" + edit_profile: "Edit profile" + view_plans_label: "View plans" + create_plan_label: "Create plan" + about_us_label: "About" + roadmap_label: "Future plans" + help_label: "Help" + contact_label: "Contact" + jisc: "The %{organisation_abbreviation} is funded by" + format: "format" + + sign_in: "Sign in" + sign_out: "Sign out" + sign_up: "Sign up" + sign_up_text: "New to %{application_name}? Sign up today." + signed_in: "Signed in as " + institution_sign_in_link: "Or, sign in with your institutional credentials" + institution_sign_in: " (UK users only)" + + user_name: "Email address" + email: "Email" + subject: "Subject" + message: "Message" + valid_email: "You must enter a valid email address." + user_details_text_html: "

    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.

    " + user_details_paragraph_html: "You can edit any of the details below." + remember_me: "Remember me" + org_not_listed: "My organization isn't listed." + + password: "Password" + current_password: "Current password" + new_password: "New password" + password_conf: "Password confirmation" + change_password: "Change your password" + forgot_password: "Forgot your password?" + password_too_small: "Your password must contain at least 8 characters." + password_no_match: "This must match what you entered in the previous field." + no_pass_instructions: "Didn't receive confirmation instructions?" + no_unlock_instructions: "Didn't receive unlock instructions?" + send_password_info: "Reset password instructions" + edit_password_info: "If you would like to change your password please complete the following fields." + accept_terms_html: " I accept the terms and conditions *" + you_must_accept: 'You must accept the terms and conditions to register.' + email_already_registered: 'That email address is already registered.' + email_must_valid_confirmation_message: "This must be a valid email address - a message will be sent to it for confirmation." + error_registration_check: 'Error processing registration. Please check that you have entered a valid email address and that your chosen password is at least 8 characters long.' + + api_token: 'API token' + api_info: 'API Information' + api_use: 'How to use the API' + api_granted: 'You have been granted permission by your organization to use our API.' + api_view_token: 'Your API token and instructions for using the API endpoints can be found here.' + api_mail_subject: 'API Permission Granted' + + text_area: "Text area" + text_field: "Text field" + radio_buttons: "Radio buttons" + checkbox: "Check box" + dropdown: "Dropdown" + multi_select_box: "Multi select box" + export: "Export" + + about: + by: "By " + on: " on " + read_more: "Read more on the " + + mailer: + permission_relating: "Your permissions relating to " + changed: " have changed. You now have " + access: "access." + access_to: "Your access to " + removed: " has been removed." + given: "You have been given " + access_two: " access to " + + truncate_continued: "... (continued)" + security_check: "Security check" + error: "Error!" + comment: "Comment" + send: "Send" + yes_label: "Yes" + no_label: "No" + ok_label: "Ok" + none: "None" + false_lowercase: "false" + title: "Title" + note: "Note" + me: "Me" + view: "View" + desc: "Description" + save: "Save" + preview: "Preview" + saving: "Saving..." + loading: "Loading..." + removing: "Removing..." + unsaved: "Unsaved changes" + unlink_account: "Unlink account" + submit: + edit: "Edit" + create: "Create" + update: "Update" + cancel: "Cancel" + save: "Save" + delete: "Delete" + back: "Back" + discard: "Discard" + publish: "Publish" + + before_submitting_consider: "Before submitting, please consider:" + name: "Name" + first_name: "First name" + last_name: "Last name" + first_name_help_text: "Please enter your first name." + surname_help_text: "Please enter your surname or family name." + owner: "Owner" + orcid_id: "ORCID number" + orcid_html: "ORCID number is a persistent digital identifier that distinguishes each researcher, more info." + sign_up_shibboleth_alert_text_html: "%{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." + shibboleth_linked_text: "Your account is linked to your institutional credentials." + shibboleth_to_link_text: "Link your %{application_name} account to your institutional credentials (UK users only)" + shibboleth_unlink_label: "Unlink your institutional credentials" + shibboleth_unlink_alert: "Unlink institutional credentials alert" + shibboleth_unlink_dialog_text: "

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

    " + + select_phase: "Select a phase" + select_version: "Select a version" + select_section: "Select a section" + select_question: "Select a question" + select_template: "Select a template" + + main_email: + from: 'info@dcc.ac.uk' + access_given: "You have been given access to a Data Management Plan" + permission_changed: "DMP permissions changed" + access_removed: "DMP access removed" + + + section_label: "Section" + sections_label: "Sections" + questions_label: "Questions" + answers_label: "Answers" + answer_questions: "Answer questions" + last_edit: "Last edited" + select_action: "Select an action" + answered_by: "Answered " + answered_by_part2: " by " + suggested_answer: "Suggested answer" + suggested_example: "Example answer" + notanswered: "Not answered yet" + noquestionanswered: "No questions have been answered" + guidance: "Guidance" + policy_expectations: "Policy Expectations" + export: "Export" + guidance_accordion_label: "Guidance" + add_comment_accordion_label: "Share note" + comment_accordion_label: "Notes" + + comments: + add_comment_label: "Add note" + add_comment_text: "Share note with collaborators" + comment_label: "Note" + comments_label: "Notes" + view_label: "View" + edit_label: "Edit" + retract_label: "Remove" + clear_label: "Remove" + commented_by: "Noted by:" + archive_own_comment_question: "Are you sure you would like to remove this note?" + archive_own_comment_button_label: "Remove" + archive_comment_question: "Are you sure you would like to remove this note?" + archive_comment_button_label: "Remove" + clear_by: "Note removed by" + retracted: "Note removed by you" + comment_created: 'Comment was successfully created.' + comment_updated: 'Comment was successfully updated.' + comment_removed: 'Comment has been removed.' + + + org_type: + funder: "Funder" + institution: "Institution" + project: "Project" + organisation: "Organization" + org_name: "Organization name" + school: "School" + publisher: "Publisher" + other_guidance: "Other guidance" + template: "Template" + templates: "Templates" + child: "Unit" + other_org_help_text: "Please enter the name of your organization." + + + project: + create: "Create plan" + edit: "Edit plan details" + grant_title: "Grant number" + grant_help_text: "Grant reference number if applicable [POST-AWARD DMPs ONLY]" + not_applicable: "Not applicable/not listed." + multi_templates: "There are a number of possible templates you could use. Please choose one." + project_name: "Plan name" + my_project_name: "My plan" + success: "Plan was successfully created." + success_update: "Plan was successfully updated." + principal_investigator: "Principal Investigator/Researcher" + principal_investigator_help_text: "Name of Principal Investigator(s) or main researcher(s) on the project." + principal_investigator_id: "Principal Investigator/Researcher ID" + principal_investigator_id_help_text: "E.g ORCID http://orcid.org/." + funder_help_text: "Research funder if relevant" + funder_name: "Funder name" + project_question_desc_label: "Summary about the questions" + tab_plan: "Plan details" + tab_export: "Export" + export_text_html: "

    From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.
    +Select what format you wish to use and click to 'Export'.

    " + questions_answered: "questions answered" + not_saved_answers_text_alert: "You have altered answers but have not saved them:" + not_saved_answers_confirmation_alert: "Would you like to save them now?" + not_saved_answers_header: "Unsaved answers" + answer_recorded: 'Answer was successfully recorded.' + answer_error: 'There was an error saving the answer.' + answer_no_change: 'No change in answer content - not saved.' + project_data_contact: "Plan data contact" + project_data_contact_help_text: "Name (if different to above), telephone and email contact details" + project_name_help_text: "If applying for funding, state the name exactly as in the grant proposal." + project_desc_help_text_html: "

    Questions to consider:

    Guidance:

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

    " + project_identifier: "ID" + project_identifier_help_text: "A pertinent ID as determined by the funder and/or institution." + project_static_info: "This plan is based on:" + projects_title: "My plans" + project_settings_text: "The items you select here will be displayed in the table below. You can sort the data by each of these headings or filter by entering a text string in the search box." + project_text_when_no_project: "

    Welcome.
    You are now ready to create your first DMP.
    Click the 'Create plan' button below to begin.

    " + project_text_when_project: "

    The table below lists the plans that you have created, and any that have been shared with you by others.
    These can be edited, shared, exported or deleted at anytime.

    " + project_details_text_html: "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." + project_details_editing_text_html: "Please fill in the basic project details below and click 'Update' to save" + confirm_delete_text: "Are you sure you wish to delete this plan? If the plan is being shared with other users, by deleting it from your list, the plan will be deleted from their plan list as well" + confirmation_text: "Confirm plan details" + confirmation_text_desc: "Where your funder or institution doesn't have specific requirements (or if you left these options blank), you will see the %{organisation_abbreviation} Checklist. This offers a generic set of DMP questions and guidance. For more details see: DMP checklist 2013." + confirmation_button_text: "Yes, create plan" + default_confirmation_text_desc: "You have selected the Default DMP, which is based on the %{organisation_abbreviation} Checklist. This offers a generic set of DMP questions and guidance. For more details see: DMP checklist 2013." + default_confirmation_button_text: "Create plan" + alert_default_template_text_html: "Please note: %{org_name} provides a DMP template. If you wish to use it select 'Cancel', otherwise select 'Create plan'" + share: + tab_share: "Share" + shared_label: "Shared?" + share_text_html: "

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

    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.

    " + collaborators: "Collaborators" + add_collaborator: "Add collaborator" + add: "Add" + permissions: "Permissions" + permissions_desc: "Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access." + remove: "Remove user access" + confirmation_question: "Are you sure?" + owner: "Owner" + co_owner: "Co-owner" + edit: "Edit" + read_only: "Read only" + locked_section_text: "This section is locked for editing by " + create_page: + title: "Create a new plan" + desc_html: "

    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.

    " + default_template: "Default DMP" + funders_question: "If applying for funding, select your research funder." + funders_question_description: "Otherwise leave blank." + other_funder_name_label: "Name of funder, if applicable." + institution_question: "To see institutional questions and/or guidance, select your organization." + institution_question_description: "You may leave blank or select a different organization to your own." + other_guidance_question: "Tick to select any other sources of guidance you wish to see." + configure: "Configure" + columns: + name: "Name" + owner: "Owner" + shared: "Shared?" + template_owner: "Template Owner" + last_edited: "Last edited" + identifier: "Identifier" + grant_number: "Grant number" + principal_investigator: "Principal Investigator / Researcher" + data_contact: "Plan data contact" + description: "Description" + filter: + placeholder: "Filter plans" + submit: "Filter" + cancel: "Cancel" + no_plans_match: "No plans match '%{filter}'" + no_matches: "No matches" + user_added: "User added to project" + invitation_success: 'Invitation issued successfully.' + enter_email: "Please enter an email address" + sharing_updated: 'Sharing details successfully updated.' + access_removed: 'Access removed' + update_success: 'Project was successfully updated.' + create_success: 'Project was successfully created.' + details_update_success: "Details successfully updated." + choose_template: "Choose a template" + + plan: + export: + pdf: + question_not_answered: "Question not answered." + generated_by: "This document was generated by %{application_name} (http://dmponline.dcc.ac.uk)" + space_used: "approx. %{space_used}% of available space used (max %{num_pages} pages)" + space_used_without_max: "approx. %{space_used}% of available space used" + project_name: "Project Name" + project_identifier: "Project Identifier" + grant_title: "Grant Title" + principal_investigator: "Principal Investigator / Researcher" + project_data_contact: "Project Data Contact" + project_description: "Description" + funder: "Funder" + institution: "Institution" + not_valid_format: '%{value}% is not a valid format' + + settings: + title: "Settings" + projects: + title: "Settings - My plans" + desc: "The table below lists the available columns that can be shown on the 'My plans' list. Choose which you would like to appear." + errors: + no_name: "'name' must be included in column list." + duplicate: "Duplicate column name. Please only include each column once." + unknown: "Unknown column name." + plans: + title: "Plan title" + reset: "Reset" + description: "Description" + custom_formatting: "(Using custom PDF formatting values)" + template_formatting: "(Using template PDF formatting values)" + default_formatting: "(Using default PDF formatting values)" + included_elements: "Included Elements" + pdf_formatting: "PDF Formatting" + font_face: "Face" + font_size: "Size" + font: "Font" + margin: "Margin" + margins: + top: "Top" + bottom: "Bottom" + left: "Left" + right: "Right" + max_pages: "Maximum number of pages" + errors: + missing_key: "A required setting has not been provided" + invalid_margin: "Margin value is invalid" + negative_margin: "Margin cannot be negative" + unknown_margin: "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" + invalid_font_size: "Invalid font size" + invalid_font_face: "Invalid font face" + unknown_key: "Unknown formatting setting" + invalid_max_pages: "Invalid maximum pages" + no_access_account: "This account does not have access to that plan." + + about_page: + title: "About %{application_name}" + tab_1: "Background" + tab_2: "Latest news" + + body_text_tab_1_html: "

    Funding bodies increasingly require their grant-holders to produce Data Management Plans(DMP), both during the bid-preparation stage and after funding has been secured. %{application_name} has been produced by the %{organisation_name} to help research teams respond to this requirement, and any expectations that their institution or others may apply.

    +

    The %{organisation_abbreviation} worked closely with research funders and universities to produce a tool that assists researchers to produce an effective data management plan (DMP) to cater for the whole lifecycle of a project, from bid-preparation stage through to completion.

    +
    +

    How the tool works

    +

    There are a number of templates within the tool that represent the requirements of different funders and institutions. Users are asked three questions at the outset so we can determine the appropriate template to display (e.g. the ESRC template when applying for an ESRC grant). Guidance is provided to help you interpret and answer the questions. This guidance is provided by researcher funders, universities and disciplines.

    +
    +

    Getting Started

    +

    If you have an account please sign in and start creating or editing your DMP.

    +

    If you do not have a %{application_name} account, click on 'Sign up' on the homepage.

    +

    Please visit the 'Help' page for guidance.

    +
    +

    Additional Information

    +

    We are constantly improving the user interface and functionality of %{application_name}. + If you would like to contribute with feedback and suggestions, please contact us by emailing + %{organisation_email}. You can also report bugs and request new features directly on GitHub

    " + + body_text_tab_2_html: "

    %{application_name} stories from the %{organisation_abbreviation} website


    " + + help_page: + title: "Help" + tab_1: "On %{application_name}" + tab_2: "On data management planning" + body_text_tab_2_html: "

    Useful resources on Data Management Planning

    + +

    Example Data Management Plans

    + +

    Useful guides on Research Data Management in general

    + " + body_text_tab_1_html: "

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

    +

    Create a plan

    +

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

    +

    Write your plan

    +

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

    + +

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

    +

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

    +

    Remember to 'save' your responses before moving on.

    +

    Share plans

    +

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

    +

    Export plans

    +

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

    " + + contact_page: + title: "Contact us" + intro_text_html: "

    %{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 enter your query in the form below or email %{organisation_email}.

    " + github_text_html: "

    If you have a feature request or think you have found a bug, please check out the list of issues on GitHub. If your issue isn't listed there, please add it; if it is, please add a comment if you have more information or just to let us know how important it is to you. This will help us to help us prioritise future developments.

    " + address_text_html: " +

    Tel. +44 (0) 131 651 1239

    +

    Email %{organisation_email}

    " + + roadmap_page: + title: "Future plans" + tab_1: "Releases" + tab_2: "Get involved" + body_text_tab_1_html: "

    The %{organisation_abbreviation} are now collaborating to develop a joint codebase for Data Management Planning called DMP Roadmap. Both of our tools will be delivered using this in the future. We've agreed what features need to be included and are planning a few sprints to deliver these. The initial release will include all of the main priorities we already had flagged, including:

    + +

    %{application_name} has an active and growing user base, and we are grateful to the members who suggest ideas for new and improved features. If you would like to help shape our future plans, please join the user group. More information on how you can engage with us is available under the 'Get involved' tab.

    +
    +

    Current release

    +

    The current version of %{application_name} is %{application_version}.

    + +

    The code is available on GitHub

    +
    " + + body_text_tab_2_html: "

    %{application_name} is developed and maintained by the UK %{organisation_name}. We’re a small team, and are happy to collaborate with others. There are various ways you can get involved:

    +

    Join the user group

    +

    We run a listserv for the %{application_name} user group that you can request to join. We also host periodic meetings to consult on our plans. Being part of the user group gives you the opportunity to be informed about future developments and to provide feedback to help shape our plans.

    +

    Our user group sessions are usually focused around a certain topic (e.g. fleshing out use cases for an API) so invites are sent based on your areas of expertise. It is helpful for us to know your role and interests to invite relevant people to each session. Please introduce yourself on the list and share your ideas.

    +

    Notes from previous user group sessions are provided below:

    + +

    Please let us know your interests and share your ideas for future developments via the mailing list so the community as a whole can feedback on them.

    +
    +

    Customise %{application_name}

    +

    %{application_name} can be customised by institutions and disciplines. You can add templates for users in your organization and tailored guidance that explains local support and services. Example answers can also be offered to help users understand what to write in a Data Management Plan. To do this you’ll need to request admin access, so please email us on %{organisation_email}.

    +

    Futher guidance on customising %{application_name} is available on the %{organisation_abbreviation} website.

    +
    +

    Contribute to the code

    +

    %{application_name} is a Ruby on Rails application. The source code is made available under a GNU Affero General Public License. This permits others to reuse the code freely, but obligates you to share the source code for any extensions in the same way. Please inform us if you install an instance of %{application_name} and offer your contributions back to the community.

    +

    If you install an instance of %{application_name} we require that you credit the %{organisation_abbreviation} as originators of the tool. We recommend that the acknowledgement takes the form of the %{application_name} logo with a link back to the %{organisation_abbreviation}-hosted version of the tool.

    +

    We are willing to work with external developers to add new features to the tool. We are also open to delivering new features on a chargeable basis. If there are extensions you would like to see prioritised and have resource to support additional developer effort, please contact us on %{organisation_email} to negotiate terms.

    +

    The code is available on GitHub

    +

    Support our work

    +

    We are impressed by the uptake of %{application_name} both in the UK and internationally and are really keen to hear how you are using the tool and promoting it in your context. We are aware that others have run training courses, developed guidance materials and advocated use of the tool. Please notify us of this as it helps to show impact.

    +

    We are currently investigating options for revenue generation. This will help us serve the increased demand more effectively and safeguard the long-term sustainability of %{application_name}. Plans will be released for consultation soon but we also welcome your suggestions on how best to support our work.

    " + + terms_page: + title: "Terms of use" + body_text_html: "
    +

    The %{organisation_name} ('%{organisation_abbreviation}') are consortia supported by %{legal_entity}. Our primary constituency is the research community, particularly the higher and further education sector.

    +
    +

    %{application_name}

    +
    +

    %{application_name} ('the tool', 'the system') is a tool developed by the %{organisation_abbreviation} as a shared resource for the research community. It is hosted by %{legal_entity}.

    +
    +

    Your personal details

    +
    +

    In order to help identify and administer your account with %{application_name}, we need to store your email address. We may also use it to contact you to obtain feedback on your use of the tool, or to inform you of the latest developments or releases. The information may be transferred between the %{organisation_abbreviation} partner institutions but only for legitimate %{organisation_abbreviation} purposes. We will not sell, rent or trade any personal information you provide to us.

    +
    +

    Privacy policy

    +
    +

    The information you enter into this system can be seen by you, people you have chosen to share access with, and - solely for the purposes of maintaining the service - system administrators at %{legal_entity}. We compile anonymised, automated and aggregated information from plans, but we will not directly access, make use of, or share your content with anyone else without your permission. Authorised officers of your home institution may access your plans for specific purposes - for example, to track compliance with funder/institutional requirements or to calculate storage requirements.

    +
    +

    Freedom of Information

    +
    +

    %{legal_entity} holds your plans on your behalf, but they are your property and responsibility. Any FOI applicants will be referred back to your home institution.

    +
    +

    Passwords

    +
    +

    Your password is stored in encrypted form and cannot be retrieved. If forgotten it has to be reset.

    +
    +

    Cookies

    +
    +

    Please note that %{application_name} uses Cookies. Further information about Cookies and how we use them is available on the main %{organisation_abbreviation} website.

    +
    +
    +
    +

    Use of the tool indicates that you understand and agree to these terms and conditions.

    " + + js: + question_text_empty: 'Question text is empty, please enter your question.' + add_guidance_text: "add guidance text" + select_question: "select a question" + select_at_least_one_theme: "select at least one theme" + select_guidance_group: "select a guidance group" + enter_up_to: "Please only enter up to 165 characters, you have used" + if_using_url_try: "If you are entering an URL try to use something like http://tinyurl.com/ to make it smaller." + you_have_unsaved_in_sections: 'You have unsaved answers in the following sections:\n' + + custom_devise: + resend_confirmation: "Resend confirmation instructions" + welcome_to_DMP: "Welcome to %{application_name}" + thank_you_and_confirm: "Thank you for registering at %{application_name}. Please confirm your email address:" + click_to_confirm: "Click here to confirm your account" + 1st_part_copy: "(or copy" + 2nd_part_copy: "into your browser)." + colleague_invited_you: "A colleague has invited you to contribute to their Data Management Plan at" + click_to_accept: "Click here to accept the invitation" + ignore_wont_be_created: "

    If you don't want to accept the invitation, please ignore this email.
    + Your account won't be created until you access the link above and set your password.

    " + 1st_part_change_password: "Someone has requested a link to change your" + 2nd_part_change_password: "password. You can do this through the link below." + ignore_password_wont_be_changed: "

    If you didn't request this, please ignore this email.

    +

    Your password won't change until you access the link above and create a new one.

    " + hello: "Hello" + 1st_part_locked: "Your " + 2nd_part_locked: " account has been locked due to an excessive number of unsuccessful sign in attempts." + click_to_unlock: "Click the link below to unlock your account:" + unlock: 'Unlock my account' + waiting_for_confirmation: "Currently waiting confirmation for: " + resend_unlock: "Resend unlock instructions" + + api: + bad_credentials: '{"Error":"Bad credentials"}' + org_dosent_exist: '{"Error":"Organization does not exist"}' + org_not_funder: '{"Error":"Organization specified is not a funder"}' + org_multiple_templates: '{"Error":"Organization has more than one template and template name unspecified or invalid"}' + no_auth_for_endpoint: '{"Error":"You do not have authorisation to view this endpoint"}' + bad_resource: '{"Error":"You do not have authorisation to view this resource"}' \ No newline at end of file diff --git a/config/locales/fr.bootstrap.yml b/config/locales/fr.bootstrap.yml deleted file mode 100644 index b71db6a..0000000 --- a/config/locales/fr.bootstrap.yml +++ /dev/null @@ -1,17 +0,0 @@ - -fr: - helpers: - actions: "Actions" - links: - back: "Retour" - cancel: "Annuler" - confirm: "Êtes-vous sûr?" - destroy: "Supprimer" - new: "Nouveau" - edit: "Modifier" - titles: - edit: "Modifier" - save: "Enregistrer" - new: "Nouveau" - delete: "Supprimer" - diff --git a/config/locales/untitled.txt b/config/locales/untitled.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/config/locales/untitled.txt