diff --git a/.gitignore b/.gitignore
index 59dd548..960fdd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+
# Ignore rbenv files
.ruby-version
diff --git a/Gemfile b/Gemfile
index 41541aa..6d1c709 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,8 +1,11 @@
source 'https://rubygems.org'
+
+ruby '>= 2.2.2'
+
#
# RAILS
#
-gem 'rails', '4.2.0'
+gem 'rails', '4.2.7'
# additional gems for rails 4
gem 'railties'
diff --git a/Gemfile.lock b/Gemfile.lock
index b4c911a..b0f7bd4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/activeadmin/activeadmin.git
- revision: 3941e1550c4d5d8a6df51057d0517f1a51b609e4
+ revision: cc178ad0ebe1b74729eeaa59d5c7ad9b82ed7837
specs:
activeadmin (1.0.0.pre4)
arbre (~> 1.0, >= 1.0.2)
@@ -12,7 +12,7 @@
jquery-rails
jquery-ui-rails
kaminari (~> 0.15)
- rails (>= 3.2, < 5.1)
+ railties (>= 3.2, < 5.1)
ransack (~> 1.3)
sass-rails
sprockets (< 4.1)
@@ -20,40 +20,40 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.2.0)
- actionpack (= 4.2.0)
- actionview (= 4.2.0)
- activejob (= 4.2.0)
+ actionmailer (4.2.7)
+ actionpack (= 4.2.7)
+ actionview (= 4.2.7)
+ activejob (= 4.2.7)
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)
+ actionpack (4.2.7)
+ actionview (= 4.2.7)
+ activesupport (= 4.2.7)
+ rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
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)
+ actionview (4.2.7)
+ activesupport (= 4.2.7)
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)
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
+ activejob (4.2.7)
+ activesupport (= 4.2.7)
globalid (>= 0.3.0)
- activemodel (4.2.0)
- activesupport (= 4.2.0)
+ activemodel (4.2.7)
+ activesupport (= 4.2.7)
builder (~> 3.1)
- activerecord (4.2.0)
- activemodel (= 4.2.0)
- activesupport (= 4.2.0)
+ activerecord (4.2.7)
+ activemodel (= 4.2.7)
+ activesupport (= 4.2.7)
arel (~> 6.0)
- activesupport (4.2.0)
+ activesupport (4.2.7)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
@@ -227,16 +227,16 @@
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)
+ rails (4.2.7)
+ actionmailer (= 4.2.7)
+ actionpack (= 4.2.7)
+ actionview (= 4.2.7)
+ activejob (= 4.2.7)
+ activemodel (= 4.2.7)
+ activerecord (= 4.2.7)
+ activesupport (= 4.2.7)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.2.0)
+ railties (= 4.2.7)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
@@ -248,9 +248,9 @@
loofah (~> 2.0)
rails-observers (0.1.2)
activemodel (~> 4.0)
- railties (4.2.0)
- actionpack (= 4.2.0)
- activesupport (= 4.2.0)
+ railties (4.2.7)
+ actionpack (= 4.2.7)
+ activesupport (= 4.2.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.2.2)
@@ -284,9 +284,9 @@
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
- swagger-docs (0.2.8)
- activesupport (>= 3, < 5)
- rails (>= 3, < 5)
+ swagger-docs (0.2.9)
+ activesupport (>= 3)
+ rails (>= 3)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
@@ -361,7 +361,7 @@
omniauth-shibboleth
protected_attributes
rack-test
- rails (= 4.2.0)
+ rails (= 4.2.7)
rails-observers
railties
recaptcha
@@ -381,5 +381,8 @@
wicked_pdf
yard
+RUBY VERSION
+ ruby 2.2.2p95
+
BUNDLED WITH
1.12.5
diff --git a/LICENSE.md b/LICENSE.md
index ba4db2c..abce7d2 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,18 +1,18 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 University of Edinburgh, University of Glasgow & The Regents of the University of California
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
-associated documentation files (the "Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or
-substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+The MIT License (MIT)
+
+Copyright (c) 2016 University of Edinburgh, University of Glasgow & The Regents of the University of California
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
+associated documentation files (the "Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or
+substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index 67fcb25..13ddc72 100644
--- a/README.md
+++ b/README.md
@@ -1,103 +1,103 @@
-## DMP Roadmap
-
-DMP Roadmap is a Data Management Planning tool. It allows users to create data management plans for the projects using funder specific templates and institutional guidance. Once a plan has been completed it can be downloaded and inserted into your grant proposals.
-
-Management and development of the DMP Roadmap is jointly provided by the Digital Curation Centre (DCC), http://www.dcc.ac.uk/, and the University of California Curation Center (UC3), http://www.cdlib.org/services/uc3/
-
-The tool has four main functions
-1. To help create and maintain different versions of Data Management Plans;
-2. To provide useful guidance on data management issues and how to meet research funders' requirements;
-3. To export attractive and useful plans in a variety of formats;
-4. To allow collaborative work when creating Data Management Plans.
-
-#### Current Release
-v.0.1.0
-[](https://travis-ci.org/DMPRoadmap/roadmap)
-
-#### Summary
-
-#### Pre-requisites
-Roadmap is a Ruby on Rails application and you will need to have:
-1. Ruby >= 2.0.0p247
-2. Rails >= 4.0
-3. MySql >= 5.0
-
-Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site: http://rubyonrails.org
-
-Further details on how to install MySQL and create your first user and database. Be sure to follow the instructions for your particular environment.
-* Install: http://dev.mysql.com/downloads/mysql/
-*
-* Create a user: http://dev.mysql.com/doc/refman/5.7/en/create-user.html
-* Create the database: http://dev.mysql.com/doc/refman/5.7/en/creating-database.html
-
-You may also find the following resources handy:
-
-* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
-* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
-
-#### Installation
-* Create your mysql db. Select UTF-8 Unicode (utf8mb4) encoding.
-* Fork the repository and then clone it onto your server
-
-> > git clone https://github.com/[your organization]/roadmap.git
-
-> > cd roadmap
-
-* Make copies of the yaml configuration files and update the values for your installation
-
-> > cp config/database_example.yml config/database.yml
-> > cp config/secrets_example.yml config/secrets.yml
-
-* Create an environment variable for your instance's secret (as defined in config/secrets.yml). You should use the following command to generate secrets for each of your environments, storing the production one in the environment variable:
-
-> > rake secret
-
-* Run bundler and perform the DB migrations
-
-> > gem install bundler (if bundler is not yet installed)
-
-> > bundle install
-
-> > rake db:migrate
-
-> > rake db:seed
-
-* Setup the devise authentication gem
-
-> > rails generate devise:install (Is this really necessary?)
-
-* Start the application
-
-> > rails server
-
-* Verify that the site is running properly by going to http://localhost:3000
-* Login as the default administrator: 'super_admin@example.com' - 'password1'
-
-#### Troubleshooting
-##### Installation - OSX:
-
-```
-An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue.
-
-Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.
-```
-
-If you are installing on a system that already has v8 installed then you may need to install the libv8 gem manually using your system's current v8 engine. If you're using homebrew to manage your packages you should run 'brew update' and 'brew upgrade' to make sure you have the latest packages
-
-> > gem uninstall -a libv8
-
-> > gem install libv8 -v '<>' -- --with-system-v8
-
-> > bundle install
-
-#### Support
-Issues should be reported here on Github https://github.com/DMPRoadmap/roadmap/issues
-Please be advised though that we can only provide limited support for your local installations.
-
-#### Become a contributor
-Fork this repository and make your modifications in a new branch. Then create a pull request to our 'development' branch. We will reject any pull request made against the 'master' branch. Once your pull request has been submitted the team will review your request and accept it if appropriate.
-
-Join the email listserv at roadmap-l (at) listserv.ucop (dot) edu.
-
-#### License
-The DMP Roadmap project uses to the MIT License .
+## DMP Roadmap
+
+DMP Roadmap is a Data Management Planning tool. It allows users to create data management plans for the projects using funder specific templates and institutional guidance. Once a plan has been completed it can be downloaded and inserted into your grant proposals.
+
+Management and development of the DMP Roadmap is jointly provided by the Digital Curation Centre (DCC), http://www.dcc.ac.uk/, and the University of California Curation Center (UC3), http://www.cdlib.org/services/uc3/
+
+The tool has four main functions
+1. To help create and maintain different versions of Data Management Plans;
+2. To provide useful guidance on data management issues and how to meet research funders' requirements;
+3. To export attractive and useful plans in a variety of formats;
+4. To allow collaborative work when creating Data Management Plans.
+
+#### Current Release
+v.0.1.0
+[](https://travis-ci.org/DMPRoadmap/roadmap)
+
+#### Summary
+
+#### Pre-requisites
+Roadmap is a Ruby on Rails application and you will need to have:
+1. Ruby >= 2.0.0p247
+2. Rails >= 4.0
+3. MySql >= 5.0
+
+Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site: http://rubyonrails.org
+
+Further details on how to install MySQL and create your first user and database. Be sure to follow the instructions for your particular environment.
+* Install: http://dev.mysql.com/downloads/mysql/
+*
+* Create a user: http://dev.mysql.com/doc/refman/5.7/en/create-user.html
+* Create the database: http://dev.mysql.com/doc/refman/5.7/en/creating-database.html
+
+You may also find the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+#### Installation
+* Create your mysql db. Select UTF-8 Unicode (utf8mb4) encoding.
+* Fork the repository and then clone it onto your server
+
+> > git clone https://github.com/[your organization]/roadmap.git
+
+> > cd roadmap
+
+* Make copies of the yaml configuration files and update the values for your installation
+
+> > cp config/database_example.yml config/database.yml
+> > cp config/secrets_example.yml config/secrets.yml
+
+* Create an environment variable for your instance's secret (as defined in config/secrets.yml). You should use the following command to generate secrets for each of your environments, storing the production one in the environment variable:
+
+> > rake secret
+
+* Run bundler and perform the DB migrations
+
+> > gem install bundler (if bundler is not yet installed)
+
+> > bundle install
+
+> > rake db:migrate
+
+> > rake db:seed
+
+* Setup the devise authentication gem
+
+> > rails generate devise:install (Is this really necessary?)
+
+* Start the application
+
+> > rails server
+
+* Verify that the site is running properly by going to http://localhost:3000
+* Login as the default administrator: 'super_admin@example.com' - 'password1'
+
+#### Troubleshooting
+##### Installation - OSX:
+
+```
+An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue.
+
+Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.
+```
+
+If you are installing on a system that already has v8 installed then you may need to install the libv8 gem manually using your system's current v8 engine. If you're using homebrew to manage your packages you should run 'brew update' and 'brew upgrade' to make sure you have the latest packages
+
+> > gem uninstall -a libv8
+
+> > gem install libv8 -v '<>' -- --with-system-v8
+
+> > bundle install
+
+#### Support
+Issues should be reported here on Github https://github.com/DMPRoadmap/roadmap/issues
+Please be advised though that we can only provide limited support for your local installations.
+
+#### Become a contributor
+Fork this repository and make your modifications in a new branch. Then create a pull request to our 'development' branch. We will reject any pull request made against the 'master' branch. Once your pull request has been submitted the team will review your request and accept it if appropriate.
+
+Join the email listserv at roadmap-l (at) listserv.ucop (dot) edu.
+
+#### License
+The DMP Roadmap project uses to the MIT License .
diff --git a/README.rdoc b/README.rdoc
index 9a680a0..8f67343 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,36 +1,36 @@
-= DMPRoadmap
-
-Roadmap is a data management planning tool, available at https://github.com/DMPRoadmap/roadmap
-
-Development of the Roadmap is provided by the Digital Curation Centre and the University of California Curation Center.
-
-The tool has four main functions
-1. To help create and maintain different versions of Data Management Plans;
-2. To provide useful guidance on data management issues and how to meet research funders' requirements;
-3. To export attractive and useful plans in a variety of formats;
-4. To allow collaborative work when creating Data Management Plans.
-
-== Documentation & Support
-
-* You can contact us by email, roadmap-l@listserv.ucop.edu, but we can only provide limited support for your installation
-
-== Bugs & Feature Requests
-
-* Bug Reports & Feature Requests: https://github.com/DMPRoadmap/roadmap/issues
-* Please prefix your request with either: 'Bug:' or 'Feature:'
-
-== Prerequisites
-
-Roadmap is a Ruby on Rails application and you will need to have Ruby 2.0.0p247 or greater installed on your server and a MySQL server v5.0 or greater.
-
-Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site, http://rubyonrails.org
-
-You may also find the following resources handy:
-
-* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
-* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
-
-
-== Copyright
-
-The Roadmap project uses an MIT License. The full text of the license can be found at: https://github.com/DMPRoadmap/roadmap/blob/master/LICENSE.md
+= DMPRoadmap
+
+Roadmap is a data management planning tool, available at https://github.com/DMPRoadmap/roadmap
+
+Development of the Roadmap is provided by the Digital Curation Centre and the University of California Curation Center.
+
+The tool has four main functions
+1. To help create and maintain different versions of Data Management Plans;
+2. To provide useful guidance on data management issues and how to meet research funders' requirements;
+3. To export attractive and useful plans in a variety of formats;
+4. To allow collaborative work when creating Data Management Plans.
+
+== Documentation & Support
+
+* You can contact us by email, roadmap-l@listserv.ucop.edu, but we can only provide limited support for your installation
+
+== Bugs & Feature Requests
+
+* Bug Reports & Feature Requests: https://github.com/DMPRoadmap/roadmap/issues
+* Please prefix your request with either: 'Bug:' or 'Feature:'
+
+== Prerequisites
+
+Roadmap is a Ruby on Rails application and you will need to have Ruby 2.0.0p247 or greater installed on your server and a MySQL server v5.0 or greater.
+
+Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site, http://rubyonrails.org
+
+You may also find the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Copyright
+
+The Roadmap project uses an MIT License. The full text of the license can be found at: https://github.com/DMPRoadmap/roadmap/blob/master/LICENSE.md
diff --git a/app/admin/language.rb b/app/admin/language.rb
new file mode 100644
index 0000000..777478c
--- /dev/null
+++ b/app/admin/language.rb
@@ -0,0 +1,45 @@
+# [+Project:+] DMPonline
+# [+Description:+]
+#
+# [+Created:+] 12/08/2016
+# [+Copyright:+] Digital Curation Centre
+
+ActiveAdmin.register Language do
+ permit_params :language_id, :name, :abbreviation, :default_language
+
+ menu :priority => 10, :label => proc { I18n.t('admin.language') }
+
+ index do
+ column I18n.t('admin.language_name'), :sortable => :name do |lang|
+ link_to lang.name, [:admin, lang]
+ end
+ column I18n.t('admin.language_abbreviation'), :sortable => :abbreviation do |lang|
+ link_to lang.abbreviation, [:admin, lang]
+ end
+ column I18n.t('admin.language_is_default'), :sortable => :default_language do |lang|
+ if lang[:default_language]
+ 'Yes'
+ else
+ 'No'
+ end
+ end
+
+ actions
+ end
+
+ show do
+ attributes_table do
+ row :name
+ row :abbreviation
+ row :default_language
+ row :description
+ end
+ end
+
+ controller do
+ def permitted_params
+ params.permit!
+ end
+ end
+
+end
\ No newline at end of file
diff --git a/app/admin/org_token_permission.rb b/app/admin/org_token_permission.rb
index e335d7f..4075d5cf 100644
--- a/app/admin/org_token_permission.rb
+++ b/app/admin/org_token_permission.rb
@@ -1,31 +1,31 @@
-ActiveAdmin.register OrgTokenPermission do
- permit_params :organisation_id, :token_permission_type_id
-
- menu priority: 40, label: proc{ I18n.t('admin.org_token_permission')}, parent: "Api"
-
- index do
- column I18n.t('admin.org') do |n|
- link_to n.organisation, [:admin,n]
- end
- column I18n.t('admin.token_permission') do |n|
- link_to n.token_permission_type, [:admin,n]
- end
-
- actions
- end
-
- show do
- attributes_table do
- row :organisation_id
- row :token_permission_type_id
- end
- end
-
- controller do
- def permitted_params
- params.permit!
- end
- end
-
-
-end
+ActiveAdmin.register OrgTokenPermission do
+ permit_params :organisation_id, :token_permission_type_id
+
+ menu priority: 40, label: proc{ I18n.t('admin.org_token_permission')}, parent: "Api"
+
+ index do
+ column I18n.t('admin.org') do |n|
+ link_to n.organisation, [:admin,n]
+ end
+ column I18n.t('admin.token_permission') do |n|
+ link_to n.token_permission_type, [:admin,n]
+ end
+
+ actions
+ end
+
+ show do
+ attributes_table do
+ row :organisation_id
+ row :token_permission_type_id
+ end
+ end
+
+ controller do
+ def permitted_params
+ params.permit!
+ end
+ end
+
+
+end
diff --git a/app/admin/token_permission_type.rb b/app/admin/token_permission_type.rb
index de4aa2d..cd6e05c 100644
--- a/app/admin/token_permission_type.rb
+++ b/app/admin/token_permission_type.rb
@@ -1,33 +1,33 @@
-ActiveAdmin.register TokenPermissionType do
- permit_params :token_type, :text_desription
-
- menu priority: 40, label: proc{ I18n.t('admin.token_permission_type')}, parent: "Api"
-
- # TODO: Find better fix for the undefined method xxx_id_eq
- remove_filter :org_token_permissions
-
- index do
- column I18n.t('admin.token_permission_type'), sortable: :token_type do |n|
- link_to n.token_type, [:admin, n]
- end
- column I18n.t('admin.permission_description') do |n|
- link_to n.text_desription, [:admin, n]
- end
-
- actions
- end
-
- show do
- attributes_table do
- row :token_type
- row :text_desription
- end
- end
-
- controller do
- def permitted_params
- params.permit!
- end
- end
-
-end
+ActiveAdmin.register TokenPermissionType do
+ permit_params :token_type, :text_desription
+
+ menu priority: 40, label: proc{ I18n.t('admin.token_permission_type')}, parent: "Api"
+
+ # TODO: Find better fix for the undefined method xxx_id_eq
+ remove_filter :org_token_permissions
+
+ index do
+ column I18n.t('admin.token_permission_type'), sortable: :token_type do |n|
+ link_to n.token_type, [:admin, n]
+ end
+ column I18n.t('admin.permission_description') do |n|
+ link_to n.text_desription, [:admin, n]
+ end
+
+ actions
+ end
+
+ show do
+ attributes_table do
+ row :token_type
+ row :text_desription
+ end
+ end
+
+ controller do
+ def permitted_params
+ params.permit!
+ end
+ end
+
+end
diff --git a/app/assets/javascripts/active_admin.js b/app/assets/javascripts/active_admin.js
index 3752dce..1f42d86 100644
--- a/app/assets/javascripts/active_admin.js
+++ b/app/assets/javascripts/active_admin.js
@@ -1 +1 @@
-#= require active_admin/base
+#= require active_admin/base
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 0a76459..68c3667 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -1,197 +1,197 @@
-// This is a manifest file that'll be compiled into application.js, which will include all the files
-// listed below.
-//
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
-// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
-//
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// the compiled file.
-//
-// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
-// GO AFTER THE REQUIRES BELOW.
-//
-//= require jquery
-//= require jquery_ujs
-//= require twitter/bootstrap
-//= require v1.js
-//= require select2.min.js
-//= require jquery.placeholder.js
-//= require tinymce-jquery
-//= require i18n
-//= require i18n/translations
-
-
-$( document ).ready(function() {
-
- $(function(){
- $('.dropdown-toggle').dropdown()
- });
-
- $('.accordion-body').on('show', function() {
- var plus = $(this).parent().children(".accordion-heading").children(".accordion-toggle").children(".icon-plus").removeClass("icon-plus").addClass("icon-minus");
- }).on('hide', function(){
- var minus = $(this).parent().children(".accordion-heading").children(".accordion-toggle").children(".icon-minus").removeClass("icon-minus").addClass("icon-plus");
- });
-
- //accordion home page
- $('.accordion-home').on('show', function() {
- var plus = $(this).parent().find(".plus-laranja").removeClass("plus-laranja").addClass("minus-laranja");
- }).on('hide', function(){
- var minus = $(this).parent().find(".minus-laranja").removeClass("minus-laranja").addClass("plus-laranja");
- });
-
- //accordion project details page when project has more than 1 plan
- $('.accordion-project').on('show', function() {
- var plus = $(this).parent().find(".plus-laranja").removeClass("plus-laranja").addClass("minus-laranja");
- }).on('hide', function(){
- var minus = $(this).parent().find(".minus-laranja").removeClass("minus-laranja").addClass("plus-laranja");
- });
-
- //$('#3-or-4-splash').modal();
-
- $('.typeahead').select2({
- width: "element",
- allowClear: true
- });
-
- $(".help").popover();
-
- $('.has-tooltip').tooltip({
- placement: "right",
- trigger: "focus"
- });
-
- $(".show-edit-toggle").click(function (e) {
- e.preventDefault();
-
- $(".edit-project").toggle();
- $(".view-project").toggle();
- });
-
- $(".toggle-existing-user-access").change(function(){
- $(this).closest("form").submit();
- });
-
- $("#user_email.text_field.reg-input").blur(function () {
- if (validateEmail($(this).val())) {
- $(this).parent().children("div").hide();
- }
- else {
- $(this).parent().children("div").show();
- }
- });
-
- $("#user_password.text_field.reg-input").blur(function () {
- if ($(this).val().length >= 8) {
- $(this).parent().children("div").hide();
- }
- else {
- $(this).parent().children("div").show();
- }
- });
-
- $("#user_password_confirmation.text_field.reg-input").blur(function () {
- if ($(this).val() == $("#user_password.text_field.reg-input").val()) {
- $(this).parent().children("div").hide();
- }
- else {
- $(this).parent().children("div").show();
- }
- });
-
- $('#user_organisation_id').on("change", function(e) {
- e.preventDefault();
- var selected_org = $(this).select2("val");
- var other_orgs = $("#other-organisation-name").attr("data-orgs").split(",");
- var index = $.inArray(selected_org, other_orgs);
- if (index > -1) {
- $("#other-organisation-name").show();
- $("#user_other_organisation").focus();
- }
- else {
- $("#other-organisation-name").hide();
- }
- });
-
- $("#other-org-link > a").click(function(e){
- e.preventDefault();
- var other_org = $("#other-organisation-name").attr("data-orgs").split(",");
- $("#user_organisation_id").select2("val", other_org);
- $("#other-org-link").hide();
- $("#user_organisation_id").change();
- });
-
- //alert dialog for unlink Shibbileth account
- $("#unlink-institutional-credentials-dialog").on("show", function(){
- $('.select2-choice').hide();
- });
-
- $("#unlink-shibboleth-cancelled").click(function (){
- $("#unlink-institutional-credentials-dialog").modal("hide");
- $('.select2-choice').show();
- });
-
- $("#unlink-shibboleth-confirmed").click(function (){
- $("#unlink_flag").val('true');
- $("#edit_user").submit();
-
- });
-
- //Question Options
- // ------------------------------------------------------------------------------------
- $(".options_table").on("click", ".remove-option", function(e){
- e.preventDefault();
-
- // Mark the option for removal
- $($(this).siblings()[0]).val(true);
-
- // Hide the entire table row and the associated hidden field for the item
- $(this).parent().parent().addClass('hidden');
- });
-
- $(".add-option").click(function(e){
- e.preventDefault();
-
- var tbl = $(this).parent().find("table.options_table > tbody.options_tbody"),
- last = tbl.find("tr:last"),
- clone = last.clone();
- nbr = parseInt(last.find(".number_field").val());
-
- // Update the input field names and ids
- clone.find("input").each(function(index){
- $(this).prop("id", $(this).prop("id").replace(/_\d+_/g, "_" + nbr + "_"));
- $(this).prop("name", $(this).prop("name").replace(/\[\d+\]/g, "[" + nbr + "]"));
- });
-
- // Remove the hidden class and make sure the new row is not marked for removal
- clone.removeClass('hidden');
- clone.find("[id$=" + nbr + "__destroy]").val(false);
-
- // Default the other values
- clone.find("[id$=" + nbr + "_number]").val("" + (nbr + 1));
- clone.find("[id$=" + nbr + "_text]").val("");
- clone.find("[id$=" + nbr + "_is_default]").prop("checked", false);
-
- last.after(clone);
- });
-
- /*$('#continue-to-new').click(function(e){
- var destination = $(this).attr("href");
- var n = destination.lastIndexOf('=');
- destination = decodeURIComponent(destination.substring(n + 1));
- $.post('splash_logs', {destination: destination} );
- $("#3-or-4-splash").modal('hide');
- return false;
- });*/
-
-});
-
-function validateEmail(sEmail) {
- var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/;
- if (filter.test(sEmail)) {
- return true;
- }
- else {
- return false;
- }
-}
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require twitter/bootstrap
+//= require v1.js
+//= require select2.min.js
+//= require jquery.placeholder.js
+//= require tinymce-jquery
+//= require i18n
+//= require i18n/translations
+
+
+$( document ).ready(function() {
+
+ $(function(){
+ $('.dropdown-toggle').dropdown()
+ });
+
+ $('.accordion-body').on('show', function() {
+ var plus = $(this).parent().children(".accordion-heading").children(".accordion-toggle").children(".icon-plus").removeClass("icon-plus").addClass("icon-minus");
+ }).on('hide', function(){
+ var minus = $(this).parent().children(".accordion-heading").children(".accordion-toggle").children(".icon-minus").removeClass("icon-minus").addClass("icon-plus");
+ });
+
+ //accordion home page
+ $('.accordion-home').on('show', function() {
+ var plus = $(this).parent().find(".plus-laranja").removeClass("plus-laranja").addClass("minus-laranja");
+ }).on('hide', function(){
+ var minus = $(this).parent().find(".minus-laranja").removeClass("minus-laranja").addClass("plus-laranja");
+ });
+
+ //accordion project details page when project has more than 1 plan
+ $('.accordion-project').on('show', function() {
+ var plus = $(this).parent().find(".plus-laranja").removeClass("plus-laranja").addClass("minus-laranja");
+ }).on('hide', function(){
+ var minus = $(this).parent().find(".minus-laranja").removeClass("minus-laranja").addClass("plus-laranja");
+ });
+
+ //$('#3-or-4-splash').modal();
+
+ $('.typeahead').select2({
+ width: "element",
+ allowClear: true
+ });
+
+ $(".help").popover();
+
+ $('.has-tooltip').tooltip({
+ placement: "right",
+ trigger: "focus"
+ });
+
+ $(".show-edit-toggle").click(function (e) {
+ e.preventDefault();
+
+ $(".edit-project").toggle();
+ $(".view-project").toggle();
+ });
+
+ $(".toggle-existing-user-access").change(function(){
+ $(this).closest("form").submit();
+ });
+
+ $("#user_email.text_field.reg-input").blur(function () {
+ if (validateEmail($(this).val())) {
+ $(this).parent().children("div").hide();
+ }
+ else {
+ $(this).parent().children("div").show();
+ }
+ });
+
+ $("#user_password.text_field.reg-input").blur(function () {
+ if ($(this).val().length >= 8) {
+ $(this).parent().children("div").hide();
+ }
+ else {
+ $(this).parent().children("div").show();
+ }
+ });
+
+ $("#user_password_confirmation.text_field.reg-input").blur(function () {
+ if ($(this).val() == $("#user_password.text_field.reg-input").val()) {
+ $(this).parent().children("div").hide();
+ }
+ else {
+ $(this).parent().children("div").show();
+ }
+ });
+
+ $('#user_organisation_id').on("change", function(e) {
+ e.preventDefault();
+ var selected_org = $(this).select2("val");
+ var other_orgs = $("#other-organisation-name").attr("data-orgs").split(",");
+ var index = $.inArray(selected_org, other_orgs);
+ if (index > -1) {
+ $("#other-organisation-name").show();
+ $("#user_other_organisation").focus();
+ }
+ else {
+ $("#other-organisation-name").hide();
+ }
+ });
+
+ $("#other-org-link > a").click(function(e){
+ e.preventDefault();
+ var other_org = $("#other-organisation-name").attr("data-orgs").split(",");
+ $("#user_organisation_id").select2("val", other_org);
+ $("#other-org-link").hide();
+ $("#user_organisation_id").change();
+ });
+
+ //alert dialog for unlink Shibbileth account
+ $("#unlink-institutional-credentials-dialog").on("show", function(){
+ $('.select2-choice').hide();
+ });
+
+ $("#unlink-shibboleth-cancelled").click(function (){
+ $("#unlink-institutional-credentials-dialog").modal("hide");
+ $('.select2-choice').show();
+ });
+
+ $("#unlink-shibboleth-confirmed").click(function (){
+ $("#unlink_flag").val('true');
+ $("#edit_user").submit();
+
+ });
+
+ //Question Options
+ // ------------------------------------------------------------------------------------
+ $(".options_table").on("click", ".remove-option", function(e){
+ e.preventDefault();
+
+ // Mark the option for removal
+ $($(this).siblings()[0]).val(true);
+
+ // Hide the entire table row and the associated hidden field for the item
+ $(this).parent().parent().addClass('hidden');
+ });
+
+ $(".add-option").click(function(e){
+ e.preventDefault();
+
+ var tbl = $(this).parent().find("table.options_table > tbody.options_tbody"),
+ last = tbl.find("tr:last"),
+ clone = last.clone();
+ nbr = parseInt(last.find(".number_field").val());
+
+ // Update the input field names and ids
+ clone.find("input").each(function(index){
+ $(this).prop("id", $(this).prop("id").replace(/_\d+_/g, "_" + nbr + "_"));
+ $(this).prop("name", $(this).prop("name").replace(/\[\d+\]/g, "[" + nbr + "]"));
+ });
+
+ // Remove the hidden class and make sure the new row is not marked for removal
+ clone.removeClass('hidden');
+ clone.find("[id$=" + nbr + "__destroy]").val(false);
+
+ // Default the other values
+ clone.find("[id$=" + nbr + "_number]").val("" + (nbr + 1));
+ clone.find("[id$=" + nbr + "_text]").val("");
+ clone.find("[id$=" + nbr + "_is_default]").prop("checked", false);
+
+ last.after(clone);
+ });
+
+ /*$('#continue-to-new').click(function(e){
+ var destination = $(this).attr("href");
+ var n = destination.lastIndexOf('=');
+ destination = decodeURIComponent(destination.substring(n + 1));
+ $.post('splash_logs', {destination: destination} );
+ $("#3-or-4-splash").modal('hide');
+ return false;
+ });*/
+
+});
+
+function validateEmail(sEmail) {
+ var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/;
+ if (filter.test(sEmail)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
diff --git a/app/assets/javascripts/bootstrap.min.js b/app/assets/javascripts/bootstrap.min.js
index f9cbdae..dce516e 100644
--- a/app/assets/javascripts/bootstrap.min.js
+++ b/app/assets/javascripts/bootstrap.min.js
@@ -1,6 +1,6 @@
-/*!
-* Bootstrap.js by @fat & @mdo
-* Copyright 2012 Twitter, Inc.
-* http://www.apache.org/licenses/LICENSE-2.0.txt
-*/
+/*!
+* Bootstrap.js by @fat & @mdo
+* Copyright 2012 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('
').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f ').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:''}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:' ',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/export_configure.js b/app/assets/javascripts/export_configure.js
index d6ae5bb..a195d3f 100644
--- a/app/assets/javascripts/export_configure.js
+++ b/app/assets/javascripts/export_configure.js
@@ -1,108 +1,108 @@
-$(document).ready(function() {
-
- // Prevent the click handler from being registered multiple times.
- // This is due to the buggy way this is included.
- if (window['has_export_js'])
- return;
-
- window['has_export_js'] = true;
-
- $.expr.filters.indeterminate = function(element) {
- return $(element).prop('indeterminate');
- };
-
- $("select#format").change(function(){
- if ($(this).val() == 'pdf') {
- $("#pdf-format-options").show();
- $("#settings-toggle > small").show();
- }
- else {
- $("#pdf-format-options").hide();
- $("#settings-toggle > small").hide();
- }
- });
-
- $("input:checkbox, select:not(#format)").change(function(){
- $(".unsaved_changes_alert").show();
- });
-
- $("select:not(#format)").change(function(){
- $(".unsaved_changes_alert").show();
- });
-
- $('.check_select > legend').append(' ');
-
- $('.btn-primary[value="Reset"]').click(function(){
- $('input:checkbox').prop('checked',true);
- $("select:not(#format)").each(function(){
- $(this).val($(this).data("default"));
- });
- $(".unsaved_changes_alert").hide();
- $("#settings-toggle > small").text(I18n.t("project.settings.plans.template_formatting"));
- });
-
- $('.btn-primary[value="Save"]').click(function(){
- var custom = false;
- $("select:not(#format)").each(function(){
- if ($(this).val() != $(this).data("default")) {
- custom = true;
- }
- });
- if (custom) {
- $("#settings-toggle > small").text(I18n.t("project.settings.plans.custom_formatting"));
- }
- else {
- $("#settings-toggle > small").text(I18n.t("project.settings.plans.template_formatting"));
- }
- $(".unsaved_changes_alert").hide();
- });
-
- $('.check_select').each(function() {
- var container = $(this),
- toggle = container.find('> legend > .toggle'),
- checks = container.find('> ol > li > input[type=checkbox], li > fieldset > legend > input[type=checkbox]');
-
-
- function checked(toggle) {
- var checks = toggle.prop('checks'),
- checked = checks.filter(':checked').length,
- indeterminate = checks.filter(':indeterminate').length;
-
- return {
- 'indeterminate' : ((checked > 0 && checked < checks.length) || indeterminate > 0),
- 'checked' : (checked == checks.length)
- };
- }
-
- function toggleParent(toggle) {
- var parent_toggle = toggle.prop('toggle');
-
- if (parent_toggle)
- parent_toggle.prop(checked(parent_toggle));
- }
-
- checks.prop('toggle', toggle);
- toggle.prop('checks', checks);
- toggle.prop('id', container.find('> legend > label').prop('for'));
- toggle.prop(checked(toggle));
- toggleParent(toggle);
-
- checks.change(function() {
- toggle.prop(checked(toggle));
- toggleParent(toggle);
- });
-
- toggle.change(function() {
- $(".unsaved_changes_alert").show();
- checks.prop({ 'checked': toggle.is(':checked'), 'indeterminate': false});
-
- checks.each(function() {
- var child_checks = $(this).prop('checks');
-
- if (child_checks)
- child_checks.prop({ 'checked': toggle.is(':checked'), 'indeterminate': toggle.is(':indeterminate') });
-
- });
- });
- });
-});
+$(document).ready(function() {
+
+ // Prevent the click handler from being registered multiple times.
+ // This is due to the buggy way this is included.
+ if (window['has_export_js'])
+ return;
+
+ window['has_export_js'] = true;
+
+ $.expr.filters.indeterminate = function(element) {
+ return $(element).prop('indeterminate');
+ };
+
+ $("select#format").change(function(){
+ if ($(this).val() == 'pdf') {
+ $("#pdf-format-options").show();
+ $("#settings-toggle > small").show();
+ }
+ else {
+ $("#pdf-format-options").hide();
+ $("#settings-toggle > small").hide();
+ }
+ });
+
+ $("input:checkbox, select:not(#format)").change(function(){
+ $(".unsaved_changes_alert").show();
+ });
+
+ $("select:not(#format)").change(function(){
+ $(".unsaved_changes_alert").show();
+ });
+
+ $('.check_select > legend').append(' ');
+
+ $('.btn-primary[value="Reset"]').click(function(){
+ $('input:checkbox').prop('checked',true);
+ $("select:not(#format)").each(function(){
+ $(this).val($(this).data("default"));
+ });
+ $(".unsaved_changes_alert").hide();
+ $("#settings-toggle > small").text(I18n.t("project.settings.plans.template_formatting"));
+ });
+
+ $('.btn-primary[value="Save"]').click(function(){
+ var custom = false;
+ $("select:not(#format)").each(function(){
+ if ($(this).val() != $(this).data("default")) {
+ custom = true;
+ }
+ });
+ if (custom) {
+ $("#settings-toggle > small").text(I18n.t("project.settings.plans.custom_formatting"));
+ }
+ else {
+ $("#settings-toggle > small").text(I18n.t("project.settings.plans.template_formatting"));
+ }
+ $(".unsaved_changes_alert").hide();
+ });
+
+ $('.check_select').each(function() {
+ var container = $(this),
+ toggle = container.find('> legend > .toggle'),
+ checks = container.find('> ol > li > input[type=checkbox], li > fieldset > legend > input[type=checkbox]');
+
+
+ function checked(toggle) {
+ var checks = toggle.prop('checks'),
+ checked = checks.filter(':checked').length,
+ indeterminate = checks.filter(':indeterminate').length;
+
+ return {
+ 'indeterminate' : ((checked > 0 && checked < checks.length) || indeterminate > 0),
+ 'checked' : (checked == checks.length)
+ };
+ }
+
+ function toggleParent(toggle) {
+ var parent_toggle = toggle.prop('toggle');
+
+ if (parent_toggle)
+ parent_toggle.prop(checked(parent_toggle));
+ }
+
+ checks.prop('toggle', toggle);
+ toggle.prop('checks', checks);
+ toggle.prop('id', container.find('> legend > label').prop('for'));
+ toggle.prop(checked(toggle));
+ toggleParent(toggle);
+
+ checks.change(function() {
+ toggle.prop(checked(toggle));
+ toggleParent(toggle);
+ });
+
+ toggle.change(function() {
+ $(".unsaved_changes_alert").show();
+ checks.prop({ 'checked': toggle.is(':checked'), 'indeterminate': false});
+
+ checks.each(function() {
+ var child_checks = $(this).prop('checks');
+
+ if (child_checks)
+ child_checks.prop({ 'checked': toggle.is(':checked'), 'indeterminate': toggle.is(':indeterminate') });
+
+ });
+ });
+ });
+});
diff --git a/app/assets/javascripts/jquery.placeholder.js b/app/assets/javascripts/jquery.placeholder.js
index ebea448..78af36d 100644
--- a/app/assets/javascripts/jquery.placeholder.js
+++ b/app/assets/javascripts/jquery.placeholder.js
@@ -1,183 +1,183 @@
-/*! http://mths.be/placeholder v2.0.7 by @mathias */
-;(function(window, document, $) {
-
- var isInputSupported = 'placeholder' in document.createElement('input');
- var isTextareaSupported = 'placeholder' in document.createElement('textarea');
- var prototype = $.fn;
- var valHooks = $.valHooks;
- var propHooks = $.propHooks;
- var hooks;
- var placeholder;
-
- if (isInputSupported && isTextareaSupported) {
-
- placeholder = prototype.placeholder = function() {
- return this;
- };
-
- placeholder.input = placeholder.textarea = true;
-
- } else {
-
- placeholder = prototype.placeholder = function() {
- var $this = this;
- $this
- .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
- .not('.placeholder')
- .bind({
- 'focus.placeholder': clearPlaceholder,
- 'blur.placeholder': setPlaceholder
- })
- .data('placeholder-enabled', true)
- .trigger('blur.placeholder');
- return $this;
- };
-
- placeholder.input = isInputSupported;
- placeholder.textarea = isTextareaSupported;
-
- hooks = {
- 'get': function(element) {
- var $element = $(element);
-
- var $passwordInput = $element.data('placeholder-password');
- if ($passwordInput) {
- return $passwordInput[0].value;
- }
-
- return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value;
- },
- 'set': function(element, value) {
- var $element = $(element);
-
- var $passwordInput = $element.data('placeholder-password');
- if ($passwordInput) {
- return $passwordInput[0].value = value;
- }
-
- if (!$element.data('placeholder-enabled')) {
- return element.value = value;
- }
- if (value == '') {
- element.value = value;
- // Issue #56: Setting the placeholder causes problems if the element continues to have focus.
- if (element != safeActiveElement()) {
- // We can't use `triggerHandler` here because of dummy text/password inputs :(
- setPlaceholder.call(element);
- }
- } else if ($element.hasClass('placeholder')) {
- clearPlaceholder.call(element, true, value) || (element.value = value);
- } else {
- element.value = value;
- }
- // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363
- return $element;
- }
- };
-
- if (!isInputSupported) {
- valHooks.input = hooks;
- propHooks.value = hooks;
- }
- if (!isTextareaSupported) {
- valHooks.textarea = hooks;
- propHooks.value = hooks;
- }
-
- $(function() {
- // Look for forms
- $(document).delegate('form', 'submit.placeholder', function() {
- // Clear the placeholder values so they don't get submitted
- var $inputs = $('.placeholder', this).each(clearPlaceholder);
- setTimeout(function() {
- $inputs.each(setPlaceholder);
- }, 10);
- });
- });
-
- // Clear placeholder values upon page reload
- $(window).bind('beforeunload.placeholder', function() {
- $('.placeholder').each(function() {
- this.value = '';
- });
- });
-
- }
-
- function args(elem) {
- // Return an object of element attributes
- var newAttrs = {};
- var rinlinejQuery = /^jQuery\d+$/;
- $.each(elem.attributes, function(i, attr) {
- if (attr.specified && !rinlinejQuery.test(attr.name)) {
- newAttrs[attr.name] = attr.value;
- }
- });
- return newAttrs;
- }
-
- function clearPlaceholder(event, value) {
- var input = this;
- var $input = $(input);
- if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) {
- if ($input.data('placeholder-password')) {
- $input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id'));
- // If `clearPlaceholder` was called from `$.valHooks.input.set`
- if (event === true) {
- return $input[0].value = value;
- }
- $input.focus();
- } else {
- input.value = '';
- $input.removeClass('placeholder');
- input == safeActiveElement() && input.select();
- }
- }
- }
-
- function setPlaceholder() {
- var $replacement;
- var input = this;
- var $input = $(input);
- var id = this.id;
- if (input.value == '') {
- if (input.type == 'password') {
- if (!$input.data('placeholder-textinput')) {
- try {
- $replacement = $input.clone().attr({ 'type': 'text' });
- } catch(e) {
- $replacement = $(' ').attr($.extend(args(this), { 'type': 'text' }));
- }
- $replacement
- .removeAttr('name')
- .data({
- 'placeholder-password': $input,
- 'placeholder-id': id
- })
- .bind('focus.placeholder', clearPlaceholder);
- $input
- .data({
- 'placeholder-textinput': $replacement,
- 'placeholder-id': id
- })
- .before($replacement);
- }
- $input = $input.removeAttr('id').hide().prev().attr('id', id).show();
- // Note: `$input[0] != input` now!
- }
- $input.addClass('placeholder');
- $input[0].value = $input.attr('placeholder');
- } else {
- $input.removeClass('placeholder');
- }
- }
-
- function safeActiveElement() {
- // Avoid IE9 `document.activeElement` of death
- // https://github.com/mathiasbynens/jquery-placeholder/pull/99
- try {
- return document.activeElement;
- } catch (err) {}
- }
-
+/*! http://mths.be/placeholder v2.0.7 by @mathias */
+;(function(window, document, $) {
+
+ var isInputSupported = 'placeholder' in document.createElement('input');
+ var isTextareaSupported = 'placeholder' in document.createElement('textarea');
+ var prototype = $.fn;
+ var valHooks = $.valHooks;
+ var propHooks = $.propHooks;
+ var hooks;
+ var placeholder;
+
+ if (isInputSupported && isTextareaSupported) {
+
+ placeholder = prototype.placeholder = function() {
+ return this;
+ };
+
+ placeholder.input = placeholder.textarea = true;
+
+ } else {
+
+ placeholder = prototype.placeholder = function() {
+ var $this = this;
+ $this
+ .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
+ .not('.placeholder')
+ .bind({
+ 'focus.placeholder': clearPlaceholder,
+ 'blur.placeholder': setPlaceholder
+ })
+ .data('placeholder-enabled', true)
+ .trigger('blur.placeholder');
+ return $this;
+ };
+
+ placeholder.input = isInputSupported;
+ placeholder.textarea = isTextareaSupported;
+
+ hooks = {
+ 'get': function(element) {
+ var $element = $(element);
+
+ var $passwordInput = $element.data('placeholder-password');
+ if ($passwordInput) {
+ return $passwordInput[0].value;
+ }
+
+ return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value;
+ },
+ 'set': function(element, value) {
+ var $element = $(element);
+
+ var $passwordInput = $element.data('placeholder-password');
+ if ($passwordInput) {
+ return $passwordInput[0].value = value;
+ }
+
+ if (!$element.data('placeholder-enabled')) {
+ return element.value = value;
+ }
+ if (value == '') {
+ element.value = value;
+ // Issue #56: Setting the placeholder causes problems if the element continues to have focus.
+ if (element != safeActiveElement()) {
+ // We can't use `triggerHandler` here because of dummy text/password inputs :(
+ setPlaceholder.call(element);
+ }
+ } else if ($element.hasClass('placeholder')) {
+ clearPlaceholder.call(element, true, value) || (element.value = value);
+ } else {
+ element.value = value;
+ }
+ // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363
+ return $element;
+ }
+ };
+
+ if (!isInputSupported) {
+ valHooks.input = hooks;
+ propHooks.value = hooks;
+ }
+ if (!isTextareaSupported) {
+ valHooks.textarea = hooks;
+ propHooks.value = hooks;
+ }
+
+ $(function() {
+ // Look for forms
+ $(document).delegate('form', 'submit.placeholder', function() {
+ // Clear the placeholder values so they don't get submitted
+ var $inputs = $('.placeholder', this).each(clearPlaceholder);
+ setTimeout(function() {
+ $inputs.each(setPlaceholder);
+ }, 10);
+ });
+ });
+
+ // Clear placeholder values upon page reload
+ $(window).bind('beforeunload.placeholder', function() {
+ $('.placeholder').each(function() {
+ this.value = '';
+ });
+ });
+
+ }
+
+ function args(elem) {
+ // Return an object of element attributes
+ var newAttrs = {};
+ var rinlinejQuery = /^jQuery\d+$/;
+ $.each(elem.attributes, function(i, attr) {
+ if (attr.specified && !rinlinejQuery.test(attr.name)) {
+ newAttrs[attr.name] = attr.value;
+ }
+ });
+ return newAttrs;
+ }
+
+ function clearPlaceholder(event, value) {
+ var input = this;
+ var $input = $(input);
+ if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) {
+ if ($input.data('placeholder-password')) {
+ $input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id'));
+ // If `clearPlaceholder` was called from `$.valHooks.input.set`
+ if (event === true) {
+ return $input[0].value = value;
+ }
+ $input.focus();
+ } else {
+ input.value = '';
+ $input.removeClass('placeholder');
+ input == safeActiveElement() && input.select();
+ }
+ }
+ }
+
+ function setPlaceholder() {
+ var $replacement;
+ var input = this;
+ var $input = $(input);
+ var id = this.id;
+ if (input.value == '') {
+ if (input.type == 'password') {
+ if (!$input.data('placeholder-textinput')) {
+ try {
+ $replacement = $input.clone().attr({ 'type': 'text' });
+ } catch(e) {
+ $replacement = $(' ').attr($.extend(args(this), { 'type': 'text' }));
+ }
+ $replacement
+ .removeAttr('name')
+ .data({
+ 'placeholder-password': $input,
+ 'placeholder-id': id
+ })
+ .bind('focus.placeholder', clearPlaceholder);
+ $input
+ .data({
+ 'placeholder-textinput': $replacement,
+ 'placeholder-id': id
+ })
+ .before($replacement);
+ }
+ $input = $input.removeAttr('id').hide().prev().attr('id', id).show();
+ // Note: `$input[0] != input` now!
+ }
+ $input.addClass('placeholder');
+ $input[0].value = $input.attr('placeholder');
+ } else {
+ $input.removeClass('placeholder');
+ }
+ }
+
+ function safeActiveElement() {
+ // Avoid IE9 `document.activeElement` of death
+ // https://github.com/mathiasbynens/jquery-placeholder/pull/99
+ try {
+ return document.activeElement;
+ } catch (err) {}
+ }
+
}(this, document, jQuery));
\ No newline at end of file
diff --git a/app/assets/javascripts/jquery.tablesorter.js b/app/assets/javascripts/jquery.tablesorter.js
index e8e2323..9b58731 100644
--- a/app/assets/javascripts/jquery.tablesorter.js
+++ b/app/assets/javascripts/jquery.tablesorter.js
@@ -1,1031 +1,1031 @@
-/*
- *
- * TableSorter 2.0 - Client-side table sorting with ease!
- * Version 2.0.5b
- * @requires jQuery v1.2.3
- *
- * Copyright (c) 2007 Christian Bach
- * Examples and docs at: http://tablesorter.com
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-/**
- *
- * @description Create a sortable table with multi-column sorting capabilitys
- *
- * @example $('table').tablesorter();
- * @desc Create a simple tablesorter interface.
- *
- * @example $('table').tablesorter({ sortList:[[0,0],[1,0]] });
- * @desc Create a tablesorter interface and sort on the first and secound column column headers.
- *
- * @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });
- *
- * @desc Create a tablesorter interface and disableing the first and second column headers.
- *
- *
- * @example $('table').tablesorter({ headers: { 0: {sorter:"integer"}, 1: {sorter:"currency"} } });
- *
- * @desc Create a tablesorter interface and set a column parser for the first
- * and second column.
- *
- *
- * @param Object
- * settings An object literal containing key/value pairs to provide
- * optional settings.
- *
- *
- * @option String cssHeader (optional) A string of the class name to be appended
- * to sortable tr elements in the thead of the table. Default value:
- * "header"
- *
- * @option String cssAsc (optional) A string of the class name to be appended to
- * sortable tr elements in the thead on a ascending sort. Default value:
- * "headerSortUp"
- *
- * @option String cssDesc (optional) A string of the class name to be appended
- * to sortable tr elements in the thead on a descending sort. Default
- * value: "headerSortDown"
- *
- * @option String sortInitialOrder (optional) A string of the inital sorting
- * order can be asc or desc. Default value: "asc"
- *
- * @option String sortMultisortKey (optional) A string of the multi-column sort
- * key. Default value: "shiftKey"
- *
- * @option String textExtraction (optional) A string of the text-extraction
- * method to use. For complex html structures inside td cell set this
- * option to "complex", on large tables the complex option can be slow.
- * Default value: "simple"
- *
- * @option Object headers (optional) An array containing the forces sorting
- * rules. This option let's you specify a default sorting rule. Default
- * value: null
- *
- * @option Array sortList (optional) An array containing the forces sorting
- * rules. This option let's you specify a default sorting rule. Default
- * value: null
- *
- * @option Array sortForce (optional) An array containing forced sorting rules.
- * This option let's you specify a default sorting rule, which is
- * prepended to user-selected rules. Default value: null
- *
- * @option Boolean sortLocaleCompare (optional) Boolean flag indicating whatever
- * to use String.localeCampare method or not. Default set to true.
- *
- *
- * @option Array sortAppend (optional) An array containing forced sorting rules.
- * This option let's you specify a default sorting rule, which is
- * appended to user-selected rules. Default value: null
- *
- * @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter
- * should apply fixed widths to the table columns. This is usefull when
- * using the pager companion plugin. This options requires the dimension
- * jquery plugin. Default value: false
- *
- * @option Boolean cancelSelection (optional) Boolean flag indicating if
- * tablesorter should cancel selection of the table headers text.
- * Default value: true
- *
- * @option Boolean debug (optional) Boolean flag indicating if tablesorter
- * should display debuging information usefull for development.
- *
- * @type jQuery
- *
- * @name tablesorter
- *
- * @cat Plugins/Tablesorter
- *
- * @author Christian Bach/christian.bach@polyester.se
- */
-
-(function ($) {
- $.extend({
- tablesorter: new
- function () {
-
- var parsers = [],
- widgets = [];
-
- this.defaults = {
- cssHeader: "header",
- cssAsc: "headerSortUp",
- cssDesc: "headerSortDown",
- cssChildRow: "expand-child",
- sortInitialOrder: "asc",
- sortMultiSortKey: "shiftKey",
- sortForce: null,
- sortAppend: null,
- sortLocaleCompare: true,
- textExtraction: "simple",
- parsers: {}, widgets: [],
- widgetZebra: {
- css: ["even", "odd"]
- }, headers: {}, widthFixed: false,
- cancelSelection: true,
- sortList: [],
- headerList: [],
- dateFormat: "us",
- decimal: '/\.|\,/g',
- onRenderHeader: null,
- selectorHeaders: 'thead th',
- debug: false
- };
-
- /* debuging utils */
-
- function benchmark(s, d) {
- log(s + "," + (new Date().getTime() - d.getTime()) + "ms");
- }
-
- this.benchmark = benchmark;
-
- function log(s) {
- if (typeof console != "undefined" && typeof console.debug != "undefined") {
- console.log(s);
- } else {
- alert(s);
- }
- }
-
- /* parsers utils */
-
- function buildParserCache(table, $headers) {
-
- if (table.config.debug) {
- var parsersDebug = "";
- }
-
- if (table.tBodies.length == 0) return; // In the case of empty tables
- var rows = table.tBodies[0].rows;
-
- if (rows[0]) {
-
- var list = [],
- cells = rows[0].cells,
- l = cells.length;
-
- for (var i = 0; i < l; i++) {
-
- var p = false;
-
- if ($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter)) {
-
- p = getParserById($($headers[i]).metadata().sorter);
-
- } else if ((table.config.headers[i] && table.config.headers[i].sorter)) {
-
- p = getParserById(table.config.headers[i].sorter);
- }
- if (!p) {
-
- p = detectParserForColumn(table, rows, -1, i);
- }
-
- if (table.config.debug) {
- parsersDebug += "column:" + i + " parser:" + p.id + "\n";
- }
-
- list.push(p);
- }
- }
-
- if (table.config.debug) {
- log(parsersDebug);
- }
-
- return list;
- };
-
- function detectParserForColumn(table, rows, rowIndex, cellIndex) {
- var l = parsers.length,
- node = false,
- nodeValue = false,
- keepLooking = true;
- while (nodeValue == '' && keepLooking) {
- rowIndex++;
- if (rows[rowIndex]) {
- node = getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex);
- nodeValue = trimAndGetNodeText(table.config, node);
- if (table.config.debug) {
- log('Checking if value was empty on row:' + rowIndex);
- }
- } else {
- keepLooking = false;
- }
- }
- for (var i = 1; i < l; i++) {
- if (parsers[i].is(nodeValue, table, node)) {
- return parsers[i];
- }
- }
- // 0 is always the generic parser (text)
- return parsers[0];
- }
-
- function getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex) {
- return rows[rowIndex].cells[cellIndex];
- }
-
- function trimAndGetNodeText(config, node) {
- return $.trim(getElementText(config, node));
- }
-
- function getParserById(name) {
- var l = parsers.length;
- for (var i = 0; i < l; i++) {
- if (parsers[i].id.toLowerCase() == name.toLowerCase()) {
- return parsers[i];
- }
- }
- return false;
- }
-
- /* utils */
-
- function buildCache(table) {
-
- if (table.config.debug) {
- var cacheTime = new Date();
- }
-
- var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
- totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0,
- parsers = table.config.parsers,
- cache = {
- row: [],
- normalized: []
- };
-
- for (var i = 0; i < totalRows; ++i) {
-
- /** Add the table data to main data array */
- var c = $(table.tBodies[0].rows[i]),
- cols = [];
-
- // if this is a child row, add it to the last row's children and
- // continue to the next row
- if (c.hasClass(table.config.cssChildRow)) {
- cache.row[cache.row.length - 1] = cache.row[cache.row.length - 1].add(c);
- // go to the next for loop
- continue;
- }
-
- cache.row.push(c);
-
- for (var j = 0; j < totalCells; ++j) {
- cols.push(parsers[j].format(getElementText(table.config, c[0].cells[j]), table, c[0].cells[j]));
- }
-
- cols.push(cache.normalized.length); // add position for rowCache
- cache.normalized.push(cols);
- cols = null;
- };
-
- if (table.config.debug) {
- benchmark("Building cache for " + totalRows + " rows:", cacheTime);
- }
-
- return cache;
- };
-
- function getElementText(config, node) {
-
- var text = "";
-
- if (!node) return "";
-
- if (!config.supportsTextContent) config.supportsTextContent = node.textContent || false;
-
- if (config.textExtraction == "simple") {
- if (config.supportsTextContent) {
- text = node.textContent;
- } else {
- if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) {
- text = node.childNodes[0].innerHTML;
- } else {
- text = node.innerHTML;
- }
- }
- } else {
- if (typeof(config.textExtraction) == "function") {
- text = config.textExtraction(node);
- } else {
- text = $(node).text();
- }
- }
- return text;
- }
-
- function appendToTable(table, cache) {
-
- if (table.config.debug) {
- var appendTime = new Date()
- }
-
- var c = cache,
- r = c.row,
- n = c.normalized,
- totalRows = n.length,
- checkCell = (n[0].length - 1),
- tableBody = $(table.tBodies[0]),
- rows = [];
-
-
- for (var i = 0; i < totalRows; i++) {
- var pos = n[i][checkCell];
-
- rows.push(r[pos]);
-
- if (!table.config.appender) {
-
- //var o = ;
- var l = r[pos].length;
- for (var j = 0; j < l; j++) {
- tableBody[0].appendChild(r[pos][j]);
- }
-
- //
- }
- }
-
-
-
- if (table.config.appender) {
-
- table.config.appender(table, rows);
- }
-
- rows = null;
-
- if (table.config.debug) {
- benchmark("Rebuilt table:", appendTime);
- }
-
- // apply table widgets
- applyWidget(table);
-
- // trigger sortend
- setTimeout(function () {
- $(table).trigger("sortEnd");
- }, 0);
-
- };
-
- function buildHeaders(table) {
-
- if (table.config.debug) {
- var time = new Date();
- }
-
- var meta = ($.metadata) ? true : false;
-
- var header_index = computeTableHeaderCellIndexes(table);
-
- $tableHeaders = $(table.config.selectorHeaders, table).each(function (index) {
-
- this.column = header_index[this.parentNode.rowIndex + "-" + this.cellIndex];
- // this.column = index;
- this.order = formatSortingOrder(table.config.sortInitialOrder);
-
-
- this.count = this.order;
-
- if (checkHeaderMetadata(this) || checkHeaderOptions(table, index)) this.sortDisabled = true;
- if (checkHeaderOptionsSortingLocked(table, index)) this.order = this.lockedOrder = checkHeaderOptionsSortingLocked(table, index);
-
- if (!this.sortDisabled) {
- var $th = $(this).addClass(table.config.cssHeader);
- if (table.config.onRenderHeader) table.config.onRenderHeader.apply($th);
- }
-
- // add cell to headerList
- table.config.headerList[index] = this;
- });
-
- if (table.config.debug) {
- benchmark("Built headers:", time);
- log($tableHeaders);
- }
-
- return $tableHeaders;
-
- };
-
- // from:
- // http://www.javascripttoolbox.com/lib/table/examples.php
- // http://www.javascripttoolbox.com/temp/table_cellindex.html
-
-
- function computeTableHeaderCellIndexes(t) {
- var matrix = [];
- var lookup = {};
- var thead = t.getElementsByTagName('THEAD')[0];
- var trs = thead.getElementsByTagName('TR');
-
- for (var i = 0; i < trs.length; i++) {
- var cells = trs[i].cells;
- for (var j = 0; j < cells.length; j++) {
- var c = cells[j];
-
- var rowIndex = c.parentNode.rowIndex;
- var cellId = rowIndex + "-" + c.cellIndex;
- var rowSpan = c.rowSpan || 1;
- var colSpan = c.colSpan || 1
- var firstAvailCol;
- if (typeof(matrix[rowIndex]) == "undefined") {
- matrix[rowIndex] = [];
- }
- // Find first available column in the first row
- for (var k = 0; k < matrix[rowIndex].length + 1; k++) {
- if (typeof(matrix[rowIndex][k]) == "undefined") {
- firstAvailCol = k;
- break;
- }
- }
- lookup[cellId] = firstAvailCol;
- for (var k = rowIndex; k < rowIndex + rowSpan; k++) {
- if (typeof(matrix[k]) == "undefined") {
- matrix[k] = [];
- }
- var matrixrow = matrix[k];
- for (var l = firstAvailCol; l < firstAvailCol + colSpan; l++) {
- matrixrow[l] = "x";
- }
- }
- }
- }
- return lookup;
- }
-
- function checkCellColSpan(table, rows, row) {
- var arr = [],
- r = table.tHead.rows,
- c = r[row].cells;
-
- for (var i = 0; i < c.length; i++) {
- var cell = c[i];
-
- if (cell.colSpan > 1) {
- arr = arr.concat(checkCellColSpan(table, headerArr, row++));
- } else {
- if (table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row + 1])) {
- arr.push(cell);
- }
- // headerArr[row] = (i+row);
- }
- }
- return arr;
- };
-
- function checkHeaderMetadata(cell) {
- if (($.metadata) && ($(cell).metadata().sorter === false)) {
- return true;
- };
- return false;
- }
-
- function checkHeaderOptions(table, i) {
- if ((table.config.headers[i]) && (table.config.headers[i].sorter === false)) {
- return true;
- };
- return false;
- }
-
- function checkHeaderOptionsSortingLocked(table, i) {
- if ((table.config.headers[i]) && (table.config.headers[i].lockedOrder)) return table.config.headers[i].lockedOrder;
- return false;
- }
-
- function applyWidget(table) {
- var c = table.config.widgets;
- var l = c.length;
- for (var i = 0; i < l; i++) {
-
- getWidgetById(c[i]).format(table);
- }
-
- }
-
- function getWidgetById(name) {
- var l = widgets.length;
- for (var i = 0; i < l; i++) {
- if (widgets[i].id.toLowerCase() == name.toLowerCase()) {
- return widgets[i];
- }
- }
- };
-
- function formatSortingOrder(v) {
- if (typeof(v) != "Number") {
- return (v.toLowerCase() == "desc") ? 1 : 0;
- } else {
- return (v == 1) ? 1 : 0;
- }
- }
-
- function isValueInArray(v, a) {
- var l = a.length;
- for (var i = 0; i < l; i++) {
- if (a[i][0] == v) {
- return true;
- }
- }
- return false;
- }
-
- function setHeadersCss(table, $headers, list, css) {
- // remove all header information
- $headers.removeClass(css[0]).removeClass(css[1]);
-
- var h = [];
- $headers.each(function (offset) {
- if (!this.sortDisabled) {
- h[this.column] = $(this);
- }
- });
-
- var l = list.length;
- for (var i = 0; i < l; i++) {
- h[list[i][0]].addClass(css[list[i][1]]);
- }
- }
-
- function fixColumnWidth(table, $headers) {
- var c = table.config;
- if (c.widthFixed) {
- var colgroup = $('');
- $("tr:first td", table.tBodies[0]).each(function () {
- colgroup.append($(' ').css('width', $(this).width()));
- });
- $(table).prepend(colgroup);
- };
- }
-
- function updateHeaderSortCount(table, sortList) {
- var c = table.config,
- l = sortList.length;
- for (var i = 0; i < l; i++) {
- var s = sortList[i],
- o = c.headerList[s[0]];
- o.count = s[1];
- o.count++;
- }
- }
-
- /* sorting methods */
-
- function multisort(table, sortList, cache) {
-
- if (table.config.debug) {
- var sortTime = new Date();
- }
-
- var dynamicExp = "var sortWrapper = function(a,b) {",
- l = sortList.length;
-
- // TODO: inline functions.
- for (var i = 0; i < l; i++) {
-
- var c = sortList[i][0];
- var order = sortList[i][1];
- // var s = (getCachedSortType(table.config.parsers,c) == "text") ?
- // ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ?
- // "sortNumeric" : "sortNumericDesc");
- // var s = (table.config.parsers[c].type == "text") ? ((order == 0)
- // ? makeSortText(c) : makeSortTextDesc(c)) : ((order == 0) ?
- // makeSortNumeric(c) : makeSortNumericDesc(c));
- var s = (table.config.parsers[c].type == "text") ? ((order == 0) ? makeSortFunction("text", "asc", c) : makeSortFunction("text", "desc", c)) : ((order == 0) ? makeSortFunction("numeric", "asc", c) : makeSortFunction("numeric", "desc", c));
- var e = "e" + i;
-
- dynamicExp += "var " + e + " = " + s; // + "(a[" + c + "],b[" + c
- // + "]); ";
- dynamicExp += "if(" + e + ") { return " + e + "; } ";
- dynamicExp += "else { ";
-
- }
-
- // if value is the same keep orignal order
- var orgOrderCol = cache.normalized[0].length - 1;
- dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";
-
- for (var i = 0; i < l; i++) {
- dynamicExp += "}; ";
- }
-
- dynamicExp += "return 0; ";
- dynamicExp += "}; ";
-
- if (table.config.debug) {
- benchmark("Evaling expression:" + dynamicExp, new Date());
- }
-
- eval(dynamicExp);
-
- cache.normalized.sort(sortWrapper);
-
- if (table.config.debug) {
- benchmark("Sorting on " + sortList.toString() + " and dir " + order + " time:", sortTime);
- }
-
- return cache;
- };
-
- function makeSortFunction(type, direction, index) {
- var a = "a[" + index + "]",
- b = "b[" + index + "]";
- if (type == 'text' && direction == 'asc') {
- return "(" + a + " == " + b + " ? 0 : (" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : (" + a + " < " + b + ") ? -1 : 1 )));";
- } else if (type == 'text' && direction == 'desc') {
- return "(" + a + " == " + b + " ? 0 : (" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : (" + b + " < " + a + ") ? -1 : 1 )));";
- } else if (type == 'numeric' && direction == 'asc') {
- return "(" + a + " === null && " + b + " === null) ? 0 :(" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : " + a + " - " + b + "));";
- } else if (type == 'numeric' && direction == 'desc') {
- return "(" + a + " === null && " + b + " === null) ? 0 :(" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : " + b + " - " + a + "));";
- }
- };
-
- function makeSortText(i) {
- return "((a[" + i + "] < b[" + i + "]) ? -1 : ((a[" + i + "] > b[" + i + "]) ? 1 : 0));";
- };
-
- function makeSortTextDesc(i) {
- return "((b[" + i + "] < a[" + i + "]) ? -1 : ((b[" + i + "] > a[" + i + "]) ? 1 : 0));";
- };
-
- function makeSortNumeric(i) {
- return "a[" + i + "]-b[" + i + "];";
- };
-
- function makeSortNumericDesc(i) {
- return "b[" + i + "]-a[" + i + "];";
- };
-
- function sortText(a, b) {
- if (table.config.sortLocaleCompare) return a.localeCompare(b);
- return ((a < b) ? -1 : ((a > b) ? 1 : 0));
- };
-
- function sortTextDesc(a, b) {
- if (table.config.sortLocaleCompare) return b.localeCompare(a);
- return ((b < a) ? -1 : ((b > a) ? 1 : 0));
- };
-
- function sortNumeric(a, b) {
- return a - b;
- };
-
- function sortNumericDesc(a, b) {
- return b - a;
- };
-
- function getCachedSortType(parsers, i) {
- return parsers[i].type;
- }; /* public methods */
- this.construct = function (settings) {
- return this.each(function () {
- // if no thead or tbody quit.
- if (!this.tHead || !this.tBodies) return;
- // declare
- var $this, $document, $headers, cache, config, shiftDown = 0,
- sortOrder;
- // new blank config object
- this.config = {};
- // merge and extend.
- config = $.extend(this.config, $.tablesorter.defaults, settings);
- // store common expression for speed
- $this = $(this);
- // save the settings where they read
- $.data(this, "tablesorter", config);
- // build headers
- $headers = buildHeaders(this);
- // try to auto detect column type, and store in tables config
- this.config.parsers = buildParserCache(this, $headers);
- // build the cache for the tbody cells
- cache = buildCache(this);
- // get the css class names, could be done else where.
- var sortCSS = [config.cssDesc, config.cssAsc];
- // fixate columns if the users supplies the fixedWidth option
- fixColumnWidth(this);
- // apply event handling to headers
- // this is to big, perhaps break it out?
- $headers.click(
-
- function (e) {
- var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
- if (!this.sortDisabled && totalRows > 0) {
- // Only call sortStart if sorting is
- // enabled.
- $this.trigger("sortStart");
- // store exp, for speed
- var $cell = $(this);
- // get current column index
- var i = this.column;
- // get current column sort order
- this.order = this.count++ % 2;
- // always sort on the locked order.
- if(this.lockedOrder) this.order = this.lockedOrder;
-
- // user only whants to sort on one
- // column
- if (!e[config.sortMultiSortKey]) {
- // flush the sort list
- config.sortList = [];
- if (config.sortForce != null) {
- var a = config.sortForce;
- for (var j = 0; j < a.length; j++) {
- if (a[j][0] != i) {
- config.sortList.push(a[j]);
- }
- }
- }
- // add column to sort list
- config.sortList.push([i, this.order]);
- // multi column sorting
- } else {
- // the user has clicked on an all
- // ready sortet column.
- if (isValueInArray(i, config.sortList)) {
- // revers the sorting direction
- // for all tables.
- for (var j = 0; j < config.sortList.length; j++) {
- var s = config.sortList[j],
- o = config.headerList[s[0]];
- if (s[0] == i) {
- o.count = s[1];
- o.count++;
- s[1] = o.count % 2;
- }
- }
- } else {
- // add column to sort list array
- config.sortList.push([i, this.order]);
- }
- };
- setTimeout(function () {
- // set css for headers
- setHeadersCss($this[0], $headers, config.sortList, sortCSS);
- appendToTable(
- $this[0], multisort(
- $this[0], config.sortList, cache)
- );
- }, 1);
- // stop normal event by returning false
- return false;
- }
- // cancel selection
- }).mousedown(function () {
- if (config.cancelSelection) {
- this.onselectstart = function () {
- return false
- };
- return false;
- }
- });
- // apply easy methods that trigger binded events
- $this.bind("update", function () {
- var me = this;
- setTimeout(function () {
- // rebuild parsers.
- me.config.parsers = buildParserCache(
- me, $headers);
- // rebuild the cache map
- cache = buildCache(me);
- }, 1);
- }).bind("updateCell", function (e, cell) {
- var config = this.config;
- // get position from the dom.
- var pos = [(cell.parentNode.rowIndex - 1), cell.cellIndex];
- // update cache
- cache.normalized[pos[0]][pos[1]] = config.parsers[pos[1]].format(
- getElementText(config, cell), cell);
- }).bind("sorton", function (e, list) {
- $(this).trigger("sortStart");
- config.sortList = list;
- // update and store the sortlist
- var sortList = config.sortList;
- // update header count index
- updateHeaderSortCount(this, sortList);
- // set css for headers
- setHeadersCss(this, $headers, sortList, sortCSS);
- // sort the table and append it to the dom
- appendToTable(this, multisort(this, sortList, cache));
- }).bind("appendCache", function () {
- appendToTable(this, cache);
- }).bind("applyWidgetId", function (e, id) {
- getWidgetById(id).format(this);
- }).bind("applyWidgets", function () {
- // apply widgets
- applyWidget(this);
- });
- if ($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {
- config.sortList = $(this).metadata().sortlist;
- }
- // if user has supplied a sort list to constructor.
- if (config.sortList.length > 0) {
- $this.trigger("sorton", [config.sortList]);
- }
- // apply widgets
- applyWidget(this);
- });
- };
- this.addParser = function (parser) {
- var l = parsers.length,
- a = true;
- for (var i = 0; i < l; i++) {
- if (parsers[i].id.toLowerCase() == parser.id.toLowerCase()) {
- a = false;
- }
- }
- if (a) {
- parsers.push(parser);
- };
- };
- this.addWidget = function (widget) {
- widgets.push(widget);
- };
- this.formatFloat = function (s) {
- var i = parseFloat(s);
- return (isNaN(i)) ? 0 : i;
- };
- this.formatInt = function (s) {
- var i = parseInt(s);
- return (isNaN(i)) ? 0 : i;
- };
- this.isDigit = function (s, config) {
- // replace all an wanted chars and match.
- return /^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g, '')));
- };
- this.clearTableBody = function (table) {
- if ($.browser.msie) {
- function empty() {
- while (this.firstChild)
- this.removeChild(this.firstChild);
- }
- empty.apply(table.tBodies[0]);
- } else {
- table.tBodies[0].innerHTML = "";
- }
- };
- }
- });
-
- // extend plugin scope
- $.fn.extend({
- tablesorter: $.tablesorter.construct
- });
-
- // make shortcut
- var ts = $.tablesorter;
-
- // add default parsers
- ts.addParser({
- id: "text",
- is: function (s) {
- return true;
- }, format: function (s) {
- return $.trim(s.toLocaleLowerCase());
- }, type: "text"
- });
-
- ts.addParser({
- id: "digit",
- is: function (s, table) {
- var c = table.config;
- return $.tablesorter.isDigit(s, c);
- }, format: function (s) {
- return $.tablesorter.formatFloat(s);
- }, type: "numeric"
- });
-
- ts.addParser({
- id: "currency",
- is: function (s) {
- return /^[£$€?.]/.test(s);
- }, format: function (s) {
- return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g), ""));
- }, type: "numeric"
- });
-
- ts.addParser({
- id: "ipAddress",
- is: function (s) {
- return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);
- }, format: function (s) {
- var a = s.split("."),
- r = "",
- l = a.length;
- for (var i = 0; i < l; i++) {
- var item = a[i];
- if (item.length == 2) {
- r += "0" + item;
- } else {
- r += item;
- }
- }
- return $.tablesorter.formatFloat(r);
- }, type: "numeric"
- });
-
- ts.addParser({
- id: "url",
- is: function (s) {
- return /^(https?|ftp|file):\/\/$/.test(s);
- }, format: function (s) {
- return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//), ''));
- }, type: "text"
- });
-
- ts.addParser({
- id: "isoDate",
- is: function (s) {
- return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);
- }, format: function (s) {
- return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(
- new RegExp(/-/g), "/")).getTime() : "0");
- }, type: "numeric"
- });
-
- ts.addParser({
- id: "percent",
- is: function (s) {
- return /\%$/.test($.trim(s));
- }, format: function (s) {
- return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g), ""));
- }, type: "numeric"
- });
-
- ts.addParser({
- id: "usLongDate",
- is: function (s) {
- return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));
- }, format: function (s) {
- return $.tablesorter.formatFloat(new Date(s).getTime());
- }, type: "numeric"
- });
-
- ts.addParser({
- id: "shortDate",
- is: function (s) {
- return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
- }, format: function (s, table) {
- var c = table.config;
- s = s.replace(/\-/g, "/");
- if (c.dateFormat == "us") {
- // reformat the string in ISO format
- s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");
- } else if (c.dateFormat == "uk") {
- // reformat the string in ISO format
- s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
- } else if (c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
- s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
- }
- return $.tablesorter.formatFloat(new Date(s).getTime());
- }, type: "numeric"
- });
- ts.addParser({
- id: "time",
- is: function (s) {
- return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);
- }, format: function (s) {
- return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime());
- }, type: "numeric"
- });
- ts.addParser({
- id: "metadata",
- is: function (s) {
- return false;
- }, format: function (s, table, cell) {
- var c = table.config,
- p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName;
- return $(cell).metadata()[p];
- }, type: "numeric"
- });
- // add default widgets
- ts.addWidget({
- id: "zebra",
- format: function (table) {
- if (table.config.debug) {
- var time = new Date();
- }
- var $tr, row = -1,
- odd;
- // loop through the visible rows
- $("tr:visible", table.tBodies[0]).each(function (i) {
- $tr = $(this);
- // style children rows the same way the parent
- // row was styled
- if (!$tr.hasClass(table.config.cssChildRow)) row++;
- odd = (row % 2 == 0);
- $tr.removeClass(
- table.config.widgetZebra.css[odd ? 0 : 1]).addClass(
- table.config.widgetZebra.css[odd ? 1 : 0])
- });
- if (table.config.debug) {
- $.tablesorter.benchmark("Applying Zebra widget", time);
- }
- }
- });
+/*
+ *
+ * TableSorter 2.0 - Client-side table sorting with ease!
+ * Version 2.0.5b
+ * @requires jQuery v1.2.3
+ *
+ * Copyright (c) 2007 Christian Bach
+ * Examples and docs at: http://tablesorter.com
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+/**
+ *
+ * @description Create a sortable table with multi-column sorting capabilitys
+ *
+ * @example $('table').tablesorter();
+ * @desc Create a simple tablesorter interface.
+ *
+ * @example $('table').tablesorter({ sortList:[[0,0],[1,0]] });
+ * @desc Create a tablesorter interface and sort on the first and secound column column headers.
+ *
+ * @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });
+ *
+ * @desc Create a tablesorter interface and disableing the first and second column headers.
+ *
+ *
+ * @example $('table').tablesorter({ headers: { 0: {sorter:"integer"}, 1: {sorter:"currency"} } });
+ *
+ * @desc Create a tablesorter interface and set a column parser for the first
+ * and second column.
+ *
+ *
+ * @param Object
+ * settings An object literal containing key/value pairs to provide
+ * optional settings.
+ *
+ *
+ * @option String cssHeader (optional) A string of the class name to be appended
+ * to sortable tr elements in the thead of the table. Default value:
+ * "header"
+ *
+ * @option String cssAsc (optional) A string of the class name to be appended to
+ * sortable tr elements in the thead on a ascending sort. Default value:
+ * "headerSortUp"
+ *
+ * @option String cssDesc (optional) A string of the class name to be appended
+ * to sortable tr elements in the thead on a descending sort. Default
+ * value: "headerSortDown"
+ *
+ * @option String sortInitialOrder (optional) A string of the inital sorting
+ * order can be asc or desc. Default value: "asc"
+ *
+ * @option String sortMultisortKey (optional) A string of the multi-column sort
+ * key. Default value: "shiftKey"
+ *
+ * @option String textExtraction (optional) A string of the text-extraction
+ * method to use. For complex html structures inside td cell set this
+ * option to "complex", on large tables the complex option can be slow.
+ * Default value: "simple"
+ *
+ * @option Object headers (optional) An array containing the forces sorting
+ * rules. This option let's you specify a default sorting rule. Default
+ * value: null
+ *
+ * @option Array sortList (optional) An array containing the forces sorting
+ * rules. This option let's you specify a default sorting rule. Default
+ * value: null
+ *
+ * @option Array sortForce (optional) An array containing forced sorting rules.
+ * This option let's you specify a default sorting rule, which is
+ * prepended to user-selected rules. Default value: null
+ *
+ * @option Boolean sortLocaleCompare (optional) Boolean flag indicating whatever
+ * to use String.localeCampare method or not. Default set to true.
+ *
+ *
+ * @option Array sortAppend (optional) An array containing forced sorting rules.
+ * This option let's you specify a default sorting rule, which is
+ * appended to user-selected rules. Default value: null
+ *
+ * @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter
+ * should apply fixed widths to the table columns. This is usefull when
+ * using the pager companion plugin. This options requires the dimension
+ * jquery plugin. Default value: false
+ *
+ * @option Boolean cancelSelection (optional) Boolean flag indicating if
+ * tablesorter should cancel selection of the table headers text.
+ * Default value: true
+ *
+ * @option Boolean debug (optional) Boolean flag indicating if tablesorter
+ * should display debuging information usefull for development.
+ *
+ * @type jQuery
+ *
+ * @name tablesorter
+ *
+ * @cat Plugins/Tablesorter
+ *
+ * @author Christian Bach/christian.bach@polyester.se
+ */
+
+(function ($) {
+ $.extend({
+ tablesorter: new
+ function () {
+
+ var parsers = [],
+ widgets = [];
+
+ this.defaults = {
+ cssHeader: "header",
+ cssAsc: "headerSortUp",
+ cssDesc: "headerSortDown",
+ cssChildRow: "expand-child",
+ sortInitialOrder: "asc",
+ sortMultiSortKey: "shiftKey",
+ sortForce: null,
+ sortAppend: null,
+ sortLocaleCompare: true,
+ textExtraction: "simple",
+ parsers: {}, widgets: [],
+ widgetZebra: {
+ css: ["even", "odd"]
+ }, headers: {}, widthFixed: false,
+ cancelSelection: true,
+ sortList: [],
+ headerList: [],
+ dateFormat: "us",
+ decimal: '/\.|\,/g',
+ onRenderHeader: null,
+ selectorHeaders: 'thead th',
+ debug: false
+ };
+
+ /* debuging utils */
+
+ function benchmark(s, d) {
+ log(s + "," + (new Date().getTime() - d.getTime()) + "ms");
+ }
+
+ this.benchmark = benchmark;
+
+ function log(s) {
+ if (typeof console != "undefined" && typeof console.debug != "undefined") {
+ console.log(s);
+ } else {
+ alert(s);
+ }
+ }
+
+ /* parsers utils */
+
+ function buildParserCache(table, $headers) {
+
+ if (table.config.debug) {
+ var parsersDebug = "";
+ }
+
+ if (table.tBodies.length == 0) return; // In the case of empty tables
+ var rows = table.tBodies[0].rows;
+
+ if (rows[0]) {
+
+ var list = [],
+ cells = rows[0].cells,
+ l = cells.length;
+
+ for (var i = 0; i < l; i++) {
+
+ var p = false;
+
+ if ($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter)) {
+
+ p = getParserById($($headers[i]).metadata().sorter);
+
+ } else if ((table.config.headers[i] && table.config.headers[i].sorter)) {
+
+ p = getParserById(table.config.headers[i].sorter);
+ }
+ if (!p) {
+
+ p = detectParserForColumn(table, rows, -1, i);
+ }
+
+ if (table.config.debug) {
+ parsersDebug += "column:" + i + " parser:" + p.id + "\n";
+ }
+
+ list.push(p);
+ }
+ }
+
+ if (table.config.debug) {
+ log(parsersDebug);
+ }
+
+ return list;
+ };
+
+ function detectParserForColumn(table, rows, rowIndex, cellIndex) {
+ var l = parsers.length,
+ node = false,
+ nodeValue = false,
+ keepLooking = true;
+ while (nodeValue == '' && keepLooking) {
+ rowIndex++;
+ if (rows[rowIndex]) {
+ node = getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex);
+ nodeValue = trimAndGetNodeText(table.config, node);
+ if (table.config.debug) {
+ log('Checking if value was empty on row:' + rowIndex);
+ }
+ } else {
+ keepLooking = false;
+ }
+ }
+ for (var i = 1; i < l; i++) {
+ if (parsers[i].is(nodeValue, table, node)) {
+ return parsers[i];
+ }
+ }
+ // 0 is always the generic parser (text)
+ return parsers[0];
+ }
+
+ function getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex) {
+ return rows[rowIndex].cells[cellIndex];
+ }
+
+ function trimAndGetNodeText(config, node) {
+ return $.trim(getElementText(config, node));
+ }
+
+ function getParserById(name) {
+ var l = parsers.length;
+ for (var i = 0; i < l; i++) {
+ if (parsers[i].id.toLowerCase() == name.toLowerCase()) {
+ return parsers[i];
+ }
+ }
+ return false;
+ }
+
+ /* utils */
+
+ function buildCache(table) {
+
+ if (table.config.debug) {
+ var cacheTime = new Date();
+ }
+
+ var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
+ totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0,
+ parsers = table.config.parsers,
+ cache = {
+ row: [],
+ normalized: []
+ };
+
+ for (var i = 0; i < totalRows; ++i) {
+
+ /** Add the table data to main data array */
+ var c = $(table.tBodies[0].rows[i]),
+ cols = [];
+
+ // if this is a child row, add it to the last row's children and
+ // continue to the next row
+ if (c.hasClass(table.config.cssChildRow)) {
+ cache.row[cache.row.length - 1] = cache.row[cache.row.length - 1].add(c);
+ // go to the next for loop
+ continue;
+ }
+
+ cache.row.push(c);
+
+ for (var j = 0; j < totalCells; ++j) {
+ cols.push(parsers[j].format(getElementText(table.config, c[0].cells[j]), table, c[0].cells[j]));
+ }
+
+ cols.push(cache.normalized.length); // add position for rowCache
+ cache.normalized.push(cols);
+ cols = null;
+ };
+
+ if (table.config.debug) {
+ benchmark("Building cache for " + totalRows + " rows:", cacheTime);
+ }
+
+ return cache;
+ };
+
+ function getElementText(config, node) {
+
+ var text = "";
+
+ if (!node) return "";
+
+ if (!config.supportsTextContent) config.supportsTextContent = node.textContent || false;
+
+ if (config.textExtraction == "simple") {
+ if (config.supportsTextContent) {
+ text = node.textContent;
+ } else {
+ if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) {
+ text = node.childNodes[0].innerHTML;
+ } else {
+ text = node.innerHTML;
+ }
+ }
+ } else {
+ if (typeof(config.textExtraction) == "function") {
+ text = config.textExtraction(node);
+ } else {
+ text = $(node).text();
+ }
+ }
+ return text;
+ }
+
+ function appendToTable(table, cache) {
+
+ if (table.config.debug) {
+ var appendTime = new Date()
+ }
+
+ var c = cache,
+ r = c.row,
+ n = c.normalized,
+ totalRows = n.length,
+ checkCell = (n[0].length - 1),
+ tableBody = $(table.tBodies[0]),
+ rows = [];
+
+
+ for (var i = 0; i < totalRows; i++) {
+ var pos = n[i][checkCell];
+
+ rows.push(r[pos]);
+
+ if (!table.config.appender) {
+
+ //var o = ;
+ var l = r[pos].length;
+ for (var j = 0; j < l; j++) {
+ tableBody[0].appendChild(r[pos][j]);
+ }
+
+ //
+ }
+ }
+
+
+
+ if (table.config.appender) {
+
+ table.config.appender(table, rows);
+ }
+
+ rows = null;
+
+ if (table.config.debug) {
+ benchmark("Rebuilt table:", appendTime);
+ }
+
+ // apply table widgets
+ applyWidget(table);
+
+ // trigger sortend
+ setTimeout(function () {
+ $(table).trigger("sortEnd");
+ }, 0);
+
+ };
+
+ function buildHeaders(table) {
+
+ if (table.config.debug) {
+ var time = new Date();
+ }
+
+ var meta = ($.metadata) ? true : false;
+
+ var header_index = computeTableHeaderCellIndexes(table);
+
+ $tableHeaders = $(table.config.selectorHeaders, table).each(function (index) {
+
+ this.column = header_index[this.parentNode.rowIndex + "-" + this.cellIndex];
+ // this.column = index;
+ this.order = formatSortingOrder(table.config.sortInitialOrder);
+
+
+ this.count = this.order;
+
+ if (checkHeaderMetadata(this) || checkHeaderOptions(table, index)) this.sortDisabled = true;
+ if (checkHeaderOptionsSortingLocked(table, index)) this.order = this.lockedOrder = checkHeaderOptionsSortingLocked(table, index);
+
+ if (!this.sortDisabled) {
+ var $th = $(this).addClass(table.config.cssHeader);
+ if (table.config.onRenderHeader) table.config.onRenderHeader.apply($th);
+ }
+
+ // add cell to headerList
+ table.config.headerList[index] = this;
+ });
+
+ if (table.config.debug) {
+ benchmark("Built headers:", time);
+ log($tableHeaders);
+ }
+
+ return $tableHeaders;
+
+ };
+
+ // from:
+ // http://www.javascripttoolbox.com/lib/table/examples.php
+ // http://www.javascripttoolbox.com/temp/table_cellindex.html
+
+
+ function computeTableHeaderCellIndexes(t) {
+ var matrix = [];
+ var lookup = {};
+ var thead = t.getElementsByTagName('THEAD')[0];
+ var trs = thead.getElementsByTagName('TR');
+
+ for (var i = 0; i < trs.length; i++) {
+ var cells = trs[i].cells;
+ for (var j = 0; j < cells.length; j++) {
+ var c = cells[j];
+
+ var rowIndex = c.parentNode.rowIndex;
+ var cellId = rowIndex + "-" + c.cellIndex;
+ var rowSpan = c.rowSpan || 1;
+ var colSpan = c.colSpan || 1
+ var firstAvailCol;
+ if (typeof(matrix[rowIndex]) == "undefined") {
+ matrix[rowIndex] = [];
+ }
+ // Find first available column in the first row
+ for (var k = 0; k < matrix[rowIndex].length + 1; k++) {
+ if (typeof(matrix[rowIndex][k]) == "undefined") {
+ firstAvailCol = k;
+ break;
+ }
+ }
+ lookup[cellId] = firstAvailCol;
+ for (var k = rowIndex; k < rowIndex + rowSpan; k++) {
+ if (typeof(matrix[k]) == "undefined") {
+ matrix[k] = [];
+ }
+ var matrixrow = matrix[k];
+ for (var l = firstAvailCol; l < firstAvailCol + colSpan; l++) {
+ matrixrow[l] = "x";
+ }
+ }
+ }
+ }
+ return lookup;
+ }
+
+ function checkCellColSpan(table, rows, row) {
+ var arr = [],
+ r = table.tHead.rows,
+ c = r[row].cells;
+
+ for (var i = 0; i < c.length; i++) {
+ var cell = c[i];
+
+ if (cell.colSpan > 1) {
+ arr = arr.concat(checkCellColSpan(table, headerArr, row++));
+ } else {
+ if (table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row + 1])) {
+ arr.push(cell);
+ }
+ // headerArr[row] = (i+row);
+ }
+ }
+ return arr;
+ };
+
+ function checkHeaderMetadata(cell) {
+ if (($.metadata) && ($(cell).metadata().sorter === false)) {
+ return true;
+ };
+ return false;
+ }
+
+ function checkHeaderOptions(table, i) {
+ if ((table.config.headers[i]) && (table.config.headers[i].sorter === false)) {
+ return true;
+ };
+ return false;
+ }
+
+ function checkHeaderOptionsSortingLocked(table, i) {
+ if ((table.config.headers[i]) && (table.config.headers[i].lockedOrder)) return table.config.headers[i].lockedOrder;
+ return false;
+ }
+
+ function applyWidget(table) {
+ var c = table.config.widgets;
+ var l = c.length;
+ for (var i = 0; i < l; i++) {
+
+ getWidgetById(c[i]).format(table);
+ }
+
+ }
+
+ function getWidgetById(name) {
+ var l = widgets.length;
+ for (var i = 0; i < l; i++) {
+ if (widgets[i].id.toLowerCase() == name.toLowerCase()) {
+ return widgets[i];
+ }
+ }
+ };
+
+ function formatSortingOrder(v) {
+ if (typeof(v) != "Number") {
+ return (v.toLowerCase() == "desc") ? 1 : 0;
+ } else {
+ return (v == 1) ? 1 : 0;
+ }
+ }
+
+ function isValueInArray(v, a) {
+ var l = a.length;
+ for (var i = 0; i < l; i++) {
+ if (a[i][0] == v) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function setHeadersCss(table, $headers, list, css) {
+ // remove all header information
+ $headers.removeClass(css[0]).removeClass(css[1]);
+
+ var h = [];
+ $headers.each(function (offset) {
+ if (!this.sortDisabled) {
+ h[this.column] = $(this);
+ }
+ });
+
+ var l = list.length;
+ for (var i = 0; i < l; i++) {
+ h[list[i][0]].addClass(css[list[i][1]]);
+ }
+ }
+
+ function fixColumnWidth(table, $headers) {
+ var c = table.config;
+ if (c.widthFixed) {
+ var colgroup = $(' ');
+ $("tr:first td", table.tBodies[0]).each(function () {
+ colgroup.append($(' ').css('width', $(this).width()));
+ });
+ $(table).prepend(colgroup);
+ };
+ }
+
+ function updateHeaderSortCount(table, sortList) {
+ var c = table.config,
+ l = sortList.length;
+ for (var i = 0; i < l; i++) {
+ var s = sortList[i],
+ o = c.headerList[s[0]];
+ o.count = s[1];
+ o.count++;
+ }
+ }
+
+ /* sorting methods */
+
+ function multisort(table, sortList, cache) {
+
+ if (table.config.debug) {
+ var sortTime = new Date();
+ }
+
+ var dynamicExp = "var sortWrapper = function(a,b) {",
+ l = sortList.length;
+
+ // TODO: inline functions.
+ for (var i = 0; i < l; i++) {
+
+ var c = sortList[i][0];
+ var order = sortList[i][1];
+ // var s = (getCachedSortType(table.config.parsers,c) == "text") ?
+ // ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ?
+ // "sortNumeric" : "sortNumericDesc");
+ // var s = (table.config.parsers[c].type == "text") ? ((order == 0)
+ // ? makeSortText(c) : makeSortTextDesc(c)) : ((order == 0) ?
+ // makeSortNumeric(c) : makeSortNumericDesc(c));
+ var s = (table.config.parsers[c].type == "text") ? ((order == 0) ? makeSortFunction("text", "asc", c) : makeSortFunction("text", "desc", c)) : ((order == 0) ? makeSortFunction("numeric", "asc", c) : makeSortFunction("numeric", "desc", c));
+ var e = "e" + i;
+
+ dynamicExp += "var " + e + " = " + s; // + "(a[" + c + "],b[" + c
+ // + "]); ";
+ dynamicExp += "if(" + e + ") { return " + e + "; } ";
+ dynamicExp += "else { ";
+
+ }
+
+ // if value is the same keep orignal order
+ var orgOrderCol = cache.normalized[0].length - 1;
+ dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";
+
+ for (var i = 0; i < l; i++) {
+ dynamicExp += "}; ";
+ }
+
+ dynamicExp += "return 0; ";
+ dynamicExp += "}; ";
+
+ if (table.config.debug) {
+ benchmark("Evaling expression:" + dynamicExp, new Date());
+ }
+
+ eval(dynamicExp);
+
+ cache.normalized.sort(sortWrapper);
+
+ if (table.config.debug) {
+ benchmark("Sorting on " + sortList.toString() + " and dir " + order + " time:", sortTime);
+ }
+
+ return cache;
+ };
+
+ function makeSortFunction(type, direction, index) {
+ var a = "a[" + index + "]",
+ b = "b[" + index + "]";
+ if (type == 'text' && direction == 'asc') {
+ return "(" + a + " == " + b + " ? 0 : (" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : (" + a + " < " + b + ") ? -1 : 1 )));";
+ } else if (type == 'text' && direction == 'desc') {
+ return "(" + a + " == " + b + " ? 0 : (" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : (" + b + " < " + a + ") ? -1 : 1 )));";
+ } else if (type == 'numeric' && direction == 'asc') {
+ return "(" + a + " === null && " + b + " === null) ? 0 :(" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : " + a + " - " + b + "));";
+ } else if (type == 'numeric' && direction == 'desc') {
+ return "(" + a + " === null && " + b + " === null) ? 0 :(" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : " + b + " - " + a + "));";
+ }
+ };
+
+ function makeSortText(i) {
+ return "((a[" + i + "] < b[" + i + "]) ? -1 : ((a[" + i + "] > b[" + i + "]) ? 1 : 0));";
+ };
+
+ function makeSortTextDesc(i) {
+ return "((b[" + i + "] < a[" + i + "]) ? -1 : ((b[" + i + "] > a[" + i + "]) ? 1 : 0));";
+ };
+
+ function makeSortNumeric(i) {
+ return "a[" + i + "]-b[" + i + "];";
+ };
+
+ function makeSortNumericDesc(i) {
+ return "b[" + i + "]-a[" + i + "];";
+ };
+
+ function sortText(a, b) {
+ if (table.config.sortLocaleCompare) return a.localeCompare(b);
+ return ((a < b) ? -1 : ((a > b) ? 1 : 0));
+ };
+
+ function sortTextDesc(a, b) {
+ if (table.config.sortLocaleCompare) return b.localeCompare(a);
+ return ((b < a) ? -1 : ((b > a) ? 1 : 0));
+ };
+
+ function sortNumeric(a, b) {
+ return a - b;
+ };
+
+ function sortNumericDesc(a, b) {
+ return b - a;
+ };
+
+ function getCachedSortType(parsers, i) {
+ return parsers[i].type;
+ }; /* public methods */
+ this.construct = function (settings) {
+ return this.each(function () {
+ // if no thead or tbody quit.
+ if (!this.tHead || !this.tBodies) return;
+ // declare
+ var $this, $document, $headers, cache, config, shiftDown = 0,
+ sortOrder;
+ // new blank config object
+ this.config = {};
+ // merge and extend.
+ config = $.extend(this.config, $.tablesorter.defaults, settings);
+ // store common expression for speed
+ $this = $(this);
+ // save the settings where they read
+ $.data(this, "tablesorter", config);
+ // build headers
+ $headers = buildHeaders(this);
+ // try to auto detect column type, and store in tables config
+ this.config.parsers = buildParserCache(this, $headers);
+ // build the cache for the tbody cells
+ cache = buildCache(this);
+ // get the css class names, could be done else where.
+ var sortCSS = [config.cssDesc, config.cssAsc];
+ // fixate columns if the users supplies the fixedWidth option
+ fixColumnWidth(this);
+ // apply event handling to headers
+ // this is to big, perhaps break it out?
+ $headers.click(
+
+ function (e) {
+ var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
+ if (!this.sortDisabled && totalRows > 0) {
+ // Only call sortStart if sorting is
+ // enabled.
+ $this.trigger("sortStart");
+ // store exp, for speed
+ var $cell = $(this);
+ // get current column index
+ var i = this.column;
+ // get current column sort order
+ this.order = this.count++ % 2;
+ // always sort on the locked order.
+ if(this.lockedOrder) this.order = this.lockedOrder;
+
+ // user only whants to sort on one
+ // column
+ if (!e[config.sortMultiSortKey]) {
+ // flush the sort list
+ config.sortList = [];
+ if (config.sortForce != null) {
+ var a = config.sortForce;
+ for (var j = 0; j < a.length; j++) {
+ if (a[j][0] != i) {
+ config.sortList.push(a[j]);
+ }
+ }
+ }
+ // add column to sort list
+ config.sortList.push([i, this.order]);
+ // multi column sorting
+ } else {
+ // the user has clicked on an all
+ // ready sortet column.
+ if (isValueInArray(i, config.sortList)) {
+ // revers the sorting direction
+ // for all tables.
+ for (var j = 0; j < config.sortList.length; j++) {
+ var s = config.sortList[j],
+ o = config.headerList[s[0]];
+ if (s[0] == i) {
+ o.count = s[1];
+ o.count++;
+ s[1] = o.count % 2;
+ }
+ }
+ } else {
+ // add column to sort list array
+ config.sortList.push([i, this.order]);
+ }
+ };
+ setTimeout(function () {
+ // set css for headers
+ setHeadersCss($this[0], $headers, config.sortList, sortCSS);
+ appendToTable(
+ $this[0], multisort(
+ $this[0], config.sortList, cache)
+ );
+ }, 1);
+ // stop normal event by returning false
+ return false;
+ }
+ // cancel selection
+ }).mousedown(function () {
+ if (config.cancelSelection) {
+ this.onselectstart = function () {
+ return false
+ };
+ return false;
+ }
+ });
+ // apply easy methods that trigger binded events
+ $this.bind("update", function () {
+ var me = this;
+ setTimeout(function () {
+ // rebuild parsers.
+ me.config.parsers = buildParserCache(
+ me, $headers);
+ // rebuild the cache map
+ cache = buildCache(me);
+ }, 1);
+ }).bind("updateCell", function (e, cell) {
+ var config = this.config;
+ // get position from the dom.
+ var pos = [(cell.parentNode.rowIndex - 1), cell.cellIndex];
+ // update cache
+ cache.normalized[pos[0]][pos[1]] = config.parsers[pos[1]].format(
+ getElementText(config, cell), cell);
+ }).bind("sorton", function (e, list) {
+ $(this).trigger("sortStart");
+ config.sortList = list;
+ // update and store the sortlist
+ var sortList = config.sortList;
+ // update header count index
+ updateHeaderSortCount(this, sortList);
+ // set css for headers
+ setHeadersCss(this, $headers, sortList, sortCSS);
+ // sort the table and append it to the dom
+ appendToTable(this, multisort(this, sortList, cache));
+ }).bind("appendCache", function () {
+ appendToTable(this, cache);
+ }).bind("applyWidgetId", function (e, id) {
+ getWidgetById(id).format(this);
+ }).bind("applyWidgets", function () {
+ // apply widgets
+ applyWidget(this);
+ });
+ if ($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {
+ config.sortList = $(this).metadata().sortlist;
+ }
+ // if user has supplied a sort list to constructor.
+ if (config.sortList.length > 0) {
+ $this.trigger("sorton", [config.sortList]);
+ }
+ // apply widgets
+ applyWidget(this);
+ });
+ };
+ this.addParser = function (parser) {
+ var l = parsers.length,
+ a = true;
+ for (var i = 0; i < l; i++) {
+ if (parsers[i].id.toLowerCase() == parser.id.toLowerCase()) {
+ a = false;
+ }
+ }
+ if (a) {
+ parsers.push(parser);
+ };
+ };
+ this.addWidget = function (widget) {
+ widgets.push(widget);
+ };
+ this.formatFloat = function (s) {
+ var i = parseFloat(s);
+ return (isNaN(i)) ? 0 : i;
+ };
+ this.formatInt = function (s) {
+ var i = parseInt(s);
+ return (isNaN(i)) ? 0 : i;
+ };
+ this.isDigit = function (s, config) {
+ // replace all an wanted chars and match.
+ return /^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g, '')));
+ };
+ this.clearTableBody = function (table) {
+ if ($.browser.msie) {
+ function empty() {
+ while (this.firstChild)
+ this.removeChild(this.firstChild);
+ }
+ empty.apply(table.tBodies[0]);
+ } else {
+ table.tBodies[0].innerHTML = "";
+ }
+ };
+ }
+ });
+
+ // extend plugin scope
+ $.fn.extend({
+ tablesorter: $.tablesorter.construct
+ });
+
+ // make shortcut
+ var ts = $.tablesorter;
+
+ // add default parsers
+ ts.addParser({
+ id: "text",
+ is: function (s) {
+ return true;
+ }, format: function (s) {
+ return $.trim(s.toLocaleLowerCase());
+ }, type: "text"
+ });
+
+ ts.addParser({
+ id: "digit",
+ is: function (s, table) {
+ var c = table.config;
+ return $.tablesorter.isDigit(s, c);
+ }, format: function (s) {
+ return $.tablesorter.formatFloat(s);
+ }, type: "numeric"
+ });
+
+ ts.addParser({
+ id: "currency",
+ is: function (s) {
+ return /^[£$€?.]/.test(s);
+ }, format: function (s) {
+ return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g), ""));
+ }, type: "numeric"
+ });
+
+ ts.addParser({
+ id: "ipAddress",
+ is: function (s) {
+ return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);
+ }, format: function (s) {
+ var a = s.split("."),
+ r = "",
+ l = a.length;
+ for (var i = 0; i < l; i++) {
+ var item = a[i];
+ if (item.length == 2) {
+ r += "0" + item;
+ } else {
+ r += item;
+ }
+ }
+ return $.tablesorter.formatFloat(r);
+ }, type: "numeric"
+ });
+
+ ts.addParser({
+ id: "url",
+ is: function (s) {
+ return /^(https?|ftp|file):\/\/$/.test(s);
+ }, format: function (s) {
+ return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//), ''));
+ }, type: "text"
+ });
+
+ ts.addParser({
+ id: "isoDate",
+ is: function (s) {
+ return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);
+ }, format: function (s) {
+ return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(
+ new RegExp(/-/g), "/")).getTime() : "0");
+ }, type: "numeric"
+ });
+
+ ts.addParser({
+ id: "percent",
+ is: function (s) {
+ return /\%$/.test($.trim(s));
+ }, format: function (s) {
+ return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g), ""));
+ }, type: "numeric"
+ });
+
+ ts.addParser({
+ id: "usLongDate",
+ is: function (s) {
+ return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));
+ }, format: function (s) {
+ return $.tablesorter.formatFloat(new Date(s).getTime());
+ }, type: "numeric"
+ });
+
+ ts.addParser({
+ id: "shortDate",
+ is: function (s) {
+ return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
+ }, format: function (s, table) {
+ var c = table.config;
+ s = s.replace(/\-/g, "/");
+ if (c.dateFormat == "us") {
+ // reformat the string in ISO format
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");
+ } else if (c.dateFormat == "uk") {
+ // reformat the string in ISO format
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
+ } else if (c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
+ }
+ return $.tablesorter.formatFloat(new Date(s).getTime());
+ }, type: "numeric"
+ });
+ ts.addParser({
+ id: "time",
+ is: function (s) {
+ return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);
+ }, format: function (s) {
+ return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime());
+ }, type: "numeric"
+ });
+ ts.addParser({
+ id: "metadata",
+ is: function (s) {
+ return false;
+ }, format: function (s, table, cell) {
+ var c = table.config,
+ p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName;
+ return $(cell).metadata()[p];
+ }, type: "numeric"
+ });
+ // add default widgets
+ ts.addWidget({
+ id: "zebra",
+ format: function (table) {
+ if (table.config.debug) {
+ var time = new Date();
+ }
+ var $tr, row = -1,
+ odd;
+ // loop through the visible rows
+ $("tr:visible", table.tBodies[0]).each(function (i) {
+ $tr = $(this);
+ // style children rows the same way the parent
+ // row was styled
+ if (!$tr.hasClass(table.config.cssChildRow)) row++;
+ odd = (row % 2 == 0);
+ $tr.removeClass(
+ table.config.widgetZebra.css[odd ? 0 : 1]).addClass(
+ table.config.widgetZebra.css[odd ? 1 : 0])
+ });
+ if (table.config.debug) {
+ $.tablesorter.benchmark("Applying Zebra widget", time);
+ }
+ }
+ });
})(jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/jquery.timeago.js b/app/assets/javascripts/jquery.timeago.js
index 4d58026..893b382 100644
--- a/app/assets/javascripts/jquery.timeago.js
+++ b/app/assets/javascripts/jquery.timeago.js
@@ -1,193 +1,193 @@
-/**
- * Timeago is a jQuery plugin that makes it easy to support automatically
- * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
- *
- * @name timeago
- * @version 1.3.0
- * @requires jQuery v1.2.3+
- * @author Ryan McGeary
- * @license MIT License - http://www.opensource.org/licenses/mit-license.php
- *
- * For usage and examples, visit:
- * http://timeago.yarp.com/
- *
- * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
- */
-
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery'], factory);
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function ($) {
- $.timeago = function(timestamp) {
- if (timestamp instanceof Date) {
- return inWords(timestamp);
- } else if (typeof timestamp === "string") {
- return inWords($.timeago.parse(timestamp));
- } else if (typeof timestamp === "number") {
- return inWords(new Date(timestamp));
- } else {
- return inWords($.timeago.datetime(timestamp));
- }
- };
- var $t = $.timeago;
-
- $.extend($.timeago, {
- settings: {
- refreshMillis: 60000,
- allowFuture: false,
- localeTitle: false,
- cutoff: 0,
- strings: {
- prefixAgo: null,
- prefixFromNow: null,
- suffixAgo: "ago",
- suffixFromNow: "from now",
- seconds: "less than a minute",
- minute: "about a minute",
- minutes: "%d minutes",
- hour: "about an hour",
- hours: "about %d hours",
- day: "a day",
- days: "%d days",
- month: "about a month",
- months: "%d months",
- year: "about a year",
- years: "%d years",
- wordSeparator: " ",
- numbers: []
- }
- },
- inWords: function(distanceMillis) {
- var $l = this.settings.strings;
- var prefix = $l.prefixAgo;
- var suffix = $l.suffixAgo;
- if (this.settings.allowFuture) {
- if (distanceMillis < 0) {
- prefix = $l.prefixFromNow;
- suffix = $l.suffixFromNow;
- }
- }
-
- var seconds = Math.abs(distanceMillis) / 1000;
- var minutes = seconds / 60;
- var hours = minutes / 60;
- var days = hours / 24;
- var years = days / 365;
-
- function substitute(stringOrFunction, number) {
- var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
- var value = ($l.numbers && $l.numbers[number]) || number;
- return string.replace(/%d/i, value);
- }
-
- var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
- seconds < 90 && substitute($l.minute, 1) ||
- minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
- minutes < 90 && substitute($l.hour, 1) ||
- hours < 24 && substitute($l.hours, Math.round(hours)) ||
- hours < 42 && substitute($l.day, 1) ||
- days < 30 && substitute($l.days, Math.round(days)) ||
- days < 45 && substitute($l.month, 1) ||
- days < 365 && substitute($l.months, Math.round(days / 30)) ||
- years < 1.5 && substitute($l.year, 1) ||
- substitute($l.years, Math.round(years));
-
- var separator = $l.wordSeparator || "";
- if ($l.wordSeparator === undefined) { separator = " "; }
- return $.trim([prefix, words, suffix].join(separator));
- },
- parse: function(iso8601) {
- var s = $.trim(iso8601);
- s = s.replace(/\.\d+/,""); // remove milliseconds
- s = s.replace(/-/,"/").replace(/-/,"/");
- s = s.replace(/T/," ").replace(/Z/," UTC");
- s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
- return new Date(s);
- },
- datetime: function(elem) {
- var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
- return $t.parse(iso8601);
- },
- isTime: function(elem) {
- // jQuery's `is()` doesn't play well with HTML5 in IE
- return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
- }
- });
-
- // functions that can be called via $(el).timeago('action')
- // init is default when no action is given
- // functions are called with context of a single element
- var functions = {
- init: function(){
- var refresh_el = $.proxy(refresh, this);
- refresh_el();
- var $s = $t.settings;
- if ($s.refreshMillis > 0) {
- setInterval(refresh_el, $s.refreshMillis);
- }
- },
- update: function(time){
- $(this).data('timeago', { datetime: $t.parse(time) });
- refresh.apply(this);
- },
- updateFromDOM: function(){
- $(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
- refresh.apply(this);
- }
- };
-
- $.fn.timeago = function(action, options) {
- var fn = action ? functions[action] : functions.init;
- if(!fn){
- throw new Error("Unknown function name '"+ action +"' for timeago");
- }
- // each over objects here and call the requested function
- this.each(function(){
- fn.call(this, options);
- });
- return this;
- };
-
- function refresh() {
- var data = prepareData(this);
- var $s = $t.settings;
-
- if (!isNaN(data.datetime)) {
- if ( $s.cutoff == 0 || distance(data.datetime) < $s.cutoff) {
- $(this).text(inWords(data.datetime));
- }
- }
- return this;
- }
-
- function prepareData(element) {
- element = $(element);
- if (!element.data("timeago")) {
- element.data("timeago", { datetime: $t.datetime(element) });
- var text = $.trim(element.text());
- if ($t.settings.localeTitle) {
- element.attr("title", element.data('timeago').datetime.toLocaleString());
- } else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
- element.attr("title", text);
- }
- }
- return element.data("timeago");
- }
-
- function inWords(date) {
- return $t.inWords(distance(date));
- }
-
- function distance(date) {
- return (new Date().getTime() - date.getTime());
- }
-
- // fix for IE6 suckage
- document.createElement("abbr");
- document.createElement("time");
-}));
+/**
+ * Timeago is a jQuery plugin that makes it easy to support automatically
+ * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
+ *
+ * @name timeago
+ * @version 1.3.0
+ * @requires jQuery v1.2.3+
+ * @author Ryan McGeary
+ * @license MIT License - http://www.opensource.org/licenses/mit-license.php
+ *
+ * For usage and examples, visit:
+ * http://timeago.yarp.com/
+ *
+ * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
+ */
+
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+ $.timeago = function(timestamp) {
+ if (timestamp instanceof Date) {
+ return inWords(timestamp);
+ } else if (typeof timestamp === "string") {
+ return inWords($.timeago.parse(timestamp));
+ } else if (typeof timestamp === "number") {
+ return inWords(new Date(timestamp));
+ } else {
+ return inWords($.timeago.datetime(timestamp));
+ }
+ };
+ var $t = $.timeago;
+
+ $.extend($.timeago, {
+ settings: {
+ refreshMillis: 60000,
+ allowFuture: false,
+ localeTitle: false,
+ cutoff: 0,
+ strings: {
+ prefixAgo: null,
+ prefixFromNow: null,
+ suffixAgo: "ago",
+ suffixFromNow: "from now",
+ seconds: "less than a minute",
+ minute: "about a minute",
+ minutes: "%d minutes",
+ hour: "about an hour",
+ hours: "about %d hours",
+ day: "a day",
+ days: "%d days",
+ month: "about a month",
+ months: "%d months",
+ year: "about a year",
+ years: "%d years",
+ wordSeparator: " ",
+ numbers: []
+ }
+ },
+ inWords: function(distanceMillis) {
+ var $l = this.settings.strings;
+ var prefix = $l.prefixAgo;
+ var suffix = $l.suffixAgo;
+ if (this.settings.allowFuture) {
+ if (distanceMillis < 0) {
+ prefix = $l.prefixFromNow;
+ suffix = $l.suffixFromNow;
+ }
+ }
+
+ var seconds = Math.abs(distanceMillis) / 1000;
+ var minutes = seconds / 60;
+ var hours = minutes / 60;
+ var days = hours / 24;
+ var years = days / 365;
+
+ function substitute(stringOrFunction, number) {
+ var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
+ var value = ($l.numbers && $l.numbers[number]) || number;
+ return string.replace(/%d/i, value);
+ }
+
+ var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
+ seconds < 90 && substitute($l.minute, 1) ||
+ minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
+ minutes < 90 && substitute($l.hour, 1) ||
+ hours < 24 && substitute($l.hours, Math.round(hours)) ||
+ hours < 42 && substitute($l.day, 1) ||
+ days < 30 && substitute($l.days, Math.round(days)) ||
+ days < 45 && substitute($l.month, 1) ||
+ days < 365 && substitute($l.months, Math.round(days / 30)) ||
+ years < 1.5 && substitute($l.year, 1) ||
+ substitute($l.years, Math.round(years));
+
+ var separator = $l.wordSeparator || "";
+ if ($l.wordSeparator === undefined) { separator = " "; }
+ return $.trim([prefix, words, suffix].join(separator));
+ },
+ parse: function(iso8601) {
+ var s = $.trim(iso8601);
+ s = s.replace(/\.\d+/,""); // remove milliseconds
+ s = s.replace(/-/,"/").replace(/-/,"/");
+ s = s.replace(/T/," ").replace(/Z/," UTC");
+ s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
+ return new Date(s);
+ },
+ datetime: function(elem) {
+ var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
+ return $t.parse(iso8601);
+ },
+ isTime: function(elem) {
+ // jQuery's `is()` doesn't play well with HTML5 in IE
+ return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
+ }
+ });
+
+ // functions that can be called via $(el).timeago('action')
+ // init is default when no action is given
+ // functions are called with context of a single element
+ var functions = {
+ init: function(){
+ var refresh_el = $.proxy(refresh, this);
+ refresh_el();
+ var $s = $t.settings;
+ if ($s.refreshMillis > 0) {
+ setInterval(refresh_el, $s.refreshMillis);
+ }
+ },
+ update: function(time){
+ $(this).data('timeago', { datetime: $t.parse(time) });
+ refresh.apply(this);
+ },
+ updateFromDOM: function(){
+ $(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
+ refresh.apply(this);
+ }
+ };
+
+ $.fn.timeago = function(action, options) {
+ var fn = action ? functions[action] : functions.init;
+ if(!fn){
+ throw new Error("Unknown function name '"+ action +"' for timeago");
+ }
+ // each over objects here and call the requested function
+ this.each(function(){
+ fn.call(this, options);
+ });
+ return this;
+ };
+
+ function refresh() {
+ var data = prepareData(this);
+ var $s = $t.settings;
+
+ if (!isNaN(data.datetime)) {
+ if ( $s.cutoff == 0 || distance(data.datetime) < $s.cutoff) {
+ $(this).text(inWords(data.datetime));
+ }
+ }
+ return this;
+ }
+
+ function prepareData(element) {
+ element = $(element);
+ if (!element.data("timeago")) {
+ element.data("timeago", { datetime: $t.datetime(element) });
+ var text = $.trim(element.text());
+ if ($t.settings.localeTitle) {
+ element.attr("title", element.data('timeago').datetime.toLocaleString());
+ } else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
+ element.attr("title", text);
+ }
+ }
+ return element.data("timeago");
+ }
+
+ function inWords(date) {
+ return $t.inWords(distance(date));
+ }
+
+ function distance(date) {
+ return (new Date().getTime() - date.getTime());
+ }
+
+ // fix for IE6 suckage
+ document.createElement("abbr");
+ document.createElement("time");
+}));
diff --git a/app/assets/javascripts/plans.js b/app/assets/javascripts/plans.js
index 43db140..0cda411 100644
--- a/app/assets/javascripts/plans.js
+++ b/app/assets/javascripts/plans.js
@@ -1,536 +1,536 @@
-//= require jquery.timeago.js
-//= require tinymce
-
-var dirty = {};
-
-
-
-$( document ).ready(function() {
-
- //reload page back to where it was before committing comment
-
- if($('#comment_section_id').length) {
- var section_id = $('#comment_section_id').val();
-
- $("#collapse-" + section_id).addClass("in");
- $("#collapse-" + section_id).children(".accordion-inner").find(".loading").show();
- $("#collapse-" + section_id).children(".accordion-inner").find(".loaded").hide();
-
- setTimeout(function(){
- $("loaded").find(".section-lock-notice").html("");
- $("loaded").find(".section-lock-notice").hide();
- $(".question-form").find("select").removeAttr('disabled');
- $(".question-div").find(".question-readonly").hide();
- $(".question-div").find(".question-form").show();
-
- $("#collapse-" + section_id).children(".accordion-inner").find(".loading").hide();
- $("#collapse-" + section_id).children(".accordion-inner").find(".loaded").show();
- $('html, body').animate({
- 'scrollTop': $("#current_question").offset().top
- },1000);
- },8000);
- }
-
- window.onbeforeunload = function(){
- var message = null;
- if ($.fn.is_dirty()) {
- var questions = $.fn.get_unsaved_questions();
- message = I18n.t("you_have_unsaved_in_sections");
- $.each(questions, function(section_text, question_texts){
- message += "\n\u2022"+section_text;
- });
- return message;
- }
- };
-
- // Make timestamps readable
- $('abbr.timeago').timeago();
-
- // Update status messages on form submission
- $("form.answer").submit(function(){
- var submit_button = $(this).find('input[type="submit"]');
- var saving_message = $(this).find('.saving-message');
- submit_button.parent().hide();
- q_id = $(this).find(".question_id").val();
- saving_message.show();
- s_status = $(this).closest(".accordion-group").find(".section-status:first");
- s_status.toggle_dirty(q_id, false);
- // Allow quarter of a second for database to update
- timeout = setTimeout(function(){
- $.getJSON("status.json", function(data) {
- $.fn.update_plan_progress(data);
- $.fn.update_timestamp(q_id, data);
- s_status.update_section_progress(data);
- submit_button.parent().show();
- saving_message.hide();
- });
- },250);
- });
-
- //accordion guidance
- $('.accordion-guidance-link').on('click', function (e) {
- e.stopPropagation();
- var show = true;
- var div_to_toggle = $($(this).attr("href"));
- if (div_to_toggle.hasClass('in')) {
- show = false;
- }
- $($(this).attr("href")).toggleClass("in");
- if (show) {
- $(this).children(".plus-laranja").removeClass("plus-laranja").addClass("minus-laranja");
- }
- else {
- $(this).children(".minus-laranja").removeClass("minus-laranja").addClass("plus-laranja");
- }
- delete show;
- delete div_to_toggle;
- e.preventDefault();
- });
-
- // Periodically check locks on open section - every 50 seconds
- setInterval(function(){
- // Only lock/unlock if there are forms on the page (not read-only)
- if ($('.question-form').length > 0) {
- section = $('.section-collapse.in');
- if (section.length > 0) {
- section.check_section_lock();
- }
- }
- }, 50000);
-
- // Handle section actions on accordion expansion/collapse
- $('.section-collapse').on('show', function() {
- var section = $(this);
- section.find(".loaded").hide();
- section.find(".loading").show();
- // Only lock if there are forms on the page (not read-only)
- if ($('.question-form').length > 0) {
- section.check_section_lock();
- }
- // check for updated answers
- $.getJSON("status.json", function(data) {
- $.fn.update_plan_progress(data);
- $(".section-status").each(function(){
- $(this).update_section_progress(data);
- });
- //For each question in section, check answer timestamp against currently displayed
- var section_id = section.attr("id").split('-')[1];
- var num_questions = data.sections[section_id]["questions"].length;
- for (var i = 0; i < num_questions; i++) {
- question_id = data.sections[section_id]["questions"][i];
- //If timestamp newer than displayed, update answers
- if ($.fn.update_timestamp(question_id, data)) {
- $.fn.update_answer(question_id);
- }
- }
- section.find(".loading").hide();
- section.find(".loaded").show();
- });
- }).on('hide', function(){
- var section = $(this);
- // Only attempt unlock if there are forms on the page (not read-only)
- if ($('.question-form').length > 0) {
- var section_id = section.attr("id").split('-')[1];
- // LIBDMP-137
- // Changed post request 'unlock_section' to 'unlock_section.json'. 'unlock_section' unnecessary returns a huge html response and takes a quite lot of time to process(3sec) lowering server
- // performance when there are large number of concurrent users.
- $.post('unlock_section.json', {section_id: section_id});
-
- if ($.fn.is_dirty(section_id)) {
- $('#unsaved-answers-'+section_id).text("");
- $.each($.fn.get_unsaved_questions(section_id), function(index, question_text){
- $('#unsaved-answers-'+section_id).append(""+question_text+" ");
- });
- $('#section-' + section_id + '-collapse-alert').modal();
- }
- }
- });
-
- $(".cancel-section-collapse").click(function () {
- var section_id = $(this).attr('data-section');
- $("#collapse-" + section_id).collapse("show");
- $('#section-' + section_id + '-collapse-alert').modal("hide");
- });
-
- $(".discard-section-collapse").click(function () {
- var section_id = $(this).attr('data-section');
- $('#section-' + section_id + '-collapse-alert').modal("hide");
- });
-
- $(".save-section-collapse").click(function () {
- var section_id = $(this).attr('data-section');
- $("#collapse-" + section_id).find("input[type='submit']").click();
- $('#section-' + section_id + '-collapse-alert').modal("hide");
- });
-
- $("select, :radio, :checkbox, input").change(function() {
- $(this).closest(".accordion-group").find(".section-status:first").toggle_dirty($(this).closest("form.answer").find(".question_id").val(), true);
- });
-
- // COMMENTS Javascript
-
- //action for show comment block on the right side of a question
- $('.comments_accordion_button').click(function(e){
- var q_id = $(this).closest(".question_right_column_nav").find(".question_id").val();
- $(this).parent().addClass("active");
- $(this).closest(".question_right_column_ul").find(".guidance_tab_class").removeClass("active");
- $('#guidance-question-area-'+ q_id).hide();
- $('#comment-question-area-'+ q_id).show();
- e.preventDefault();
- });
-
- //action for show guidance block on the right side of a question
- $('.guidance_accordion_button').click(function(e){
- var q_id = $(this).closest(".question_right_column_nav").find(".question_id").val();
- $(this).parent().addClass("active");
- $(this).closest(".question_right_column_ul").find(".comment_tab_class").removeClass("active");
- $('#comment-question-area-'+ q_id).hide();
- $('#guidance-question-area-'+ q_id).show();
- e.preventDefault();
- });
-
- //action for show add comment block
- $('.add_comment_button').click(function(e){
- var q_id = $(this).closest(".comment-area").find(".question_id").val();
- $('.view_comment_class').hide();
- $('.edit_comment_class').hide();
- $('.archive_comment_class').hide();
- $('#add_comment_button_bottom_div_'+ q_id).hide();
- $('#add_comment_button_top_div_'+ q_id).hide();
- $('#add_comment_block_div_'+ q_id).show();
- e.preventDefault();
- });
-
- //submit new comment button
- $('.new_comment_submit_button').click(function(e){
- var q_id = $(this).parent().children(".question_id").val();
- var s_id = $(this).parent().children(".section_id").val();
-
- $("#collapse-" + s_id).children(".accordion-inner").find(".saving").show();
- $("#collapse-" + s_id).children(".accordion-inner").find(".loaded").hide();
- $(".alert-notice").hide();
- $("#new_comment_form_" + q_id).submit();
-
- });
-
- //action to view a comment block
- $('.view_comment_button').click(function(e){
- var c_id = $(this).next(".comment_id").val();
- var q_id = $(this).closest(".comment-area").find(".question_id").val();
- $('.view_comment_class').hide();
- $('.edit_comment_class').hide();
- $('.archive_comment_class').hide();
- $('#lastet_comment_div_'+ q_id).hide();
- $('#edit_comment_div_'+ c_id).hide();
- $('#archive_comment_div_'+ c_id).hide();
- $('#add_comment_block_div_'+ q_id).hide();
- $('#view_comment_div_'+ c_id).show();
- $('#add_comment_button_bottom_div_'+ q_id).show();
- $('#add_comment_button_top_div_'+ q_id).show();
- e.preventDefault();
- });
-
- //action to edit a comment block
- $('.edit_comment_button').click(function(e){
- var c_id = $(this).prev(".comment_id").val();
- var q_id = $(this).closest(".comment-area").find(".question_id").val();
- $('.edit_comment_class').hide();
- $('.view_comment_class').hide();
- $('.archive_comment_class').hide();
- $('#lastet_comment_div_'+ q_id).hide();
- $('#view_comment_div_'+ c_id).hide();
- $('#archive_comment_div_'+ c_id).hide();
- $('#add_comment_block_div_'+ q_id).hide();
- $('#edit_comment_div_'+ c_id).show();
- $('#add_comment_button_bottom_div_'+ q_id).show();
- $('#add_comment_button_top_div_'+ q_id).show();
- e.preventDefault();
- });
-
- //submit edit comment button
- $('.edit_comment_submit_button').click(function(e){
- var c_id = $(this).parent().children(".comment_id").val();
- var s_id = $(this).parent().children(".section_id").val();
-
- $("#collapse-" + s_id).children(".accordion-inner").find(".saving").show();
- $("#collapse-" + s_id).children(".accordion-inner").find(".loaded").hide();
- $(".alert-notice").hide();
- $("#edit_comment_form_" + c_id).submit();
-
- });
-
- //action to archive a comment block
- $('.archive_comment_button').click(function(e){
- var c_id = $(this).prev(".comment_id").val();
- var q_id = $(this).closest(".comment-area").find(".question_id").val();
- $('.edit_comment_class').hide();
- $('.view_comment_class').hide();
- $('.archive_comment_class').hide();
- $('#view_comment_div_'+ c_id).hide();
- $('#lastet_comment_div_'+ q_id).hide();
- $('#edit_comment_div_'+ c_id).hide();
- $('#add_comment_block_div_'+ q_id).hide();
- $('#archive_comment_div_'+ c_id).show()
- $('#add_comment_button_bottom_div_'+ q_id).show();
- $('#add_comment_button_top_div_'+ q_id).show();
- e.preventDefault();
- });
-
- //submit archived comment button
- $('.archive_comment_submit_button').click(function(e){
- var c_id = $(this).parent().children(".comment_id").val();
- var s_id = $(this).parent().children(".section_id").val();
-
- $("#collapse-" + s_id).children(".accordion-inner").find(".removing").show();
- $("#collapse-" + s_id).children(".accordion-inner").find(".loaded").hide();
- $(".alert-notice").hide();
- $("#archive_comment_form_" + c_id).submit();
-
- });
-
- //action to cancel archive block
- $(".cancel_archive_comment").click(function(e){
- var c_id = $(this).prev(".comment_id").val();
- $('.archive_comment_class').hide();
- $('#view_comment_div_'+ c_id).show();
- e.preventDefault();
- });
-
-});
-
-$.fn.get_unsaved_questions = function(section_id) {
- if (section_id != null) {
- var questions = new Array();
- $.each(dirty[section_id], function(question_id,value){
- if (value && question_id != 'undefined') {
- questions.push($("label[for='answer-text-"+question_id+"']").text());
- }
- });
- return questions;
- }
- else {
- var questions = {};
- $.each(dirty, function(section_id,question_ids){
- var section_text = $("#section-header-"+section_id).clone().children().remove().end().text().trim();
- questions[section_text] = new Array();
- $.each(question_ids, function(question_id,value){
- if (value && question_id != 'undefined') {
- questions[section_text].push($("label[for='answer-text-"+question_id+"']").text());
- }
- });
- });
- return questions;
- }
-
-
-};
-
-$.fn.is_dirty = function(section_id, question_id) {
- if (section_id != null) {
- if (dirty[section_id] != null) {
- if (question_id != null) {
- if (dirty[section_id][question_id] != null) {
- return dirty[section_id][question_id];
- }
- else {
- return false;
- }
- }
- else {
- var is_dirty = false;
- $.each(dirty[section_id], function(question_id, value){
- if (value && question_id != 'undefined') {
- is_dirty = true;
- }
- });
- return is_dirty;
- }
- }
- }
- else {
- var is_dirty = false;
- $.each(dirty, function(section_id, questions){
- $.each(questions, function(question_id, value){
- if (value && question_id != 'undefined') {
- is_dirty = true;
- }
- });
- });
- return is_dirty;
- }
- return false;
-};
-
-$.fn.update_answer = function(question_id) {
- $.ajax({
- type: 'GET',
- url: "answer.json?q_id="+question_id,
- dataType: 'json',
- async: false, //Needs to be synchronous, otherwise end up mixing up answers
- success: function(data) {
- if (data != null) {
- //Get divs containing the form and readonly versions
- var form_div = $("#question-form-"+question_id);
- var readonly_div = $("#question-readonly-"+question_id);
- //Look for textfields
- if ($("input#answer-text-"+question_id).length == 1) {
- $("input#answer-text-"+question_id).val(data.text);
- readonly_div.find('.answer-text-readonly').html(""+data.text+"
");
- }
- else {
- //Update answer text - both in textarea and readonly
- $('#answer-text-'+question_id).val(data.text);
- tinymce.get('answer-text-'+question_id).setContent(data.text);
- readonly_div.find('.answer-text-readonly').html(data.text);
- }
- //Update answer options - both in form and readonly
- num_options = data.options.length;
- form_div.find('option').each(function(){
- var selected = false;
- for (var j =0; j < num_options; j++) {
- if ($(this).val() == data.options[j].id) {
- selected = true;
- }
- }
- if (selected) {
- $(this).attr('selected', 'selected');
- }
- else {
- $(this).removeAttr('selected');
- }
- });
- form_div.find(':checkbox,:radio').each(function(){
- var selected = false;
- for (var j =0; j < num_options; j++) {
- if ($(this).val() == data.options[j].id) {
- selected = true;
- }
- }
- if (selected) {
- $(this).attr('checked', 'checked');
- }
- else {
- $(this).removeAttr('checked');
- }
- });
-
- var list_string = "";
- for (var j =0; j < num_options; j++) {
- list_string += ""+data.options[j].text+" ";
- }
- readonly_div.find('.options').html(list_string);
- form_div.closest(".accordion-group").find(".section-status:first").toggle_dirty(question_id, false);
- }
- }
- });
-
-};
-
-$.fn.update_section_progress = function(data) {
- s_id = $(this).attr("id").split('-')[0];
- s_qs = data.sections[s_id]["num_questions"];
- question_word = "questions"
- if (s_qs == 1) {
- question_word = "question";
- }
- s_as = data.sections[s_id]["num_answers"];
- $(this).text("("+s_qs+" "+question_word+", "+s_as+" answered)");
- if (s_qs == s_as) {
- $(this).removeClass("label-warning");
- $(this).addClass("label-info");
- }
-};
-
-$.fn.update_plan_progress = function(data) {
- $("#questions-progress").css("width", (data.num_answers/data.num_questions*100)+"%");
- $("#questions-progress-title").text(data.num_answers+"/"+data.num_questions + " " + I18n.t("helpers.project.questions_answered"));
- $('#export-progress').css('width', data.space_used + '%');
- $("#export-progress-title").text(I18n.t("helpers.plan.export.space_used_without_max", {space_used: data.space_used}));
- if (data.space_used >= 100) {
- $('#export-progress').removeClass("space");
- $('#export-progress').addClass("full");
- $('#export-progress-title').addClass("bar-full-text");
- }
- else {
- $('#export-progress').removeClass("full");
- $('#export-progress').addClass("space");
- $('#export-progress-title').removeClass("bar-full-text");
- }
-};
-
-$.fn.update_timestamp = function(question_id, data) {
- q_status = $('#'+question_id+'-status');
- var t = q_status.children("abbr:first");
- var current_timestamp = new Date(t.attr('data-time'));
- var timestamp = data.questions[question_id]["answer_created_at"];
- if (timestamp != null) {
- timestamp = new Date(Number(timestamp) * 1000);
- if (timestamp.getTime() != current_timestamp.getTime()) {
- q_status.text("");
- q_status.append(I18n.t("helpers.answered_by") + " " + I18n.t("helpers.answered_by_part2") + " " + data.questions[question_id]["answered_by"]);
- t = q_status.children("abbr:first");
- // Update label to indicate successful submission
- q_status.removeClass("label-info label-warning");
- q_status.addClass("label-success");
- // Set timestamp text and data
- t.text(timestamp.toUTCString());
- t.attr('title', timestamp.toISOString()).data("timeago",null).timeago();
- t.attr('data-time', timestamp.toISOString());
- return true;
- }
- }
- return false;
-};
-
-$.fn.check_section_lock = function() {
- var section = $(this);
- var section_id = section.attr("id").split('-')[1];
- $.getJSON("locked?section_id="+section_id, function(data) {
- if (data.locked) {
- section.find(".section-lock-notice").html("" + I18n.t("helpers.project.share.locked_section_text") + data.locked_by + ".
");
- section.find(".section-lock-notice").show();
- section.find("input").attr('disabled', 'disabled');
- section.find(".question-form").hide();
- section.find("select").attr('disabled', 'disabled');
- section.find(".question-readonly").show();
- }
- else {
- // LIBDMP-137
- // Changed post request 'lock_section' to 'lock_section.json'. 'lock_section' unnecessary returns a huge html response and takes a quite lot of time to process(3sec) lowering server
- // performance when there are large number of concurrent users.
- $.post('lock_section', {section_id: section_id} );
- section.find(".section-lock-notice").html("");
- section.find(".section-lock-notice").hide();
- section.find("input").removeAttr('disabled');
- section.find(".question-form").show();
- section.find("select").removeAttr('disabled');
- section.find(".question-readonly").hide();
- }
- });
- return true;
-};
-
-$.fn.toggle_dirty = function(question_id, is_dirty) {
- section_id = $(this).attr("id").split('-')[0];
- if (dirty[section_id] == null) {
- dirty[section_id] = {};
- }
- dirty[section_id][question_id] = is_dirty;
- if (is_dirty) {
- $("#"+question_id+"-unsaved").show();
-
- }
- else {
- $("#"+question_id+"-unsaved").hide();
- }
-};
-
-$.fn.check_textarea = function(editor) {
- $("#"+editor.id).closest(".accordion-group").find(".section-status:first").toggle_dirty(editor.id.split('-')[2], editor.isDirty());
-
-};
-
-
-
-
-
+//= require jquery.timeago.js
+//= require tinymce
+
+var dirty = {};
+
+
+
+$( document ).ready(function() {
+
+ //reload page back to where it was before committing comment
+
+ if($('#comment_section_id').length) {
+ var section_id = $('#comment_section_id').val();
+
+ $("#collapse-" + section_id).addClass("in");
+ $("#collapse-" + section_id).children(".accordion-inner").find(".loading").show();
+ $("#collapse-" + section_id).children(".accordion-inner").find(".loaded").hide();
+
+ setTimeout(function(){
+ $("loaded").find(".section-lock-notice").html("");
+ $("loaded").find(".section-lock-notice").hide();
+ $(".question-form").find("select").removeAttr('disabled');
+ $(".question-div").find(".question-readonly").hide();
+ $(".question-div").find(".question-form").show();
+
+ $("#collapse-" + section_id).children(".accordion-inner").find(".loading").hide();
+ $("#collapse-" + section_id).children(".accordion-inner").find(".loaded").show();
+ $('html, body').animate({
+ 'scrollTop': $("#current_question").offset().top
+ },1000);
+ },8000);
+ }
+
+ window.onbeforeunload = function(){
+ var message = null;
+ if ($.fn.is_dirty()) {
+ var questions = $.fn.get_unsaved_questions();
+ message = I18n.t("you_have_unsaved_in_sections");
+ $.each(questions, function(section_text, question_texts){
+ message += "\n\u2022"+section_text;
+ });
+ return message;
+ }
+ };
+
+ // Make timestamps readable
+ $('abbr.timeago').timeago();
+
+ // Update status messages on form submission
+ $("form.answer").submit(function(){
+ var submit_button = $(this).find('input[type="submit"]');
+ var saving_message = $(this).find('.saving-message');
+ submit_button.parent().hide();
+ q_id = $(this).find(".question_id").val();
+ saving_message.show();
+ s_status = $(this).closest(".accordion-group").find(".section-status:first");
+ s_status.toggle_dirty(q_id, false);
+ // Allow quarter of a second for database to update
+ timeout = setTimeout(function(){
+ $.getJSON("status.json", function(data) {
+ $.fn.update_plan_progress(data);
+ $.fn.update_timestamp(q_id, data);
+ s_status.update_section_progress(data);
+ submit_button.parent().show();
+ saving_message.hide();
+ });
+ },250);
+ });
+
+ //accordion guidance
+ $('.accordion-guidance-link').on('click', function (e) {
+ e.stopPropagation();
+ var show = true;
+ var div_to_toggle = $($(this).attr("href"));
+ if (div_to_toggle.hasClass('in')) {
+ show = false;
+ }
+ $($(this).attr("href")).toggleClass("in");
+ if (show) {
+ $(this).children(".plus-laranja").removeClass("plus-laranja").addClass("minus-laranja");
+ }
+ else {
+ $(this).children(".minus-laranja").removeClass("minus-laranja").addClass("plus-laranja");
+ }
+ delete show;
+ delete div_to_toggle;
+ e.preventDefault();
+ });
+
+ // Periodically check locks on open section - every 50 seconds
+ setInterval(function(){
+ // Only lock/unlock if there are forms on the page (not read-only)
+ if ($('.question-form').length > 0) {
+ section = $('.section-collapse.in');
+ if (section.length > 0) {
+ section.check_section_lock();
+ }
+ }
+ }, 50000);
+
+ // Handle section actions on accordion expansion/collapse
+ $('.section-collapse').on('show', function() {
+ var section = $(this);
+ section.find(".loaded").hide();
+ section.find(".loading").show();
+ // Only lock if there are forms on the page (not read-only)
+ if ($('.question-form').length > 0) {
+ section.check_section_lock();
+ }
+ // check for updated answers
+ $.getJSON("status.json", function(data) {
+ $.fn.update_plan_progress(data);
+ $(".section-status").each(function(){
+ $(this).update_section_progress(data);
+ });
+ //For each question in section, check answer timestamp against currently displayed
+ var section_id = section.attr("id").split('-')[1];
+ var num_questions = data.sections[section_id]["questions"].length;
+ for (var i = 0; i < num_questions; i++) {
+ question_id = data.sections[section_id]["questions"][i];
+ //If timestamp newer than displayed, update answers
+ if ($.fn.update_timestamp(question_id, data)) {
+ $.fn.update_answer(question_id);
+ }
+ }
+ section.find(".loading").hide();
+ section.find(".loaded").show();
+ });
+ }).on('hide', function(){
+ var section = $(this);
+ // Only attempt unlock if there are forms on the page (not read-only)
+ if ($('.question-form').length > 0) {
+ var section_id = section.attr("id").split('-')[1];
+ // LIBDMP-137
+ // Changed post request 'unlock_section' to 'unlock_section.json'. 'unlock_section' unnecessary returns a huge html response and takes a quite lot of time to process(3sec) lowering server
+ // performance when there are large number of concurrent users.
+ $.post('unlock_section.json', {section_id: section_id});
+
+ if ($.fn.is_dirty(section_id)) {
+ $('#unsaved-answers-'+section_id).text("");
+ $.each($.fn.get_unsaved_questions(section_id), function(index, question_text){
+ $('#unsaved-answers-'+section_id).append(""+question_text+" ");
+ });
+ $('#section-' + section_id + '-collapse-alert').modal();
+ }
+ }
+ });
+
+ $(".cancel-section-collapse").click(function () {
+ var section_id = $(this).attr('data-section');
+ $("#collapse-" + section_id).collapse("show");
+ $('#section-' + section_id + '-collapse-alert').modal("hide");
+ });
+
+ $(".discard-section-collapse").click(function () {
+ var section_id = $(this).attr('data-section');
+ $('#section-' + section_id + '-collapse-alert').modal("hide");
+ });
+
+ $(".save-section-collapse").click(function () {
+ var section_id = $(this).attr('data-section');
+ $("#collapse-" + section_id).find("input[type='submit']").click();
+ $('#section-' + section_id + '-collapse-alert').modal("hide");
+ });
+
+ $("select, :radio, :checkbox, input").change(function() {
+ $(this).closest(".accordion-group").find(".section-status:first").toggle_dirty($(this).closest("form.answer").find(".question_id").val(), true);
+ });
+
+ // COMMENTS Javascript
+
+ //action for show comment block on the right side of a question
+ $('.comments_accordion_button').click(function(e){
+ var q_id = $(this).closest(".question_right_column_nav").find(".question_id").val();
+ $(this).parent().addClass("active");
+ $(this).closest(".question_right_column_ul").find(".guidance_tab_class").removeClass("active");
+ $('#guidance-question-area-'+ q_id).hide();
+ $('#comment-question-area-'+ q_id).show();
+ e.preventDefault();
+ });
+
+ //action for show guidance block on the right side of a question
+ $('.guidance_accordion_button').click(function(e){
+ var q_id = $(this).closest(".question_right_column_nav").find(".question_id").val();
+ $(this).parent().addClass("active");
+ $(this).closest(".question_right_column_ul").find(".comment_tab_class").removeClass("active");
+ $('#comment-question-area-'+ q_id).hide();
+ $('#guidance-question-area-'+ q_id).show();
+ e.preventDefault();
+ });
+
+ //action for show add comment block
+ $('.add_comment_button').click(function(e){
+ var q_id = $(this).closest(".comment-area").find(".question_id").val();
+ $('.view_comment_class').hide();
+ $('.edit_comment_class').hide();
+ $('.archive_comment_class').hide();
+ $('#add_comment_button_bottom_div_'+ q_id).hide();
+ $('#add_comment_button_top_div_'+ q_id).hide();
+ $('#add_comment_block_div_'+ q_id).show();
+ e.preventDefault();
+ });
+
+ //submit new comment button
+ $('.new_comment_submit_button').click(function(e){
+ var q_id = $(this).parent().children(".question_id").val();
+ var s_id = $(this).parent().children(".section_id").val();
+
+ $("#collapse-" + s_id).children(".accordion-inner").find(".saving").show();
+ $("#collapse-" + s_id).children(".accordion-inner").find(".loaded").hide();
+ $(".alert-notice").hide();
+ $("#new_comment_form_" + q_id).submit();
+
+ });
+
+ //action to view a comment block
+ $('.view_comment_button').click(function(e){
+ var c_id = $(this).next(".comment_id").val();
+ var q_id = $(this).closest(".comment-area").find(".question_id").val();
+ $('.view_comment_class').hide();
+ $('.edit_comment_class').hide();
+ $('.archive_comment_class').hide();
+ $('#lastet_comment_div_'+ q_id).hide();
+ $('#edit_comment_div_'+ c_id).hide();
+ $('#archive_comment_div_'+ c_id).hide();
+ $('#add_comment_block_div_'+ q_id).hide();
+ $('#view_comment_div_'+ c_id).show();
+ $('#add_comment_button_bottom_div_'+ q_id).show();
+ $('#add_comment_button_top_div_'+ q_id).show();
+ e.preventDefault();
+ });
+
+ //action to edit a comment block
+ $('.edit_comment_button').click(function(e){
+ var c_id = $(this).prev(".comment_id").val();
+ var q_id = $(this).closest(".comment-area").find(".question_id").val();
+ $('.edit_comment_class').hide();
+ $('.view_comment_class').hide();
+ $('.archive_comment_class').hide();
+ $('#lastet_comment_div_'+ q_id).hide();
+ $('#view_comment_div_'+ c_id).hide();
+ $('#archive_comment_div_'+ c_id).hide();
+ $('#add_comment_block_div_'+ q_id).hide();
+ $('#edit_comment_div_'+ c_id).show();
+ $('#add_comment_button_bottom_div_'+ q_id).show();
+ $('#add_comment_button_top_div_'+ q_id).show();
+ e.preventDefault();
+ });
+
+ //submit edit comment button
+ $('.edit_comment_submit_button').click(function(e){
+ var c_id = $(this).parent().children(".comment_id").val();
+ var s_id = $(this).parent().children(".section_id").val();
+
+ $("#collapse-" + s_id).children(".accordion-inner").find(".saving").show();
+ $("#collapse-" + s_id).children(".accordion-inner").find(".loaded").hide();
+ $(".alert-notice").hide();
+ $("#edit_comment_form_" + c_id).submit();
+
+ });
+
+ //action to archive a comment block
+ $('.archive_comment_button').click(function(e){
+ var c_id = $(this).prev(".comment_id").val();
+ var q_id = $(this).closest(".comment-area").find(".question_id").val();
+ $('.edit_comment_class').hide();
+ $('.view_comment_class').hide();
+ $('.archive_comment_class').hide();
+ $('#view_comment_div_'+ c_id).hide();
+ $('#lastet_comment_div_'+ q_id).hide();
+ $('#edit_comment_div_'+ c_id).hide();
+ $('#add_comment_block_div_'+ q_id).hide();
+ $('#archive_comment_div_'+ c_id).show()
+ $('#add_comment_button_bottom_div_'+ q_id).show();
+ $('#add_comment_button_top_div_'+ q_id).show();
+ e.preventDefault();
+ });
+
+ //submit archived comment button
+ $('.archive_comment_submit_button').click(function(e){
+ var c_id = $(this).parent().children(".comment_id").val();
+ var s_id = $(this).parent().children(".section_id").val();
+
+ $("#collapse-" + s_id).children(".accordion-inner").find(".removing").show();
+ $("#collapse-" + s_id).children(".accordion-inner").find(".loaded").hide();
+ $(".alert-notice").hide();
+ $("#archive_comment_form_" + c_id).submit();
+
+ });
+
+ //action to cancel archive block
+ $(".cancel_archive_comment").click(function(e){
+ var c_id = $(this).prev(".comment_id").val();
+ $('.archive_comment_class').hide();
+ $('#view_comment_div_'+ c_id).show();
+ e.preventDefault();
+ });
+
+});
+
+$.fn.get_unsaved_questions = function(section_id) {
+ if (section_id != null) {
+ var questions = new Array();
+ $.each(dirty[section_id], function(question_id,value){
+ if (value && question_id != 'undefined') {
+ questions.push($("label[for='answer-text-"+question_id+"']").text());
+ }
+ });
+ return questions;
+ }
+ else {
+ var questions = {};
+ $.each(dirty, function(section_id,question_ids){
+ var section_text = $("#section-header-"+section_id).clone().children().remove().end().text().trim();
+ questions[section_text] = new Array();
+ $.each(question_ids, function(question_id,value){
+ if (value && question_id != 'undefined') {
+ questions[section_text].push($("label[for='answer-text-"+question_id+"']").text());
+ }
+ });
+ });
+ return questions;
+ }
+
+
+};
+
+$.fn.is_dirty = function(section_id, question_id) {
+ if (section_id != null) {
+ if (dirty[section_id] != null) {
+ if (question_id != null) {
+ if (dirty[section_id][question_id] != null) {
+ return dirty[section_id][question_id];
+ }
+ else {
+ return false;
+ }
+ }
+ else {
+ var is_dirty = false;
+ $.each(dirty[section_id], function(question_id, value){
+ if (value && question_id != 'undefined') {
+ is_dirty = true;
+ }
+ });
+ return is_dirty;
+ }
+ }
+ }
+ else {
+ var is_dirty = false;
+ $.each(dirty, function(section_id, questions){
+ $.each(questions, function(question_id, value){
+ if (value && question_id != 'undefined') {
+ is_dirty = true;
+ }
+ });
+ });
+ return is_dirty;
+ }
+ return false;
+};
+
+$.fn.update_answer = function(question_id) {
+ $.ajax({
+ type: 'GET',
+ url: "answer.json?q_id="+question_id,
+ dataType: 'json',
+ async: false, //Needs to be synchronous, otherwise end up mixing up answers
+ success: function(data) {
+ if (data != null) {
+ //Get divs containing the form and readonly versions
+ var form_div = $("#question-form-"+question_id);
+ var readonly_div = $("#question-readonly-"+question_id);
+ //Look for textfields
+ if ($("input#answer-text-"+question_id).length == 1) {
+ $("input#answer-text-"+question_id).val(data.text);
+ readonly_div.find('.answer-text-readonly').html(""+data.text+"
");
+ }
+ else {
+ //Update answer text - both in textarea and readonly
+ $('#answer-text-'+question_id).val(data.text);
+ tinymce.get('answer-text-'+question_id).setContent(data.text);
+ readonly_div.find('.answer-text-readonly').html(data.text);
+ }
+ //Update answer options - both in form and readonly
+ num_options = data.options.length;
+ form_div.find('option').each(function(){
+ var selected = false;
+ for (var j =0; j < num_options; j++) {
+ if ($(this).val() == data.options[j].id) {
+ selected = true;
+ }
+ }
+ if (selected) {
+ $(this).attr('selected', 'selected');
+ }
+ else {
+ $(this).removeAttr('selected');
+ }
+ });
+ form_div.find(':checkbox,:radio').each(function(){
+ var selected = false;
+ for (var j =0; j < num_options; j++) {
+ if ($(this).val() == data.options[j].id) {
+ selected = true;
+ }
+ }
+ if (selected) {
+ $(this).attr('checked', 'checked');
+ }
+ else {
+ $(this).removeAttr('checked');
+ }
+ });
+
+ var list_string = "";
+ for (var j =0; j < num_options; j++) {
+ list_string += ""+data.options[j].text+" ";
+ }
+ readonly_div.find('.options').html(list_string);
+ form_div.closest(".accordion-group").find(".section-status:first").toggle_dirty(question_id, false);
+ }
+ }
+ });
+
+};
+
+$.fn.update_section_progress = function(data) {
+ s_id = $(this).attr("id").split('-')[0];
+ s_qs = data.sections[s_id]["num_questions"];
+ question_word = "questions"
+ if (s_qs == 1) {
+ question_word = "question";
+ }
+ s_as = data.sections[s_id]["num_answers"];
+ $(this).text("("+s_qs+" "+question_word+", "+s_as+" answered)");
+ if (s_qs == s_as) {
+ $(this).removeClass("label-warning");
+ $(this).addClass("label-info");
+ }
+};
+
+$.fn.update_plan_progress = function(data) {
+ $("#questions-progress").css("width", (data.num_answers/data.num_questions*100)+"%");
+ $("#questions-progress-title").text(data.num_answers+"/"+data.num_questions + " " + I18n.t("helpers.project.questions_answered"));
+ $('#export-progress').css('width', data.space_used + '%');
+ $("#export-progress-title").text(I18n.t("helpers.plan.export.space_used_without_max", {space_used: data.space_used}));
+ if (data.space_used >= 100) {
+ $('#export-progress').removeClass("space");
+ $('#export-progress').addClass("full");
+ $('#export-progress-title').addClass("bar-full-text");
+ }
+ else {
+ $('#export-progress').removeClass("full");
+ $('#export-progress').addClass("space");
+ $('#export-progress-title').removeClass("bar-full-text");
+ }
+};
+
+$.fn.update_timestamp = function(question_id, data) {
+ q_status = $('#'+question_id+'-status');
+ var t = q_status.children("abbr:first");
+ var current_timestamp = new Date(t.attr('data-time'));
+ var timestamp = data.questions[question_id]["answer_created_at"];
+ if (timestamp != null) {
+ timestamp = new Date(Number(timestamp) * 1000);
+ if (timestamp.getTime() != current_timestamp.getTime()) {
+ q_status.text("");
+ q_status.append(I18n.t("helpers.answered_by") + " " + I18n.t("helpers.answered_by_part2") + " " + data.questions[question_id]["answered_by"]);
+ t = q_status.children("abbr:first");
+ // Update label to indicate successful submission
+ q_status.removeClass("label-info label-warning");
+ q_status.addClass("label-success");
+ // Set timestamp text and data
+ t.text(timestamp.toUTCString());
+ t.attr('title', timestamp.toISOString()).data("timeago",null).timeago();
+ t.attr('data-time', timestamp.toISOString());
+ return true;
+ }
+ }
+ return false;
+};
+
+$.fn.check_section_lock = function() {
+ var section = $(this);
+ var section_id = section.attr("id").split('-')[1];
+ $.getJSON("locked?section_id="+section_id, function(data) {
+ if (data.locked) {
+ section.find(".section-lock-notice").html("" + I18n.t("helpers.project.share.locked_section_text") + data.locked_by + ".
");
+ section.find(".section-lock-notice").show();
+ section.find("input").attr('disabled', 'disabled');
+ section.find(".question-form").hide();
+ section.find("select").attr('disabled', 'disabled');
+ section.find(".question-readonly").show();
+ }
+ else {
+ // LIBDMP-137
+ // Changed post request 'lock_section' to 'lock_section.json'. 'lock_section' unnecessary returns a huge html response and takes a quite lot of time to process(3sec) lowering server
+ // performance when there are large number of concurrent users.
+ $.post('lock_section', {section_id: section_id} );
+ section.find(".section-lock-notice").html("");
+ section.find(".section-lock-notice").hide();
+ section.find("input").removeAttr('disabled');
+ section.find(".question-form").show();
+ section.find("select").removeAttr('disabled');
+ section.find(".question-readonly").hide();
+ }
+ });
+ return true;
+};
+
+$.fn.toggle_dirty = function(question_id, is_dirty) {
+ section_id = $(this).attr("id").split('-')[0];
+ if (dirty[section_id] == null) {
+ dirty[section_id] = {};
+ }
+ dirty[section_id][question_id] = is_dirty;
+ if (is_dirty) {
+ $("#"+question_id+"-unsaved").show();
+
+ }
+ else {
+ $("#"+question_id+"-unsaved").hide();
+ }
+};
+
+$.fn.check_textarea = function(editor) {
+ $("#"+editor.id).closest(".accordion-group").find(".section-status:first").toggle_dirty(editor.id.split('-')[2], editor.isDirty());
+
+};
+
+
+
+
+
diff --git a/app/assets/javascripts/projects.js b/app/assets/javascripts/projects.js
index 72bc364..c103f84 100644
--- a/app/assets/javascripts/projects.js
+++ b/app/assets/javascripts/projects.js
@@ -1,169 +1,169 @@
-$( document ).ready(function() {
-
-/*
- $("#project_funder_id").select2({
- placeholder: "Select a funder"
- });
-*/
- $("#project_funder_id").change(function () {
- update_template_options();
- update_guidance_options();
- if ($(this).val().length > 0) {
- $("#other-funder-name").hide();
- $("#project_funder_name").val("");
- }
- else {
- $("#other-funder-name").show();
- }
- $("#institution-control-group").show();
- $("#create-plan-button").show();
- $("#confirm-funder").text($("#project_funder_id").select2('data').text);
- });
-
- $("#no-funder").click(function(e) {
- e.preventDefault();
- $("#project_funder_id").select2("val", "");
- update_template_options();
- update_guidance_options();
- $("#institution-control-group").show();
- $("#create-plan-button").show();
- $("#other-funder-name").show();
- $("#confirm-funder").text(I18n.t("helpers.none"));
- });
-
- $("#project_funder_name").change(function(){
- $("#confirm-funder").text($(this).val());
- });
-
- $("#project_institution_id").change(function () {
- update_template_options();
- update_guidance_options();
- $("#confirm-institution").text($("#project_institution_id").select2('data').text);
- });
-
- $("#no-institution").click(function() {
- $("#project_institution_id").select2("val", "");
- update_template_options();
- update_guidance_options();
- $("#confirm-institution").text(I18n.t("helpers.none"));
- });
-
- $("#project_dmptemplate_id").change(function (f) {
- update_guidance_options();
- $("#confirm-template").text($("#project_dmptemplate_id :selected").text());
- });
-
- $("#project-confirmation-dialog").on("show", function(){
- if ($("#confirm-institution").text() == "") {
- $("#confirm-institution").text(I18n.t("helpers.none"));
- }
- if ($("#confirm-funder").text() == "") {
- $("#confirm-funder").text(I18n.t("helpers.none"));
- }
- if ($("#confirm-template").text() == "") {
- $("#confirm-template").closest("div").hide();
- }
- else {
- $("#confirm-template").closest("div").show();
- }
- $("#confirm-guidance").empty();
- $("input:checked").each(function(){
- $("#confirm-guidance").append(""+$(this).parent().text()+" ");
- });
- $('.select2-choice').hide();
- });
-
- $("#new-project-cancelled").click(function (){
- $("#project-confirmation-dialog").modal("hide");
- $('.select2-choice').show();
- });
-
- $("#new-project-confirmed").click(function (){
- $("#new_project").submit();
- });
-
- //for the default template alert
- $("#default-template-confirmation-dialog").on("show", function(){
- $('.select2-choice').hide();
- });
-
- $("#default-template-cancelled").click(function (){
- $("#default-template-confirmation-dialog").modal("hide");
- $('.select2-choice').show();
- });
-
- $("#default-template-confirmed").click(function (){
- $("#default_tag").val('true');
- $("#new_project").submit();
- });
-
-
- function update_template_options() {
- var options = {};
- var funder = $("#project_funder_id").select2('val');
- var institution = $("#project_institution_id").select2('val');
- $.ajax({
- type: 'GET',
- url: "possible_templates.json?institution="+institution+"&funder="+funder,
- dataType: 'json',
- async: false, //Needs to be synchronous, otherwise end up mixing up answers
- success: function(data) {
- options = data;
- }
- });
- select_element = $("#project_dmptemplate_id");
- select_element.find("option").remove();
- var count = 0;
- for (var id in options) {
- if (count == 0) {
- select_element.append(""+options[id]+" ");
- }
- else {
- select_element.append(""+options[id]+" ");
- }
- count++;
- }
- if (count >= 2) {
- $("#template-control-group").show();
- }
- else {
- $("#template-control-group").hide();
- }
- $("#confirm-template").text("");
- $("#project_dmptemplate_id").change();
- }
-
- function update_guidance_options() {
- var institution = $("#project_institution_id").select2('val');
- var template = $("#project_dmptemplate_id :selected").val();
- var options = null;
-
- $.ajax({
- type: 'GET',
- url: "possible_guidance.json?institution="+institution+"&template="+template,
- dataType: 'json',
- async: false, //Needs to be synchronous, otherwise end up mixing up answers
- success: function(data) {
- options = data;
- },
- error: function(err){
- console.log(err);
- }
- });
- options_container = $("#guidance-control-group");
- options_container = options_container.find(".choices-group");
- options_container.empty();
-
- var count = 0;
- for (var id in options) {
- options_container.append(" "+options[id]+" ");
- count++;
- }
- if (count > 0) {
- $("#guidance-control-group").show();
- }
- else {
- $("#guidance-control-group").hide();
- }
- }
-});
+$( document ).ready(function() {
+
+/*
+ $("#project_funder_id").select2({
+ placeholder: "Select a funder"
+ });
+*/
+ $("#project_funder_id").change(function () {
+ update_template_options();
+ update_guidance_options();
+ if ($(this).val().length > 0) {
+ $("#other-funder-name").hide();
+ $("#project_funder_name").val("");
+ }
+ else {
+ $("#other-funder-name").show();
+ }
+ $("#institution-control-group").show();
+ $("#create-plan-button").show();
+ $("#confirm-funder").text($("#project_funder_id").select2('data').text);
+ });
+
+ $("#no-funder").click(function(e) {
+ e.preventDefault();
+ $("#project_funder_id").select2("val", "");
+ update_template_options();
+ update_guidance_options();
+ $("#institution-control-group").show();
+ $("#create-plan-button").show();
+ $("#other-funder-name").show();
+ $("#confirm-funder").text(I18n.t("helpers.none"));
+ });
+
+ $("#project_funder_name").change(function(){
+ $("#confirm-funder").text($(this).val());
+ });
+
+ $("#project_institution_id").change(function () {
+ update_template_options();
+ update_guidance_options();
+ $("#confirm-institution").text($("#project_institution_id").select2('data').text);
+ });
+
+ $("#no-institution").click(function() {
+ $("#project_institution_id").select2("val", "");
+ update_template_options();
+ update_guidance_options();
+ $("#confirm-institution").text(I18n.t("helpers.none"));
+ });
+
+ $("#project_dmptemplate_id").change(function (f) {
+ update_guidance_options();
+ $("#confirm-template").text($("#project_dmptemplate_id :selected").text());
+ });
+
+ $("#project-confirmation-dialog").on("show", function(){
+ if ($("#confirm-institution").text() == "") {
+ $("#confirm-institution").text(I18n.t("helpers.none"));
+ }
+ if ($("#confirm-funder").text() == "") {
+ $("#confirm-funder").text(I18n.t("helpers.none"));
+ }
+ if ($("#confirm-template").text() == "") {
+ $("#confirm-template").closest("div").hide();
+ }
+ else {
+ $("#confirm-template").closest("div").show();
+ }
+ $("#confirm-guidance").empty();
+ $("input:checked").each(function(){
+ $("#confirm-guidance").append(""+$(this).parent().text()+" ");
+ });
+ $('.select2-choice').hide();
+ });
+
+ $("#new-project-cancelled").click(function (){
+ $("#project-confirmation-dialog").modal("hide");
+ $('.select2-choice').show();
+ });
+
+ $("#new-project-confirmed").click(function (){
+ $("#new_project").submit();
+ });
+
+ //for the default template alert
+ $("#default-template-confirmation-dialog").on("show", function(){
+ $('.select2-choice').hide();
+ });
+
+ $("#default-template-cancelled").click(function (){
+ $("#default-template-confirmation-dialog").modal("hide");
+ $('.select2-choice').show();
+ });
+
+ $("#default-template-confirmed").click(function (){
+ $("#default_tag").val('true');
+ $("#new_project").submit();
+ });
+
+
+ function update_template_options() {
+ var options = {};
+ var funder = $("#project_funder_id").select2('val');
+ var institution = $("#project_institution_id").select2('val');
+ $.ajax({
+ type: 'GET',
+ url: "possible_templates.json?institution="+institution+"&funder="+funder,
+ dataType: 'json',
+ async: false, //Needs to be synchronous, otherwise end up mixing up answers
+ success: function(data) {
+ options = data;
+ }
+ });
+ select_element = $("#project_dmptemplate_id");
+ select_element.find("option").remove();
+ var count = 0;
+ for (var id in options) {
+ if (count == 0) {
+ select_element.append(""+options[id]+" ");
+ }
+ else {
+ select_element.append(""+options[id]+" ");
+ }
+ count++;
+ }
+ if (count >= 2) {
+ $("#template-control-group").show();
+ }
+ else {
+ $("#template-control-group").hide();
+ }
+ $("#confirm-template").text("");
+ $("#project_dmptemplate_id").change();
+ }
+
+ function update_guidance_options() {
+ var institution = $("#project_institution_id").select2('val');
+ var template = $("#project_dmptemplate_id :selected").val();
+ var options = null;
+
+ $.ajax({
+ type: 'GET',
+ url: "possible_guidance.json?institution="+institution+"&template="+template,
+ dataType: 'json',
+ async: false, //Needs to be synchronous, otherwise end up mixing up answers
+ success: function(data) {
+ options = data;
+ },
+ error: function(err){
+ console.log(err);
+ }
+ });
+ options_container = $("#guidance-control-group");
+ options_container = options_container.find(".choices-group");
+ options_container.empty();
+
+ var count = 0;
+ for (var id in options) {
+ options_container.append(" "+options[id]+" ");
+ count++;
+ }
+ if (count > 0) {
+ $("#guidance-control-group").show();
+ }
+ else {
+ $("#guidance-control-group").hide();
+ }
+ }
+});
diff --git a/app/assets/javascripts/select2.min.js b/app/assets/javascripts/select2.min.js
index f5e3013..1aa2d30 100644
--- a/app/assets/javascripts/select2.min.js
+++ b/app/assets/javascripts/select2.min.js
@@ -1,22 +1,22 @@
-/*
-Copyright 2012 Igor Vaynberg
-
-Version: 3.4.2 Timestamp: Mon Aug 12 15:04:12 PDT 2013
-
-This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
-General Public License version 2 (the "GPL License"). You may choose either license to govern your
-use of this software only upon the condition that you accept all of the terms of either the Apache
-License or the GPL License.
-
-You may obtain a copy of the Apache License and the GPL License at:
-
-http://www.apache.org/licenses/LICENSE-2.0
-http://www.gnu.org/licenses/gpl-2.0.html
-
-Unless required by applicable law or agreed to in writing, software distributed under the Apache License
-or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-either express or implied. See the Apache License and the GPL License for the specific language governing
-permissions and limitations under the Apache License and the GPL License.
-*/
-!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++dc;c++)e=a.charAt(c),b+=m[e]||e;return b}function o(a,b){for(var c=0,d=b.length;d>c;c+=1)if(q(a,b[c]))return c;return-1}function p(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function q(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function r(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function s(a){return a.outerWidth(!1)-a.width()}function t(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function u(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function v(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function w(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function x(a,b){var c=v(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){o(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function D(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=n(a.toUpperCase()).indexOf(n(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push(""),c.push(d(a.substring(e,e+f))),c.push(" "),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error(c+" must be a function or a falsy value")}function K(b){return a.isFunction(b)?b():b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(q(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="
",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z"};j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=N(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,h,i,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=w(function(){return c.element.closest("body")}),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss)),this.container.addClass(K(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(K(c.dropdownCssClass)),this.dropdown.data("select2",this),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),u(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),t(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||p(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.nextSearchTerm=b},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:q(a.attr("locked"),"locked")||q(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,g,h=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,l=this.opts.id;g=function(d,e,i){var j,k,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),j=0,k=d.length;k>j;j+=1)m=d[j],o=m.disabled===!0,n=!o&&l(m)!==b,p=m.children&&m.children.length>0,q=a(" "),q.addClass("select2-results-dept-"+i),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(h.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,h.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a(""),s.addClass("select2-result-sub"),g(m.children,s,i+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,i,c={results:[],more:!1},e=a.term;i=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(h.optionToData(b)):b.is("optgroup")&&(d=h.optionToData(b),b.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){i(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(r(b.val(),c.separator)).each(function(){var b=this,d=this,f=c.tags;a.isFunction(f)&&(f=f()),a(f).each(function(){return q(this.id,b)?(d=this.text,!1):void 0}),e.push({id:b,text:d})}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var c,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var d,f=a.prop("disabled");f===b&&(f=!1),this.enable(!f);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass)),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass))}),a.on("propertychange.select2 DOMAttrModified.select2",c),this.mutationCallback===b&&(this.mutationCallback=function(a){a.forEach(c)}),"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(this.mutationCallback),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var q,r,s,t,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window).scrollLeft()+a(window).width(),h=a(window).scrollTop()+a(window).height(),i=c.top+d,j=c.left,l=h>=i+f,m=c.top-f>=this.body().scrollTop(),n=b.outerWidth(!1),o=g>=j+n,p=b.hasClass("select2-drop-above");this.opts.dropdownAutoWidth?(t=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),n=b.outerWidth(!1)+(t.scrollHeight===t.clientHeight?0:k.width),n>e?e=n:n=e,o=g>=j+n):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(q=this.body().offset(),i-=q.top,j-=q.left),p?(r=!0,!m&&l&&(r=!1)):(r=!1,!l&&m&&(r=!0)),o||(j=c.left+e-n),r?(i=c.top-f,this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),s=a.extend({top:i,left:j,width:e},K(this.opts.dropdownCss)),b.css(s)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.on("mousedown touchstart click",function(b){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close({focus:!1}),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var h=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){h.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),f=e.offset().top+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!0),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=e.offset().top-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.ensureHighlightVisible(),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),e=this.resultsPage+1,f=this,g=this.search.val(),h=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:g,page:e,context:h,matcher:this.opts.matcher,callback:this.bind(function(c){f.opened()&&(f.opts.populateResults.call(this,a,c.results,{term:g,page:e,context:h}),f.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(f.opts.formatLoadMore(e+1)),window.setTimeout(function(){f.loadMoreIfNeeded()},10)):b.remove(),f.positionDropdown(),f.resultsPage=e,f.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown()}function n(a){e.html(a),m()}var g,i,l,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!q(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n(""+f.formatSelectionTooBig(o)+" "),void 0;if(d.val().length"+f.formatInputTooShort(d.val(),f.minimumInputLength)+""):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n(""+f.formatInputTooLong(d.val(),f.maximumInputLength)+" "):n(""),void 0;
+/*
+Copyright 2012 Igor Vaynberg
+
+Version: 3.4.2 Timestamp: Mon Aug 12 15:04:12 PDT 2013
+
+This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
+General Public License version 2 (the "GPL License"). You may choose either license to govern your
+use of this software only upon the condition that you accept all of the terms of either the Apache
+License or the GPL License.
+
+You may obtain a copy of the Apache License and the GPL License at:
+
+http://www.apache.org/licenses/LICENSE-2.0
+http://www.gnu.org/licenses/gpl-2.0.html
+
+Unless required by applicable law or agreed to in writing, software distributed under the Apache License
+or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+either express or implied. See the Apache License and the GPL License for the specific language governing
+permissions and limitations under the Apache License and the GPL License.
+*/
+!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++dc;c++)e=a.charAt(c),b+=m[e]||e;return b}function o(a,b){for(var c=0,d=b.length;d>c;c+=1)if(q(a,b[c]))return c;return-1}function p(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function q(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function r(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function s(a){return a.outerWidth(!1)-a.width()}function t(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function u(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function v(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function w(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function x(a,b){var c=v(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){o(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function D(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=n(a.toUpperCase()).indexOf(n(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push(""),c.push(d(a.substring(e,e+f))),c.push(" "),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error(c+" must be a function or a falsy value")}function K(b){return a.isFunction(b)?b():b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(q(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="
",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z"};j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=N(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,h,i,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=w(function(){return c.element.closest("body")}),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss)),this.container.addClass(K(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(K(c.dropdownCssClass)),this.dropdown.data("select2",this),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),u(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),t(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||p(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.nextSearchTerm=b},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:q(a.attr("locked"),"locked")||q(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,g,h=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,l=this.opts.id;g=function(d,e,i){var j,k,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),j=0,k=d.length;k>j;j+=1)m=d[j],o=m.disabled===!0,n=!o&&l(m)!==b,p=m.children&&m.children.length>0,q=a(" "),q.addClass("select2-results-dept-"+i),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(h.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,h.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a(""),s.addClass("select2-result-sub"),g(m.children,s,i+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,i,c={results:[],more:!1},e=a.term;i=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(h.optionToData(b)):b.is("optgroup")&&(d=h.optionToData(b),b.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){i(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(r(b.val(),c.separator)).each(function(){var b=this,d=this,f=c.tags;a.isFunction(f)&&(f=f()),a(f).each(function(){return q(this.id,b)?(d=this.text,!1):void 0}),e.push({id:b,text:d})}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var c,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var d,f=a.prop("disabled");f===b&&(f=!1),this.enable(!f);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass)),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass))}),a.on("propertychange.select2 DOMAttrModified.select2",c),this.mutationCallback===b&&(this.mutationCallback=function(a){a.forEach(c)}),"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(this.mutationCallback),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var q,r,s,t,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window).scrollLeft()+a(window).width(),h=a(window).scrollTop()+a(window).height(),i=c.top+d,j=c.left,l=h>=i+f,m=c.top-f>=this.body().scrollTop(),n=b.outerWidth(!1),o=g>=j+n,p=b.hasClass("select2-drop-above");this.opts.dropdownAutoWidth?(t=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),n=b.outerWidth(!1)+(t.scrollHeight===t.clientHeight?0:k.width),n>e?e=n:n=e,o=g>=j+n):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(q=this.body().offset(),i-=q.top,j-=q.left),p?(r=!0,!m&&l&&(r=!1)):(r=!1,!l&&m&&(r=!0)),o||(j=c.left+e-n),r?(i=c.top-f,this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),s=a.extend({top:i,left:j,width:e},K(this.opts.dropdownCss)),b.css(s)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.on("mousedown touchstart click",function(b){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close({focus:!1}),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var h=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){h.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),f=e.offset().top+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!0),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=e.offset().top-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.ensureHighlightVisible(),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),e=this.resultsPage+1,f=this,g=this.search.val(),h=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:g,page:e,context:h,matcher:this.opts.matcher,callback:this.bind(function(c){f.opened()&&(f.opts.populateResults.call(this,a,c.results,{term:g,page:e,context:h}),f.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(f.opts.formatLoadMore(e+1)),window.setTimeout(function(){f.loadMoreIfNeeded()},10)):b.remove(),f.positionDropdown(),f.resultsPage=e,f.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown()}function n(a){e.html(a),m()}var g,i,l,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!q(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n(""+f.formatSelectionTooBig(o)+" "),void 0;if(d.val().length"+f.formatInputTooShort(d.val(),f.minimumInputLength)+""):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n(""+f.formatInputTooLong(d.val(),f.maximumInputLength)+" "):n(""),void 0;
f.formatSearching&&0===this.findHighlightableChoices().length&&n(""+f.formatSearching()+" "),d.addClass("select2-active"),this.removeHighlight(),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;if(l==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return q(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&J(f.formatNoMatches,"formatNoMatches"))return n(""+f.formatNoMatches(d.val())+" "),void 0;e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&J(f.formatLoadMore,"formatLoadMore")&&(e.append(""+h.opts.escapeMarkup(f.formatLoadMore(this.resultsPage))+" "),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"select2-loaded",items:g})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){y(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var a=this.select.children().first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&a||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.text()&&""===a.val())return a}},initContainerWidth:function(){function c(){var c,d,e,f,g;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(e=d[f].replace(/\s/g,"").match(/[^-]width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=N(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html([""," "," "," "," ",""].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e)),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(a){this.opened()&&(this.parent.close.apply(this,arguments),a=a||{focus:!0},this.focusser.removeAttr("disabled"),a.focus&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var b,d=this.container,e=this.dropdown;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=d.find(".select2-choice"),this.focusser=d.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return A(a),void 0;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),void 0;case c.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return A(a),void 0;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),t(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection.focus())})),b.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(b)})),e.on("mousedown",this.bind(function(){this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(a){var b=this.selection.data("select2-data");if(b){var c=this.getPlaceholderOption();this.opts.element.val(c?c.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),a!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(b),choice:b}),this.triggerChange({removed:b}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},isPlaceholderOptionSelected:function(){var a;return this.opts.placeholder?(a=this.getPlaceholderOption())!==b&&a.is(":selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val():!1},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find(":selected");b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=q(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return q(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||this.selection.focus(),q(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),f=N(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["",""].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find(":selected").each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=r(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return q(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){o(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("
"),f=a("
"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith(""+j+"
"),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),A(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(a){var c,d,b=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";c=a.data("select2-data"),c&&(d=o(this.id(c),b),d>=0&&(b.splice(d,1),this.setVal(b),this.select&&this.postprocessResults()),a.remove(),this.opts.element.trigger({type:"removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));o(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append(""+g.opts.formatNoMatches(g.search.val())+" ")},getMaxSearchWidth:function(){return this.selection.width()-s(this.search)},resizeSearch:function(){var a,b,c,d,e,f=s(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(e)},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),r(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){o(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c. Attach to instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,g,h,i,j,c=Array.prototype.slice.call(arguments,0),k=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],m=["val","data"],n={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?j=d.element.prop("multiple"):(j=d.multiple||!1,"tags"in d&&(d.multiple=j=!0)),g=j?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(o(c[0],k)<0)throw"Unknown method: "+c[0];if(i=b,g=a(this).data("select2"),g===b)return;if(h=c[0],"container"===h?i=g.container:"dropdown"===h?i=g.dropdown:(n[h]&&(h=n[h]),i=g[h].apply(g,c.slice(1))),o(c[0],l)>=0||o(c[0],m)&&1==c.length)return!1}}),i===b?this:i},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatSelectionCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return n(""+b).toUpperCase().indexOf(n(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:v,markMatch:E,escapeMarkup:F,stripDiacritics:n},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
\ No newline at end of file
diff --git a/app/assets/javascripts/toolbar.js b/app/assets/javascripts/toolbar.js
index 3bdf29b..58c178c 100644
--- a/app/assets/javascripts/toolbar.js
+++ b/app/assets/javascripts/toolbar.js
@@ -1,112 +1,112 @@
-$(document).ready(function() {
-
- var toolbar = $('.dmp_toolbar').first(),
- form = null;
-
- $('#toolbar_configure').click(function(e) {
- e.preventDefault();
-
- if (form) {
- form.toggle();
- } else {
- $.get('/settings/projects.json')
- .done(buildSettingsForm)
- .fail(function(data) {
- // Handle failure?
- });
- }
- });
-
- // FIXME: it would be simpler just to return the partial from
- // Settings::ProjectsController#show, but that would perhaps
- // mean responding to a JSON request with HTML.
- function buildSettingsForm(data) {
- if (!form)
- form = $('');
-
- var table = $('').appendTo(form),
- thead = $(' ').appendTo(table),
- tbody = $(' ').appendTo(table),
- tfoot = $(' ').appendTo(table),
- cols = data.all_columns,
- selected = [];
-
- // grab the keys from the data.selected_columns hash
- $.each(data.selected_columns, function(k,v){
- selected.push(k);
- });
-
- table.before(' '); // PUT not POST
- table.before(' '); // Auth token
- table.after('' + I18n.t("helpers.project.project_settings_text") + '
');
-
- // Default name column
- table.before(' ');
- thead.append('Name ');
- tbody.append(' ')
-
- for (var i = 0, len = cols.length; i < len; i++) {
- var title = cols[i].replace(/^\w|_/g, function(c) { return c === '_' ? ' ' : c.toUpperCase(); }), // FIXME: add titles to response for I18n?
- label = $('' + title + ' ').appendTo(thead),
- container = $(' ').appendTo(tbody),
- input = $(' ').appendTo(container);
-
- if (selected.indexOf(cols[i]) > -1)
- input.attr('checked', 'checked');
- }
-
- thead.append('' + I18n.t("helpers.select_action") + ' ');
- tbody.append(' ')
-
- var submit = $(' ').appendTo(tfoot);
- cancel = $('' + I18n.t("helpers.submit.cancel") + ' ').appendTo(tfoot);
-
- cancel.click(function(e) {
- e.preventDefault();
- form.toggle();
- });
-
- toolbar.before(form);
- }
-
- /*
- 'My plans' filtering
- */
- var no_matches_message = $('' + I18n.t("helpers.project.filter.no_matches") + ' ').appendTo($('#dmp_table tbody')),
- rows = $('#dmp_table tbody tr'),
- filter = $('#filter');
-
- filter.keyup(function() {
- var query = $(this).val(),
- len = query.length,
- filter_re = new RegExp(query, 'i'),
- matched = false;
-
- if (len < 2) {
- rows.show();
- no_matches_message.hide();
- return;
- }
-
- no_matches_message.hide();
-
- rows.each(function() {
- var row = $(this);
- row.text().match(filter_re) ? (matched = true && row.show()) : row.hide();
- });
-
- if (!matched)
- no_matches_message.show();
- });
-
- $('#clear_filter').click(function(e) {
- e.preventDefault();
-
- filter.val('');
- rows.show();
- no_matches_message.hide();
- });
-
- $('#filter_form').submit(function(e) { e.preventDefault() } );
-
-});
+$(document).ready(function() {
+
+ var toolbar = $('.dmp_toolbar').first(),
+ form = null;
+
+ $('#toolbar_configure').click(function(e) {
+ e.preventDefault();
+
+ if (form) {
+ form.toggle();
+ } else {
+ $.get('/settings/projects.json')
+ .done(buildSettingsForm)
+ .fail(function(data) {
+ // Handle failure?
+ });
+ }
+ });
+
+ // FIXME: it would be simpler just to return the partial from
+ // Settings::ProjectsController#show, but that would perhaps
+ // mean responding to a JSON request with HTML.
+ function buildSettingsForm(data) {
+ if (!form)
+ form = $('');
+
+ var table = $('').appendTo(form),
+ thead = $(' ').appendTo(table),
+ tbody = $(' ').appendTo(table),
+ tfoot = $(' ').appendTo(table),
+ cols = data.all_columns,
+ selected = [];
+
+ // grab the keys from the data.selected_columns hash
+ $.each(data.selected_columns, function(k,v){
+ selected.push(k);
+ });
+
+ table.before(' '); // PUT not POST
+ table.before(' '); // Auth token
+ table.after('' + I18n.t("helpers.project.project_settings_text") + '
');
+
+ // Default name column
+ table.before(' ');
+ thead.append('Name ');
+ tbody.append(' ')
+
+ for (var i = 0, len = cols.length; i < len; i++) {
+ var title = cols[i].replace(/^\w|_/g, function(c) { return c === '_' ? ' ' : c.toUpperCase(); }), // FIXME: add titles to response for I18n?
+ label = $('' + title + ' ').appendTo(thead),
+ container = $(' ').appendTo(tbody),
+ input = $(' ').appendTo(container);
+
+ if (selected.indexOf(cols[i]) > -1)
+ input.attr('checked', 'checked');
+ }
+
+ thead.append('' + I18n.t("helpers.select_action") + ' ');
+ tbody.append(' ')
+
+ var submit = $(' ').appendTo(tfoot);
+ cancel = $('' + I18n.t("helpers.submit.cancel") + ' ').appendTo(tfoot);
+
+ cancel.click(function(e) {
+ e.preventDefault();
+ form.toggle();
+ });
+
+ toolbar.before(form);
+ }
+
+ /*
+ 'My plans' filtering
+ */
+ var no_matches_message = $('' + I18n.t("helpers.project.filter.no_matches") + ' ').appendTo($('#dmp_table tbody')),
+ rows = $('#dmp_table tbody tr'),
+ filter = $('#filter');
+
+ filter.keyup(function() {
+ var query = $(this).val(),
+ len = query.length,
+ filter_re = new RegExp(query, 'i'),
+ matched = false;
+
+ if (len < 2) {
+ rows.show();
+ no_matches_message.hide();
+ return;
+ }
+
+ no_matches_message.hide();
+
+ rows.each(function() {
+ var row = $(this);
+ row.text().match(filter_re) ? (matched = true && row.show()) : row.hide();
+ });
+
+ if (!matched)
+ no_matches_message.show();
+ });
+
+ $('#clear_filter').click(function(e) {
+ e.preventDefault();
+
+ filter.val('');
+ rows.show();
+ no_matches_message.hide();
+ });
+
+ $('#filter_form').submit(function(e) { e.preventDefault() } );
+
+});
diff --git a/app/assets/stylesheets/active_admin.scss b/app/assets/stylesheets/active_admin.scss
index d3c61f3..b9759c9 100644
--- a/app/assets/stylesheets/active_admin.scss
+++ b/app/assets/stylesheets/active_admin.scss
@@ -1,17 +1,17 @@
-// SASS variable overrides must be declared before loading up Active Admin's styles.
-//
-// To view the variables that Active Admin provides, take a look at
-// `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
-// Active Admin source.
-//
-// For example, to change the sidebar width:
-// $sidebar-width: 242px;
-
-// Active Admin's got SASS!
-@import "active_admin/mixins";
-@import "active_admin/base";
-
-// Overriding any non-variable SASS must be done after the fact.
-// For example, to change the default status-tag color:
-//
-// .status_tag { background: #6090DB; }
+// SASS variable overrides must be declared before loading up Active Admin's styles.
+//
+// To view the variables that Active Admin provides, take a look at
+// `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
+// Active Admin source.
+//
+// For example, to change the sidebar width:
+// $sidebar-width: 242px;
+
+// Active Admin's got SASS!
+@import "active_admin/mixins";
+@import "active_admin/base";
+
+// Overriding any non-variable SASS must be done after the fact.
+// For example, to change the default status-tag color:
+//
+// .status_tag { background: #6090DB; }
diff --git a/app/assets/stylesheets/admin.css.less b/app/assets/stylesheets/admin.css.less
index 009ffa9..48be624 100644
--- a/app/assets/stylesheets/admin.css.less
+++ b/app/assets/stylesheets/admin.css.less
@@ -1704,15 +1704,5 @@
width: 140px;
float: right;
margin-left: 1px;
- }
-
-
-
-
-
-
+ }
}
-
-
-
-
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index db43a20..f4a3bdf 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1,17 +1,17 @@
-/*
- * This is a manifest file that'll be compiled into application.css, which will include all the files
- * listed below.
- *
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
- *
- * You're free to add application-wide styles to this file and they'll appear at the top of the
- * compiled file, but it's generally better to create a new file per style scope.
- *
- * require jquery.ui.all
- *= require_self
- *= require bootstrap_and_overrides
- *= require bootstrap.css
- *= require bootstrap_and_overrides.css.less
- *= require select2.css
- */
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ * require jquery.ui.all
+ *= require_self
+ *= require bootstrap_and_overrides
+ *= require bootstrap.css
+ *= require bootstrap_and_overrides.css.less
+ *= require select2.css
+ */
diff --git a/app/assets/stylesheets/bootstrap.css b/app/assets/stylesheets/bootstrap.css
index 90f0019..c69a009 100644
--- a/app/assets/stylesheets/bootstrap.css
+++ b/app/assets/stylesheets/bootstrap.css
@@ -1,11 +1,11 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-
-
+/*!
+ * Bootstrap v2.3.2
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+
diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less
index 0aac89f..08617ed 100644
--- a/app/assets/stylesheets/bootstrap_and_overrides.css.less
+++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less
@@ -175,13 +175,30 @@
margin-right: 0px;
}
-#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover{
- background-color: @orange_colour;
- color: @white_colour !important;
- font-weight: bold;
- border: 1px solid @orange_colour;
- padding: 4px 15px 4px 15px;
- text-decoration: none !important;
+#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover, lang-dropdown-link:hover{
+ background-color: @orange_colour;
+ color: @white_colour !important;
+ font-weight: bold;
+ border: 1px solid @orange_colour;
+ padding: 4px 15px 4px 15px;
+ text-decoration: none !important;
+}
+
+.caret-orange {
+ border-top: 4px solid #f49700!important;
+ border-bottom-color: #f49700!important;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+ color: #f49700;
+}
+
+a.dropdown-toggle:hover .caret-orange {
+ border-top: 4px solid white!important;
+ border-bottom-color: white!important;
+}
+
+.lang-dropdown-link {
+ margin-bottom: 0!important;
}
/********************/
@@ -704,11 +721,15 @@
float:left;
}
-#s2id_user_organisation_id{
+#s2id_user_organisation_id, #s2id_user_language_id{
min-width:84% !important;
clear:both;
float:left;
- margin: 0 0 10px 0;
+ margin: 0 0 5px 0;
+}
+
+#s2id__organisation_language_id {
+ float:none;
}
#other-org-link {
diff --git a/app/assets/stylesheets/httpd.conf b/app/assets/stylesheets/httpd.conf
index fea94bc..f473b97 100644
--- a/app/assets/stylesheets/httpd.conf
+++ b/app/assets/stylesheets/httpd.conf
@@ -1,1037 +1,1037 @@
-#
-# This is the main Apache server configuration file. It contains the
-# configuration directives that give the server its instructions.
-# See for detailed information.
-# In particular, see
-#
-# for a discussion of each configuration directive.
-#
-#
-# Do NOT simply read the instructions in here without understanding
-# what they do. They're here only as hints or reminders. If you are unsure
-# consult the online docs. You have been warned.
-#
-# The configuration directives are grouped into three basic sections:
-# 1. Directives that control the operation of the Apache server process as a
-# whole (the 'global environment').
-# 2. Directives that define the parameters of the 'main' or 'default' server,
-# which responds to requests that aren't handled by a virtual host.
-# These directives also provide default values for the settings
-# of all virtual hosts.
-# 3. Settings for virtual hosts, which allow Web requests to be sent to
-# different IP addresses or hostnames and have them handled by the
-# same Apache server process.
-#
-# Configuration and logfile names: If the filenames you specify for many
-# of the server's control files begin with "/" (or "drive:/" for Win32), the
-# server will use that explicit path. If the filenames do *not* begin
-# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
-# with ServerRoot set to "/etc/httpd" will be interpreted by the
-# server as "/etc/httpd/logs/foo.log".
-#
-
-### Section 1: Global Environment
-#
-# The directives in this section affect the overall operation of Apache,
-# such as the number of concurrent requests it can handle or where it
-# can find its configuration files.
-#
-
-#
-# Don't give away too much information about all the subcomponents
-# we are running. Comment out this line if you don't mind remote sites
-# finding out what major optional modules you are running
-ServerTokens OS
-
-#
-# ServerRoot: The top of the directory tree under which the server's
-# configuration, error, and log files are kept.
-#
-# NOTE! If you intend to place this on an NFS (or otherwise network)
-# mounted filesystem then please read the LockFile documentation
-# (available at );
-# you will save yourself a lot of trouble.
-#
-# Do NOT add a slash at the end of the directory path.
-#
-ServerRoot "/etc/httpd"
-
-#
-# PidFile: The file in which the server should record its process
-# identification number when it starts. Note the PIDFILE variable in
-# /etc/sysconfig/httpd must be set appropriately if this location is
-# changed.
-#
-PidFile run/httpd.pid
-
-#
-# Timeout: The number of seconds before receives and sends time out.
-#
-Timeout 60
-
-#
-# KeepAlive: Whether or not to allow persistent connections (more than
-# one request per connection). Set to "Off" to deactivate.
-#
-KeepAlive Off
-
-#
-# MaxKeepAliveRequests: The maximum number of requests to allow
-# during a persistent connection. Set to 0 to allow an unlimited amount.
-# We recommend you leave this number high, for maximum performance.
-#
-MaxKeepAliveRequests 100
-
-#
-# KeepAliveTimeout: Number of seconds to wait for the next request from the
-# same client on the same connection.
-#
-KeepAliveTimeout 15
-
-##
-## Server-Pool Size Regulation (MPM specific)
-##
-
-# prefork MPM
-# StartServers: number of server processes to start
-# MinSpareServers: minimum number of server processes which are kept spare
-# MaxSpareServers: maximum number of server processes which are kept spare
-# ServerLimit: maximum value for MaxClients for the lifetime of the server
-# MaxClients: maximum number of server processes allowed to start
-# MaxRequestsPerChild: maximum number of requests a server process serves
-
-StartServers 8
-MinSpareServers 5
-MaxSpareServers 20
-ServerLimit 256
-MaxClients 256
-MaxRequestsPerChild 4000
-
-
-# worker MPM
-# StartServers: initial number of server processes to start
-# MaxClients: maximum number of simultaneous client connections
-# MinSpareThreads: minimum number of worker threads which are kept spare
-# MaxSpareThreads: maximum number of worker threads which are kept spare
-# ThreadsPerChild: constant number of worker threads in each server process
-# MaxRequestsPerChild: maximum number of requests a server process serves
-
-StartServers 4
-MaxClients 300
-MinSpareThreads 25
-MaxSpareThreads 75
-ThreadsPerChild 25
-MaxRequestsPerChild 0
-
-
-#
-# Listen: Allows you to bind Apache to specific IP addresses and/or
-# ports, in addition to the default. See also the
-# directive.
-#
-# Change this to Listen on specific IP addresses as shown below to
-# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
-#
-#Listen 12.34.56.78:80
-Listen 80
-
-#
-# Dynamic Shared Object (DSO) Support
-#
-# To be able to use the functionality of a module which was built as a DSO you
-# have to place corresponding `LoadModule' lines at this location so the
-# directives contained in it are actually available _before_ they are used.
-# Statically compiled modules (those listed by `httpd -l') do not need
-# to be loaded here.
-#
-# Example:
-# LoadModule foo_module modules/mod_foo.so
-#
-LoadModule auth_basic_module modules/mod_auth_basic.so
-LoadModule auth_digest_module modules/mod_auth_digest.so
-LoadModule authn_file_module modules/mod_authn_file.so
-LoadModule authn_alias_module modules/mod_authn_alias.so
-LoadModule authn_anon_module modules/mod_authn_anon.so
-LoadModule authn_dbm_module modules/mod_authn_dbm.so
-LoadModule authn_default_module modules/mod_authn_default.so
-LoadModule authz_host_module modules/mod_authz_host.so
-LoadModule authz_user_module modules/mod_authz_user.so
-LoadModule authz_owner_module modules/mod_authz_owner.so
-LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
-LoadModule authz_dbm_module modules/mod_authz_dbm.so
-LoadModule authz_default_module modules/mod_authz_default.so
-LoadModule ldap_module modules/mod_ldap.so
-LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
-LoadModule include_module modules/mod_include.so
-LoadModule log_config_module modules/mod_log_config.so
-LoadModule logio_module modules/mod_logio.so
-LoadModule env_module modules/mod_env.so
-LoadModule ext_filter_module modules/mod_ext_filter.so
-LoadModule mime_magic_module modules/mod_mime_magic.so
-LoadModule expires_module modules/mod_expires.so
-LoadModule deflate_module modules/mod_deflate.so
-LoadModule headers_module modules/mod_headers.so
-LoadModule usertrack_module modules/mod_usertrack.so
-LoadModule setenvif_module modules/mod_setenvif.so
-LoadModule mime_module modules/mod_mime.so
-LoadModule dav_module modules/mod_dav.so
-LoadModule status_module modules/mod_status.so
-LoadModule autoindex_module modules/mod_autoindex.so
-LoadModule info_module modules/mod_info.so
-LoadModule dav_fs_module modules/mod_dav_fs.so
-LoadModule vhost_alias_module modules/mod_vhost_alias.so
-LoadModule negotiation_module modules/mod_negotiation.so
-LoadModule dir_module modules/mod_dir.so
-LoadModule actions_module modules/mod_actions.so
-LoadModule speling_module modules/mod_speling.so
-LoadModule userdir_module modules/mod_userdir.so
-LoadModule alias_module modules/mod_alias.so
-LoadModule substitute_module modules/mod_substitute.so
-LoadModule rewrite_module modules/mod_rewrite.so
-LoadModule proxy_module modules/mod_proxy.so
-LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
-LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
-LoadModule proxy_http_module modules/mod_proxy_http.so
-LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
-LoadModule proxy_connect_module modules/mod_proxy_connect.so
-LoadModule cache_module modules/mod_cache.so
-LoadModule suexec_module modules/mod_suexec.so
-LoadModule disk_cache_module modules/mod_disk_cache.so
-LoadModule cgi_module modules/mod_cgi.so
-LoadModule version_module modules/mod_version.so
-
-# Ruby on Rails Passenger mod_rails
- LoadModule passenger_module /home/dmpdev/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/buildout/apache2/mod_passenger.so
- PassengerRoot /home/dmpdev/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10
- PassengerDefaultRuby /home/dmpdev/.rvm/wrappers/ruby-2.0.0-p247/ruby
-
-#
-# The following modules are not loaded by default:
-#
-#LoadModule asis_module modules/mod_asis.so
-#LoadModule authn_dbd_module modules/mod_authn_dbd.so
-#LoadModule cern_meta_module modules/mod_cern_meta.so
-#LoadModule cgid_module modules/mod_cgid.so
-#LoadModule dbd_module modules/mod_dbd.so
-#LoadModule dumpio_module modules/mod_dumpio.so
-#LoadModule filter_module modules/mod_filter.so
-#LoadModule ident_module modules/mod_ident.so
-#LoadModule log_forensic_module modules/mod_log_forensic.so
-#LoadModule unique_id_module modules/mod_unique_id.so
-#
-
-#
-# Load config files from the config directory "/etc/httpd/conf.d".
-#
-Include conf.d/*.conf
-
-#
-# ExtendedStatus controls whether Apache will generate "full" status
-# information (ExtendedStatus On) or just basic information (ExtendedStatus
-# Off) when the "server-status" handler is called. The default is Off.
-#
-#ExtendedStatus On
-
-#
-# If you wish httpd to run as a different user or group, you must run
-# httpd as root initially and it will switch.
-#
-# User/Group: The name (or #number) of the user/group to run httpd as.
-# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
-# . On HPUX you may not be able to use shared memory as nobody, and the
-# suggested workaround is to create a user www and use that user.
-# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
-# when the value of (unsigned)Group is above 60000;
-# don't use Group #-1 on these systems!
-#
-User apache
-Group apache
-
-### Section 2: 'Main' server configuration
-#
-# The directives in this section set up the values used by the 'main'
-# server, which responds to any requests that aren't handled by a
-# definition. These values also provide defaults for
-# any containers you may define later in the file.
-#
-# All of these directives may appear inside containers,
-# in which case these default settings will be overridden for the
-# virtual host being defined.
-#
-
-#
-# ServerAdmin: Your address, where problems with the server should be
-# e-mailed. This address appears on some server-generated pages, such
-# as error documents. e.g. admin@your-domain.com
-#
-ServerAdmin root@localhost
-
-#
-# ServerName gives the name and port that the server uses to identify itself.
-# This can often be determined automatically, but we recommend you specify
-# it explicitly to prevent problems during startup.
-#
-# If this is not set to valid DNS name for your host, server-generated
-# redirections will not work. See also the UseCanonicalName directive.
-#
-# If your host doesn't have a registered DNS name, enter its IP address here.
-# You will have to access it by its address anyway, and this will make
-# redirections work in a sensible way.
-#
-#ServerName www.example.com:80
-
-#
-# UseCanonicalName: Determines how Apache constructs self-referencing
-# URLs and the SERVER_NAME and SERVER_PORT variables.
-# When set "Off", Apache will use the Hostname and Port supplied
-# by the client. When set "On", Apache will use the value of the
-# ServerName directive.
-#
-UseCanonicalName Off
-
-#
-# DocumentRoot: The directory out of which you will serve your
-# documents. By default, all requests are taken from this directory, but
-# symbolic links and aliases may be used to point to other locations.
-#
-DocumentRoot "/var/www/html"
-
-#
-# Each directory to which Apache has access can be configured with respect
-# to which services and features are allowed and/or disabled in that
-# directory (and its subdirectories).
-#
-# First, we configure the "default" to be a very restrictive set of
-# features.
-#
-
- Options FollowSymLinks
- AllowOverride None
-
-
-#
-# Note that from this point forward you must specifically allow
-# particular features to be enabled - so if something's not working as
-# you might expect, make sure that you have specifically enabled it
-# below.
-#
-
-#
-# This should be changed to whatever you set DocumentRoot to.
-#
-
-
-#
-# Possible values for the Options directive are "None", "All",
-# or any combination of:
-# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
-#
-# Note that "MultiViews" must be named *explicitly* --- "Options All"
-# doesn't give it to you.
-#
-# The Options directive is both complicated and important. Please see
-# http://httpd.apache.org/docs/2.2/mod/core.html#options
-# for more information.
-#
- Options Indexes FollowSymLinks
-
-#
-# AllowOverride controls what directives may be placed in .htaccess files.
-# It can be "All", "None", or any combination of the keywords:
-# Options FileInfo AuthConfig Limit
-#
- AllowOverride None
-
-#
-# Controls who can get stuff from this server.
-#
- Order allow,deny
- Allow from all
-
-
-
-#
-# UserDir: The name of the directory that is appended onto a user's home
-# directory if a ~user request is received.
-#
-# The path to the end user account 'public_html' directory must be
-# accessible to the webserver userid. This usually means that ~userid
-# must have permissions of 711, ~userid/public_html must have permissions
-# of 755, and documents contained therein must be world-readable.
-# Otherwise, the client will only receive a "403 Forbidden" message.
-#
-# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
-#
-
- #
- # UserDir is disabled by default since it can confirm the presence
- # of a username on the system (depending on home directory
- # permissions).
- #
- UserDir disabled
-
- #
- # To enable requests to /~user/ to serve the user's public_html
- # directory, remove the "UserDir disabled" line above, and uncomment
- # the following line instead:
- #
- #UserDir public_html
-
-
-
-#
-# Control access to UserDir directories. The following is an example
-# for a site where these directories are restricted to read-only.
-#
-#
-# AllowOverride FileInfo AuthConfig Limit
-# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
-#
-# Order allow,deny
-# Allow from all
-#
-#
-# Order deny,allow
-# Deny from all
-#
-#
-
-#
-# DirectoryIndex: sets the file that Apache will serve if a directory
-# is requested.
-#
-# The index.html.var file (a type-map) is used to deliver content-
-# negotiated documents. The MultiViews Option can be used for the
-# same purpose, but it is much slower.
-#
-DirectoryIndex index.html index.html.var
-
-#
-# AccessFileName: The name of the file to look for in each directory
-# for additional configuration directives. See also the AllowOverride
-# directive.
-#
-AccessFileName .htaccess
-
-#
-# The following lines prevent .htaccess and .htpasswd files from being
-# viewed by Web clients.
-#
-
- Order allow,deny
- Deny from all
- Satisfy All
-
-
-#
-# TypesConfig describes where the mime.types file (or equivalent) is
-# to be found.
-#
-TypesConfig /etc/mime.types
-
-#
-# DefaultType is the default MIME type the server will use for a document
-# if it cannot otherwise determine one, such as from filename extensions.
-# If your server contains mostly text or HTML documents, "text/plain" is
-# a good value. If most of your content is binary, such as applications
-# or images, you may want to use "application/octet-stream" instead to
-# keep browsers from trying to display binary files as though they are
-# text.
-#
-DefaultType text/plain
-
-#
-# The mod_mime_magic module allows the server to use various hints from the
-# contents of the file itself to determine its type. The MIMEMagicFile
-# directive tells the module where the hint definitions are located.
-#
-
-# MIMEMagicFile /usr/share/magic.mime
- MIMEMagicFile conf/magic
-
-
-#
-# HostnameLookups: Log the names of clients or just their IP addresses
-# e.g., www.apache.org (on) or 204.62.129.132 (off).
-# The default is off because it'd be overall better for the net if people
-# had to knowingly turn this feature on, since enabling it means that
-# each client request will result in AT LEAST one lookup request to the
-# nameserver.
-#
-HostnameLookups Off
-
-#
-# EnableMMAP: Control whether memory-mapping is used to deliver
-# files (assuming that the underlying OS supports it).
-# The default is on; turn this off if you serve from NFS-mounted
-# filesystems. On some systems, turning it off (regardless of
-# filesystem) can improve performance; for details, please see
-# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
-#
-#EnableMMAP off
-
-#
-# EnableSendfile: Control whether the sendfile kernel support is
-# used to deliver files (assuming that the OS supports it).
-# The default is on; turn this off if you serve from NFS-mounted
-# filesystems. Please see
-# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
-#
-#EnableSendfile off
-
-#
-# ErrorLog: The location of the error log file.
-# If you do not specify an ErrorLog directive within a
-# container, error messages relating to that virtual host will be
-# logged here. If you *do* define an error logfile for a
-# container, that host's errors will be logged there and not here.
-#
-ErrorLog logs/error_log
-
-#
-# LogLevel: Control the number of messages logged to the error_log.
-# Possible values include: debug, info, notice, warn, error, crit,
-# alert, emerg.
-#
-LogLevel warn
-
-#
-# The following directives define some format nicknames for use with
-# a CustomLog directive (see below).
-#
-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-LogFormat "%h %l %u %t \"%r\" %>s %b" common
-LogFormat "%{Referer}i -> %U" referer
-LogFormat "%{User-agent}i" agent
-
-# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
-# requires the mod_logio module to be loaded.
-#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
-
-#
-# The location and format of the access logfile (Common Logfile Format).
-# If you do not define any access logfiles within a
-# container, they will be logged here. Contrariwise, if you *do*
-# define per- access logfiles, transactions will be
-# logged therein and *not* in this file.
-#
-#CustomLog logs/access_log common
-
-#
-# If you would like to have separate agent and referer logfiles, uncomment
-# the following directives.
-#
-#CustomLog logs/referer_log referer
-#CustomLog logs/agent_log agent
-
-#
-# For a single logfile with access, agent, and referer information
-# (Combined Logfile Format), use the following directive:
-#
-CustomLog logs/access_log combined
-
-#
-# Optionally add a line containing the server version and virtual host
-# name to server-generated pages (internal error documents, FTP directory
-# listings, mod_status and mod_info output etc., but not CGI generated
-# documents or custom error documents).
-# Set to "EMail" to also include a mailto: link to the ServerAdmin.
-# Set to one of: On | Off | EMail
-#
-ServerSignature On
-
-#
-# Aliases: Add here as many aliases as you need (with no limit). The format is
-# Alias fakename realname
-#
-# Note that if you include a trailing / on fakename then the server will
-# require it to be present in the URL. So "/icons" isn't aliased in this
-# example, only "/icons/". If the fakename is slash-terminated, then the
-# realname must also be slash terminated, and if the fakename omits the
-# trailing slash, the realname must also omit it.
-#
-# We include the /icons/ alias for FancyIndexed directory listings. If you
-# do not use FancyIndexing, you may comment this out.
-#
-Alias /icons/ "/var/www/icons/"
-
-
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order allow,deny
- Allow from all
-
-
-#
-# WebDAV module configuration section.
-#
-
- # Location of the WebDAV lock database.
- DAVLockDB /var/lib/dav/lockdb
-
-
-#
-# ScriptAlias: This controls which directories contain server scripts.
-# ScriptAliases are essentially the same as Aliases, except that
-# documents in the realname directory are treated as applications and
-# run by the server when requested rather than as documents sent to the client.
-# The same rules about trailing "/" apply to ScriptAlias directives as to
-# Alias.
-#
-ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
-
-#
-# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
-# CGI directory exists, if you have that configured.
-#
-
- AllowOverride None
- Options None
- Order allow,deny
- Allow from all
-
-
-#
-# Redirect allows you to tell clients about documents which used to exist in
-# your server's namespace, but do not anymore. This allows you to tell the
-# clients where to look for the relocated document.
-# Example:
-# Redirect permanent /foo http://www.example.com/bar
-
-#
-# Directives controlling the display of server-generated directory listings.
-#
-
-#
-# IndexOptions: Controls the appearance of server-generated directory
-# listings.
-#
-IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
-
-#
-# AddIcon* directives tell the server which icon to show for different
-# files or filename extensions. These are only displayed for
-# FancyIndexed directories.
-#
-AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
-
-AddIconByType (TXT,/icons/text.gif) text/*
-AddIconByType (IMG,/icons/image2.gif) image/*
-AddIconByType (SND,/icons/sound2.gif) audio/*
-AddIconByType (VID,/icons/movie.gif) video/*
-
-AddIcon /icons/binary.gif .bin .exe
-AddIcon /icons/binhex.gif .hqx
-AddIcon /icons/tar.gif .tar
-AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
-AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
-AddIcon /icons/a.gif .ps .ai .eps
-AddIcon /icons/layout.gif .html .shtml .htm .pdf
-AddIcon /icons/text.gif .txt
-AddIcon /icons/c.gif .c
-AddIcon /icons/p.gif .pl .py
-AddIcon /icons/f.gif .for
-AddIcon /icons/dvi.gif .dvi
-AddIcon /icons/uuencoded.gif .uu
-AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
-AddIcon /icons/tex.gif .tex
-AddIcon /icons/bomb.gif core
-
-AddIcon /icons/back.gif ..
-AddIcon /icons/hand.right.gif README
-AddIcon /icons/folder.gif ^^DIRECTORY^^
-AddIcon /icons/blank.gif ^^BLANKICON^^
-
-#
-# DefaultIcon is which icon to show for files which do not have an icon
-# explicitly set.
-#
-DefaultIcon /icons/unknown.gif
-
-#
-# AddDescription allows you to place a short description after a file in
-# server-generated indexes. These are only displayed for FancyIndexed
-# directories.
-# Format: AddDescription "description" filename
-#
-#AddDescription "GZIP compressed document" .gz
-#AddDescription "tar archive" .tar
-#AddDescription "GZIP compressed tar archive" .tgz
-
-#
-# ReadmeName is the name of the README file the server will look for by
-# default, and append to directory listings.
-#
-# HeaderName is the name of a file which should be prepended to
-# directory indexes.
-ReadmeName README.html
-HeaderName HEADER.html
-
-#
-# IndexIgnore is a set of filenames which directory indexing should ignore
-# and not include in the listing. Shell-style wildcarding is permitted.
-#
-IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
-
-#
-# DefaultLanguage and AddLanguage allows you to specify the language of
-# a document. You can then use content negotiation to give a browser a
-# file in a language the user can understand.
-#
-# Specify a default language. This means that all data
-# going out without a specific language tag (see below) will
-# be marked with this one. You probably do NOT want to set
-# this unless you are sure it is correct for all cases.
-#
-# * It is generally better to not mark a page as
-# * being a certain language than marking it with the wrong
-# * language!
-#
-# DefaultLanguage nl
-#
-# Note 1: The suffix does not have to be the same as the language
-# keyword --- those with documents in Polish (whose net-standard
-# language code is pl) may wish to use "AddLanguage pl .po" to
-# avoid the ambiguity with the common suffix for perl scripts.
-#
-# Note 2: The example entries below illustrate that in some cases
-# the two character 'Language' abbreviation is not identical to
-# the two character 'Country' code for its country,
-# E.g. 'Danmark/dk' versus 'Danish/da'.
-#
-# Note 3: In the case of 'ltz' we violate the RFC by using a three char
-# specifier. There is 'work in progress' to fix this and get
-# the reference data for rfc1766 cleaned up.
-#
-# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
-# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
-# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
-# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
-# Norwegian (no) - Polish (pl) - Portugese (pt)
-# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
-# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
-#
-AddLanguage ca .ca
-AddLanguage cs .cz .cs
-AddLanguage da .dk
-AddLanguage de .de
-AddLanguage el .el
-AddLanguage en .en
-AddLanguage eo .eo
-AddLanguage es .es
-AddLanguage et .et
-AddLanguage fr .fr
-AddLanguage he .he
-AddLanguage hr .hr
-AddLanguage it .it
-AddLanguage ja .ja
-AddLanguage ko .ko
-AddLanguage ltz .ltz
-AddLanguage nl .nl
-AddLanguage nn .nn
-AddLanguage no .no
-AddLanguage pl .po
-AddLanguage pt .pt
-AddLanguage pt-BR .pt-br
-AddLanguage ru .ru
-AddLanguage sv .sv
-AddLanguage zh-CN .zh-cn
-AddLanguage zh-TW .zh-tw
-
-#
-# LanguagePriority allows you to give precedence to some languages
-# in case of a tie during content negotiation.
-#
-# Just list the languages in decreasing order of preference. We have
-# more or less alphabetized them here. You probably want to change this.
-#
-LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
-
-#
-# ForceLanguagePriority allows you to serve a result page rather than
-# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
-# [in case no accepted languages matched the available variants]
-#
-ForceLanguagePriority Prefer Fallback
-
-#
-# Specify a default charset for all content served; this enables
-# interpretation of all content as UTF-8 by default. To use the
-# default browser choice (ISO-8859-1), or to allow the META tags
-# in HTML content to override this choice, comment out this
-# directive:
-#
-AddDefaultCharset UTF-8
-
-#
-# AddType allows you to add to or override the MIME configuration
-# file mime.types for specific file types.
-#
-#AddType application/x-tar .tgz
-
-#
-# AddEncoding allows you to have certain browsers uncompress
-# information on the fly. Note: Not all browsers support this.
-# Despite the name similarity, the following Add* directives have nothing
-# to do with the FancyIndexing customization directives above.
-#
-#AddEncoding x-compress .Z
-#AddEncoding x-gzip .gz .tgz
-
-# If the AddEncoding directives above are commented-out, then you
-# probably should define those extensions to indicate media types:
-#
-AddType application/x-compress .Z
-AddType application/x-gzip .gz .tgz
-
-#
-# MIME-types for downloading Certificates and CRLs
-#
-AddType application/x-x509-ca-cert .crt
-AddType application/x-pkcs7-crl .crl
-
-#
-# AddHandler allows you to map certain file extensions to "handlers":
-# actions unrelated to filetype. These can be either built into the server
-# or added with the Action directive (see below)
-#
-# To use CGI scripts outside of ScriptAliased directories:
-# (You will also need to add "ExecCGI" to the "Options" directive.)
-#
-#AddHandler cgi-script .cgi
-
-#
-# For files that include their own HTTP headers:
-#
-#AddHandler send-as-is asis
-
-#
-# For type maps (negotiated resources):
-# (This is enabled by default to allow the Apache "It Worked" page
-# to be distributed in multiple languages.)
-#
-AddHandler type-map var
-
-#
-# Filters allow you to process content before it is sent to the client.
-#
-# To parse .shtml files for server-side includes (SSI):
-# (You will also need to add "Includes" to the "Options" directive.)
-#
-AddType text/html .shtml
-AddOutputFilter INCLUDES .shtml
-
-#
-# Action lets you define media types that will execute a script whenever
-# a matching file is called. This eliminates the need for repeated URL
-# pathnames for oft-used CGI file processors.
-# Format: Action media/type /cgi-script/location
-# Format: Action handler-name /cgi-script/location
-#
-
-#
-# Customizable error responses come in three flavors:
-# 1) plain text 2) local redirects 3) external redirects
-#
-# Some examples:
-#ErrorDocument 500 "The server made a boo boo."
-#ErrorDocument 404 /missing.html
-#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
-#ErrorDocument 402 http://www.example.com/subscription_info.html
-#
-
-#
-# Putting this all together, we can internationalize error responses.
-#
-# We use Alias to redirect any /error/HTTP_.html.var response to
-# our collection of by-error message multi-language collections. We use
-# includes to substitute the appropriate text.
-#
-# You can modify the messages' appearance without changing any of the
-# default HTTP_.html.var files by adding the line:
-#
-# Alias /error/include/ "/your/include/path/"
-#
-# which allows you to create your own set of files by starting with the
-# /var/www/error/include/ files and
-# copying them to /your/include/path/, even on a per-VirtualHost basis.
-#
-
-Alias /error/ "/var/www/error/"
-
-
-
-
- AllowOverride None
- Options IncludesNoExec
- AddOutputFilter Includes html
- AddHandler type-map var
- Order allow,deny
- Allow from all
- LanguagePriority en es de fr
- ForceLanguagePriority Prefer Fallback
-
-
-# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
-# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
-# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
-# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
-# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
-# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
-# ErrorDocument 410 /error/HTTP_GONE.html.var
-# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
-# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
-# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
-# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
-# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
-# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
-# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
-# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
-# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
-# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
-
-
-
-
-#
-# The following directives modify normal HTTP response behavior to
-# handle known problems with browser implementations.
-#
-BrowserMatch "Mozilla/2" nokeepalive
-BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
-BrowserMatch "RealPlayer 4\.0" force-response-1.0
-BrowserMatch "Java/1\.0" force-response-1.0
-BrowserMatch "JDK/1\.0" force-response-1.0
-
-#
-# The following directive disables redirects on non-GET requests for
-# a directory that does not include the trailing slash. This fixes a
-# problem with Microsoft WebFolders which does not appropriately handle
-# redirects for folders with DAV methods.
-# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
-#
-BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
-BrowserMatch "MS FrontPage" redirect-carefully
-BrowserMatch "^WebDrive" redirect-carefully
-BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
-BrowserMatch "^gnome-vfs/1.0" redirect-carefully
-BrowserMatch "^XML Spy" redirect-carefully
-BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
-
-#
-# Allow server status reports generated by mod_status,
-# with the URL of http://servername/server-status
-# Change the ".example.com" to match your domain to enable.
-#
-#
-# SetHandler server-status
-# Order deny,allow
-# Deny from all
-# Allow from .example.com
-#
-
-#
-# Allow remote server configuration reports, with the URL of
-# http://servername/server-info (requires that mod_info.c be loaded).
-# Change the ".example.com" to match your domain to enable.
-#
-#
-# SetHandler server-info
-# Order deny,allow
-# Deny from all
-# Allow from .example.com
-#
-
-#
-# Proxy Server directives. Uncomment the following lines to
-# enable the proxy server:
-#
-#
-#ProxyRequests On
-#
-#
-# Order deny,allow
-# Deny from all
-# Allow from .example.com
-#
-
-#
-# Enable/disable the handling of HTTP/1.1 "Via:" headers.
-# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
-# Set to one of: Off | On | Full | Block
-#
-#ProxyVia On
-
-#
-# To enable a cache of proxied content, uncomment the following lines.
-# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
-#
-#
-# CacheEnable disk /
-# CacheRoot "/var/cache/mod_proxy"
-#
-#
-
-#
-# End of proxy directives.
-
-### Section 3: Virtual Hosts
-#
-# VirtualHost: If you want to maintain multiple domains/hostnames on your
-# machine you can setup VirtualHost containers for them. Most configurations
-# use only name-based virtual hosts so the server doesn't need to worry about
-# IP addresses. This is indicated by the asterisks in the directives below.
-#
-# Please see the documentation at
-#
-# for further details before you try to setup virtual hosts.
-#
-# You may use the command line option '-S' to verify your virtual host
-# configuration.
-
-#
-# Use name-based virtual hosting.
-#
-#NameVirtualHost *:80
-#
-# NOTE: NameVirtualHost cannot be used without a port specifier
-# (e.g. :80) if mod_ssl is being used, due to the nature of the
-# SSL protocol.
-#
-
-#
-# VirtualHost example:
-# Almost any Apache directive may go into a VirtualHost container.
-# The first VirtualHost section is used for requests without a known
-# server name.
-#
-#
-# ServerAdmin webmaster@dummy-host.example.com
-# DocumentRoot /www/docs/dummy-host.example.com
-# ServerName dummy-host.example.com
-# ErrorLog logs/dummy-host.example.com-error_log
-# CustomLog logs/dummy-host.example.com-access_log common
-#
-
-#NameVirtualHost *:80
-#
-
- ServerName dmponline-test.dcc.ac.uk
- # !!! Be sure to point DocumentRoot to 'public'!
- DocumentRoot /var/www/html/dmponline_v4/public
- Alias /maintenance/ "/var/www/html/maintenance/"
- ErrorDocument 403 /maintenance/403.html
-
- Order Deny,Allow
- # Always open to allow serving of 403 error page
- Deny from none
- Allow from all
-
-
- Options -MultiViews
- RewriteEngine On
- RewriteRule ^/?(.*)$ https://dmponline-test.dcc.ac.uk/$1 [QSA,R=permanent] # This relaxes Apache security settings.
- AllowOverride all
-
-
-
+#
+# This is the main Apache server configuration file. It contains the
+# configuration directives that give the server its instructions.
+# See for detailed information.
+# In particular, see
+#
+# for a discussion of each configuration directive.
+#
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do. They're here only as hints or reminders. If you are unsure
+# consult the online docs. You have been warned.
+#
+# The configuration directives are grouped into three basic sections:
+# 1. Directives that control the operation of the Apache server process as a
+# whole (the 'global environment').
+# 2. Directives that define the parameters of the 'main' or 'default' server,
+# which responds to requests that aren't handled by a virtual host.
+# These directives also provide default values for the settings
+# of all virtual hosts.
+# 3. Settings for virtual hosts, which allow Web requests to be sent to
+# different IP addresses or hostnames and have them handled by the
+# same Apache server process.
+#
+# Configuration and logfile names: If the filenames you specify for many
+# of the server's control files begin with "/" (or "drive:/" for Win32), the
+# server will use that explicit path. If the filenames do *not* begin
+# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
+# with ServerRoot set to "/etc/httpd" will be interpreted by the
+# server as "/etc/httpd/logs/foo.log".
+#
+
+### Section 1: Global Environment
+#
+# The directives in this section affect the overall operation of Apache,
+# such as the number of concurrent requests it can handle or where it
+# can find its configuration files.
+#
+
+#
+# Don't give away too much information about all the subcomponents
+# we are running. Comment out this line if you don't mind remote sites
+# finding out what major optional modules you are running
+ServerTokens OS
+
+#
+# ServerRoot: The top of the directory tree under which the server's
+# configuration, error, and log files are kept.
+#
+# NOTE! If you intend to place this on an NFS (or otherwise network)
+# mounted filesystem then please read the LockFile documentation
+# (available at );
+# you will save yourself a lot of trouble.
+#
+# Do NOT add a slash at the end of the directory path.
+#
+ServerRoot "/etc/httpd"
+
+#
+# PidFile: The file in which the server should record its process
+# identification number when it starts. Note the PIDFILE variable in
+# /etc/sysconfig/httpd must be set appropriately if this location is
+# changed.
+#
+PidFile run/httpd.pid
+
+#
+# Timeout: The number of seconds before receives and sends time out.
+#
+Timeout 60
+
+#
+# KeepAlive: Whether or not to allow persistent connections (more than
+# one request per connection). Set to "Off" to deactivate.
+#
+KeepAlive Off
+
+#
+# MaxKeepAliveRequests: The maximum number of requests to allow
+# during a persistent connection. Set to 0 to allow an unlimited amount.
+# We recommend you leave this number high, for maximum performance.
+#
+MaxKeepAliveRequests 100
+
+#
+# KeepAliveTimeout: Number of seconds to wait for the next request from the
+# same client on the same connection.
+#
+KeepAliveTimeout 15
+
+##
+## Server-Pool Size Regulation (MPM specific)
+##
+
+# prefork MPM
+# StartServers: number of server processes to start
+# MinSpareServers: minimum number of server processes which are kept spare
+# MaxSpareServers: maximum number of server processes which are kept spare
+# ServerLimit: maximum value for MaxClients for the lifetime of the server
+# MaxClients: maximum number of server processes allowed to start
+# MaxRequestsPerChild: maximum number of requests a server process serves
+
+StartServers 8
+MinSpareServers 5
+MaxSpareServers 20
+ServerLimit 256
+MaxClients 256
+MaxRequestsPerChild 4000
+
+
+# worker MPM
+# StartServers: initial number of server processes to start
+# MaxClients: maximum number of simultaneous client connections
+# MinSpareThreads: minimum number of worker threads which are kept spare
+# MaxSpareThreads: maximum number of worker threads which are kept spare
+# ThreadsPerChild: constant number of worker threads in each server process
+# MaxRequestsPerChild: maximum number of requests a server process serves
+
+StartServers 4
+MaxClients 300
+MinSpareThreads 25
+MaxSpareThreads 75
+ThreadsPerChild 25
+MaxRequestsPerChild 0
+
+
+#
+# Listen: Allows you to bind Apache to specific IP addresses and/or
+# ports, in addition to the default. See also the
+# directive.
+#
+# Change this to Listen on specific IP addresses as shown below to
+# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
+#
+#Listen 12.34.56.78:80
+Listen 80
+
+#
+# Dynamic Shared Object (DSO) Support
+#
+# To be able to use the functionality of a module which was built as a DSO you
+# have to place corresponding `LoadModule' lines at this location so the
+# directives contained in it are actually available _before_ they are used.
+# Statically compiled modules (those listed by `httpd -l') do not need
+# to be loaded here.
+#
+# Example:
+# LoadModule foo_module modules/mod_foo.so
+#
+LoadModule auth_basic_module modules/mod_auth_basic.so
+LoadModule auth_digest_module modules/mod_auth_digest.so
+LoadModule authn_file_module modules/mod_authn_file.so
+LoadModule authn_alias_module modules/mod_authn_alias.so
+LoadModule authn_anon_module modules/mod_authn_anon.so
+LoadModule authn_dbm_module modules/mod_authn_dbm.so
+LoadModule authn_default_module modules/mod_authn_default.so
+LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule authz_user_module modules/mod_authz_user.so
+LoadModule authz_owner_module modules/mod_authz_owner.so
+LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
+LoadModule authz_dbm_module modules/mod_authz_dbm.so
+LoadModule authz_default_module modules/mod_authz_default.so
+LoadModule ldap_module modules/mod_ldap.so
+LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
+LoadModule include_module modules/mod_include.so
+LoadModule log_config_module modules/mod_log_config.so
+LoadModule logio_module modules/mod_logio.so
+LoadModule env_module modules/mod_env.so
+LoadModule ext_filter_module modules/mod_ext_filter.so
+LoadModule mime_magic_module modules/mod_mime_magic.so
+LoadModule expires_module modules/mod_expires.so
+LoadModule deflate_module modules/mod_deflate.so
+LoadModule headers_module modules/mod_headers.so
+LoadModule usertrack_module modules/mod_usertrack.so
+LoadModule setenvif_module modules/mod_setenvif.so
+LoadModule mime_module modules/mod_mime.so
+LoadModule dav_module modules/mod_dav.so
+LoadModule status_module modules/mod_status.so
+LoadModule autoindex_module modules/mod_autoindex.so
+LoadModule info_module modules/mod_info.so
+LoadModule dav_fs_module modules/mod_dav_fs.so
+LoadModule vhost_alias_module modules/mod_vhost_alias.so
+LoadModule negotiation_module modules/mod_negotiation.so
+LoadModule dir_module modules/mod_dir.so
+LoadModule actions_module modules/mod_actions.so
+LoadModule speling_module modules/mod_speling.so
+LoadModule userdir_module modules/mod_userdir.so
+LoadModule alias_module modules/mod_alias.so
+LoadModule substitute_module modules/mod_substitute.so
+LoadModule rewrite_module modules/mod_rewrite.so
+LoadModule proxy_module modules/mod_proxy.so
+LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
+LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
+LoadModule proxy_http_module modules/mod_proxy_http.so
+LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
+LoadModule proxy_connect_module modules/mod_proxy_connect.so
+LoadModule cache_module modules/mod_cache.so
+LoadModule suexec_module modules/mod_suexec.so
+LoadModule disk_cache_module modules/mod_disk_cache.so
+LoadModule cgi_module modules/mod_cgi.so
+LoadModule version_module modules/mod_version.so
+
+# Ruby on Rails Passenger mod_rails
+ LoadModule passenger_module /home/dmpdev/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/buildout/apache2/mod_passenger.so
+ PassengerRoot /home/dmpdev/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10
+ PassengerDefaultRuby /home/dmpdev/.rvm/wrappers/ruby-2.0.0-p247/ruby
+
+#
+# The following modules are not loaded by default:
+#
+#LoadModule asis_module modules/mod_asis.so
+#LoadModule authn_dbd_module modules/mod_authn_dbd.so
+#LoadModule cern_meta_module modules/mod_cern_meta.so
+#LoadModule cgid_module modules/mod_cgid.so
+#LoadModule dbd_module modules/mod_dbd.so
+#LoadModule dumpio_module modules/mod_dumpio.so
+#LoadModule filter_module modules/mod_filter.so
+#LoadModule ident_module modules/mod_ident.so
+#LoadModule log_forensic_module modules/mod_log_forensic.so
+#LoadModule unique_id_module modules/mod_unique_id.so
+#
+
+#
+# Load config files from the config directory "/etc/httpd/conf.d".
+#
+Include conf.d/*.conf
+
+#
+# ExtendedStatus controls whether Apache will generate "full" status
+# information (ExtendedStatus On) or just basic information (ExtendedStatus
+# Off) when the "server-status" handler is called. The default is Off.
+#
+#ExtendedStatus On
+
+#
+# If you wish httpd to run as a different user or group, you must run
+# httpd as root initially and it will switch.
+#
+# User/Group: The name (or #number) of the user/group to run httpd as.
+# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
+# . On HPUX you may not be able to use shared memory as nobody, and the
+# suggested workaround is to create a user www and use that user.
+# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
+# when the value of (unsigned)Group is above 60000;
+# don't use Group #-1 on these systems!
+#
+User apache
+Group apache
+
+### Section 2: 'Main' server configuration
+#
+# The directives in this section set up the values used by the 'main'
+# server, which responds to any requests that aren't handled by a
+# definition. These values also provide defaults for
+# any containers you may define later in the file.
+#
+# All of these directives may appear inside containers,
+# in which case these default settings will be overridden for the
+# virtual host being defined.
+#
+
+#
+# ServerAdmin: Your address, where problems with the server should be
+# e-mailed. This address appears on some server-generated pages, such
+# as error documents. e.g. admin@your-domain.com
+#
+ServerAdmin root@localhost
+
+#
+# ServerName gives the name and port that the server uses to identify itself.
+# This can often be determined automatically, but we recommend you specify
+# it explicitly to prevent problems during startup.
+#
+# If this is not set to valid DNS name for your host, server-generated
+# redirections will not work. See also the UseCanonicalName directive.
+#
+# If your host doesn't have a registered DNS name, enter its IP address here.
+# You will have to access it by its address anyway, and this will make
+# redirections work in a sensible way.
+#
+#ServerName www.example.com:80
+
+#
+# UseCanonicalName: Determines how Apache constructs self-referencing
+# URLs and the SERVER_NAME and SERVER_PORT variables.
+# When set "Off", Apache will use the Hostname and Port supplied
+# by the client. When set "On", Apache will use the value of the
+# ServerName directive.
+#
+UseCanonicalName Off
+
+#
+# DocumentRoot: The directory out of which you will serve your
+# documents. By default, all requests are taken from this directory, but
+# symbolic links and aliases may be used to point to other locations.
+#
+DocumentRoot "/var/www/html"
+
+#
+# Each directory to which Apache has access can be configured with respect
+# to which services and features are allowed and/or disabled in that
+# directory (and its subdirectories).
+#
+# First, we configure the "default" to be a very restrictive set of
+# features.
+#
+
+ Options FollowSymLinks
+ AllowOverride None
+
+
+#
+# Note that from this point forward you must specifically allow
+# particular features to be enabled - so if something's not working as
+# you might expect, make sure that you have specifically enabled it
+# below.
+#
+
+#
+# This should be changed to whatever you set DocumentRoot to.
+#
+
+
+#
+# Possible values for the Options directive are "None", "All",
+# or any combination of:
+# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
+#
+# Note that "MultiViews" must be named *explicitly* --- "Options All"
+# doesn't give it to you.
+#
+# The Options directive is both complicated and important. Please see
+# http://httpd.apache.org/docs/2.2/mod/core.html#options
+# for more information.
+#
+ Options Indexes FollowSymLinks
+
+#
+# AllowOverride controls what directives may be placed in .htaccess files.
+# It can be "All", "None", or any combination of the keywords:
+# Options FileInfo AuthConfig Limit
+#
+ AllowOverride None
+
+#
+# Controls who can get stuff from this server.
+#
+ Order allow,deny
+ Allow from all
+
+
+
+#
+# UserDir: The name of the directory that is appended onto a user's home
+# directory if a ~user request is received.
+#
+# The path to the end user account 'public_html' directory must be
+# accessible to the webserver userid. This usually means that ~userid
+# must have permissions of 711, ~userid/public_html must have permissions
+# of 755, and documents contained therein must be world-readable.
+# Otherwise, the client will only receive a "403 Forbidden" message.
+#
+# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
+#
+
+ #
+ # UserDir is disabled by default since it can confirm the presence
+ # of a username on the system (depending on home directory
+ # permissions).
+ #
+ UserDir disabled
+
+ #
+ # To enable requests to /~user/ to serve the user's public_html
+ # directory, remove the "UserDir disabled" line above, and uncomment
+ # the following line instead:
+ #
+ #UserDir public_html
+
+
+
+#
+# Control access to UserDir directories. The following is an example
+# for a site where these directories are restricted to read-only.
+#
+#
+# AllowOverride FileInfo AuthConfig Limit
+# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+#
+# Order allow,deny
+# Allow from all
+#
+#
+# Order deny,allow
+# Deny from all
+#
+#
+
+#
+# DirectoryIndex: sets the file that Apache will serve if a directory
+# is requested.
+#
+# The index.html.var file (a type-map) is used to deliver content-
+# negotiated documents. The MultiViews Option can be used for the
+# same purpose, but it is much slower.
+#
+DirectoryIndex index.html index.html.var
+
+#
+# AccessFileName: The name of the file to look for in each directory
+# for additional configuration directives. See also the AllowOverride
+# directive.
+#
+AccessFileName .htaccess
+
+#
+# The following lines prevent .htaccess and .htpasswd files from being
+# viewed by Web clients.
+#
+
+ Order allow,deny
+ Deny from all
+ Satisfy All
+
+
+#
+# TypesConfig describes where the mime.types file (or equivalent) is
+# to be found.
+#
+TypesConfig /etc/mime.types
+
+#
+# DefaultType is the default MIME type the server will use for a document
+# if it cannot otherwise determine one, such as from filename extensions.
+# If your server contains mostly text or HTML documents, "text/plain" is
+# a good value. If most of your content is binary, such as applications
+# or images, you may want to use "application/octet-stream" instead to
+# keep browsers from trying to display binary files as though they are
+# text.
+#
+DefaultType text/plain
+
+#
+# The mod_mime_magic module allows the server to use various hints from the
+# contents of the file itself to determine its type. The MIMEMagicFile
+# directive tells the module where the hint definitions are located.
+#
+
+# MIMEMagicFile /usr/share/magic.mime
+ MIMEMagicFile conf/magic
+
+
+#
+# HostnameLookups: Log the names of clients or just their IP addresses
+# e.g., www.apache.org (on) or 204.62.129.132 (off).
+# The default is off because it'd be overall better for the net if people
+# had to knowingly turn this feature on, since enabling it means that
+# each client request will result in AT LEAST one lookup request to the
+# nameserver.
+#
+HostnameLookups Off
+
+#
+# EnableMMAP: Control whether memory-mapping is used to deliver
+# files (assuming that the underlying OS supports it).
+# The default is on; turn this off if you serve from NFS-mounted
+# filesystems. On some systems, turning it off (regardless of
+# filesystem) can improve performance; for details, please see
+# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
+#
+#EnableMMAP off
+
+#
+# EnableSendfile: Control whether the sendfile kernel support is
+# used to deliver files (assuming that the OS supports it).
+# The default is on; turn this off if you serve from NFS-mounted
+# filesystems. Please see
+# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
+#
+#EnableSendfile off
+
+#
+# ErrorLog: The location of the error log file.
+# If you do not specify an ErrorLog directive within a
+# container, error messages relating to that virtual host will be
+# logged here. If you *do* define an error logfile for a
+# container, that host's errors will be logged there and not here.
+#
+ErrorLog logs/error_log
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+#
+# The following directives define some format nicknames for use with
+# a CustomLog directive (see below).
+#
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %b" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+
+# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
+# requires the mod_logio module to be loaded.
+#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
+
+#
+# The location and format of the access logfile (Common Logfile Format).
+# If you do not define any access logfiles within a
+# container, they will be logged here. Contrariwise, if you *do*
+# define per- access logfiles, transactions will be
+# logged therein and *not* in this file.
+#
+#CustomLog logs/access_log common
+
+#
+# If you would like to have separate agent and referer logfiles, uncomment
+# the following directives.
+#
+#CustomLog logs/referer_log referer
+#CustomLog logs/agent_log agent
+
+#
+# For a single logfile with access, agent, and referer information
+# (Combined Logfile Format), use the following directive:
+#
+CustomLog logs/access_log combined
+
+#
+# Optionally add a line containing the server version and virtual host
+# name to server-generated pages (internal error documents, FTP directory
+# listings, mod_status and mod_info output etc., but not CGI generated
+# documents or custom error documents).
+# Set to "EMail" to also include a mailto: link to the ServerAdmin.
+# Set to one of: On | Off | EMail
+#
+ServerSignature On
+
+#
+# Aliases: Add here as many aliases as you need (with no limit). The format is
+# Alias fakename realname
+#
+# Note that if you include a trailing / on fakename then the server will
+# require it to be present in the URL. So "/icons" isn't aliased in this
+# example, only "/icons/". If the fakename is slash-terminated, then the
+# realname must also be slash terminated, and if the fakename omits the
+# trailing slash, the realname must also omit it.
+#
+# We include the /icons/ alias for FancyIndexed directory listings. If you
+# do not use FancyIndexing, you may comment this out.
+#
+Alias /icons/ "/var/www/icons/"
+
+
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+
+#
+# WebDAV module configuration section.
+#
+
+ # Location of the WebDAV lock database.
+ DAVLockDB /var/lib/dav/lockdb
+
+
+#
+# ScriptAlias: This controls which directories contain server scripts.
+# ScriptAliases are essentially the same as Aliases, except that
+# documents in the realname directory are treated as applications and
+# run by the server when requested rather than as documents sent to the client.
+# The same rules about trailing "/" apply to ScriptAlias directives as to
+# Alias.
+#
+ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
+
+#
+# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
+# CGI directory exists, if you have that configured.
+#
+
+ AllowOverride None
+ Options None
+ Order allow,deny
+ Allow from all
+
+
+#
+# Redirect allows you to tell clients about documents which used to exist in
+# your server's namespace, but do not anymore. This allows you to tell the
+# clients where to look for the relocated document.
+# Example:
+# Redirect permanent /foo http://www.example.com/bar
+
+#
+# Directives controlling the display of server-generated directory listings.
+#
+
+#
+# IndexOptions: Controls the appearance of server-generated directory
+# listings.
+#
+IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
+
+#
+# AddIcon* directives tell the server which icon to show for different
+# files or filename extensions. These are only displayed for
+# FancyIndexed directories.
+#
+AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
+
+AddIconByType (TXT,/icons/text.gif) text/*
+AddIconByType (IMG,/icons/image2.gif) image/*
+AddIconByType (SND,/icons/sound2.gif) audio/*
+AddIconByType (VID,/icons/movie.gif) video/*
+
+AddIcon /icons/binary.gif .bin .exe
+AddIcon /icons/binhex.gif .hqx
+AddIcon /icons/tar.gif .tar
+AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
+AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
+AddIcon /icons/a.gif .ps .ai .eps
+AddIcon /icons/layout.gif .html .shtml .htm .pdf
+AddIcon /icons/text.gif .txt
+AddIcon /icons/c.gif .c
+AddIcon /icons/p.gif .pl .py
+AddIcon /icons/f.gif .for
+AddIcon /icons/dvi.gif .dvi
+AddIcon /icons/uuencoded.gif .uu
+AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
+AddIcon /icons/tex.gif .tex
+AddIcon /icons/bomb.gif core
+
+AddIcon /icons/back.gif ..
+AddIcon /icons/hand.right.gif README
+AddIcon /icons/folder.gif ^^DIRECTORY^^
+AddIcon /icons/blank.gif ^^BLANKICON^^
+
+#
+# DefaultIcon is which icon to show for files which do not have an icon
+# explicitly set.
+#
+DefaultIcon /icons/unknown.gif
+
+#
+# AddDescription allows you to place a short description after a file in
+# server-generated indexes. These are only displayed for FancyIndexed
+# directories.
+# Format: AddDescription "description" filename
+#
+#AddDescription "GZIP compressed document" .gz
+#AddDescription "tar archive" .tar
+#AddDescription "GZIP compressed tar archive" .tgz
+
+#
+# ReadmeName is the name of the README file the server will look for by
+# default, and append to directory listings.
+#
+# HeaderName is the name of a file which should be prepended to
+# directory indexes.
+ReadmeName README.html
+HeaderName HEADER.html
+
+#
+# IndexIgnore is a set of filenames which directory indexing should ignore
+# and not include in the listing. Shell-style wildcarding is permitted.
+#
+IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
+
+#
+# DefaultLanguage and AddLanguage allows you to specify the language of
+# a document. You can then use content negotiation to give a browser a
+# file in a language the user can understand.
+#
+# Specify a default language. This means that all data
+# going out without a specific language tag (see below) will
+# be marked with this one. You probably do NOT want to set
+# this unless you are sure it is correct for all cases.
+#
+# * It is generally better to not mark a page as
+# * being a certain language than marking it with the wrong
+# * language!
+#
+# DefaultLanguage nl
+#
+# Note 1: The suffix does not have to be the same as the language
+# keyword --- those with documents in Polish (whose net-standard
+# language code is pl) may wish to use "AddLanguage pl .po" to
+# avoid the ambiguity with the common suffix for perl scripts.
+#
+# Note 2: The example entries below illustrate that in some cases
+# the two character 'Language' abbreviation is not identical to
+# the two character 'Country' code for its country,
+# E.g. 'Danmark/dk' versus 'Danish/da'.
+#
+# Note 3: In the case of 'ltz' we violate the RFC by using a three char
+# specifier. There is 'work in progress' to fix this and get
+# the reference data for rfc1766 cleaned up.
+#
+# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
+# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
+# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
+# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
+# Norwegian (no) - Polish (pl) - Portugese (pt)
+# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
+# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
+#
+AddLanguage ca .ca
+AddLanguage cs .cz .cs
+AddLanguage da .dk
+AddLanguage de .de
+AddLanguage el .el
+AddLanguage en .en
+AddLanguage eo .eo
+AddLanguage es .es
+AddLanguage et .et
+AddLanguage fr .fr
+AddLanguage he .he
+AddLanguage hr .hr
+AddLanguage it .it
+AddLanguage ja .ja
+AddLanguage ko .ko
+AddLanguage ltz .ltz
+AddLanguage nl .nl
+AddLanguage nn .nn
+AddLanguage no .no
+AddLanguage pl .po
+AddLanguage pt .pt
+AddLanguage pt-BR .pt-br
+AddLanguage ru .ru
+AddLanguage sv .sv
+AddLanguage zh-CN .zh-cn
+AddLanguage zh-TW .zh-tw
+
+#
+# LanguagePriority allows you to give precedence to some languages
+# in case of a tie during content negotiation.
+#
+# Just list the languages in decreasing order of preference. We have
+# more or less alphabetized them here. You probably want to change this.
+#
+LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
+
+#
+# ForceLanguagePriority allows you to serve a result page rather than
+# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
+# [in case no accepted languages matched the available variants]
+#
+ForceLanguagePriority Prefer Fallback
+
+#
+# Specify a default charset for all content served; this enables
+# interpretation of all content as UTF-8 by default. To use the
+# default browser choice (ISO-8859-1), or to allow the META tags
+# in HTML content to override this choice, comment out this
+# directive:
+#
+AddDefaultCharset UTF-8
+
+#
+# AddType allows you to add to or override the MIME configuration
+# file mime.types for specific file types.
+#
+#AddType application/x-tar .tgz
+
+#
+# AddEncoding allows you to have certain browsers uncompress
+# information on the fly. Note: Not all browsers support this.
+# Despite the name similarity, the following Add* directives have nothing
+# to do with the FancyIndexing customization directives above.
+#
+#AddEncoding x-compress .Z
+#AddEncoding x-gzip .gz .tgz
+
+# If the AddEncoding directives above are commented-out, then you
+# probably should define those extensions to indicate media types:
+#
+AddType application/x-compress .Z
+AddType application/x-gzip .gz .tgz
+
+#
+# MIME-types for downloading Certificates and CRLs
+#
+AddType application/x-x509-ca-cert .crt
+AddType application/x-pkcs7-crl .crl
+
+#
+# AddHandler allows you to map certain file extensions to "handlers":
+# actions unrelated to filetype. These can be either built into the server
+# or added with the Action directive (see below)
+#
+# To use CGI scripts outside of ScriptAliased directories:
+# (You will also need to add "ExecCGI" to the "Options" directive.)
+#
+#AddHandler cgi-script .cgi
+
+#
+# For files that include their own HTTP headers:
+#
+#AddHandler send-as-is asis
+
+#
+# For type maps (negotiated resources):
+# (This is enabled by default to allow the Apache "It Worked" page
+# to be distributed in multiple languages.)
+#
+AddHandler type-map var
+
+#
+# Filters allow you to process content before it is sent to the client.
+#
+# To parse .shtml files for server-side includes (SSI):
+# (You will also need to add "Includes" to the "Options" directive.)
+#
+AddType text/html .shtml
+AddOutputFilter INCLUDES .shtml
+
+#
+# Action lets you define media types that will execute a script whenever
+# a matching file is called. This eliminates the need for repeated URL
+# pathnames for oft-used CGI file processors.
+# Format: Action media/type /cgi-script/location
+# Format: Action handler-name /cgi-script/location
+#
+
+#
+# Customizable error responses come in three flavors:
+# 1) plain text 2) local redirects 3) external redirects
+#
+# Some examples:
+#ErrorDocument 500 "The server made a boo boo."
+#ErrorDocument 404 /missing.html
+#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
+#ErrorDocument 402 http://www.example.com/subscription_info.html
+#
+
+#
+# Putting this all together, we can internationalize error responses.
+#
+# We use Alias to redirect any /error/HTTP_.html.var response to
+# our collection of by-error message multi-language collections. We use
+# includes to substitute the appropriate text.
+#
+# You can modify the messages' appearance without changing any of the
+# default HTTP_.html.var files by adding the line:
+#
+# Alias /error/include/ "/your/include/path/"
+#
+# which allows you to create your own set of files by starting with the
+# /var/www/error/include/ files and
+# copying them to /your/include/path/, even on a per-VirtualHost basis.
+#
+
+Alias /error/ "/var/www/error/"
+
+
+
+
+ AllowOverride None
+ Options IncludesNoExec
+ AddOutputFilter Includes html
+ AddHandler type-map var
+ Order allow,deny
+ Allow from all
+ LanguagePriority en es de fr
+ ForceLanguagePriority Prefer Fallback
+
+
+# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
+# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
+# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
+# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
+# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
+# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
+# ErrorDocument 410 /error/HTTP_GONE.html.var
+# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
+# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
+# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
+# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
+# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
+# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
+# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
+# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
+# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
+# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
+
+
+
+
+#
+# The following directives modify normal HTTP response behavior to
+# handle known problems with browser implementations.
+#
+BrowserMatch "Mozilla/2" nokeepalive
+BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
+BrowserMatch "RealPlayer 4\.0" force-response-1.0
+BrowserMatch "Java/1\.0" force-response-1.0
+BrowserMatch "JDK/1\.0" force-response-1.0
+
+#
+# The following directive disables redirects on non-GET requests for
+# a directory that does not include the trailing slash. This fixes a
+# problem with Microsoft WebFolders which does not appropriately handle
+# redirects for folders with DAV methods.
+# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
+#
+BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
+BrowserMatch "MS FrontPage" redirect-carefully
+BrowserMatch "^WebDrive" redirect-carefully
+BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
+BrowserMatch "^gnome-vfs/1.0" redirect-carefully
+BrowserMatch "^XML Spy" redirect-carefully
+BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
+
+#
+# Allow server status reports generated by mod_status,
+# with the URL of http://servername/server-status
+# Change the ".example.com" to match your domain to enable.
+#
+#
+# SetHandler server-status
+# Order deny,allow
+# Deny from all
+# Allow from .example.com
+#
+
+#
+# Allow remote server configuration reports, with the URL of
+# http://servername/server-info (requires that mod_info.c be loaded).
+# Change the ".example.com" to match your domain to enable.
+#
+#
+# SetHandler server-info
+# Order deny,allow
+# Deny from all
+# Allow from .example.com
+#
+
+#
+# Proxy Server directives. Uncomment the following lines to
+# enable the proxy server:
+#
+#
+#ProxyRequests On
+#
+#
+# Order deny,allow
+# Deny from all
+# Allow from .example.com
+#
+
+#
+# Enable/disable the handling of HTTP/1.1 "Via:" headers.
+# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
+# Set to one of: Off | On | Full | Block
+#
+#ProxyVia On
+
+#
+# To enable a cache of proxied content, uncomment the following lines.
+# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
+#
+#
+# CacheEnable disk /
+# CacheRoot "/var/cache/mod_proxy"
+#
+#
+
+#
+# End of proxy directives.
+
+### Section 3: Virtual Hosts
+#
+# VirtualHost: If you want to maintain multiple domains/hostnames on your
+# machine you can setup VirtualHost containers for them. Most configurations
+# use only name-based virtual hosts so the server doesn't need to worry about
+# IP addresses. This is indicated by the asterisks in the directives below.
+#
+# Please see the documentation at
+#
+# for further details before you try to setup virtual hosts.
+#
+# You may use the command line option '-S' to verify your virtual host
+# configuration.
+
+#
+# Use name-based virtual hosting.
+#
+#NameVirtualHost *:80
+#
+# NOTE: NameVirtualHost cannot be used without a port specifier
+# (e.g. :80) if mod_ssl is being used, due to the nature of the
+# SSL protocol.
+#
+
+#
+# VirtualHost example:
+# Almost any Apache directive may go into a VirtualHost container.
+# The first VirtualHost section is used for requests without a known
+# server name.
+#
+#
+# ServerAdmin webmaster@dummy-host.example.com
+# DocumentRoot /www/docs/dummy-host.example.com
+# ServerName dummy-host.example.com
+# ErrorLog logs/dummy-host.example.com-error_log
+# CustomLog logs/dummy-host.example.com-access_log common
+#
+
+#NameVirtualHost *:80
+#
+
+ ServerName dmponline-test.dcc.ac.uk
+ # !!! Be sure to point DocumentRoot to 'public'!
+ DocumentRoot /var/www/html/dmponline_v4/public
+ Alias /maintenance/ "/var/www/html/maintenance/"
+ ErrorDocument 403 /maintenance/403.html
+
+ Order Deny,Allow
+ # Always open to allow serving of 403 error page
+ Deny from none
+ Allow from all
+
+
+ Options -MultiViews
+ RewriteEngine On
+ RewriteRule ^/?(.*)$ https://dmponline-test.dcc.ac.uk/$1 [QSA,R=permanent] # This relaxes Apache security settings.
+ AllowOverride all
+
+
+
diff --git a/app/assets/stylesheets/select2.css b/app/assets/stylesheets/select2.css
index 5ee2f77..2fc34c9 100644
--- a/app/assets/stylesheets/select2.css
+++ b/app/assets/stylesheets/select2.css
@@ -1,641 +1,641 @@
-/*
-Version: 3.4.2 Timestamp Mon Aug 12 15:04:12 PDT 2013
-*/
-.select2-container {
- margin: 0;
- position: relative;
- display: inline-block;
- /* inline-block for ie7 */
- zoom: 1;
- *display: inline;
- vertical-align: middle;
-}
-
-.select2-container,
-.select2-drop,
-.select2-search,
-.select2-search input {
- /*
- Force border-box so that % widths fit the parent
- container without overlap because of margin/padding.
-
- More Info : http://www.quirksmode.org/css/box.html
- */
- -webkit-box-sizing: border-box; /* webkit */
- -moz-box-sizing: border-box; /* firefox */
- box-sizing: border-box; /* css3 */
-}
-
-.select2-container .select2-choice {
- display: block;
- height: 26px;
- padding: 0 0 0 8px;
- overflow: hidden;
- position: relative;
-
- border: 1px solid #aaa;
- white-space: nowrap;
- line-height: 26px;
- color: #444;
- text-decoration: none;
-
- border-radius: 4px;
-
- background-clip: padding-box;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-
- background-color: #fff;
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
- background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
- background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
- background-image: -o-linear-gradient(bottom, #eee 0%, #fff 50%);
- background-image: -ms-linear-gradient(top, #fff 0%, #eee 50%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
- background-image: linear-gradient(top, #fff 0%, #eee 50%);
-}
-
-.select2-container .select2-chosen {
- color: #444444;
-}
-
-.select2-container.select2-drop-above .select2-choice {
- border-bottom-color: #aaa;
-
- border-radius: 0 0 4px 4px;
-
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
- background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
- background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
- background-image: -o-linear-gradient(bottom, #eee 0%, #fff 90%);
- background-image: -ms-linear-gradient(top, #eee 0%, #fff 90%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- background-image: linear-gradient(top, #eee 0%, #fff 90%);
-}
-
-.select2-container.select2-allowclear .select2-choice .select2-chosen {
- margin-right: 42px;
-}
-
-.select2-container .select2-choice > .select2-chosen {
- margin-right: 26px;
- display: block;
- overflow: hidden;
-
- white-space: nowrap;
-
- text-overflow: ellipsis;
-}
-
-.select2-container .select2-choice abbr {
- display: none;
- width: 12px;
- height: 12px;
- position: absolute;
- right: 24px;
- top: 8px;
-
- font-size: 1px;
- text-decoration: none;
-
- border: 0;
- background: url('/assets/select2.png') right top no-repeat;
- cursor: pointer;
- outline: 0;
-}
-
-.select2-container.select2-allowclear .select2-choice abbr {
- display: inline-block;
-}
-
-.select2-container .select2-choice abbr:hover {
- background-position: right -11px;
- cursor: pointer;
-}
-
-.select2-drop-mask {
- border: 0;
- margin: 0;
- padding: 0;
- position: fixed;
- left: 0;
- top: 0;
- min-height: 100%;
- min-width: 100%;
- height: auto;
- width: auto;
- opacity: 0;
- z-index: 9998;
- /* styles required for IE to work */
- background-color: #fff;
- opacity: 0;
- filter: alpha(opacity=0);
-}
-
-.select2-drop {
- width: 100%;
- margin-top: -1px;
- position: absolute;
- z-index: 9999;
- top: 100%;
-
- background: #fff;
- color: #000;
- border: 1px solid #aaa;
- border-top: 0;
-
- border-radius: 0 0 4px 4px;
-
- -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
- box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
-}
-
-.select2-drop-auto-width {
- border-top: 1px solid #aaa;
- width: auto;
-}
-
-.select2-drop-auto-width .select2-search {
- padding-top: 4px;
-}
-
-.select2-drop.select2-drop-above {
- margin-top: 1px;
- border-top: 1px solid #aaa;
- border-bottom: 0;
-
- border-radius: 4px 4px 0 0;
-
- -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
- box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
-}
-
-.select2-drop-active {
- border: 1px solid #5897fb;
- border-top: none;
-}
-
-.select2-drop.select2-drop-above.select2-drop-active {
- border-top: 1px solid #5897fb;
-}
-
-.select2-container .select2-choice .select2-arrow {
- display: inline-block;
- width: 18px;
- height: 100%;
- position: absolute;
- right: 0;
- top: 0;
-
- border-left: 1px solid #aaa;
- border-radius: 0 4px 4px 0;
-
- background-clip: padding-box;
-
- background: #ccc;
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
- background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
- background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
- background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
- background-image: -ms-linear-gradient(top, #ccc 0%, #eee 60%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
- background-image: linear-gradient(top, #ccc 0%, #eee 60%);
-}
-
-.select2-container .select2-choice .select2-arrow b {
- display: block;
- width: 100%;
- height: 100%;
- background: url('/assets/select2.png') no-repeat 0 1px;
-}
-
-.select2-search {
- display: inline-block;
- width: 100%;
- min-height: 26px;
- margin: 0;
- padding-left: 4px;
- padding-right: 4px;
-
- position: relative;
- z-index: 10000;
-
- white-space: nowrap;
-}
-
-.select2-search input {
- width: 100%;
- height: auto !important;
- min-height: 26px;
- padding: 4px 20px 4px 5px;
- margin: 0;
-
- outline: 0;
- font-family: sans-serif;
- font-size: 1em;
-
- border: 1px solid #aaa;
- border-radius: 0;
-
- -webkit-box-shadow: none;
- box-shadow: none;
-
- background: #fff url('/assets/select2.png') no-repeat 100% -22px;
- background: url('/assets/select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
- background: url('/assets/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
- background: url('/assets/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
- background: url('/assets/select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, #fff 85%, #eee 99%);
- background: url('/assets/select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #fff 85%, #eee 99%);
- background: url('/assets/select2.png') no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
-}
-
-.select2-drop.select2-drop-above .select2-search input {
- margin-top: 4px;
-}
-
-.select2-search input.select2-active {
- background: #fff url('/assets/select2-spinner.gif') no-repeat 100%;
- background: url('/assets/select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
- background: url('/assets/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
- background: url('/assets/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
- background: url('/assets/select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, #fff 85%, #eee 99%);
- background: url('/assets/select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #fff 85%, #eee 99%);
- background: url('/assets/select2-spinner.gif') no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
-}
-
-.select2-container-active .select2-choice,
-.select2-container-active .select2-choices {
- border: 1px solid #5897fb;
- outline: none;
-
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
- box-shadow: 0 0 5px rgba(0, 0, 0, .3);
-}
-
-.select2-dropdown-open .select2-choice {
- border-bottom-color: transparent;
- -webkit-box-shadow: 0 1px 0 #fff inset;
- box-shadow: 0 1px 0 #fff inset;
-
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
-
- background-color: #eee;
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
- background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
- background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
- background-image: -o-linear-gradient(bottom, #fff 0%, #eee 50%);
- background-image: -ms-linear-gradient(top, #fff 0%, #eee 50%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
- background-image: linear-gradient(top, #fff 0%, #eee 50%);
-}
-
-.select2-dropdown-open.select2-drop-above .select2-choice,
-.select2-dropdown-open.select2-drop-above .select2-choices {
- border: 1px solid #5897fb;
- border-top-color: transparent;
-
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
- background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
- background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
- background-image: -o-linear-gradient(top, #fff 0%, #eee 50%);
- background-image: -ms-linear-gradient(bottom, #fff 0%, #eee 50%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
- background-image: linear-gradient(bottom, #fff 0%, #eee 50%);
-}
-
-.select2-dropdown-open .select2-choice .select2-arrow {
- background: transparent;
- border-left: none;
- filter: none;
-}
-.select2-dropdown-open .select2-choice .select2-arrow b {
- background-position: -18px 1px;
-}
-
-/* results */
-.select2-results {
- max-height: 200px;
- padding: 0 0 0 4px;
- margin: 4px 4px 4px 0;
- position: relative;
- overflow-x: hidden;
- overflow-y: auto;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-.select2-results ul.select2-result-sub {
- margin: 0;
- padding-left: 0;
-}
-
-.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
-.select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
-.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
-.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
-.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
-.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
-.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
-
-.select2-results li {
- list-style: none;
- display: list-item;
- background-image: none;
-}
-
-.select2-results li.select2-result-with-children > .select2-result-label {
- font-weight: bold;
-}
-
-.select2-results .select2-result-label {
- padding: 3px 7px 4px;
- margin: 0;
- cursor: pointer;
-
- min-height: 1em;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.select2-results .select2-highlighted {
- background: #3875d7;
- color: #fff;
-}
-
-.select2-results li em {
- background: #feffde;
- font-style: normal;
-}
-
-.select2-results .select2-highlighted em {
- background: transparent;
-}
-
-.select2-results .select2-highlighted ul {
- background: #fff;
- color: #000;
-}
-
-
-.select2-results .select2-no-results,
-.select2-results .select2-searching,
-.select2-results .select2-selection-limit {
- background: #f4f4f4;
- display: list-item;
-}
-
-/*
-disabled look for disabled choices in the results dropdown
-*/
-.select2-results .select2-disabled.select2-highlighted {
- color: #666;
- background: #f4f4f4;
- display: list-item;
- cursor: default;
-}
-.select2-results .select2-disabled {
- background: #f4f4f4;
- display: list-item;
- cursor: default;
-}
-
-.select2-results .select2-selected {
- display: none;
-}
-
-.select2-more-results.select2-active {
- background: #f4f4f4 url('/assets/select2-spinner.gif') no-repeat 100%;
-}
-
-.select2-more-results {
- background: #f4f4f4;
- display: list-item;
-}
-
-/* disabled styles */
-
-.select2-container.select2-container-disabled .select2-choice {
- background-color: #f4f4f4;
- background-image: none;
- border: 1px solid #ddd;
- cursor: default;
-}
-
-.select2-container.select2-container-disabled .select2-choice .select2-arrow {
- background-color: #f4f4f4;
- background-image: none;
- border-left: 0;
-}
-
-.select2-container.select2-container-disabled .select2-choice abbr {
- display: none;
-}
-
-
-/* multiselect */
-
-.select2-container-multi .select2-choices {
- height: auto !important;
- height: 1%;
- margin: 0;
- padding: 0;
- position: relative;
-
- border: 1px solid #aaa;
- cursor: text;
- overflow: hidden;
-
- background-color: #fff;
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
- background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
- background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
- background-image: -o-linear-gradient(top, #eee 1%, #fff 15%);
- background-image: -ms-linear-gradient(top, #eee 1%, #fff 15%);
- background-image: linear-gradient(top, #eee 1%, #fff 15%);
-}
-
-.select2-locked {
- padding: 3px 5px 3px 5px !important;
-}
-
-.select2-container-multi .select2-choices {
- min-height: 26px;
-}
-
-.select2-container-multi.select2-container-active .select2-choices {
- border: 1px solid #5897fb;
- outline: none;
-
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
- box-shadow: 0 0 5px rgba(0, 0, 0, .3);
-}
-.select2-container-multi .select2-choices li {
- float: left;
- list-style: none;
-}
-.select2-container-multi .select2-choices .select2-search-field {
- margin: 0;
- padding: 0;
- white-space: nowrap;
-}
-
-.select2-container-multi .select2-choices .select2-search-field input {
- padding: 5px;
- margin: 1px 0;
-
- font-family: sans-serif;
- font-size: 100%;
- color: #666;
- outline: 0;
- border: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- background: transparent !important;
-}
-
-.select2-container-multi .select2-choices .select2-search-field input.select2-active {
- background: #fff url('/assets/select2-spinner.gif') no-repeat 100% !important;
-}
-
-.select2-default {
- color: #999 !important;
-}
-
-.select2-container-multi .select2-choices .select2-search-choice {
- padding: 3px 5px 3px 18px;
- margin: 3px 0 3px 5px;
- position: relative;
-
- line-height: 13px;
- color: #333;
- cursor: default;
- border: 1px solid #aaaaaa;
-
- border-radius: 3px;
-
- -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
- box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
-
- background-clip: padding-box;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-
- background-color: #e4e4e4;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
- background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
-}
-.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
- cursor: default;
-}
-.select2-container-multi .select2-choices .select2-search-choice-focus {
- background: #d4d4d4;
-}
-
-.select2-search-choice-close {
- display: block;
- width: 12px;
- height: 13px;
- position: absolute;
- right: 3px;
- top: 4px;
-
- font-size: 1px;
- outline: none;
- background: url('/assets/select2.png') right top no-repeat;
-}
-
-.select2-container-multi .select2-search-choice-close {
- left: 3px;
-}
-
-.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
- background-position: right -11px;
-}
-.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
- background-position: right -11px;
-}
-
-/* disabled styles */
-.select2-container-multi.select2-container-disabled .select2-choices {
- background-color: #f4f4f4;
- background-image: none;
- border: 1px solid #ddd;
- cursor: default;
-}
-
-.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
- padding: 3px 5px 3px 5px;
- border: 1px solid #ddd;
- background-image: none;
- background-color: #f4f4f4;
-}
-
-.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
- background: none;
-}
-/* end multiselect */
-
-
-.select2-result-selectable .select2-match,
-.select2-result-unselectable .select2-match {
- text-decoration: underline;
-}
-
-.select2-offscreen, .select2-offscreen:focus {
- clip: rect(0 0 0 0) !important;
- width: 1px !important;
- height: 1px !important;
- border: 0 !important;
- margin: 0 !important;
- padding: 0 !important;
- overflow: hidden !important;
- position: absolute !important;
- outline: 0 !important;
- left: 0px !important;
- top: 0px !important;
-}
-
-.select2-display-none {
- display: none;
-}
-
-.select2-measure-scrollbar {
- position: absolute;
- top: -10000px;
- left: -10000px;
- width: 100px;
- height: 100px;
- overflow: scroll;
-}
-/* Retina-ize icons */
-
-@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
- .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
- background-image: url('/assets/select2x2.png') !important;
- background-repeat: no-repeat !important;
- background-size: 60px 40px !important;
- }
- .select2-search input {
- background-position: 100% -21px !important;
- }
-}
+/*
+Version: 3.4.2 Timestamp Mon Aug 12 15:04:12 PDT 2013
+*/
+.select2-container {
+ margin: 0;
+ position: relative;
+ display: inline-block;
+ /* inline-block for ie7 */
+ zoom: 1;
+ *display: inline;
+ vertical-align: middle;
+}
+
+.select2-container,
+.select2-drop,
+.select2-search,
+.select2-search input {
+ /*
+ Force border-box so that % widths fit the parent
+ container without overlap because of margin/padding.
+
+ More Info : http://www.quirksmode.org/css/box.html
+ */
+ -webkit-box-sizing: border-box; /* webkit */
+ -moz-box-sizing: border-box; /* firefox */
+ box-sizing: border-box; /* css3 */
+}
+
+.select2-container .select2-choice {
+ display: block;
+ height: 26px;
+ padding: 0 0 0 8px;
+ overflow: hidden;
+ position: relative;
+
+ border: 1px solid #aaa;
+ white-space: nowrap;
+ line-height: 26px;
+ color: #444;
+ text-decoration: none;
+
+ border-radius: 4px;
+
+ background-clip: padding-box;
+
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+
+ background-color: #fff;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
+ background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
+ background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
+ background-image: -o-linear-gradient(bottom, #eee 0%, #fff 50%);
+ background-image: -ms-linear-gradient(top, #fff 0%, #eee 50%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
+ background-image: linear-gradient(top, #fff 0%, #eee 50%);
+}
+
+.select2-container .select2-chosen {
+ color: #444444;
+}
+
+.select2-container.select2-drop-above .select2-choice {
+ border-bottom-color: #aaa;
+
+ border-radius: 0 0 4px 4px;
+
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
+ background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
+ background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
+ background-image: -o-linear-gradient(bottom, #eee 0%, #fff 90%);
+ background-image: -ms-linear-gradient(top, #eee 0%, #fff 90%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
+ background-image: linear-gradient(top, #eee 0%, #fff 90%);
+}
+
+.select2-container.select2-allowclear .select2-choice .select2-chosen {
+ margin-right: 42px;
+}
+
+.select2-container .select2-choice > .select2-chosen {
+ margin-right: 26px;
+ display: block;
+ overflow: hidden;
+
+ white-space: nowrap;
+
+ text-overflow: ellipsis;
+}
+
+.select2-container .select2-choice abbr {
+ display: none;
+ width: 12px;
+ height: 12px;
+ position: absolute;
+ right: 24px;
+ top: 8px;
+
+ font-size: 1px;
+ text-decoration: none;
+
+ border: 0;
+ background: url('/assets/select2.png') right top no-repeat;
+ cursor: pointer;
+ outline: 0;
+}
+
+.select2-container.select2-allowclear .select2-choice abbr {
+ display: inline-block;
+}
+
+.select2-container .select2-choice abbr:hover {
+ background-position: right -11px;
+ cursor: pointer;
+}
+
+.select2-drop-mask {
+ border: 0;
+ margin: 0;
+ padding: 0;
+ position: fixed;
+ left: 0;
+ top: 0;
+ min-height: 100%;
+ min-width: 100%;
+ height: auto;
+ width: auto;
+ opacity: 0;
+ z-index: 9998;
+ /* styles required for IE to work */
+ background-color: #fff;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+
+.select2-drop {
+ width: 100%;
+ margin-top: -1px;
+ position: absolute;
+ z-index: 9999;
+ top: 100%;
+
+ background: #fff;
+ color: #000;
+ border: 1px solid #aaa;
+ border-top: 0;
+
+ border-radius: 0 0 4px 4px;
+
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
+ box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
+}
+
+.select2-drop-auto-width {
+ border-top: 1px solid #aaa;
+ width: auto;
+}
+
+.select2-drop-auto-width .select2-search {
+ padding-top: 4px;
+}
+
+.select2-drop.select2-drop-above {
+ margin-top: 1px;
+ border-top: 1px solid #aaa;
+ border-bottom: 0;
+
+ border-radius: 4px 4px 0 0;
+
+ -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
+ box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
+}
+
+.select2-drop-active {
+ border: 1px solid #5897fb;
+ border-top: none;
+}
+
+.select2-drop.select2-drop-above.select2-drop-active {
+ border-top: 1px solid #5897fb;
+}
+
+.select2-container .select2-choice .select2-arrow {
+ display: inline-block;
+ width: 18px;
+ height: 100%;
+ position: absolute;
+ right: 0;
+ top: 0;
+
+ border-left: 1px solid #aaa;
+ border-radius: 0 4px 4px 0;
+
+ background-clip: padding-box;
+
+ background: #ccc;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
+ background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
+ background-image: -ms-linear-gradient(top, #ccc 0%, #eee 60%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
+ background-image: linear-gradient(top, #ccc 0%, #eee 60%);
+}
+
+.select2-container .select2-choice .select2-arrow b {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background: url('/assets/select2.png') no-repeat 0 1px;
+}
+
+.select2-search {
+ display: inline-block;
+ width: 100%;
+ min-height: 26px;
+ margin: 0;
+ padding-left: 4px;
+ padding-right: 4px;
+
+ position: relative;
+ z-index: 10000;
+
+ white-space: nowrap;
+}
+
+.select2-search input {
+ width: 100%;
+ height: auto !important;
+ min-height: 26px;
+ padding: 4px 20px 4px 5px;
+ margin: 0;
+
+ outline: 0;
+ font-family: sans-serif;
+ font-size: 1em;
+
+ border: 1px solid #aaa;
+ border-radius: 0;
+
+ -webkit-box-shadow: none;
+ box-shadow: none;
+
+ background: #fff url('/assets/select2.png') no-repeat 100% -22px;
+ background: url('/assets/select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
+ background: url('/assets/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
+ background: url('/assets/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
+ background: url('/assets/select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, #fff 85%, #eee 99%);
+ background: url('/assets/select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #fff 85%, #eee 99%);
+ background: url('/assets/select2.png') no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
+}
+
+.select2-drop.select2-drop-above .select2-search input {
+ margin-top: 4px;
+}
+
+.select2-search input.select2-active {
+ background: #fff url('/assets/select2-spinner.gif') no-repeat 100%;
+ background: url('/assets/select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
+ background: url('/assets/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
+ background: url('/assets/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
+ background: url('/assets/select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, #fff 85%, #eee 99%);
+ background: url('/assets/select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #fff 85%, #eee 99%);
+ background: url('/assets/select2-spinner.gif') no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
+}
+
+.select2-container-active .select2-choice,
+.select2-container-active .select2-choices {
+ border: 1px solid #5897fb;
+ outline: none;
+
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+ box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+}
+
+.select2-dropdown-open .select2-choice {
+ border-bottom-color: transparent;
+ -webkit-box-shadow: 0 1px 0 #fff inset;
+ box-shadow: 0 1px 0 #fff inset;
+
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+
+ background-color: #eee;
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
+ background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
+ background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
+ background-image: -o-linear-gradient(bottom, #fff 0%, #eee 50%);
+ background-image: -ms-linear-gradient(top, #fff 0%, #eee 50%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
+ background-image: linear-gradient(top, #fff 0%, #eee 50%);
+}
+
+.select2-dropdown-open.select2-drop-above .select2-choice,
+.select2-dropdown-open.select2-drop-above .select2-choices {
+ border: 1px solid #5897fb;
+ border-top-color: transparent;
+
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
+ background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
+ background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
+ background-image: -o-linear-gradient(top, #fff 0%, #eee 50%);
+ background-image: -ms-linear-gradient(bottom, #fff 0%, #eee 50%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
+ background-image: linear-gradient(bottom, #fff 0%, #eee 50%);
+}
+
+.select2-dropdown-open .select2-choice .select2-arrow {
+ background: transparent;
+ border-left: none;
+ filter: none;
+}
+.select2-dropdown-open .select2-choice .select2-arrow b {
+ background-position: -18px 1px;
+}
+
+/* results */
+.select2-results {
+ max-height: 200px;
+ padding: 0 0 0 4px;
+ margin: 4px 4px 4px 0;
+ position: relative;
+ overflow-x: hidden;
+ overflow-y: auto;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+.select2-results ul.select2-result-sub {
+ margin: 0;
+ padding-left: 0;
+}
+
+.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
+.select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
+.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
+.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
+.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
+.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
+.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
+
+.select2-results li {
+ list-style: none;
+ display: list-item;
+ background-image: none;
+}
+
+.select2-results li.select2-result-with-children > .select2-result-label {
+ font-weight: bold;
+}
+
+.select2-results .select2-result-label {
+ padding: 3px 7px 4px;
+ margin: 0;
+ cursor: pointer;
+
+ min-height: 1em;
+
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.select2-results .select2-highlighted {
+ background: #3875d7;
+ color: #fff;
+}
+
+.select2-results li em {
+ background: #feffde;
+ font-style: normal;
+}
+
+.select2-results .select2-highlighted em {
+ background: transparent;
+}
+
+.select2-results .select2-highlighted ul {
+ background: #fff;
+ color: #000;
+}
+
+
+.select2-results .select2-no-results,
+.select2-results .select2-searching,
+.select2-results .select2-selection-limit {
+ background: #f4f4f4;
+ display: list-item;
+}
+
+/*
+disabled look for disabled choices in the results dropdown
+*/
+.select2-results .select2-disabled.select2-highlighted {
+ color: #666;
+ background: #f4f4f4;
+ display: list-item;
+ cursor: default;
+}
+.select2-results .select2-disabled {
+ background: #f4f4f4;
+ display: list-item;
+ cursor: default;
+}
+
+.select2-results .select2-selected {
+ display: none;
+}
+
+.select2-more-results.select2-active {
+ background: #f4f4f4 url('/assets/select2-spinner.gif') no-repeat 100%;
+}
+
+.select2-more-results {
+ background: #f4f4f4;
+ display: list-item;
+}
+
+/* disabled styles */
+
+.select2-container.select2-container-disabled .select2-choice {
+ background-color: #f4f4f4;
+ background-image: none;
+ border: 1px solid #ddd;
+ cursor: default;
+}
+
+.select2-container.select2-container-disabled .select2-choice .select2-arrow {
+ background-color: #f4f4f4;
+ background-image: none;
+ border-left: 0;
+}
+
+.select2-container.select2-container-disabled .select2-choice abbr {
+ display: none;
+}
+
+
+/* multiselect */
+
+.select2-container-multi .select2-choices {
+ height: auto !important;
+ height: 1%;
+ margin: 0;
+ padding: 0;
+ position: relative;
+
+ border: 1px solid #aaa;
+ cursor: text;
+ overflow: hidden;
+
+ background-color: #fff;
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
+ background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
+ background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
+ background-image: -o-linear-gradient(top, #eee 1%, #fff 15%);
+ background-image: -ms-linear-gradient(top, #eee 1%, #fff 15%);
+ background-image: linear-gradient(top, #eee 1%, #fff 15%);
+}
+
+.select2-locked {
+ padding: 3px 5px 3px 5px !important;
+}
+
+.select2-container-multi .select2-choices {
+ min-height: 26px;
+}
+
+.select2-container-multi.select2-container-active .select2-choices {
+ border: 1px solid #5897fb;
+ outline: none;
+
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+ box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+}
+.select2-container-multi .select2-choices li {
+ float: left;
+ list-style: none;
+}
+.select2-container-multi .select2-choices .select2-search-field {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+
+.select2-container-multi .select2-choices .select2-search-field input {
+ padding: 5px;
+ margin: 1px 0;
+
+ font-family: sans-serif;
+ font-size: 100%;
+ color: #666;
+ outline: 0;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ background: transparent !important;
+}
+
+.select2-container-multi .select2-choices .select2-search-field input.select2-active {
+ background: #fff url('/assets/select2-spinner.gif') no-repeat 100% !important;
+}
+
+.select2-default {
+ color: #999 !important;
+}
+
+.select2-container-multi .select2-choices .select2-search-choice {
+ padding: 3px 5px 3px 18px;
+ margin: 3px 0 3px 5px;
+ position: relative;
+
+ line-height: 13px;
+ color: #333;
+ cursor: default;
+ border: 1px solid #aaaaaa;
+
+ border-radius: 3px;
+
+ -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
+
+ background-clip: padding-box;
+
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+
+ background-color: #e4e4e4;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+ background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
+}
+.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
+ cursor: default;
+}
+.select2-container-multi .select2-choices .select2-search-choice-focus {
+ background: #d4d4d4;
+}
+
+.select2-search-choice-close {
+ display: block;
+ width: 12px;
+ height: 13px;
+ position: absolute;
+ right: 3px;
+ top: 4px;
+
+ font-size: 1px;
+ outline: none;
+ background: url('/assets/select2.png') right top no-repeat;
+}
+
+.select2-container-multi .select2-search-choice-close {
+ left: 3px;
+}
+
+.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
+ background-position: right -11px;
+}
+.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
+ background-position: right -11px;
+}
+
+/* disabled styles */
+.select2-container-multi.select2-container-disabled .select2-choices {
+ background-color: #f4f4f4;
+ background-image: none;
+ border: 1px solid #ddd;
+ cursor: default;
+}
+
+.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
+ padding: 3px 5px 3px 5px;
+ border: 1px solid #ddd;
+ background-image: none;
+ background-color: #f4f4f4;
+}
+
+.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
+ background: none;
+}
+/* end multiselect */
+
+
+.select2-result-selectable .select2-match,
+.select2-result-unselectable .select2-match {
+ text-decoration: underline;
+}
+
+.select2-offscreen, .select2-offscreen:focus {
+ clip: rect(0 0 0 0) !important;
+ width: 1px !important;
+ height: 1px !important;
+ border: 0 !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ overflow: hidden !important;
+ position: absolute !important;
+ outline: 0 !important;
+ left: 0px !important;
+ top: 0px !important;
+}
+
+.select2-display-none {
+ display: none;
+}
+
+.select2-measure-scrollbar {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 100px;
+ height: 100px;
+ overflow: scroll;
+}
+/* Retina-ize icons */
+
+@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
+ .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
+ background-image: url('/assets/select2x2.png') !important;
+ background-repeat: no-repeat !important;
+ background-size: 60px 40px !important;
+ }
+ .select2-search input {
+ background-position: 100% -21px !important;
+ }
+}
diff --git a/app/assets/videos/index.files/html5video/.htaccess b/app/assets/videos/index.files/html5video/.htaccess
index e79adac..98147a7 100644
--- a/app/assets/videos/index.files/html5video/.htaccess
+++ b/app/assets/videos/index.files/html5video/.htaccess
@@ -1,5 +1,5 @@
-AddType video/ogg .ogv
-AddType video/mp4 .mp4
-AddType video/mp4 .m4v
-AddType video/webm .webm
-SetEnvIfNoCase Request_URI \.(ogv|mp4|m4v|webm)$ no-gzip dont-vary
+AddType video/ogg .ogv
+AddType video/mp4 .mp4
+AddType video/mp4 .m4v
+AddType video/webm .webm
+SetEnvIfNoCase Request_URI \.(ogv|mp4|m4v|webm)$ no-gzip dont-vary
diff --git a/app/assets/videos/index.files/html5video/html5ext.js b/app/assets/videos/index.files/html5video/html5ext.js
index e8e1a51..de28896 100644
--- a/app/assets/videos/index.files/html5video/html5ext.js
+++ b/app/assets/videos/index.files/html5video/html5ext.js
@@ -1,7 +1,7 @@
-/**
- * EasyHTML5Video JavaScript Extension API version 1.2
- * Created by EasyHTML5Video.com
- * Modified 13:05 25.07.2013
- * This file content fullscreen api
- */
+/**
+ * EasyHTML5Video JavaScript Extension API version 1.2
+ * Created by EasyHTML5Video.com
+ * Modified 13:05 25.07.2013
+ * This file content fullscreen api
+ */
(function(){function j(t,s,i){if(t.addEventListener){t.addEventListener(s,i,false)}else{t.attachEvent("on"+s,i)}}function r(t,s,i){if(t.removeEventListener){t.removeEventListener(s,i)}else{t.detachEvent("on"+s,i)}}function o(u,t){if(!u.length){u=[u]}for(var v in t){for(var s=0;s=0;v--){if(!u[v].type){A=u[v].src}else{if(A&&/mp4/.test(u[v].type)){u[v].src=A;t.load()}}}}}if(!t||!t.canPlayType){var x=s.getElementsByTagName("object")[0]||s.getElementsByTagName("embed")[0];var C=x.height/x.width;x.setAttribute("width","100%");x.removeAttribute("height");var B=function(){x.style.height=s.offsetWidth*C+"px"};j(window,"resize",B);B()}}var b=m("easyhtml5video");for(var f=0;f] any active_reccord reccords which
+ # have the "created_at" field specified
+ # @return [Array] filtered list of objects
+ def restrict_date_range( objects )
+ # set start_date to either passed param, or beginning of time
+ start_date = params[:start_date].blank? ? Date.new(0) : Date.strptime(params[:start_date], "%Y-%m-%d")
+ # set end_date to either passed param or now
+ end_date = params[:end_date].blank? ? Date.today : Date.strptime(params[:end_date], "%Y-%m-%d")
+
+ filtered = []
+ objects.each do |obj|
+ # apperantly things can have nil created_at
+ if obj.created_at.blank?
+ if params[:start_date].blank? && params[:end_date].blank?
+ filtered += [obj]
+ end
+ elsif start_date <= obj.created_at.to_date && end_date >= obj.created_at.to_date
+ filtered += [obj]
+ end
+ end
+ return filtered
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index cbc894d..ecca66a 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,6 +1,10 @@
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
+ include GlobalHelpers
+
+ helper_method GlobalHelpers.instance_methods
+
# Override build_footer method in ActiveAdmin::Views::Pages
require 'active_admin_views_pages_base.rb'
@@ -14,17 +18,19 @@
def set_locale
# parameter from url takes precedence
- if params[:locale]
+ # check if locale is defined
+ if params[:locale] # and I18n.available_locales.include? params[:locale] # throw an error if not available
# if locales data is present in the parameter from url use it
- # TODO we need to error to the user that locale is missing, it can be THE CASE because there can be a missmatch between locales files and db
I18n.locale = params[:locale]
- elsif false # TODO
+ elsif user_signed_in? and !current_user[:language_id].nil?
+ I18n.locale = Language.find_by_id(current_user[:language_id]).abbreviation
# if user has set preferred language use it
- elsif false # TODO
- # use user's organization language, keep in mine the "OTHER ORG" edge case which should use english
+ elsif user_signed_in? and current_user.organisation.present? and !current_user.organisation[:language_id].nil?
+ I18n.locale = Language.find_by_id(current_user.organisation[:language_id]).abbreviation
+ # use user's organization language, keep in mine the "OTHER ORG" edge case which should use default language
else
# just use the default language, line can be commented out, included just for clarity
- # I18n.locale = config.i18n.default_locale
+ I18n.locale = I18n.default_locale
end
end
diff --git a/app/controllers/contacts_controller.rb b/app/controllers/contacts_controller.rb
index 08843f2..ae9e85a 100644
--- a/app/controllers/contacts_controller.rb
+++ b/app/controllers/contacts_controller.rb
@@ -1,4 +1,7 @@
-class ContactsController < ContactUs::ContactsController
+class ContactsController < ContactUs::ContactsController
+
+ # in order to i18 this file recaptcha gem has to be updated
+
def create
@contact = ContactUs::Contact.new(params[:contact_us_contact])
if (!user_signed_in?)
diff --git a/app/controllers/guidances_controller.rb b/app/controllers/guidances_controller.rb
index 817c0d9..1c8d2d1 100644
--- a/app/controllers/guidances_controller.rb
+++ b/app/controllers/guidances_controller.rb
@@ -1,228 +1,228 @@
-class GuidancesController < ApplicationController
-
- # GET /guidances
- # GET /guidances.json
- def admin_index
- if user_signed_in? && current_user.is_org_admin? then
- @guidances = Guidance.by_organisation(current_user.organisation_id)
- @guidance_groups = GuidanceGroup.where('organisation_id = ?', current_user.organisation_id )
-
-
- respond_to do |format|
- format.html # index.html.erb
- format.json { render json: @guidances }
- end
- else
- render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
- end
- end
-
- # GET /guidances/1
- # GET /guidances/1.json
- def admin_show
- if user_signed_in? && current_user.is_org_admin? then
- @guidance = Guidance.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.json { render json: @guidance }
- end
- end
- end
-
- def admin_new
- if user_signed_in? && current_user.is_org_admin? then
- @guidance = Guidance.new
- @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
- @phases = nil
- @dmptemplates.each do |template|
- if @phases.nil? then
- @phases = template.phases.all.order('number')
- else
- @phases = @phases + template.phases.all.order('number')
- end
- end
- @versions = nil
- @phases.each do |phase|
- if @versions.nil? then
- @versions = phase.versions.all.order('title')
- else
- @versions = @versions + phase.versions.all.order('title')
- end
- end
- @sections = nil
- @versions.each do |version|
- if @sections.nil? then
- @sections = version.sections.all.order('number')
- else
- @sections = @sections + version.sections.all.order('number')
- end
- end
- @questions = nil
- @sections.each do |section|
- if @questions.nil? then
- @questions = section.questions.all.order('number')
- else
- @questions = @questions + section.questions.all.order('number')
- end
- end
- respond_to do |format|
- format.html
- end
- end
- end
-
- #setup variables for use in the dynamic updating
- def update_phases
- # updates phases, versions, sections and questions based on template selected
- dmptemplate = Dmptemplate.find(params[:dmptemplate_id])
- # map to title and id for use in our options_for_select
- @phases = dmptemplate.phases.map{|a| [a.title, a.id]}.insert(0, I18n.t('helpers.select_phase'))
- @versions = dmptemplate.versions.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_version'))
- @sections = dmptemplate.sections.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_section'))
- @questions = dmptemplate.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
-
- end
-
- def update_versions
- # updates versions, sections and questions based on phase selected
- phase = Phase.find(params[:phase_id])
- # map to name and id for use in our options_for_select
- @versions = phase.versions.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_version'))
- @sections = phase.sections.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_section'))
- @questions = phase.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
- end
-
- def update_sections
- # updates sections and questions based on version selected
- version = Version.find(params[:version_id])
- # map to name and id for use in our options_for_select
- @sections = version.sections.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_section'))
- @questions = version.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
- end
-
- def update_questions
- # updates songs based on artist selected
- section = Section.find(params[:section_id])
- @questions = section.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
- end
-
-
- # GET /guidances/1/edit
- def admin_edit
- if user_signed_in? && current_user.is_org_admin? then
- @guidance = Guidance.find(params[:id])
- @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
- @phases = nil
- @dmptemplates.each do |template|
- if @phases.nil? then
- @phases = template.phases.all.order('number')
- else
- @phases = @phases + template.phases.all.order('number')
- end
- end
- @versions = nil
- @phases.each do |phase|
- if @versions.nil? then
- @versions = phase.versions.all.order('title')
- else
- @versions = @versions + phase.versions.all.order('title')
- end
- end
- @sections = nil
- @versions.each do |version|
- if @sections.nil? then
- @sections = version.sections.all.order('number')
- else
- @sections = @sections + version.sections.all.order('number')
- end
- end
- @questions = nil
- @sections.each do |section|
- if @questions.nil? then
- @questions = section.questions.all.order('number')
- else
- @questions = @questions + section.questions.all.order('number')
- end
- end
- else
- render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
- end
- end
-
- # POST /guidances
- # POST /guidances.json
- def admin_create
- if user_signed_in? && current_user.is_org_admin? then
- @guidance = Guidance.new(params[:guidance])
- @guidance.text = params["guidance-text"]
- @guidance.question_id = params["question_id"]
- if @guidance.published == true then
- @gg = GuidanceGroup.find(@guidance.guidance_group_ids).first
-
- if @gg.published == false || @gg.published.nil? then
- @gg.published = true
- @gg.save
- end
-
- end
-
- respond_to do |format|
- if @guidance.save
- format.html { redirect_to admin_show_guidance_path(@guidance), notice: I18n.t('org_admin.guidance.created_message') }
- format.json { render json: @guidance, status: :created, location: @guidance }
- else
- format.html { render action: "new" }
- format.json { render json: @guidance.errors, status: :unprocessable_entity }
- end
- end
- else
- render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
- end
- end
-
- # PUT /guidances/1
- # PUT /guidances/1.json
- def admin_update
- if user_signed_in? && current_user.is_org_admin? then
- @guidance = Guidance.find(params[:id])
-
- @guidance.text = params["guidance-text"]
-
- @guidance.question_id = params["question_id"]
-
- respond_to do |format|
- if @guidance.update_attributes(params[:guidance])
- format.html { redirect_to admin_show_guidance_path(params[:guidance]), notice: I18n.t('org_admin.guidance.updated_message') }
- format.json { head :no_content }
- else
- format.html { render action: "edit" }
- format.json { render json: @guidance.errors, status: :unprocessable_entity }
- end
- end
- else
- render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
- end
- end
-
-
- # DELETE /guidances/1
- # DELETE /guidances/1.json
- def admin_destroy
- if user_signed_in? && current_user.is_org_admin? then
- @guidance = Guidance.find(params[:id])
- @guidance.destroy
-
- respond_to do |format|
- format.html { redirect_to admin_index_guidance_path }
- format.json { head :no_content }
- end
- else
- render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
- end
-
- end
-
-
-
-end
+class GuidancesController < ApplicationController
+
+ # GET /guidances
+ # GET /guidances.json
+ def admin_index
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidances = Guidance.by_organisation(current_user.organisation_id)
+ @guidance_groups = GuidanceGroup.where('organisation_id = ?', current_user.organisation_id )
+
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @guidances }
+ end
+ else
+ render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
+ end
+ end
+
+ # GET /guidances/1
+ # GET /guidances/1.json
+ def admin_show
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidance = Guidance.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @guidance }
+ end
+ end
+ end
+
+ def admin_new
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidance = Guidance.new
+ @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
+ @phases = nil
+ @dmptemplates.each do |template|
+ if @phases.nil? then
+ @phases = template.phases.all.order('number')
+ else
+ @phases = @phases + template.phases.all.order('number')
+ end
+ end
+ @versions = nil
+ @phases.each do |phase|
+ if @versions.nil? then
+ @versions = phase.versions.all.order('title')
+ else
+ @versions = @versions + phase.versions.all.order('title')
+ end
+ end
+ @sections = nil
+ @versions.each do |version|
+ if @sections.nil? then
+ @sections = version.sections.all.order('number')
+ else
+ @sections = @sections + version.sections.all.order('number')
+ end
+ end
+ @questions = nil
+ @sections.each do |section|
+ if @questions.nil? then
+ @questions = section.questions.all.order('number')
+ else
+ @questions = @questions + section.questions.all.order('number')
+ end
+ end
+ respond_to do |format|
+ format.html
+ end
+ end
+ end
+
+ #setup variables for use in the dynamic updating
+ def update_phases
+ # updates phases, versions, sections and questions based on template selected
+ dmptemplate = Dmptemplate.find(params[:dmptemplate_id])
+ # map to title and id for use in our options_for_select
+ @phases = dmptemplate.phases.map{|a| [a.title, a.id]}.insert(0, I18n.t('helpers.select_phase'))
+ @versions = dmptemplate.versions.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_version'))
+ @sections = dmptemplate.sections.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_section'))
+ @questions = dmptemplate.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
+
+ end
+
+ def update_versions
+ # updates versions, sections and questions based on phase selected
+ phase = Phase.find(params[:phase_id])
+ # map to name and id for use in our options_for_select
+ @versions = phase.versions.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_version'))
+ @sections = phase.sections.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_section'))
+ @questions = phase.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
+ end
+
+ def update_sections
+ # updates sections and questions based on version selected
+ version = Version.find(params[:version_id])
+ # map to name and id for use in our options_for_select
+ @sections = version.sections.map{|s| [s.title, s.id]}.insert(0, I18n.t('helpers.select_section'))
+ @questions = version.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
+ end
+
+ def update_questions
+ # updates songs based on artist selected
+ section = Section.find(params[:section_id])
+ @questions = section.questions.map{|s| [s.text, s.id]}.insert(0, I18n.t('helpers.select_question'))
+ end
+
+
+ # GET /guidances/1/edit
+ def admin_edit
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidance = Guidance.find(params[:id])
+ @dmptemplates = Dmptemplate.funders_and_own_templates(current_user.organisation_id)
+ @phases = nil
+ @dmptemplates.each do |template|
+ if @phases.nil? then
+ @phases = template.phases.all.order('number')
+ else
+ @phases = @phases + template.phases.all.order('number')
+ end
+ end
+ @versions = nil
+ @phases.each do |phase|
+ if @versions.nil? then
+ @versions = phase.versions.all.order('title')
+ else
+ @versions = @versions + phase.versions.all.order('title')
+ end
+ end
+ @sections = nil
+ @versions.each do |version|
+ if @sections.nil? then
+ @sections = version.sections.all.order('number')
+ else
+ @sections = @sections + version.sections.all.order('number')
+ end
+ end
+ @questions = nil
+ @sections.each do |section|
+ if @questions.nil? then
+ @questions = section.questions.all.order('number')
+ else
+ @questions = @questions + section.questions.all.order('number')
+ end
+ end
+ else
+ render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
+ end
+ end
+
+ # POST /guidances
+ # POST /guidances.json
+ def admin_create
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidance = Guidance.new(params[:guidance])
+ @guidance.text = params["guidance-text"]
+ @guidance.question_id = params["question_id"]
+ if @guidance.published == true then
+ @gg = GuidanceGroup.find(@guidance.guidance_group_ids).first
+
+ if @gg.published == false || @gg.published.nil? then
+ @gg.published = true
+ @gg.save
+ end
+
+ end
+
+ respond_to do |format|
+ if @guidance.save
+ format.html { redirect_to admin_show_guidance_path(@guidance), notice: I18n.t('org_admin.guidance.created_message') }
+ format.json { render json: @guidance, status: :created, location: @guidance }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @guidance.errors, status: :unprocessable_entity }
+ end
+ end
+ else
+ render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
+ end
+ end
+
+ # PUT /guidances/1
+ # PUT /guidances/1.json
+ def admin_update
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidance = Guidance.find(params[:id])
+
+ @guidance.text = params["guidance-text"]
+
+ @guidance.question_id = params["question_id"]
+
+ respond_to do |format|
+ if @guidance.update_attributes(params[:guidance])
+ format.html { redirect_to admin_show_guidance_path(params[:guidance]), notice: I18n.t('org_admin.guidance.updated_message') }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @guidance.errors, status: :unprocessable_entity }
+ end
+ end
+ else
+ render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
+ end
+ end
+
+
+ # DELETE /guidances/1
+ # DELETE /guidances/1.json
+ def admin_destroy
+ if user_signed_in? && current_user.is_org_admin? then
+ @guidance = Guidance.find(params[:id])
+ @guidance.destroy
+
+ respond_to do |format|
+ format.html { redirect_to admin_index_guidance_path }
+ format.json { head :no_content }
+ end
+ else
+ render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
+ end
+
+ end
+
+
+
+end
diff --git a/app/controllers/organisation_users_controller.rb b/app/controllers/organisation_users_controller.rb
index 4693650..6bdeeb3 100644
--- a/app/controllers/organisation_users_controller.rb
+++ b/app/controllers/organisation_users_controller.rb
@@ -1,25 +1,25 @@
-class OrganisationUsersController < ApplicationController
-
- def admin_index
- if user_signed_in? && current_user.is_org_admin? then
- # find excluded user_id's
- excluded_ids = params[:user_ids]
- excluded_ids.each do |user_id|
- User.find(user_id).remove_token
- end
- # remove their api_tokens
- # find included user id's
- params[:user_ids].each do |user_id|
- User.find(user_id).keep_or_generate_token
- end
- # keep_or_generate_token
- respond_to do |format|
- format.html # index.html.erb
- format.json { render json: @organisation_users }
- end
- else
- render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
- end
- end
-
+class OrganisationUsersController < ApplicationController
+
+ def admin_index
+ if user_signed_in? && current_user.is_org_admin? then
+ # find excluded user_id's
+ excluded_ids = params[:user_ids]
+ excluded_ids.each do |user_id|
+ User.find(user_id).remove_token
+ end
+ # remove their api_tokens
+ # find included user id's
+ params[:user_ids].each do |user_id|
+ User.find(user_id).keep_or_generate_token
+ end
+ # keep_or_generate_token
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @organisation_users }
+ end
+ else
+ render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
+ end
+ end
+
end
\ No newline at end of file
diff --git a/app/controllers/project_groups_controller.rb b/app/controllers/project_groups_controller.rb
index 776bad9..426b842 100644
--- a/app/controllers/project_groups_controller.rb
+++ b/app/controllers/project_groups_controller.rb
@@ -1,5 +1,5 @@
class ProjectGroupsController < ApplicationController
-
+
def create
@project_group = ProjectGroup.new(params[:project_group])
access_level = params[:project_group][:access_level].to_i
@@ -24,11 +24,9 @@
@project_group.user = User.find_by_email(params[:project_group][:email])
@project_group.save
UserMailer.sharing_notification(@project_group).deliver
- logger.debug("Email sent from here?")
end
else
UserMailer.sharing_notification(@project_group).deliver
- logger.debug("Email sent from there?")
end
flash[:notice] = message
format.html { redirect_to :controller => 'projects', :action => 'share', :id => @project_group.project.slug }
@@ -42,13 +40,13 @@
format.html { redirect_to :controller => 'projects', :action => 'share', :id => @project_group.project.slug }
format.json { render json: @project_group, status: :created, location: @project_group }
end
- end
+ end
else
render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
end
-
+
end
-
+
def update
@project_group = ProjectGroup.find(params[:id])
access_level = params[:project_group][:access_level].to_i
@@ -95,5 +93,4 @@
render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false)
end
end
-
end
\ No newline at end of file
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 74b2a5f..1e04277 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -4,6 +4,7 @@
# GET /projects
# GET /projects.json
def index
+ ## TODO: Is this A magic String? the "Show_shib_link?" as we define it and users dont see cookies
if user_signed_in? then
if (current_user.shibboleth_id.nil? || current_user.shibboleth_id.length == 0) && !cookies[:show_shib_link].nil? && cookies[:show_shib_link] == "show_shib_link" then
flash.notice = "Would you like to #{view_context.link_to I18n.t('helpers.shibboleth_to_link_text'), user_omniauth_shibboleth_path}".html_safe
@@ -53,8 +54,8 @@
if user_signed_in? then
@project = Project.new
@project.organisation = current_user.organisation
- @funders = orgs_of_type(t('helpers.org_type.funder'), true)
- @institutions = orgs_of_type(t('helpers.org_type.institution'))
+ @funders = orgs_of_type(constant("organisation_types.funder"), true)
+ @institutions = orgs_of_type(constant("organisation_types.institution"))
respond_to do |format|
format.html # new.html.erb
format.json { render json: @project }
@@ -100,10 +101,10 @@
respond_to do |format|
format.html { redirect_to edit_user_registration_path }
end
- else
+ else
respond_to do |format|
format.html { render action: "export" }
-
+
end
end
end
@@ -113,7 +114,7 @@
def create
if user_signed_in? then
@project = Project.new(params[:project])
-
+
if @project.dmptemplate.nil? && params[:project][:funder_id] != "" then # this shouldn't be necessary - see setter for funder_id in project.rb
funder = Organisation.find(params[:project][:funder_id])
if funder.dmptemplates.count == 1 then
@@ -127,7 +128,7 @@
end
end
@project.principal_investigator = current_user.name(false)
-
+
@project.title = I18n.t('helpers.project.my_project_name')+' ('+@project.dmptemplate.title+')'
@project.assign_creator(current_user.id)
respond_to do |format|
@@ -226,21 +227,21 @@
else
institution = nil
end
- excluded_orgs = orgs_of_type(t('helpers.org_type.funder')) + orgs_of_type(t('helpers.org_type.institution')) + Organisation.orgs_with_parent_of_type(t('helpers.org_type.institution'))
+ excluded_orgs = orgs_of_type(constant("organisation_types.funder")) + orgs_of_type(constant("organisation_types.institution")) + Organisation.orgs_with_parent_of_type(constant("organisation_types.institution"))
guidance_groups = {}
ggs = GuidanceGroup.guidance_groups_excluding(excluded_orgs)
-
+
ggs.each do |gg|
guidance_groups[gg.id] = gg.name
end
-
+
#subset guidance that belong to the institution
unless institution.nil? then
optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, institution.id)
optional_gg.each do|optional|
guidance_groups[optional.id] = optional.name
end
-
+
institution.children.each do |o|
o.guidance_groups.each do |gg|
include = false
@@ -256,21 +257,21 @@
end
end
end
-
+
#If template belongs to a funder and that funder has subset guidance display then.
- if !template.nil? && template.organisation.organisation_type.name == t('helpers.org_type.funder') then
+ if !template.nil? && template.organisation.organisation_type.name == constant("organisation_types.funder") then
optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, template.organisation_id)
optional_gg.each do|optional|
guidance_groups[optional.id] = optional.name
end
end
-
-
+
+
respond_to do |format|
format.json { render json: guidance_groups.to_json }
end
end
-
+
private
def orgs_of_type(org_type_name, published_templates = false)
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 1dd578f..d7127bb 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -3,6 +3,7 @@
# POST /resource
def create
+ logger.debug "#{sign_up_params}"
if sign_up_params[:accept_terms] != "1" then
redirect_to after_sign_up_error_path_for(resource), alert: I18n.t('helpers.you_must_accept')
else
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index a86c0fa..5515afb 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -1,27 +1,27 @@
-# app/controllers/sessions_controller.rb
-class SessionsController < Devise::SessionsController
-
- def create
- existing_user = User.find_by_email(params[:user][:email])
-
- if !existing_user.nil? && (existing_user.password == "" || existing_user.password.nil?) && existing_user.confirmed_at.nil? then
- redirect_to :controller => :existing_users, :action => :index, :email => params[:user][:email]
- else
- #after authentication verify if session[:shibboleth] exists
- if !params[:shibboleth_data].nil? then
- existing_user.update_attributes(:shibboleth_id => session[:shibboleth_data][:uid])
- end
- super
-
- end
- end
-
- def destroy
- current_user.plan_sections.each do |lock|
- lock.delete
-
- end
- super
- end
-
+# app/controllers/sessions_controller.rb
+class SessionsController < Devise::SessionsController
+
+ def create
+ existing_user = User.find_by_email(params[:user][:email])
+
+ if !existing_user.nil? && (existing_user.password == "" || existing_user.password.nil?) && existing_user.confirmed_at.nil? then
+ redirect_to :controller => :existing_users, :action => :index, :email => params[:user][:email]
+ else
+ #after authentication verify if session[:shibboleth] exists
+ if !params[:shibboleth_data].nil? then
+ existing_user.update_attributes(:shibboleth_id => session[:shibboleth_data][:uid])
+ end
+ super
+
+ end
+ end
+
+ def destroy
+ current_user.plan_sections.each do |lock|
+ lock.delete
+
+ end
+ super
+ end
+
end
\ No newline at end of file
diff --git a/app/controllers/settings/projects_controller.rb b/app/controllers/settings/projects_controller.rb
index b0df35c..5719f2c 100644
--- a/app/controllers/settings/projects_controller.rb
+++ b/app/controllers/settings/projects_controller.rb
@@ -1,40 +1,40 @@
-module Settings
- class ProjectsController < SettingsController
-
- before_filter :get_plan_list_columns
- before_filter :get_settings
-
- def show
- respond_to do |format|
- format.html
- format.json { render json: settings_json }
- end
- end
-
- def update
- columns = (params[:columns] || {})
-
- if @settings.update_attributes(columns: columns)
- respond_to do |format|
- format.html { redirect_to(projects_path) }
- format.json { render json: settings_json }
- end
- else
- render(action: :show) # Expect #show to display errors etc
- end
- end
-
- private
-
- def get_settings
- @settings = current_user.settings(:plan_list)
- # :name column should always be present (displayed as a disabled checkbox)
- # so it's not necessary to include it in the list here
- @all_columns -= [:name]
- end
-
- def settings_json
- @settings_json ||= { selected_columns: @settings.columns, all_columns: @all_columns }.to_json
- end
- end
-end
+module Settings
+ class ProjectsController < SettingsController
+
+ before_filter :get_plan_list_columns
+ before_filter :get_settings
+
+ def show
+ respond_to do |format|
+ format.html
+ format.json { render json: settings_json }
+ end
+ end
+
+ def update
+ columns = (params[:columns] || {})
+
+ if @settings.update_attributes(columns: columns)
+ respond_to do |format|
+ format.html { redirect_to(projects_path) }
+ format.json { render json: settings_json }
+ end
+ else
+ render(action: :show) # Expect #show to display errors etc
+ end
+ end
+
+ private
+
+ def get_settings
+ @settings = current_user.settings(:plan_list)
+ # :name column should always be present (displayed as a disabled checkbox)
+ # so it's not necessary to include it in the list here
+ @all_columns -= [:name]
+ end
+
+ def settings_json
+ @settings_json ||= { selected_columns: @settings.columns, all_columns: @all_columns }.to_json
+ end
+ end
+end
diff --git a/app/controllers/token_permission_types_controller.rb b/app/controllers/token_permission_types_controller.rb
index 4e1b33a..bdb6b58 100644
--- a/app/controllers/token_permission_types_controller.rb
+++ b/app/controllers/token_permission_types_controller.rb
@@ -1,15 +1,15 @@
-class TokenPermissionTypesController < ApplicationController
-
-
- def index
- if user_signed_in? && current_user.organisation.token_permission_types.count > 0
- @user = current_user
- respond_to do |format|
- format.html
- end
- else
- render(file: File.join(Rails.root, 'public/403.html'),status: 403, layout: false)
- end
- end
-
+class TokenPermissionTypesController < ApplicationController
+
+
+ def index
+ if user_signed_in? && current_user.organisation.token_permission_types.count > 0
+ @user = current_user
+ respond_to do |format|
+ format.html
+ end
+ else
+ render(file: File.join(Rails.root, 'public/403.html'),status: 403, layout: false)
+ end
+ end
+
end
\ No newline at end of file
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 8fad4df..5647a32 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,4 +1,5 @@
class UsersController < ApplicationController
+
# GET /users/1
# GET /users/1.json
def show
@@ -85,22 +86,28 @@
def admin_api_update
if user_signed_in? && current_user.is_org_admin? then
#iterate through all org users
+ user_ids = params[:api_user_ids].blank? ? [] : params[:api_user_ids].map(&:to_i)
+ admin_user_ids = params[:org_admin_ids].blank? ? [] : params[:org_admin_ids].map(&:to_i)
current_user.organisation.users.each do |user|
- if !params[:user_ids].nil?
- user_ids = params[:user_ids].map(&:to_i)
- # if user_id in passed params
- if user_ids.include? user.id
- # run generate_or_keep
- user.keep_or_generate_token!
- # if not in passed params
- else
- # remove the token
- user.remove_token!
- end
+ # if user_id in passed params
+ if user_ids.include? user.id
+ # run generate_or_keep
+ user.keep_or_generate_token!
+ # if not in passed params
else
- # no users selected so remove all tokens
+ # remove the token
user.remove_token!
end
+ # ORG_ADMINS
+ if admin_user_ids.include?( user.id) && !user.is_org_admin?
+ # add admin privleges
+ # MAGIC_STRING
+ user.roles << Role.find_by(name: constant("user_role_types.organisational_admin"))
+ # if user_id not in passed, but user is an admin
+ elsif !admin_user_ids.include?(user.id) && user.is_org_admin?
+ # strip admin privleges
+ user.roles.delete(Role.find_by(name: constant("user_role_types.organisational_admin")))
+ end
end
#redirect_to admin_index
else
diff --git a/app/helpers/plans_helper.rb b/app/helpers/plans_helper.rb
index f5cf56d..37a6355 100644
--- a/app/helpers/plans_helper.rb
+++ b/app/helpers/plans_helper.rb
@@ -1,13 +1,13 @@
module PlansHelper
def project_list_head(column)
- klass = case column[0]
+ klass = case column
when 'name' then :dmp_th_big
when 'description' then :dmp_th_big
else :dmp_th_small
end
- content_tag(:th, t("helpers.project.columns.#{column[0]}"), class: klass)
+ content_tag(:th, t("helpers.project.columns.#{column}"), class: klass)
end
def project_list_body(column, project)
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 02c490e..8a60e7b 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,24 +1,24 @@
-class UserMailer < ActionMailer::Base
- default from: I18n.t('helpers.main_email.from')
-
- def sharing_notification(project_group)
- @project_group = project_group
- mail(to: @project_group.user.email, subject: I18n.t('helpers.main_email.access_given'))
- end
-
- def permissions_change_notification(project_group)
- @project_group = project_group
- mail(to: @project_group.user.email, subject: I18n.t('helpers.main_email.permission_changed'))
- end
-
- def project_access_removed_notification(user, project)
- @user = user
- @project = project
- mail(to: @user.email, subject: I18n.t('helpers.main_email.access_removed'))
- end
-
- def api_token_granted_notification(user)
- @user = user
- mail(to: @user.email, subject: I18n.t('helper.api_mail_subject'))
- end
+class UserMailer < ActionMailer::Base
+ default from: I18n.t('helpers.main_email.from')
+
+ def sharing_notification(project_group)
+ @project_group = project_group
+ mail(to: @project_group.user.email, subject: I18n.t('helpers.main_email.access_given'))
+ end
+
+ def permissions_change_notification(project_group)
+ @project_group = project_group
+ mail(to: @project_group.user.email, subject: I18n.t('helpers.main_email.permission_changed'))
+ end
+
+ def project_access_removed_notification(user, project)
+ @user = user
+ @project = project
+ mail(to: @user.email, subject: I18n.t('helpers.main_email.access_removed'))
+ end
+
+ def api_token_granted_notification(user)
+ @user = user
+ mail(to: @user.email, subject: I18n.t('helper.api_mail_subject'))
+ end
end
\ No newline at end of file
diff --git a/app/models/ability.rb b/app/models/ability.rb
index b75a646..e283051 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -1,11 +1,12 @@
class Ability
+ include GlobalHelpers
include CanCan::Ability
def initialize(user)
# Define abilities for the passed in user here. For example:
#
user ||= User.new # guest user (not logged in)
- if user.has_role? :admin
+ if user.has_role? constant("user_role_types.super_admin")
can :manage, :all
else
can :read, :all
diff --git a/app/models/admin_user.rb b/app/models/admin_user.rb
index 28b7223..511e649 100644
--- a/app/models/admin_user.rb
+++ b/app/models/admin_user.rb
@@ -1,4 +1,4 @@
-class AdminUser < ActiveRecord::Base
- devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
- attr_accessible :email, :password, :password_confirmation, :remember_me
-end
+class AdminUser < ActiveRecord::Base
+ devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
+ attr_accessible :email, :password, :password_confirmation, :remember_me
+end
diff --git a/app/models/answer.rb b/app/models/answer.rb
index 7c2e4dd..cadb66d 100644
--- a/app/models/answer.rb
+++ b/app/models/answer.rb
@@ -1,16 +1,16 @@
-class Answer < ActiveRecord::Base
-
- #associations between tables
- belongs_to :question
- belongs_to :user
- belongs_to :plan
-
-# accepts_nested_attributes_for :question
-# accepts_nested_attributes_for :plan
-
- has_and_belongs_to_many :options, join_table: "answers_options"
-
- attr_accessible :text, :plan_id, :question_id, :user_id, :option_ids , :as => [:default, :admin]
-
-
-end
+class Answer < ActiveRecord::Base
+
+ #associations between tables
+ belongs_to :question
+ belongs_to :user
+ belongs_to :plan
+
+# accepts_nested_attributes_for :question
+# accepts_nested_attributes_for :plan
+
+ has_and_belongs_to_many :options, join_table: "answers_options"
+
+ attr_accessible :text, :plan_id, :question_id, :user_id, :option_ids , :as => [:default, :admin]
+
+
+end
diff --git a/app/models/comment.rb b/app/models/comment.rb
index a2fc503..b4af9f9 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -1,15 +1,15 @@
-class Comment < ActiveRecord::Base
-
- #associations between tables
- belongs_to :question
-
- #fields
- attr_accessible :question_id, :text, :user_id, :archived, :plan_id, :archived_by, :as => [:default, :admin]
-
-
-
- def to_s
- "#{text}"
- end
-
-end
+class Comment < ActiveRecord::Base
+
+ #associations between tables
+ belongs_to :question
+
+ #fields
+ attr_accessible :question_id, :text, :user_id, :archived, :plan_id, :archived_by, :as => [:default, :admin]
+
+
+
+ def to_s
+ "#{text}"
+ end
+
+end
diff --git a/app/models/dmptemplate.rb b/app/models/dmptemplate.rb
index 502a8b5..981b585 100644
--- a/app/models/dmptemplate.rb
+++ b/app/models/dmptemplate.rb
@@ -1,4 +1,6 @@
class Dmptemplate < ActiveRecord::Base
+ include GlobalHelpers
+
attr_accessible :id, :organisation_id, :description, :published, :title, :user_id, :locale,
:is_default, :guidance_group_ids, :as => [:default, :admin]
@@ -57,7 +59,7 @@
#
# @return [Array] all templates from funder organisations
def self.funders_templates
- new_org_obejcts = OrganisationType.find_by(name: I18n.t("helpers.org_type.funder")).organisations
+ new_org_obejcts = OrganisationType.find_by(name: GlobalHelpers.constant("organisation_types.funder")).organisations
org_templates = Array.new
new_org_obejcts.each do |neworg|
@@ -99,7 +101,7 @@
#verify if org type is not a funder
current_org = Organisation.find(org_id)
- if current_org.organisation_type.name != I18n.t("helpers.org_type.funder") then
+ if current_org.organisation_type.name != GlobalHelpers.constant("organisation_types.funder") then
own_institutional_templates = self.own_institutional_templates(org_id)
else
own_institutional_templates = []
diff --git a/app/models/exported_plan.rb b/app/models/exported_plan.rb
index 36dd019..6d21897 100644
--- a/app/models/exported_plan.rb
+++ b/app/models/exported_plan.rb
@@ -1,11 +1,12 @@
class ExportedPlan < ActiveRecord::Base
-
+ include GlobalHelpers
+
attr_accessible :plan_id, :user_id, :format, :as => [:default, :admin]
#associations between tables
belongs_to :plan
belongs_to :user
-
+
VALID_FORMATS = ['csv', 'html', 'json', 'pdf', 'text', 'xml', 'docx']
validates :format, inclusion: { in: VALID_FORMATS, message: I18n.t('helpers.plan.export.not_valid_format') }
@@ -46,7 +47,7 @@
def funder
org = self.plan.project.dmptemplate.try(:organisation)
- org.name if org.present? && org.organisation_type.try(:name) == I18n.t('helpers.org_type.funder')
+ org.name if org.present? && org.organisation_type.try(:name) == constant("organisation_types.funder")
end
def institution
@@ -107,7 +108,7 @@
output += "\n#{sanitize_text(answer.text)}\n"
else
output += "\n"
- end
+ end
end
end
end
diff --git a/app/models/file_type.rb b/app/models/file_type.rb
index 027055d..7c836dc 100644
--- a/app/models/file_type.rb
+++ b/app/models/file_type.rb
@@ -1,3 +1,3 @@
-class FileType < ActiveRecord::Base
- #attr_accessible :name, :icon_location, :icon_name, :icon_size
-end
+class FileType < ActiveRecord::Base
+ #attr_accessible :name, :icon_location, :icon_name, :icon_size
+end
diff --git a/app/models/file_upload.rb b/app/models/file_upload.rb
index 72bca44..7cf325c 100644
--- a/app/models/file_upload.rb
+++ b/app/models/file_upload.rb
@@ -1,7 +1,7 @@
-class FileUpload < ActiveRecord::Base
- #attr_accessible :file_type_id, :description, :location, :name, :published, :size, :title
-
- #associations between tables
- belongs_to :file_type
-
-end
+class FileUpload < ActiveRecord::Base
+ #attr_accessible :file_type_id, :description, :location, :name, :published, :size, :title
+
+ #associations between tables
+ belongs_to :file_type
+
+end
diff --git a/app/models/guidance.rb b/app/models/guidance.rb
index f537433..ac1e886 100644
--- a/app/models/guidance.rb
+++ b/app/models/guidance.rb
@@ -8,6 +8,7 @@
class Guidance < ActiveRecord::Base
+ include GlobalHelpers
#associations between tables
attr_accessible :text, :question_id, :published, :as => [:default, :admin]
@@ -72,7 +73,7 @@
##
# Returns whether or not a given user can view a given guidance
# we define guidances viewable to a user by those owned by a guidance group:
- # owned by the DCC
+ # owned by the managing curation center
# owned by a funder organisation
# owned by an organisation, of which the user is a member
#
@@ -88,20 +89,19 @@
# guidances are viewable if they are owned by any of the user's organisations
user.organisations.each do |organisation|
- logger.debug "#{organisation.name}"
if guidance_group.organisation.id == organisation.id
viewable = true
end
end
- # guidance groups are viewable if they are owned by the DCC
- if guidance_group.organisation.id == Organisation.find_by( name: "Digital Curation Centre").id
+ # guidance groups are viewable if they are owned by the Managing Curation Center
+ if guidance_group.organisation.id == Organisation.find_by( name: GlobalHelpers.constant("organisation_types.managing_organisation")).id
viewable = true
end
# guidance groups are viewable if they are owned by a funder
- if guidance_group.organisation.organisation_type == OrganisationType.find_by( name: "Funder")
+ if guidance_group.organisation.organisation_type == OrganisationType.find_by( name: GlobalHelpers.constant("organisation_types.funder"))
viewable = true
end
end
@@ -112,17 +112,17 @@
##
# Returns a list of all guidances which a specified user can view
# we define guidances viewable to a user by those owned by a guidance group:
- # owned by the DCC
+ # owned by the Managing Curation Center
# owned by a funder organisation
# owned by an organisation, of which the user is a member
#
# @param user [User] a user object
# @return [Array] a list of all "viewable" guidances to a user
def self.all_viewable(user)
- dcc_groups = (Organisation.find_by name: "Digital Curation Centre").guidance_groups
+ managing_groups = (Organisation.find_by name: GlobalHelpers.constant("organisation_types.managing_organisation")).guidance_groups
# find all groups owned by a Funder organisation
funder_groups = []
- funders = OrganisationType.find_by( name: "Funder")
+ funders = OrganisationType.find_by( name: GlobalHelpers.constant("organisation_types.funder"))
funders.organisations.each do |funder|
funder_groups += funder.guidance_groups
end
@@ -133,7 +133,7 @@
end
# find all guidances belonging to any of the viewable groups
all_viewable_guidances = []
- all_viewable_groups = dcc_groups + funder_groups + organisation_groups
+ all_viewable_groups = managing_groups + funder_groups + organisation_groups
all_viewable_groups.each do |group|
all_viewable_guidances += group.guidances
end
diff --git a/app/models/guidance_group.rb b/app/models/guidance_group.rb
index eb06b2a..201818c 100644
--- a/app/models/guidance_group.rb
+++ b/app/models/guidance_group.rb
@@ -1,4 +1,5 @@
class GuidanceGroup < ActiveRecord::Base
+ include GlobalHelpers
#associations between tables
belongs_to :organisation
@@ -53,7 +54,7 @@
##
# Returns whether or not a given user can view a given guidance group
# we define guidances viewable to a user by those owned by:
- # the DCC
+ # the managing curation center
# a funder organisation
# an organisation, of which the user is a member
#
@@ -70,14 +71,14 @@
viewable = true
end
end
- # groups are viewable if they are owned by the DCC
- Organisation.where( name: "Digital Curation Centre").find_each do |dcc|
- if guidance_group.organisation.id == dcc.id
+ # groups are viewable if they are owned by the managing curation center
+ Organisation.where( name: GlobalHelpers.constant("organisation_types.managing_organisation")).find_each do |managing_group|
+ if guidance_group.organisation.id == managing_group.id
viewable = true
end
end
# groups are viewable if they are owned by a funder
- if guidance_group.organisation.organisation_type == OrganisationType.find_by( name: "Funder")
+ if guidance_group.organisation.organisation_type == OrganisationType.find_by( name: GlobalHelpers.constant("organisation_types.funder"))
viewable = true
end
@@ -87,27 +88,24 @@
##
# Returns a list of all guidance groups which a specified user can view
# we define guidance groups viewable to a user by those owned by:
- # the DCC
+ # the Managing Curation Center
# a funder organisation
# an organisation, of which the user is a member
#
# @param user [User] a user object
# @return [Array] a list of all "viewable" guidance groups to a user
def self.all_viewable(user)
- # first find all groups owned by the DCC
- dcc_groups = []
- Organisation.where( name: "Digital Curation Centre").find_each do |dcc|
- dcc_groups = dcc_groups + dcc.guidance_groups
- logger.info "another one"
+ # first find all groups owned by the Managing Curation Center
+ managing_org_groups = []
+ Organisation.where( name: GlobalHelpers.constant("organisation_types.managing_organisation")).find_each do |managing_org|
+ managing_org_groups = managing_org_groups + managing_org.guidance_groups
end
# find all groups owned by a Funder organisation
funder_groups = []
- funders = OrganisationType.find_by( name: "Funder")
- logger.debug "found an org type? #{funders.organisations.first.name}"
+ funders = OrganisationType.find_by( name: GlobalHelpers.constant("organisation_types.funder"))
funders.organisations.each do |funder|
funder_groups = funder_groups + funder.guidance_groups
- logger.info "iterating through funders"
end
# find all groups owned by any of the user's organisations
organisation_groups = []
@@ -115,9 +113,8 @@
organisation_groups = organisation_groups + organisation.guidance_groups
end
# pass this list to the view with respond_with @all_viewable_groups
- all_viewable_groups = dcc_groups + funder_groups + organisation_groups
+ all_viewable_groups = managing_org_groups + funder_groups + organisation_groups
all_viewable_groups = all_viewable_groups.uniq{|x| x.id}
- logger.debug "we finished it?"
return all_viewable_groups
end
end
diff --git a/app/models/language.rb b/app/models/language.rb
index a402b79..6566489 100644
--- a/app/models/language.rb
+++ b/app/models/language.rb
@@ -1,3 +1,3 @@
-class Language < ActiveRecord::Base
-
+class Language < ActiveRecord::Base
+
end
\ No newline at end of file
diff --git a/app/models/option.rb b/app/models/option.rb
index 09aedaa..87dfc46 100644
--- a/app/models/option.rb
+++ b/app/models/option.rb
@@ -1,15 +1,15 @@
-class Option < ActiveRecord::Base
-
- #associations between tables
- belongs_to :question
-
- has_many :option_warnings, :dependent => :destroy
-
- has_and_belongs_to_many :answers, join_table: "answers_options"
-
- attr_accessible :text, :question_id, :is_default, :number, :as => [:default, :admin]
-
- def to_s
- "#{text}"
- end
+class Option < ActiveRecord::Base
+
+ #associations between tables
+ belongs_to :question
+
+ has_many :option_warnings, :dependent => :destroy
+
+ has_and_belongs_to_many :answers, join_table: "answers_options"
+
+ attr_accessible :text, :question_id, :is_default, :number, :as => [:default, :admin]
+
+ def to_s
+ "#{text}"
+ end
end
\ No newline at end of file
diff --git a/app/models/option_warning.rb b/app/models/option_warning.rb
index 55067e6..d67709f 100644
--- a/app/models/option_warning.rb
+++ b/app/models/option_warning.rb
@@ -1,12 +1,12 @@
-class OptionWarning < ActiveRecord::Base
-
- #associations between tables
- belongs_to :option
- belongs_to :organisation
-
- attr_accessible :text, :option_id, :organisation_id, :as => [:default, :admin]
-
- def to_s
- "#{text}"
- end
+class OptionWarning < ActiveRecord::Base
+
+ #associations between tables
+ belongs_to :option
+ belongs_to :organisation
+
+ attr_accessible :text, :option_id, :organisation_id, :as => [:default, :admin]
+
+ def to_s
+ "#{text}"
+ end
end
\ No newline at end of file
diff --git a/app/models/org_token_permission.rb b/app/models/org_token_permission.rb
index fe49047..c00a248 100644
--- a/app/models/org_token_permission.rb
+++ b/app/models/org_token_permission.rb
@@ -1,8 +1,8 @@
-class OrgTokenPermission < ActiveRecord::Base
- attr_accessible :organisation_id, :token_permission_type_id, :organisation, :token_permission_type, :as => [:default, :admin]
-
- #associations between tables
- belongs_to :organisation
- belongs_to :token_permission_type
-
-end
+class OrgTokenPermission < ActiveRecord::Base
+ attr_accessible :organisation_id, :token_permission_type_id, :organisation, :token_permission_type, :as => [:default, :admin]
+
+ #associations between tables
+ belongs_to :organisation
+ belongs_to :token_permission_type
+
+end
diff --git a/app/models/organisation.rb b/app/models/organisation.rb
index a1eef16..1da4a0b 100644
--- a/app/models/organisation.rb
+++ b/app/models/organisation.rb
@@ -1,4 +1,5 @@
class Organisation < ActiveRecord::Base
+ include GlobalHelpers
#associations between tables
belongs_to :organisation_type
has_many :guidance_groups
@@ -13,45 +14,78 @@
belongs_to :parent, :class_name => 'Organisation'
+ has_one :language
+
has_many :children, :class_name => 'Organisation', :foreign_key => 'parent_id'
# accepts_nested_attributes_for :organisation_type
accepts_nested_attributes_for :dmptemplates
accepts_nested_attributes_for :token_permission_types
- attr_accessible :abbreviation, :banner_text, :description, :domain,
- :logo_file_name, :name, :stylesheet_file_id, :target_url,
+ attr_accessible :abbreviation, :banner_text, :description, :domain,
+ :logo_file_name, :name, :stylesheet_file_id, :target_url,
:organisation_type_id, :wayfless_entity, :parent_id, :sort_name,
- :token_permission_type_ids
+ :token_permission_type_ids, :language_id
- def to_s
- name
- end
- def short_name
- if abbreviation.nil? then
- return name
- else
- return abbreviation
- end
- end
+ ##
+ # returns the name of the organisation
+ #
+ # @return [String]
+ def to_s
+ name
+ end
- #retrieves info off a child org
- def self.orgs_with_parent_of_type(org_type)
- parents = OrganisationType.find_by_name(org_type).organisations
- children = Array.new
- parents.each do |parent|
- children += parent.children
- end
- return children
- end
+ ##
+ # returns the abbreviation for the organisation if it exists, or the name if not
+ #
+ # @return [String] name or abbreviation of the organisation
+ def short_name
+ if abbreviation.nil? then
+ return name
+ else
+ return abbreviation
+ end
+ end
+
+ ##
+ # finds all organisations who have a parent of the passed organisation type
+ #
+ # @params [String] the name of an organisation type
+ # @return [Array]
+ def self.orgs_with_parent_of_type(org_type)
+ parents = OrganisationType.find_by_name(org_type).organisations
+ children = Array.new
+ parents.each do |parent|
+ children += parent.children
+ end
+ return children
+ end
+
+ ##
+ # returns a list of all guidance groups belonging to other organisations
+ #
+ # @return [Array]
+ def self.other_organisations
+ org_types = [GlobalHelpers.constant("organisation_types.funder")]
+ organisations_list = []
+ org_types.each do |ot|
+ new_org_obejct = OrganisationType.find_by_name(ot)
+
+ org_with_guidance = GuidanceGroup.joins(new_org_obejct.organisations)
+
+ organisations_list = organisations_list + org_with_guidance
+ end
+ return organisations_list
+ end
+
##
# returns a list of all guidance groups belonging to other organisations
#
# @return [Array]
def self.other_organisations
- org_types = [I18n.t('helpers.org_type.organisation')]
+ org_types = [GlobalHelpers.constant("organisation_types.funder")]
organisations_list = []
org_types.each do |ot|
new_org_obejct = OrganisationType.find_by_name(ot)
diff --git a/app/models/organisation_type.rb b/app/models/organisation_type.rb
index a1ce83d..c8e0edc 100644
--- a/app/models/organisation_type.rb
+++ b/app/models/organisation_type.rb
@@ -1,6 +1,6 @@
-class OrganisationType < ActiveRecord::Base
- attr_accessible :description, :name, :as => [:default, :admin]
-
- has_many :organisations
-
-end
+class OrganisationType < ActiveRecord::Base
+ attr_accessible :description, :name, :as => [:default, :admin]
+
+ has_many :organisations
+
+end
diff --git a/app/models/phase.rb b/app/models/phase.rb
index b053f36..20cfb6f 100644
--- a/app/models/phase.rb
+++ b/app/models/phase.rb
@@ -1,6 +1,6 @@
# [+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 and University of California Curation Center
class Phase < ActiveRecord::Base
@@ -9,28 +9,41 @@
#associations between tables
belongs_to :dmptemplate
-
+
has_many :versions, :dependent => :destroy
has_many :sections, :through => :versions, :dependent => :destroy
has_many :questions, :through => :sections, :dependent => :destroy
-
+
#Link the child's data
accepts_nested_attributes_for :versions, :allow_destroy => true
# accepts_nested_attributes_for :dmptemplate
-
+
attr_accessible :description, :number, :title, :dmptemplate_id, :as => [:default, :admin]
-
+
friendly_id :title, use: [:slugged, :history, :finders]
-
+
+ ##
+ # returns the title of the phase
+ #
+ # @return [String] the title of the phase
def to_s
"#{title}"
end
-
+
+ ##
+ # returns the most_recent version of this phase
+ #
+ # @return [Version] the most recent version of this phase
def latest_version
return versions.order("number DESC").last
end
-
- #Verify if this phase has any published versions
+
+ ##
+ # returns either the latest published version of this phase
+ # also serves to verify if this phase has any published versions as returns nil
+ # if there are no published versions
+ #
+ # @return [Version, nil]
def latest_published_version
versions.order("number DESC").each do |version|
if version.published then
@@ -39,8 +52,11 @@
end
return nil
end
-
- #verify if a phase has a published version or a version with one or more sections
+
+ ##
+ # verify if a phase has a published version or a version with one or more sections
+ #
+ # @return [Boolean]
def has_sections
versions = self.versions.where('published = ?', true).order('updated_at DESC')
if versions.any? then
@@ -49,16 +65,15 @@
has_section = true
else
has_section = false
- end
+ end
else
version = self.versions.order('updated_at DESC').first
if !version.sections.empty? then
has_section = true
else
has_section = false
- end
+ end
end
return has_section
- end
-
+ end
end
diff --git a/app/models/plan.rb b/app/models/plan.rb
index 65cdf1c..5946db3 100644
--- a/app/models/plan.rb
+++ b/app/models/plan.rb
@@ -24,36 +24,54 @@
alias_method :super_settings, :settings
+ ##
# Proxy through to the template settings (or defaults if this plan doesn't have
# an associated template) if there are no settings stored for this plan.
# `key` is required by rails-settings, so it's required here, too.
+ #
+ # @param key [Key] a key required by rails
+ # @return [Settings] settings for this plan's template
def settings(key)
self_settings = self.super_settings(key)
return self_settings if self_settings.value?
-
self.dmptemplate.settings(key)
end
+ ##
+ # returns the template for this plan, or generates an empty template and returns that
+ #
+ # @return [Dmptemplate] the template associated with this plan
def dmptemplate
self.project.try(:dmptemplate) || Dmptemplate.new
end
+ ##
+ # returns the title for this project as defined by the settings
+ #
+ # @return [String] the title for this project
def title
logger.debug "Title in settings: #{self.settings(:export).title}"
if self.settings(:export).title == ""
- if !self.version.nil? && !self.version.phase.nil? && !self.version.phase.title? then
- return self.version.phase.title
- else
- return I18n.t('tool_title2')
+ if !self.version.nil? && !self.version.phase.nil? && !self.version.phase.title? then
+ return self.version.phase.title
+ else
+ return I18n.t('tool_title2')
end
else
return self.settings(:export).title
end
end
+ ##
+ # returns the most recent answer to the given question id
+ # optionally can create an answer if none exists
+ #
+ # @param qid [Integer] the id for the question to find the answer for
+ # @param create_if_missing [Boolean] if true, will genereate a default answer to the question
+ # @return [Answer,nil] the most recent answer to the question, or a new question with default value, or nil
def answer(qid, create_if_missing = true)
- answer = answers.where(:question_id => qid).order("created_at DESC").first
- question = Question.find(qid)
+ answer = answers.where(:question_id => qid).order("created_at DESC").first
+ question = Question.find(qid)
if answer.nil? && create_if_missing then
answer = Answer.new
answer.plan_id = id
@@ -70,6 +88,10 @@
return answer
end
+ ##
+ # returns all of the sections for this version of the plan, and for the project's organisation
+ #
+ # @return [Array,nil] either a list of sections, or nil if none were found
def sections
unless project.organisation.nil? then
sections = version.global_sections + project.organisation.all_sections(version_id)
@@ -79,6 +101,11 @@
return sections.uniq.sort_by &:number
end
+ ##
+ # returns the guidances associated with the project's organisation, for a specified question
+ #
+ # @params question [Question] the question to find guidance for
+ # @return [Array] the list of guidances which pretain to the specified question
def guidance_for_question(question)
guidances = {}
# If project org isn't nil, get guidance by theme from any "non-subset" groups belonging to project org
@@ -93,7 +120,6 @@
end
end
end
-
# Get guidance by theme from any guidance groups selected on creation
project.guidance_groups.each do |group|
if group.dmptemplates.pluck(:id).include?(project.dmptemplate_id) || group.dmptemplates.count == 0 then
@@ -102,23 +128,28 @@
guidances = self.add_guidance_to_array(guidances, group, theme, guidance)
end
end
- end
- end
-
+ end
+ end
# Get guidance by question where guidance group was selected on creation or if group is organisation default
question.guidances.each do |guidance|
guidance.guidance_groups.each do |group|
if (group.organisation == project.organisation && !group.optional_subset) || project.guidance_groups.include?(group) then
guidances = self.add_guidance_to_array(guidances, group, nil, guidance)
end
- end
+ end
end
-
return guidances
end
+ ##
+ # adds the given guidance to a hash indexed by a passed guidance group and theme
+ #
+ # @param guidance_array [{GuidanceGroup => {Theme => Array}}] the passed hash of arrays of guidances. Indexed by GuidanceGroup and Theme.
+ # @param guidance_group [GuidanceGroup] the guidance_group index of the hash
+ # @param theme [Theme] the theme object for the GuidanceGroup
+ # @param guidance [Guidance] the guidance object to be appended to the correct section of the array
+ # @return [{GuidanceGroup => {Theme => Array}}] the updated object which was passed in
def add_guidance_to_array(guidance_array, guidance_group, theme, guidance)
-
if guidance_array[guidance_group].nil? then
guidance_array[guidance_group] = {}
end
@@ -137,15 +168,14 @@
guidance_array[guidance_group][theme].push(guidance)
end
end
-
- return guidance_array
+ return guidance_array
end
-
-
-
-
-
-
+
+ ##
+ # finds the specified warning for the plan's project's organisation
+ #
+ # @param option_id [Integer] the id to find the OptionWarning associated
+ # @return [OptionWarning] the desired OptionWarning
def warning(option_id)
if project.organisation.nil?
return nil
@@ -154,10 +184,22 @@
end
end
+ ##
+ # determines if the plan is editable by the specified user
+ # NOTE: This should be renamed to editable_by?
+ #
+ # @param user_id [Integer] the id for a user
+ # @return [Boolean] true if user can edit the plan
def editable_by(user_id)
return project.editable_by(user_id)
end
+ ##
+ # determines if the plan is readable by the specified user
+ # NOTE: This shoudl be renamed to readable_by?
+ #
+ # @param user_id [Integer] the id for a user
+ # @return [Boolean] true if the user can read the plan
def readable_by(user_id)
if project.nil?
return false
@@ -166,10 +208,24 @@
end
end
+ ##
+ # determines if the plan is administerable by the specified user
+ # NOTE: This should be renamed to administerable_by?
+ #
+ # @param user_id [Integer] the id for the user
+ # @return [Boolean] true if the user can administer the plan
def administerable_by(user_id)
return project.readable_by(user_id)
end
+
+ ##
+ # defines and returns the status of the plan
+ # status consists of a hash of the num_questions, num_answers, sections, questions, and spaced used.
+ # For each section, it contains theid's of each of the questions
+ # for each question, it contains the answer_id, answer_created_by, answer_text, answer_options_id, aand answered_by
+ #
+ # @return [Status]
def status
status = {
"num_questions" => 0,
@@ -228,6 +284,13 @@
return status
end
+
+ ##
+ # defines and returns the details for the plan
+ # details consists of a hash of: project_title, phase_title, and for each section,
+ # section: title, question text for each question, answer type and answer value
+ #
+ # @return [Details]
def details
details = {
"project_title" => project.title,
@@ -258,6 +321,12 @@
return details
end
+ ##
+ # determines wether or not a specified section of a plan is locked to a specified user and returns a status hash
+ #
+ # @param section_id [Integer] the setion to determine if locked
+ # @param user_id [Integer] the user to determine if locked for
+ # @return [Hash{String => Hash{String => Boolean, nil, String, Integer}}]
def locked(section_id, user_id)
plan_section = plan_sections.where("section_id = ? AND user_id != ? AND release_time > ?", section_id, user_id, Time.now).last
if plan_section.nil? then
@@ -277,24 +346,44 @@
end
end
+ ##
+ # for each section, lock the section with the given user_id
+ #
+ # @param user_id [Integer] the id for the user who can use the sections
def lock_all_sections(user_id)
sections.each do |s|
lock_section(s.id, user_id, 1800)
end
end
+ ##
+ # for each section, unlock the section
+ #
+ # @param user_id [Integer] the id for the user to unlock the sections for
def unlock_all_sections(user_id)
plan_sections.where(:user_id => user_id).order("created_at DESC").each do |lock|
lock.delete
end
end
+ ##
+ # for each section, unlock the section
+ # Not sure how this is different from unlock_all_sections
+ #
+ # @param user_id [Integer]
def delete_recent_locks(user_id)
plan_sections.where(:user_id => user_id).each do |lock|
lock.delete
end
end
+ ##
+ # Locks the specified section to only be used by the specified user, for the number of secconds specified
+ #
+ # @param section_id [Integer] the id of the section to be locked
+ # @param user_id [Integer] the id of the user who can use the section
+ # @param release_time [Integer] the number of secconds the section will be locked for, defaults to 60
+ # @return [Boolean] wether or not the section was locked
def lock_section(section_id, user_id, release_time = 60)
status = locked(section_id, user_id)
if ! status["locked"] then
@@ -313,12 +402,22 @@
end
end
+ ##
+ # unlocks the specified section for the specified user
+ #
+ # @param section_id [Integer] the id for the section to be unlocked
+ # @param user_id [Integer] the id for the user for whom the section was previously locked
+ # @return [Boolean] wether or not the lock was removed
def unlock_section(section_id, user_id)
plan_sections.where(:section_id => section_id, :user_id => user_id).order("created_at DESC").each do |lock|
lock.delete
end
end
+ ##
+ # returns the time of either the latest answer to any question, or the latest update to the model
+ #
+ # @return [DateTime] the time at which the plan was last changed
def latest_update
if answers.any? then
last_answered = answers.order("updated_at DESC").first.updated_at
@@ -332,6 +431,12 @@
end
end
+ ##
+ # returns an array of hashes. Each hash contains the question's id, the answer_id,
+ # the answer_text, the answer_timestamp, and the answer_options
+ #
+ # @params section_id [Integer] the section to find answers of
+ # @return [Array nil,String,Integer,DateTime}]
def section_answers(section_id)
section = Section.find(section_id)
section_questions = Array.new
@@ -363,6 +468,7 @@
private
+ ##
# Based on the height of the text gathered so far and the available vertical
# space of the pdf, estimate a percentage of how much space has been used.
# This is highly dependent on the layout in the pdf. A more accurate approach
@@ -370,6 +476,9 @@
# could be very slow.
# NOTE: This is only an estimate, rounded up to the nearest 5%; it is intended
# for guidance when editing plan data, not to be 100% accurate.
+ #
+ # @params used_height [Integer] an estimate of the height used so far
+ # @return [Integer] the estimate of space used of an A4 portrain
def estimate_space_used(used_height)
@formatting ||= self.settings(:export).formatting
@@ -383,6 +492,7 @@
(percentage / ROUNDING).ceil * ROUNDING # round up to nearest five
end
+ ##
# Take a guess at the vertical height (in mm) of the given text based on the
# font-size and left/right margins stored in the plan's settings.
# This assumes a fixed-width for each glyph, which is obviously
@@ -390,6 +500,10 @@
# they'll hopefully average out to that in the long-run.
# Allows for hinting different font sizes (offset from base via font_size_inc)
# and vertical margins (i.e. for heading text)
+ #
+ # @params text [String] the text to estimate size of
+ # @params font_size_inc [Integer] the size of the font of the text, defaults to 0
+ # @params vertical_margin [Integer] the top margin above the text, defaults to 0
def height_of_text(text, font_size_inc = 0, vertical_margin = 0)
@formatting ||= self.settings(:export).formatting
@margin_width ||= @formatting[:margin][:left].to_i + @formatting[:margin][:right].to_i
diff --git a/app/models/plan_section.rb b/app/models/plan_section.rb
index 1029b88..6a92a74 100644
--- a/app/models/plan_section.rb
+++ b/app/models/plan_section.rb
@@ -1,9 +1,9 @@
-class PlanSection < ActiveRecord::Base
- attr_accessible :plan_id, :release_time, :section_id, :user_id, :as => [:default, :admin]
-
- #associations between tables
- belongs_to :section
- belongs_to :plan
- belongs_to :user
-
-end
+class PlanSection < ActiveRecord::Base
+ attr_accessible :plan_id, :release_time, :section_id, :user_id, :as => [:default, :admin]
+
+ #associations between tables
+ belongs_to :section
+ belongs_to :plan
+ belongs_to :user
+
+end
diff --git a/app/models/project.rb b/app/models/project.rb
index 14aa4ba..4c14724 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1,4 +1,5 @@
class Project < ActiveRecord::Base
+ include GlobalHelpers
extend FriendlyId
@@ -16,46 +17,67 @@
friendly_id :title, use: [:slugged, :history, :finders]
+ ##
+ # returns the title of the project
+ #
+ # @return [String] the project's title
def to_s
"#{title}"
end
-
+
after_create :create_plans
+ ##
+ # sets a new funder for the project
+ # defaults to the first dmptemplate if the current template is nill and the funder has more than one dmptemplate
+ #
+ # @param new_funder_id [Integer] the id for a new funder
+ # @return [Organisation] the new funder
def funder_id=(new_funder_id)
if new_funder_id != "" then
new_funder = Organisation.find(new_funder_id);
-
if new_funder.dmptemplates.count >= 1 && self.dmptemplate.nil? then
self.dmptemplate = new_funder.dmptemplates.first
end
end
end
+ ##
+ # returns the funder id for the project
+ #
+ # @return [Integer, nil] the id for the funder
def funder_id
if self.dmptemplate.nil? then
return nil
end
template_org = self.dmptemplate.organisation
- if template_org.organisation_type.name == I18n.t('helpers.org_type.funder').downcase
+ if template_org.organisation_type.name == constant("organisation_types.funder").downcase
return template_org.id
else
return nil
end
end
+ ##
+ # returns the funder organisation for the project or nil if none is specified
+ #
+ # @return [Organisation, nil] the funder for project, or nil if none exists
def funder
if self.dmptemplate.nil? then
return nil
end
template_org = self.dmptemplate.organisation
- if template_org.organisation_type.name == I18n.t('helpers.org_type.funder').downcase
+ if template_org.organisation_type.name == constant("organisation_types.funder").downcase
return template_org
else
return nil
end
end
+ ##
+ # returns the name of the funder for the project
+ #
+ # @return [String] the name fo the funder for the project
def funder_name
if self.funder.nil?
return read_attribute(:funder_name)
@@ -64,6 +86,11 @@
end
end
+ ##
+ # defines a new funder_name for the project.
+ #
+ # @param new_funder_name [String] the string name of the new funder
+ # @return [Integer, nil] the org_id of the new funder
def funder_name=(new_funder_name)
write_attribute(:funder_name, new_funder_name)
org_table = Organisation.arel_table
@@ -76,12 +103,21 @@
end
end
+ ##
+ # sets a new institution_id if there is no current organisation
+ #
+ # @params new_institution_id [Integer] the id for the new institution
+ # @return [Integer, Bool] false if an organisation exists, or the id of the set org if a new organisation is set
def institution_id=(new_institution_id)
if organisation.nil? then
self.organisation_id = new_institution_id
end
end
+ ##
+ # returns the organisation which is root over the owning organisation
+ #
+ # @return [Integer, nil] the organisation_id or nil
def institution_id
if organisation.nil?
return nil
@@ -90,12 +126,23 @@
end
end
+ ##
+ # defines a new organisation_id for the project
+ # but is confusingly labled unit_id
+ #
+ # @params new_unit_id [Integer]
+ # @return [Integer, Boolean] the new organisation ID or false if no unit_id was passed
def unit_id=(new_unit_id)
unless new_unit_id.nil? ||new_unit_id == ""
self.organisation_id = new_unit_id
end
end
+ ##
+ # returns the organisation_id or nil
+ # again seems redundant
+ #
+ # @return [nil, Integer] nil if no organisation, or the id if there is an organisation specified
def unit_id
if organisation.nil? || organisation.parent_id.nil?
return nil
@@ -104,22 +151,47 @@
end
end
+ ##
+ # assigns the passed user_id to the creater_role for the project
+ # gives the user rights to read, edit, administrate, and defines them as creator
+ #
+ # @param user_id [Integer] the user to be given priveleges' id
def assign_creator(user_id)
add_user(user_id, true, true, true)
end
+ ##
+ # assigns the passed user_id as an editor for the project
+ # gives the user rights to read and edit
+ #
+ # @param user_id [Integer] the user to be given priveleges' id
def assign_editor(user_id)
add_user(user_id, true)
end
+ ##
+ # assigns the passed user_id as a reader for the project
+ # gives the user rights to read
+ #
+ # @param user_id [Integer] the user to be given priveleges' id
def assign_reader(user_id)
add_user(user_id)
end
+ ##
+ # assigns the passed user_id as an administrator for the project
+ # gives the user rights to read, adit, and administrate the project
+ #
+ # @param user_id [Integer] the user to be given priveleges' id
def assign_administrator(user_id)
add_user(user_id, true, true)
end
+ ##
+ # whether or not the current plan is administrable by the user
+ #
+ # @param user_id [Integer] the user to check if has privleges
+ # @return [Boolean] true if user can administer project, false otherwise
def administerable_by(user_id)
user = project_groups.find_by_user_id(user_id)
if (! user.nil?) && user.project_administrator then
@@ -129,6 +201,11 @@
end
end
+ ##
+ # whether or not the current plan is editable by the user
+ #
+ # @param user_id [Integer] the user to check if has privleges
+ # @return [Boolean] true if user can edit project, false otherwise
def editable_by(user_id)
user = project_groups.find_by_user_id(user_id)
if (! user.nil?) && user.project_editor then
@@ -138,6 +215,12 @@
end
end
+ ##
+ # whether or not the current plan is readable by the user
+ # should be renamed to readable_by?
+ #
+ # @param user_id [Integer] the user to check if has privleges
+ # @return [Boolean] true if user can read project, false otherwise
def readable_by(user_id)
user = project_groups.find_by_user_id(user_id)
if (! user.nil?) then
@@ -147,6 +230,11 @@
end
end
+ ##
+ # returns the projects which the user can atleast read
+ #
+ # @param user_id [Integer] the user to lookup projects for
+ # @return [Array] list of all projects the user can atleast read
def self.projects_for_user(user_id)
projects = Array.new
groups = ProjectGroup.where("user_id = ?", user_id)
@@ -160,6 +248,12 @@
return projects
end
+ ##
+ # whether or not the specified user_id created this project
+ # should be renamed to created_by?
+ #
+ # @params user_id [Integer] the user to check the priveleges of
+ # @return [Boolean] true if the user created the project
def created_by(user_id)
user = project_groups.find_by_user_id(user_id)
if (! user.nil?) && user.project_creator then
@@ -169,6 +263,10 @@
end
end
+ ##
+ # the datetime for the latest update of this project, or any plan it owns
+ #
+ # @return [DateTime] the time of latest update
def latest_update
latest_update = updated_at
plans.each do |plan|
@@ -180,30 +278,60 @@
end
# Getters to match 'My plans' columns
+
+ ##
+ # the title of the project
+ #
+ # @return [String] the title of the project
def name
self.title
end
+ ##
+ # the owner of the project
+ #
+ # @return [User] the creater of the project
def owner
self.project_groups.find_by_project_creator(true).try(:user)
end
+ ##
+ # the time the project was last updated, formatted as a date
+ #
+ # @return [Date] last update as a date
def last_edited
self.latest_update.to_date
end
+ ##
+ # whether or not the plan is shared with anybody
+ #
+ # @return [Boolean] true if the project has been shared
def shared?
self.project_groups.count > 1
end
alias_method :shared, :shared?
+ ##
+ # the organisation who owns the project
+ #
+ # @return [Dmptemplate,Organisation,String] the template, it's owner, or it's owner's abreviation
def template_owner
self.dmptemplate.try(:organisation).try(:abbreviation)
end
private
+ ##
+ # adds a user to the project
+ # if no flags are specified, the user is given read privleges
+ #
+ # @param user_id [Integer] the user to be given privleges
+ # @param is_editor [Boolean] whether or not the user can edit the project
+ # @param is_administrator [Boolean] whether or not the user can administrate the project
+ # @param is_creator [Boolean] wheter or not the user created the project
+ # @return [Array]
def add_user(user_id, is_editor = false, is_administrator = false, is_creator = false)
group = ProjectGroup.new
group.user_id = user_id
@@ -213,6 +341,11 @@
project_groups << group
end
+ ##
+ # creates a plan for each phase in the dmptemplate associated with this project
+ # unless the phase is unpublished, it creates a new plan, and a new version of the plan and adds them to the project's plans
+ #
+ # @return [Array]
def create_plans
dmptemplate.phases.each do |phase|
latest_published_version = phase.latest_published_version
diff --git a/app/models/project_group.rb b/app/models/project_group.rb
index a3be229..05a4c1e 100644
--- a/app/models/project_group.rb
+++ b/app/models/project_group.rb
@@ -1,44 +1,66 @@
class ProjectGroup < ActiveRecord::Base
- #associations between tables
- belongs_to :project
- belongs_to :user
-
- attr_accessible :project_creator, :project_editor, :project_administrator, :project_id, :user_id, :email, :access_level, :as => [:default, :admin]
-
- def email
- unless user.nil?
- return user.email
- end
- end
-
- def email=(new_email)
- unless User.find_by_email(email).nil? then
- user = User.find_by_email(email)
+ #associations between tables
+ belongs_to :project
+ belongs_to :user
+
+ attr_accessible :project_creator, :project_editor, :project_administrator, :project_id, :user_id, :email, :access_level, :as => [:default, :admin]
+
+ ##
+ # returns the user's email unless it is nil
+ #
+ # @return [Boolean, String] false if no email exists, the email otherwise
+ def email
+ unless user.nil?
+ return user.email
end
- end
-
- def access_level
- if project_administrator then
- return 3
- elsif project_editor then
- return 2
- else
- return 1
- end
- end
-
- def access_level=(new_access_level)
- new_access_level = new_access_level.to_i
- if new_access_level >= 3 then
- project_administrator = true
- else
- project_administrator = false
- end
- if new_access_level >= 2 then
- project_editor = true
- else
- project_editor = false
- end
- end
+ end
+
+ ##
+ # define a new user for the project group by email
+ #
+ # @param new_email [String] the email of the new user for the project group
+ # @return [User] the new user
+ def email=(new_email)
+ unless User.find_by(email: email).nil? then
+ user = User.find_by(email: email)
+ end
+ end
+
+ ##
+ # return the access level for the current project group
+ # 3 if the user is an administrator
+ # 2 if the user is an editor
+ # 1 if the user can only read
+ #
+ # @return [Integer]
+ def access_level
+ if project_administrator then
+ return 3
+ elsif project_editor then
+ return 2
+ else
+ return 1
+ end
+ end
+
+ ##
+ # define a new access level for the current project group
+ # if >=3, the user is a project administrator
+ # if >=2, the user is an editor
+ #
+ # @param new_access_level [Integer] the access level to give the user
+ def access_level=(new_access_level)
+ new_access_level = new_access_level.to_i
+ if new_access_level >= 3 then
+ project_administrator = true
+ else
+ project_administrator = false
+ end
+ if new_access_level >= 2 then
+ project_editor = true
+ else
+ project_editor = false
+ end
+ end
end
diff --git a/app/models/project_partner.rb b/app/models/project_partner.rb
index 93d4a41..3c82e18 100644
--- a/app/models/project_partner.rb
+++ b/app/models/project_partner.rb
@@ -1,3 +1,3 @@
-class ProjectPartner < ActiveRecord::Base
- attr_accessible :leader_org, :organisation_id, :project_id, :as => [:default, :admin]
-end
+class ProjectPartner < ActiveRecord::Base
+ attr_accessible :leader_org, :organisation_id, :project_id, :as => [:default, :admin]
+end
diff --git a/app/models/question.rb b/app/models/question.rb
index 6a46f07..4cce243 100644
--- a/app/models/question.rb
+++ b/app/models/question.rb
@@ -20,20 +20,21 @@
accepts_nested_attributes_for :suggested_answers, :allow_destroy => true
accepts_nested_attributes_for :themes
- attr_accessible :default_value, :dependency_id, :dependency_text, :guidance,:number, :parent_id,
- :suggested_answer, :text, :section_id,:question_format_id,:options_attributes,
- :suggested_answers_attributes, :option_comment_display, :theme_ids,
- :as => [:default, :admin]
+ attr_accessible :default_value, :dependency_id, :dependency_text, :guidance,:number, :parent_id, :suggested_answer, :text, :section_id,:question_format_id,:options_attributes, :suggested_answers_attributes, :option_comment_display, :theme_ids, :as => [:default, :admin]
+ ##
+ # returns the text from the question
+ #
+ # @return [String] question's text
def to_s
- "#{text}"
- end
+ "#{text}"
+ end
- amoeba do
- include_association :options
- include_association :suggested_answers
- clone [:themes]
- end
+ amoeba do
+ include_association :options
+ include_association :suggested_answers
+ clone [:themes]
+ end
#def question_type?
# type_label = {}
@@ -47,6 +48,11 @@
# return type_label
#end
+ ##
+ # for each question theme, appends them separated by comas
+ # shouldnt have a ? after the method name
+ #
+ # @return [Hash{String=> String}]
def question_themes?
themes_label = {}
i = 1
@@ -64,7 +70,12 @@
return themes_label
end
+ ##
# guidance for question in the org admin
+ #
+ # @param question [Question] the question to find guidance for
+ # @param org_admin [Organisation] the organisation to find guidance for
+ # @return [Hash{String => String}]
def guidance_for_question(question, org_admin)
# pulls together guidance from various sources for question
guidances = {}
@@ -77,7 +88,6 @@
end
end
end
-
# Guidance link to directly to a question
question.guidances.each do |g_by_q|
g_by_q.guidance_groups.each do |group|
@@ -86,20 +96,17 @@
end
end
end
-
return guidances
end
-
-
-
-
- #get suggested answer belonging to the currents user for this question
+ ##
+ # get suggested answer belonging to the currents user for this question
+ #
+ # @param org_id [Integer] the id for the organisation
+ # @return [String] the suggested_answer for this question for the specified organisation
def get_suggested_answer(org_id)
suggested_answer = suggested_answers.find_by_organisation_id(org_id)
return suggested_answer
end
-
-
end
diff --git a/app/models/question_format.rb b/app/models/question_format.rb
index e72a014..b8ede7c 100644
--- a/app/models/question_format.rb
+++ b/app/models/question_format.rb
@@ -1,12 +1,14 @@
class QuestionFormat < ActiveRecord::Base
attr_accessible :title, :description, :as => [:default, :admin]
-
+
#associations between tables
has_many :questions
-
- def to_s
+ ##
+ # gives the title of the question_format
+ #
+ # @return [String] title of the question_format
+ def to_s
"#{title}"
end
-
-
+
end
\ No newline at end of file
diff --git a/app/models/region.rb b/app/models/region.rb
new file mode 100644
index 0000000..8147fed
--- /dev/null
+++ b/app/models/region.rb
@@ -0,0 +1,3 @@
+class Region < ActiveRecord::Base
+
+end
\ No newline at end of file
diff --git a/app/models/region_group.rb b/app/models/region_group.rb
new file mode 100644
index 0000000..8f83a83
--- /dev/null
+++ b/app/models/region_group.rb
@@ -0,0 +1,3 @@
+class RegionGroup < ActiveRecord::Base
+
+end
\ No newline at end of file
diff --git a/app/models/role.rb b/app/models/role.rb
index 1907a40..c568dac 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -1,9 +1,9 @@
-class Role < ActiveRecord::Base
- has_and_belongs_to_many :users, :join_table => :users_roles
-
- belongs_to :resource, :polymorphic => true
-
- scopify
- attr_accessible :name, :role_in_plans, :resource_id, :resource_type, :as => [:default, :admin]
-
-end
+class Role < ActiveRecord::Base
+ has_and_belongs_to_many :users, :join_table => :users_roles
+
+ belongs_to :resource, :polymorphic => true
+
+ scopify
+ attr_accessible :name, :role_in_plans, :resource_id, :resource_type, :as => [:default, :admin]
+
+end
diff --git a/app/models/section.rb b/app/models/section.rb
index 223e350..fd1dcb7 100644
--- a/app/models/section.rb
+++ b/app/models/section.rb
@@ -12,6 +12,10 @@
attr_accessible :organisation_id, :description, :number, :title, :version_id , :published, :questions_attributes, :as => [:default, :admin]
+ ##
+ # return the title of the section
+ #
+ # @return [String] the title of the section
def to_s
"#{title}"
end
diff --git a/app/models/settings/dmptemplate.rb b/app/models/settings/dmptemplate.rb
index 65cff2a..a5ce2de 100644
--- a/app/models/settings/dmptemplate.rb
+++ b/app/models/settings/dmptemplate.rb
@@ -1,93 +1,93 @@
-module Settings
- class Dmptemplate < RailsSettings::SettingObject
-
- #attr_accessible :var, :target, :target_id, :target_type
-
- VALID_FONT_FACES = [
- 'Arial, Helvetica, Sans-Serif',
- '"Times New Roman", Times, Serif'
- ]
-
- VALID_FONT_SIZE_RANGE = (8..14)
- VALID_MARGIN_RANGE = (5..25)
-
- VALID_ADMIN_FIELDS = ['project_name', 'project_identifier', 'grant_title', 'principal_investigator',
- 'project_data_contact', 'project_description', 'funder', 'institution']
-
- DEFAULT_SETTINGS = {
- formatting: {
- margin: { # in millimeters
- top: 20,
- bottom: 20,
- left: 20,
- right: 20
- },
- font_face: VALID_FONT_FACES.first,
- font_size: 12 # pt
- },
- max_pages: 3,
- fields: {
- admin: VALID_ADMIN_FIELDS,
- questions: :all
- },
- title: ""
- }
-
- validate do
- formatting = value['formatting']
- max_pages = value['max_pages']
- fields = value['fields']
-
- if formatting.present?
- errs = []
- default_formatting = DEFAULT_SETTINGS[:formatting]
-
- unless (default_formatting.keys - formatting.keys).empty?
- errs << :missing_key
- else
- unless formatting[:margin].is_a?(Hash)
- errs << :invalid_margin
- else
- errs << :negative_margin if formatting[:margin].any? {|k,v| v.to_i < 0 }
- errs << :unknown_margin unless (formatting[:margin].keys - default_formatting[:margin].keys).empty?
- errs << :invalid_margin unless formatting[:margin].all? {|k,v| VALID_MARGIN_RANGE.member?(v) }
- end
-
- errs << :invalid_font_size unless VALID_FONT_SIZE_RANGE.member?(formatting[:font_size])
- errs << :invalid_font_face unless VALID_FONT_FACES.member?(formatting[:font_face])
- errs << :unknown_key unless (formatting.keys - default_formatting.keys).empty?
- end
-
- errs.map do |key|
- errors.add(:formatting, I18n.t("helpers.settings.plans.errors.#{key}"))
- end
-
- end
-
- if max_pages.present? && (!max_pages.is_a?(Integer) || max_pages <= 0)
- errors.add(:max_pages, I18n.t('helpers.settings.plans.errors.invalid_max_pages'))
- end
- end
-
- before_validation do
- self.formatting[:font_size] = self.formatting[:font_size].to_i if self.formatting[:font_size].present?
- unless self.formatting[:margin].nil? or (not self.formatting[:margin].is_a?(Hash))
- self.formatting[:margin].each do |key, val|
- self.formatting[:margin][key] = val.to_i
- end
- end
-
- self.fields.each do |key, val|
- if val.is_a?(Hash)
- val = key == :questions ? val.keys.map {|k| k.to_s.to_i } : val.keys
- end
-
- self.fields[key] = val
- end
-
- # Save empty arrays if we don't have any fields for them
- self.fields[:admin] ||= []
- self.fields[:questions] ||= []
- end
- end
-end
+module Settings
+ class Dmptemplate < RailsSettings::SettingObject
+
+ #attr_accessible :var, :target, :target_id, :target_type
+
+ VALID_FONT_FACES = [
+ 'Arial, Helvetica, Sans-Serif',
+ '"Times New Roman", Times, Serif'
+ ]
+
+ VALID_FONT_SIZE_RANGE = (8..14)
+ VALID_MARGIN_RANGE = (5..25)
+
+ VALID_ADMIN_FIELDS = ['project_name', 'project_identifier', 'grant_title', 'principal_investigator',
+ 'project_data_contact', 'project_description', 'funder', 'institution']
+
+ DEFAULT_SETTINGS = {
+ formatting: {
+ margin: { # in millimeters
+ top: 20,
+ bottom: 20,
+ left: 20,
+ right: 20
+ },
+ font_face: VALID_FONT_FACES.first,
+ font_size: 12 # pt
+ },
+ max_pages: 3,
+ fields: {
+ admin: VALID_ADMIN_FIELDS,
+ questions: :all
+ },
+ title: ""
+ }
+
+ validate do
+ formatting = value['formatting']
+ max_pages = value['max_pages']
+ fields = value['fields']
+
+ if formatting.present?
+ errs = []
+ default_formatting = DEFAULT_SETTINGS[:formatting]
+
+ unless (default_formatting.keys - formatting.keys).empty?
+ errs << :missing_key
+ else
+ unless formatting[:margin].is_a?(Hash)
+ errs << :invalid_margin
+ else
+ errs << :negative_margin if formatting[:margin].any? {|k,v| v.to_i < 0 }
+ errs << :unknown_margin unless (formatting[:margin].keys - default_formatting[:margin].keys).empty?
+ errs << :invalid_margin unless formatting[:margin].all? {|k,v| VALID_MARGIN_RANGE.member?(v) }
+ end
+
+ errs << :invalid_font_size unless VALID_FONT_SIZE_RANGE.member?(formatting[:font_size])
+ errs << :invalid_font_face unless VALID_FONT_FACES.member?(formatting[:font_face])
+ errs << :unknown_key unless (formatting.keys - default_formatting.keys).empty?
+ end
+
+ errs.map do |key|
+ errors.add(:formatting, I18n.t("helpers.settings.plans.errors.#{key}"))
+ end
+
+ end
+
+ if max_pages.present? && (!max_pages.is_a?(Integer) || max_pages <= 0)
+ errors.add(:max_pages, I18n.t('helpers.settings.plans.errors.invalid_max_pages'))
+ end
+ end
+
+ before_validation do
+ self.formatting[:font_size] = self.formatting[:font_size].to_i if self.formatting[:font_size].present?
+ unless self.formatting[:margin].nil? or (not self.formatting[:margin].is_a?(Hash))
+ self.formatting[:margin].each do |key, val|
+ self.formatting[:margin][key] = val.to_i
+ end
+ end
+
+ self.fields.each do |key, val|
+ if val.is_a?(Hash)
+ val = key == :questions ? val.keys.map {|k| k.to_s.to_i } : val.keys
+ end
+
+ self.fields[key] = val
+ end
+
+ # Save empty arrays if we don't have any fields for them
+ self.fields[:admin] ||= []
+ self.fields[:questions] ||= []
+ end
+ end
+end
diff --git a/app/models/settings/plan_list.rb b/app/models/settings/plan_list.rb
index f046cfd..17e93a9 100644
--- a/app/models/settings/plan_list.rb
+++ b/app/models/settings/plan_list.rb
@@ -1,21 +1,21 @@
-module Settings
- class PlanList < RailsSettings::SettingObject
-
- #attr_accessible :var, :target, :target_type, :target_id
-
- # TODO: can these be taken from somewhere else rather than hard-coded here?
- DEFAULT_COLUMNS = ['name', 'owner', 'shared', 'last_edited']
- ALL_COLUMNS = DEFAULT_COLUMNS + ['template_owner', 'identifier', 'grant_number',
- 'principal_investigator', 'data_contact', 'description']
-
- validate do
- cols = value["columns"]
-
- if cols.present? # columns can be empty, in which case they revert to defaults
- errors.add(:columns, I18n.t("helpers.settings.projects.errors.no_name")) unless cols.member?("name")
- errors.add(:columns, I18n.t("helpers.settings.projects.errors.duplicate")) unless cols.keys.uniq == cols.keys
- errors.add(:columns, I18n.t("helpers.settings.projects.errors.unknown")) unless (cols.keys.uniq & ALL_COLUMNS) == cols.keys.uniq
- end
- end
- end
-end
+module Settings
+ class PlanList < RailsSettings::SettingObject
+
+ #attr_accessible :var, :target, :target_type, :target_id
+
+ # TODO: can these be taken from somewhere else rather than hard-coded here?
+ DEFAULT_COLUMNS = ['name', 'owner', 'shared', 'last_edited']
+ ALL_COLUMNS = DEFAULT_COLUMNS + ['template_owner', 'identifier', 'grant_number',
+ 'principal_investigator', 'data_contact', 'description']
+
+ validate do
+ cols = value["columns"]
+
+ if cols.present? # columns can be empty, in which case they revert to defaults
+ errors.add(:columns, I18n.t("helpers.settings.projects.errors.no_name")) unless cols.member?("name")
+ errors.add(:columns, I18n.t("helpers.settings.projects.errors.duplicate")) unless cols.keys.uniq == cols.keys
+ errors.add(:columns, I18n.t("helpers.settings.projects.errors.unknown")) unless (cols.keys.uniq & ALL_COLUMNS) == cols.keys.uniq
+ end
+ end
+ end
+end
diff --git a/app/models/splash_log.rb b/app/models/splash_log.rb
index 6b10901..43dcc4d 100644
--- a/app/models/splash_log.rb
+++ b/app/models/splash_log.rb
@@ -1,3 +1,3 @@
-class SplashLog < ActiveRecord::Base
- #attr_accessible :destination
-end
+class SplashLog < ActiveRecord::Base
+ #attr_accessible :destination
+end
diff --git a/app/models/suggested_answer.rb b/app/models/suggested_answer.rb
index 01d233e..3bbefa8 100644
--- a/app/models/suggested_answer.rb
+++ b/app/models/suggested_answer.rb
@@ -2,12 +2,15 @@
belongs_to :organisation
belongs_to :question
-
+
# accepts_nested_attributes_for :question
-
+
attr_accessible :organisation_id, :question_id, :text, :is_example, :as => [:default, :admin]
-
-
+
+ ##
+ # returns the text from the suggested_answer
+ #
+ # @return [String] the text from the suggested_answer
def to_s
"#{text}"
end
diff --git a/app/models/theme.rb b/app/models/theme.rb
index 70b5b11..0b31f36 100644
--- a/app/models/theme.rb
+++ b/app/models/theme.rb
@@ -1,19 +1,23 @@
class Theme < ActiveRecord::Base
#associations between tables
- has_and_belongs_to_many :questions, join_table: "questions_themes"
+ has_and_belongs_to_many :questions, join_table: "questions_themes"
has_and_belongs_to_many :guidances, join_table: "themes_in_guidance"
-
-
+
+
# accepts_nested_attributes_for :guidances
# accepts_nested_attributes_for :questions
-
+
attr_accessible :guidance_ids , :as => [:default, :admin]
attr_accessible :question_ids, :as => [:default, :admin]
attr_accessible :description, :title, :locale , :as => [:default, :admin]
-
+
+ ##
+ # returns the title of the theme
+ #
+ # @return [String] title of the theme
def to_s
title
end
-
+
end
diff --git a/app/models/token_permission_type.rb b/app/models/token_permission_type.rb
index 8c02ecb..9b340f1 100644
--- a/app/models/token_permission_type.rb
+++ b/app/models/token_permission_type.rb
@@ -5,6 +5,10 @@
#associations between tables
has_and_belongs_to_many :org_token_permissions, join_table: "org_token_permissions"
+ ##
+ # returns the token_type of the token_permission_type
+ #
+ # @return [String] token_type of the token_permission_type
def to_s
self.token_type
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 2c0064b..e9ea489 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,9 +1,11 @@
class User < ActiveRecord::Base
+ include GlobalHelpers
+
rolify
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
- devise :invitable, :database_authenticatable, :registerable, :recoverable, :rememberable,
+ devise :invitable, :database_authenticatable, :registerable, :recoverable, :rememberable,
:trackable, :validatable, :confirmable, :omniauthable, :omniauth_providers => [:shibboleth]
#associations between tables
@@ -14,6 +16,7 @@
has_many :project_groups, :dependent => :destroy
has_many :organisations , through: :user_org_roles
has_many :user_role_types, through: :user_org_roles
+ has_one :language
@@ -39,15 +42,15 @@
# Commented out due to warning in Rails 4. This line is redundant due to use of the rolify gem
#has_and_belongs_to_many :roles, :join_table => :users_roles
-
+
has_many :plan_sections
accepts_nested_attributes_for :roles
-
- attr_accessible :password_confirmation, :encrypted_password, :remember_me, :id, :email,
+ attr_accessible :password_confirmation, :encrypted_password, :remember_me, :id, :email,
:firstname, :last_login,:login_count, :orcid_id, :password, :shibboleth_id,
:user_status_id, :surname, :user_type_id, :organisation_id, :skip_invitation,
- :other_organisation, :accept_terms, :role_ids, :dmponline3, :api_token
+ :other_organisation, :accept_terms, :role_ids, :dmponline3, :api_token,
+ :language_id
# FIXME: The duplication in the block is to set defaults. It might be better if
# they could be set in Settings::PlanList itself, if possible.
@@ -55,6 +58,11 @@
s.key :plan_list, defaults: { columns: Settings::PlanList::DEFAULT_COLUMNS }
end
+ ##
+ # gives either the name of the user, or the email if name unspecified
+ #
+ # @param user_email [Boolean] defaults to true, allows the use of email if there is no firstname or surname
+ # @return [String] the email or the firstname and surname of the user
def name(use_email = true)
if ((firstname.nil? && surname.nil?) || (firstname.strip == "" && surname.strip == "")) && use_email then
return email
@@ -64,6 +72,13 @@
end
end
+ ##
+ # sets a new organisation id for the user
+ # if the user has any roles such as org_admin or admin, those are removed
+ # if the user had an api_token, that is removed
+ #
+ # @param new_organisation_id [Integer] the id for an organisation
+ # @return [String] the empty string as a causality of setting api_token
def organisation_id=(new_organisation_id)
# if the user is not part of the new organisation
if !self.user_org_roles.pluck(:organisation_id).include?(new_organisation_id.to_i) then
@@ -71,7 +86,7 @@
if self.user_org_roles.count != 1 then
new_user_org_role = UserOrgRole.new
new_user_org_role.organisation_id = new_organisation_id
- new_user_org_role.user_role_type = UserRoleType.find_by_name("user");
+ new_user_org_role.user_role_type = UserRoleType.find_by(name: constant("user_role_types.user"));
self.user_org_roles << new_user_org_role
#
# if the user has roles other than one(0/2/3?)
@@ -83,7 +98,7 @@
# save modified role
user_org_role.save
# if user has an "org_admin" role
- org_admin_role = roles.find_by_name("org_admin")
+ org_admin_role = roles.find_by(name: constant("user_role_types.org_admin"))
unless org_admin_role.nil? then
# delete it
roles.delete(org_admin_role)
@@ -91,9 +106,13 @@
end
end
# rip api_token from user
- self.api_token = ""
+ self.remove_token!
end
+ ##
+ # returns the first organisation id of the user or nil
+ #
+ # @return [Integer, nil] the id of the user's organisation
def organisation_id
if self.organisations.count > 0 then
return self.organisations.first.id
@@ -102,6 +121,10 @@
end
end
+ ##
+ # returns the organisation of the user or nil
+ #
+ # @return [Organisation, nil] the organisation of the user
def organisation
if self.organisations.count > 0 then
return self.organisations.first
@@ -110,6 +133,11 @@
end
end
+ ##
+ # returns the last organisation in the list of organisations
+ # possibly depricated as the user only has one organisation in the current schema
+ #
+ # @return [Organisation, nil] the organisation for the user
def current_organisation
if self.organisations.count > 0 then
return self.organisations.last
@@ -118,42 +146,64 @@
end
end
+ ##
+ # sets a new organisation for the user
+ #
+ # @params new_organisation [Organisation] the new organisation for the user
def organisation=(new_organisation)
organisation_id = organisation.id
end
+ ##
+ # checks if the user is an admin
+ #
+ # @return [Boolean] true if the user is an admin
def is_admin?
- admin = roles.find_by_name("admin")
+ admin = roles.find_by( name: constant("user_role_types.super_admin"))
return !admin.nil?
end
+ ##
+ # checks if the user is an organisation admin
+ #
+ # @return [Boolean] true if the user is an organisation admin
def is_org_admin?
- org_admin = roles.find_by_name("org_admin")
+ org_admin = roles.find_by(name: constant("user_role_types.organisational_admin"))
return !org_admin.nil?
end
- def org_type
- org_type = organisation.organisation_type.name
- return org_type
- end
+ ##
+ # checks what type the user's organisation is
+ #
+ # @return [String] the organisation type
+ def org_type
+ org_type = organisation.organisation_type.name
+ return org_type
+ end
- def remove_token!
- unless api_token.empty?
- self.api_token = ""
- self.save!
- end
+ ##
+ # removes the api_token from the user
+ # modifies the user model
+ def remove_token!
+ unless api_token.empty?
+ self.api_token = ""
+ self.save!
end
+ end
- def keep_or_generate_token!
- if api_token.empty?
- self.api_token = loop do
- random_token = SecureRandom.urlsafe_base64(nil, false)
- break random_token unless User.exists?(api_token: random_token)
- end
- self.save!
- # send an email to the user to notify them of their new api token
- UserMailer.api_token_granted_notification(self)
- end
+ #
+ # generates a new token for the user unless the user already has a token.
+ # modifies the user's model.
+ def keep_or_generate_token!
+ if api_token.empty?
+ self.api_token = loop do
+ random_token = SecureRandom.urlsafe_base64(nil, false)
+ break random_token unless User.exists?(api_token: random_token)
+ end
+ self.save!
+ # send an email to the user to notify them of their new api token
+ UserMailer.api_token_granted_notification(self)
end
+ end
end
diff --git a/app/models/user_org_role.rb b/app/models/user_org_role.rb
index 7d94d6f..10fca3c 100644
--- a/app/models/user_org_role.rb
+++ b/app/models/user_org_role.rb
@@ -1,9 +1,9 @@
-class UserOrgRole < ActiveRecord::Base
- attr_accessible :organisation_id, :user_id, :user_role_type_id, :as => [:default, :admin]
-
- #associations between tables
- belongs_to :user
- belongs_to :organisation
- belongs_to :user_role_type
-
-end
+class UserOrgRole < ActiveRecord::Base
+ attr_accessible :organisation_id, :user_id, :user_role_type_id, :as => [:default, :admin]
+
+ #associations between tables
+ belongs_to :user
+ belongs_to :organisation
+ belongs_to :user_role_type
+
+end
diff --git a/app/models/user_role_type.rb b/app/models/user_role_type.rb
index 756f032..e012aca 100644
--- a/app/models/user_role_type.rb
+++ b/app/models/user_role_type.rb
@@ -1,7 +1,7 @@
-class UserRoleType < ActiveRecord::Base
-
- #associations between tables
- has_many :user_org_roles
-
- attr_accessible :description, :name, :as => [:default, :admin]
-end
+class UserRoleType < ActiveRecord::Base
+
+ #associations between tables
+ has_many :user_org_roles
+
+ attr_accessible :description, :name, :as => [:default, :admin]
+end
diff --git a/app/models/user_status.rb b/app/models/user_status.rb
index 5c7bea6..a8c4dcd 100644
--- a/app/models/user_status.rb
+++ b/app/models/user_status.rb
@@ -1,6 +1,6 @@
-class UserStatus < ActiveRecord::Base
- attr_accessible :description, :name, :as => [:default, :admin]
-
- #associations between tables
- has_many :users
-end
+class UserStatus < ActiveRecord::Base
+ attr_accessible :description, :name, :as => [:default, :admin]
+
+ #associations between tables
+ has_many :users
+end
diff --git a/app/models/user_type.rb b/app/models/user_type.rb
index 8cf20be..8ceb4d4 100644
--- a/app/models/user_type.rb
+++ b/app/models/user_type.rb
@@ -1,6 +1,6 @@
-class UserType < ActiveRecord::Base
- attr_accessible :description, :name, :as => [:default, :admin]
-
- #associations between tables
- has_many :users
-end
+class UserType < ActiveRecord::Base
+ attr_accessible :description, :name, :as => [:default, :admin]
+
+ #associations between tables
+ has_many :users
+end
diff --git a/app/models/version.rb b/app/models/version.rb
index 13e17c8..db03966 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -1,35 +1,41 @@
class Version < ActiveRecord::Base
-
+
#associations between tables
belongs_to :phase
-
+
has_many :sections, :dependent => :destroy
has_many :questions, :through => :sections, :dependent => :destroy
has_many :plans
-
+
#Link the data
# accepts_nested_attributes_for :phase
- accepts_nested_attributes_for :sections, :allow_destroy => true
-
- attr_accessible :id, :description, :number, :published, :title, :phase_id,
+ accepts_nested_attributes_for :sections, :allow_destroy => true
+
+ attr_accessible :id, :description, :number, :published, :title, :phase_id,
:sections_attributes, :as => [:default, :admin]
-
+
+ ##
+ # returns the title of the version
+ #
+ # @return [String] the title of the version
def to_s
"#{title}"
end
-
-
-
+
+
+ ##
+ # returns all sections where the org_id is the same as this version's phase's org_id
+ #
+ # @return [Array]
def global_sections
sections.where("organisation_id = ? ", phase.dmptemplate.organisation_id).load
end
-
+
amoeba do
include_association :sections
include_association :questions
set :published => 'false'
- prepend :title => "Copy of "
+ prepend :title => "Copy of "
end
-
-
+
end
diff --git a/app/views/api/v0/dmptemplates/index.json.jbuilder b/app/views/api/v0/dmptemplates/index.json.jbuilder
new file mode 100644
index 0000000..33ebd74
--- /dev/null
+++ b/app/views/api/v0/dmptemplates/index.json.jbuilder
@@ -0,0 +1,14 @@
+# builds a json response to api query for a list of all dmptemplates
+json.prettify!
+
+json.templates Organisation.all.each do |org|
+ unless org.published_templates.blank?
+ json.organisation_name org.name
+ json.organisation_id org.id
+ json.organisation_templates org.published_templates.each do |template|
+ json.title template.title
+ json.id template.id
+ json.description template.description
+ end
+ end
+end
\ No newline at end of file
diff --git a/app/views/api/v0/guidance_groups/index.json.jbuilder b/app/views/api/v0/guidance_groups/index.json.jbuilder
index cae2288..908b19d 100644
--- a/app/views/api/v0/guidance_groups/index.json.jbuilder
+++ b/app/views/api/v0/guidance_groups/index.json.jbuilder
@@ -13,11 +13,7 @@
end
json.templates @templates do |template|
json.title template.title
- end
-
- json.guidances guidance_group.guidances do |guidance|
- json.text guidance.text
- json.id guidance.id
+ json.id template.id
end
json.optional guidance_group.optional_subset
diff --git a/app/views/api/v0/guidance_groups/show.json.jbuilder b/app/views/api/v0/guidance_groups/show.json.jbuilder
index 4408430..1a412db 100644
--- a/app/views/api/v0/guidance_groups/show.json.jbuilder
+++ b/app/views/api/v0/guidance_groups/show.json.jbuilder
@@ -13,6 +13,7 @@
end
json.templates @templates do |template|
json.title template.title
+ json.id template.id
end
json.guidances @guidance_group.guidances do |guidance|
diff --git a/app/views/api/v0/projects/create.json.jbuilder b/app/views/api/v0/projects/create.json.jbuilder
index 8ed26fb..ebb8c58 100644
--- a/app/views/api/v0/projects/create.json.jbuilder
+++ b/app/views/api/v0/projects/create.json.jbuilder
@@ -1,15 +1,15 @@
-# builds a json response to a successful project createtion
-
-json.prettify!
-
-json.project do
- json.title @project.title
- # TODO add after decision on user creation/identification
- #json.created_by @project.owner.email
- json.id @project.id
- json.created_at @project.created_at
-end
-
-# json.location do
-# json.link (url_for action: 'show', controller: 'project')
-# end
+# builds a json response to a successful project createtion
+
+json.prettify!
+
+json.project do
+ json.title @project.title
+ # TODO add after decision on user creation/identification
+ #json.created_by @project.owner.email
+ json.id @project.id
+ json.created_at @project.created_at
+end
+
+# json.location do
+# json.link (url_for action: 'show', controller: 'project')
+# end
diff --git a/app/views/api/v0/projects/show.json.jbuilder b/app/views/api/v0/projects/show.json.jbuilder
index 6e9d391..2cd84bf 100644
--- a/app/views/api/v0/projects/show.json.jbuilder
+++ b/app/views/api/v0/projects/show.json.jbuilder
@@ -1,13 +1,13 @@
-# builds a json response to a successful project createtion
-
-json.prettify!
-
-json.project do
- json.title @project.title
- # TODO add after decision on user creation/identification
- json.created_by @project.owner.email
- json.id @project.id
- json.created_at @project.created_at
- #json.template @project.dmptemplate
- json.dmptemplate @project.dmptemplate.title
-end
+# builds a json response to a successful project createtion
+
+json.prettify!
+
+json.project do
+ json.title @project.title
+ # TODO add after decision on user creation/identification
+ json.created_by @project.owner.email
+ json.id @project.id
+ json.created_at @project.created_at
+ #json.template @project.dmptemplate
+ json.dmptemplate @project.dmptemplate.title
+end
diff --git a/app/views/api/v0/statistics/plans.json.jbuilder b/app/views/api/v0/statistics/plans.json.jbuilder
new file mode 100644
index 0000000..1a05c9b
--- /dev/null
+++ b/app/views/api/v0/statistics/plans.json.jbuilder
@@ -0,0 +1,25 @@
+json.prettify!
+
+json.plans @org_projects.each do |project|
+ json.id project.id
+ json.grant_number project.grant_number
+ json.org_id project.organisation_id
+ json.template do
+ json.title project.dmptemplate.title
+ json.id project.dmptemplate.id
+ end
+ json.project do
+ json.title project.title
+ end
+ json.funder do
+ json.name project.funder_name
+ end
+ json.principal_investigator do
+ json.name project.principal_investigator
+ end
+ json.data_contact do
+ json.info project.data_contact
+ end
+ json.description project.description
+
+end
\ No newline at end of file
diff --git a/app/views/api/v0/statistics/plans_by_template.json.jbuilder b/app/views/api/v0/statistics/plans_by_template.json.jbuilder
new file mode 100644
index 0000000..155bbba
--- /dev/null
+++ b/app/views/api/v0/statistics/plans_by_template.json.jbuilder
@@ -0,0 +1,20 @@
+json.prettify!
+templates = {}
+@org_projects.each do |project|
+ # if hash exists
+ if templates[project.dmptemplate.title].blank?
+ templates[project.dmptemplate.title] = {}
+ templates[project.dmptemplate.title][:title] = project.dmptemplate.title
+ templates[project.dmptemplate.title][:id] = project.dmptemplate.id
+ templates[project.dmptemplate.title][:uses] = 1
+ else
+ templates[project.dmptemplate.title][:uses] += 1
+ end
+end
+
+json.templates templates.each do |template, info|
+ json.template_name info[:title]
+ json.template_id info[:id]
+ json.template_uses info[:uses]
+end
+
diff --git a/app/views/api/v0/statistics/users_joined.json.jbuilder b/app/views/api/v0/statistics/users_joined.json.jbuilder
new file mode 100644
index 0000000..4826bb7
--- /dev/null
+++ b/app/views/api/v0/statistics/users_joined.json.jbuilder
@@ -0,0 +1,4 @@
+
+json.prettify!
+
+json.users_joined @users_count
\ No newline at end of file
diff --git a/app/views/api/v0/statistics/using_template.json.jbuilder b/app/views/api/v0/statistics/using_template.json.jbuilder
new file mode 100644
index 0000000..04a77b6
--- /dev/null
+++ b/app/views/api/v0/statistics/using_template.json.jbuilder
@@ -0,0 +1,3 @@
+json.prettify!
+
+json.plans_using_template @template_count
\ No newline at end of file
diff --git a/app/views/contact_us/contact_mailer/contact_email.html.erb b/app/views/contact_us/contact_mailer/contact_email.html.erb
index 57616f4..c8646c2 100644
--- a/app/views/contact_us/contact_mailer/contact_email.html.erb
+++ b/app/views/contact_us/contact_mailer/contact_email.html.erb
@@ -1,3 +1,3 @@
-<%= @contact.message %>
----------------------
-<%= ContactUs.require_name ? t('.sent_by_name', :email => @contact.email, :name => @contact.name) : t('.sent_by_contact_form', :email => @contact.email) %>
+<%= @contact.message %>
+---------------------
+<%= ContactUs.require_name ? t('.sent_by_name', :email => @contact.email, :name => @contact.name) : t('.sent_by_contact_form', :email => @contact.email) %>
diff --git a/app/views/contact_us/contact_mailer/contact_email.text.plain.erb b/app/views/contact_us/contact_mailer/contact_email.text.plain.erb
index 182f4f4..2bf3d27 100644
--- a/app/views/contact_us/contact_mailer/contact_email.text.plain.erb
+++ b/app/views/contact_us/contact_mailer/contact_email.text.plain.erb
@@ -1,4 +1,4 @@
-<%= @contact.message %>
-
--------------------------------------
+<%= @contact.message %>
+
+-------------------------------------
<%= ContactUs.require_name ? t('.sent_by_name', :email => @contact.email, :name => @contact.name) : t('.sent_by_contact_form', :email => @contact.email) %>
\ No newline at end of file
diff --git a/app/views/contact_us/contacts/new_formtastic.html.erb b/app/views/contact_us/contacts/new_formtastic.html.erb
index fe182db..8554019 100644
--- a/app/views/contact_us/contacts/new_formtastic.html.erb
+++ b/app/views/contact_us/contacts/new_formtastic.html.erb
@@ -1,8 +1,8 @@
-<%= t('.contact_us') %>
-<%= semantic_form_for @contact, :url => contacts_path do |f| %>
- <%= f.input :name, :label => t('.name') if ContactUs.require_name %>
- <%= f.input :email, :label => t('.email') %>
- <%= f.input :subject, :label => t('.subject') if ContactUs.require_subject %>
- <%= f.input :message, :as => :text, :label => t('.message') %>
- <%= f.action :submit, :label => t('.submit'), :button_html => { :alt => t('.submit'), :id => 'contact_us_contact_submit', :title => t('.submit') } %>
-<% end %>
+<%= t('.contact_us') %>
+<%= semantic_form_for @contact, :url => contacts_path do |f| %>
+ <%= f.input :name, :label => t('.name') if ContactUs.require_name %>
+ <%= f.input :email, :label => t('.email') %>
+ <%= f.input :subject, :label => t('.subject') if ContactUs.require_subject %>
+ <%= f.input :message, :as => :text, :label => t('.message') %>
+ <%= f.action :submit, :label => t('.submit'), :button_html => { :alt => t('.submit'), :id => 'contact_us_contact_submit', :title => t('.submit') } %>
+<% end %>
diff --git a/app/views/contact_us/contacts/new_simple_form.html.erb b/app/views/contact_us/contacts/new_simple_form.html.erb
index d863cf3..b4593f0 100644
--- a/app/views/contact_us/contacts/new_simple_form.html.erb
+++ b/app/views/contact_us/contacts/new_simple_form.html.erb
@@ -1,8 +1,8 @@
-<%= t('.contact_us') %>
-<%= simple_form_for @contact, :url => contacts_path do |f| %>
- <%= f.input :name, :label => t('.name') if ContactUs.require_name %>
- <%= f.input :email, :label => t('.email') %>
- <%= f.input :subject, :label => t('.subject') if ContactUs.require_subject %>
- <%= f.input :message, :as => :text, :label => t('.message') %>
- <%= f.button :submit, :label => t('.submit'), :button_html => { :alt => t('.submit'), :id => 'contact_us_contact_submit', :title => t('.submit') } %>
-<% end %>
+<%= t('.contact_us') %>
+<%= simple_form_for @contact, :url => contacts_path do |f| %>
+ <%= f.input :name, :label => t('.name') if ContactUs.require_name %>
+ <%= f.input :email, :label => t('.email') %>
+ <%= f.input :subject, :label => t('.subject') if ContactUs.require_subject %>
+ <%= f.input :message, :as => :text, :label => t('.message') %>
+ <%= f.button :submit, :label => t('.submit'), :button_html => { :alt => t('.submit'), :id => 'contact_us_contact_submit', :title => t('.submit') } %>
+<% end %>
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index d5cc21d..f5fadfb 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -1,12 +1,12 @@
-<%= t('custom_devise.resend_confirmation') %>
-
-<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
- <%= devise_error_messages! %>
-
- <%= f.label :email %>
- <%= f.email_field :email, :autofocus => true %>
-
- <%= f.submit t('custom_devise.resend_confirmation') %>
-<% end %>
-
-<%= render "devise/shared/links" %>
+<%= t('custom_devise.resend_confirmation') %>
+
+<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
+ <%= devise_error_messages! %>
+
+ <%= f.label :email %>
+ <%= f.email_field :email, :autofocus => true %>
+
+ <%= f.submit t('custom_devise.resend_confirmation') %>
+<% end %>
+
+<%= render "devise/shared/links" %>
diff --git a/app/views/devise/invitations/edit.html.erb b/app/views/devise/invitations/edit.html.erb
index c6071dc..4a4b73e 100644
--- a/app/views/devise/invitations/edit.html.erb
+++ b/app/views/devise/invitations/edit.html.erb
@@ -1,15 +1,15 @@
-<%= t "devise.invitations.edit.header" %>
-
- <%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
- <%= devise_error_messages! %>
- <%= f.hidden_field :invitation_token %>
-
-
<%= f.label :password %>
- <%= f.password_field :password %>
-
-
<%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation %>
-
-
<%= f.submit t("devise.invitations.edit.submit_button") %>
- <% end %>
-
+<%= t "devise.invitations.edit.header" %>
+
+ <%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
+ <%= devise_error_messages! %>
+ <%= f.hidden_field :invitation_token %>
+
+
<%= f.label :password %>
+ <%= f.password_field :password %>
+
+
<%= f.label :password_confirmation %>
+ <%= f.password_field :password_confirmation %>
+
+
<%= f.submit t("devise.invitations.edit.submit_button") %>
+ <% end %>
+
diff --git a/app/views/devise/invitations/new.html.erb b/app/views/devise/invitations/new.html.erb
index 3602bb4..3567356 100644
--- a/app/views/devise/invitations/new.html.erb
+++ b/app/views/devise/invitations/new.html.erb
@@ -1,14 +1,14 @@
-<%= t "devise.invitations.new.header" %>
-
- <%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %>
- <%= devise_error_messages! %>
-
- <% resource.class.invite_key_fields.each do |field| -%>
-
<%= f.label field %>
- <%= f.text_field field %>
- <% end -%>
-
-
<%= f.submit t("devise.invitations.new.submit_button") %>
- <% end %>
-
+
<%= t "devise.invitations.new.header" %>
+
+ <%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %>
+ <%= devise_error_messages! %>
+
+ <% resource.class.invite_key_fields.each do |field| -%>
+
<%= f.label field %>
+ <%= f.text_field field %>
+ <% end -%>
+
+
<%= f.submit t("devise.invitations.new.submit_button") %>
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb
index 08c61ba..c1faca5 100644
--- a/app/views/devise/mailer/confirmation_instructions.html.erb
+++ b/app/views/devise/mailer/confirmation_instructions.html.erb
@@ -1,5 +1,5 @@
-
<%= t('custom_devise.welcome_to_DMP') %>, <%= @email %>!
-
-
<%= t('custom_devise.thank_you_and_confirm') %>
-
+
<%= t('custom_devise.welcome_to_DMP') %>, <%= @email %>!
+
+
<%= t('custom_devise.thank_you_and_confirm') %>
+
<%= link_to t('custom_devise.click_to_confirm'), confirmation_url(@resource, :confirmation_token => @token) %> <%= t('custom_devise.1st_part_copy') %> <%= confirmation_url(@resource, :confirmation_token => @token) %> <%= t('custom_devise.2nd_part_copy') %>
\ No newline at end of file
diff --git a/app/views/devise/mailer/invitation_instructions.html.erb b/app/views/devise/mailer/invitation_instructions.html.erb
index 2828329..7beb75d 100644
--- a/app/views/devise/mailer/invitation_instructions.html.erb
+++ b/app/views/devise/mailer/invitation_instructions.html.erb
@@ -1,7 +1,7 @@
-
<%= t('custom_devise.hello') %> <%= @resource.email %>!
-
-
<%= t('custom_devise.colleague_invited_you') %> <%= link_to t('tool_title'), root_url %>
-
-
<%= link_to t('custom_devise.click_to_accept'), accept_invitation_url(@resource, :invitation_token => @token) %> <%= t('custom_devise.1st_part_copy') %> <%= accept_invitation_url(@resource, :invitation_token => @token) %> <%= t('custom_devise.2nd_part_copy') %>
-
+
<%= t('custom_devise.hello') %> <%= @resource.email %>!
+
+
<%= t('custom_devise.colleague_invited_you') %> <%= link_to t('tool_title'), root_url %>
+
+
<%= link_to t('custom_devise.click_to_accept'), accept_invitation_url(@resource, :invitation_token => @token) %> <%= t('custom_devise.1st_part_copy') %> <%= accept_invitation_url(@resource, :invitation_token => @token) %> <%= t('custom_devise.2nd_part_copy') %>
+
<%= t('custom_devise.ignore_wont_be_created') %>
\ No newline at end of file
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb
index 1638d2e..b4c0ac6 100644
--- a/app/views/devise/mailer/reset_password_instructions.html.erb
+++ b/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -1,7 +1,7 @@
-
<%= t('custom_devise.hello') %> <%= @resource.email %>!
-
-
<%= t('custom_devise.1st_part_change_password') %> <%= link_to t('tool_title'), root_url %> <%= t('custom_devise.2nd_part_change_password') %>
-
-
<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %>
-
-<%= t('custom_devise.1st_part_change_password') %>
+
<%= t('custom_devise.hello') %> <%= @resource.email %>!
+
+
<%= t('custom_devise.1st_part_change_password') %> <%= link_to t('tool_title'), root_url %> <%= t('custom_devise.2nd_part_change_password') %>
+
+
<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %>
+
+<%= t('custom_devise.1st_part_change_password') %>
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb
index 955c0c7..0346189 100644
--- a/app/views/devise/mailer/unlock_instructions.html.erb
+++ b/app/views/devise/mailer/unlock_instructions.html.erb
@@ -1,7 +1,7 @@
-
<%= t('custom_devise.hello') %> <%= @resource.email %>!
-
-
<%= t('custom_devise.1st_part_locked') %><%= link_to t('tool_title'), root_url %><%= t('custom_devise.2nd_part_locked') %>
-
-
<%= t('custom_devise.click_to_unlock') %>
-
+
<%= t('custom_devise.hello') %> <%= @resource.email %>!
+
+
<%= t('custom_devise.1st_part_locked') %><%= link_to t('tool_title'), root_url %><%= t('custom_devise.2nd_part_locked') %>
+
+
<%= t('custom_devise.click_to_unlock') %>
+
<%= link_to t('custom_devise.unlock'), unlock_url(@resource, :unlock_token => @token) %>
\ No newline at end of file
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb
index 08fbf6c..a82a78f 100644
--- a/app/views/devise/passwords/edit.html.erb
+++ b/app/views/devise/passwords/edit.html.erb
@@ -1,26 +1,26 @@
-
<%= t('helpers.change_password') %>
-
-
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
- <%= devise_error_messages! %>
- <%= f.hidden_field :reset_password_token %>
-
-
-
- <%= t('helpers.new_password') %>
- <%= f.password_field :password, :autofocus => true %>
-
-
- <%= t('helpers.password') %>
- <%= f.password_field :password_confirmation %>
-
-
-
- <%= f.submit t('helpers.save'), :class => 'btn btn-primary' %>
-
-
- <% end %>
-
- <%= render "devise/shared/links" %>
-
-
+
<%= t('helpers.change_password') %>
+
+
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
+ <%= devise_error_messages! %>
+ <%= f.hidden_field :reset_password_token %>
+
+
+
+ <%= t('helpers.new_password') %>
+ <%= f.password_field :password, :autofocus => true %>
+
+
+ <%= t('helpers.password') %>
+ <%= f.password_field :password_confirmation %>
+
+
+
+ <%= f.submit t('helpers.save'), :class => 'btn btn-primary' %>
+
+
+ <% end %>
+
+ <%= render "devise/shared/links" %>
+
+
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 33d9a27..f95b651 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -1,26 +1,26 @@
-
<%= t('helpers.forgot_password') %>
-
-
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
- <%= devise_error_messages! %>
-
-
-
- <%= t("helpers.email") %>
- <%= t("helpers.send_password_info")%>
-
-
- <%= f.email_field :email, :autofocus => true , :style => "width:95%;" %>
-
-
-
-
-
-
- <%= f.submit t("helpers.send"), :class => "btn btn-primary", :id => "send_btn" %>
-
- <% end %>
-
-<%= render "devise/shared/links" %>
-
-
+
<%= t('helpers.forgot_password') %>
+
+
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
+ <%= devise_error_messages! %>
+
+
+
+ <%= t("helpers.email") %>
+ <%= t("helpers.send_password_info")%>
+
+
+ <%= f.email_field :email, :autofocus => true , :style => "width:95%;" %>
+
+
+
+
+
+
+ <%= f.submit t("helpers.send"), :class => "btn btn-primary", :id => "send_btn" %>
+
+ <% end %>
+
+<%= render "devise/shared/links" %>
+
+
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index 6b85dc8..9be1fed 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -1,14 +1,14 @@
<%= t("helpers.edit_profile") %>
- <%= raw t("helpers.user_details_text_html")%>
+<%= raw t("helpers.user_details_text_html") %>
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
- <%= hidden_field_tag :unlink_flag, "false" ,:id => "unlink_flag" %>
-
-
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:method => :put}) do |f| %>
+ <%= hidden_field_tag :unlink_flag, "false", :id => "unlink_flag" %>
+
+
-
<%= raw t("helpers.user_details_paragraph_html")%>
+
<%= raw t("helpers.user_details_paragraph_html") %>
@@ -38,7 +38,7 @@
<%= t("helpers.org_type.organisation") %>
<%= collection_select(:user,
:organisation_id, Organisation.where("parent_id IS NULL").order("name"),
- :id, :name, {include_blank: t("helpers.org_type.organisation")},
+ :id, :name, {include_blank: constant("organisation_types.organisation")},
{ :class => "typeahead org_sign_up" }) %>
<% other_organisations = Array.new %>
@@ -51,6 +51,13 @@
:as => :string,
:class => "text_field has-tooltip reg-input", "data-toggle" => "tooltip", "data-container" => "body", "title" => t("helpers.org_type.other_org_help_text") %>
+
+ <%= t('helpers.user_details_language') %>
+ <%= collection_select(:user,
+ :language_id, Language.all.order("name"),
+ :id, :name, {:selected => Language.where(default_language: true).first.id},
+ {:class => "typeahead org_sign_up"}) %>
+
<%= t("helpers.orcid_id") %>
<%= f.text_field :orcid_id ,
@@ -119,20 +126,20 @@
<%# = button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>
-
+
-
-
- <%= raw t("helpers.shibboleth_unlink_dialog_text")%>
-
-
+
+
+ <%= raw t("helpers.shibboleth_unlink_dialog_text") %>
+
+
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index 0c3ca00..5406165 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -1,13 +1,13 @@
-<%= t('helpers.sign_up') %>
-<% unless session[:shibboleth_data].nil? %>
-
- <%= raw t('helpers.sign_up_shibboleth_alert_text_html')%>
-
- <% cookies[:show_shib_link] = { value: 'show_shib_link', expires: 3.hours.from_now } %>
-<% end %>
-
-
-
-
- <%= render :partial => 'shared/register_form', locals: {extended: true} %>
+
<%= t('helpers.sign_up') %>
+<% unless session[:shibboleth_data].nil? %>
+
+ <%= raw t('helpers.sign_up_shibboleth_alert_text_html')%>
+
+ <% cookies[:show_shib_link] = { value: 'show_shib_link', expires: 3.hours.from_now } %>
+<% end %>
+
+
+
+
+ <%= render :partial => 'shared/register_form', locals: {extended: true} %>
\ No newline at end of file
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 2f0d3bb..95c5cf1 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -1,33 +1,33 @@
-
<%= t("helpers.sign_in") %>
-
-
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
-
-
-
- <%= t("helpers.email") %>
- <%= f.email_field :email, :autofocus => true %>
-
-
- <%= t("helpers.password") %>
- <%= f.password_field :password %>
-
-
-
- <% if devise_mapping.rememberable? -%>
-
- <%= f.check_box :remember_me %>
- <%= f.label :remember_me %>
-
- <% end -%>
-
-
-
-
- <%= f.submit t("helpers.sign_in"), :class => "btn btn-primary" %>
-
-
- <% end %>
-
- <%= render "devise/shared/links" %>
-
+
<%= t("helpers.sign_in") %>
+
+
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
+
+
+
+ <%= t("helpers.email") %>
+ <%= f.email_field :email, :autofocus => true %>
+
+
+ <%= t("helpers.password") %>
+ <%= f.password_field :password %>
+
+
+
+ <% if devise_mapping.rememberable? -%>
+
+ <%= f.check_box :remember_me %>
+ <%= f.label :remember_me %>
+
+ <% end -%>
+
+
+
+
+ <%= f.submit t("helpers.sign_in"), :class => "btn btn-primary" %>
+
+
+ <% end %>
+
+ <%= render "devise/shared/links" %>
+
diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb
index 9de3361..44a1965 100644
--- a/app/views/devise/shared/_links.erb
+++ b/app/views/devise/shared/_links.erb
@@ -1,17 +1,17 @@
-<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
- <%= link_to t('helpers.forgot_password'), new_password_path(resource_name), :class => "a-orange"%>
-<% end -%>
-
-<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
- <%= link_to t('helpers.no_pass_instructions'), new_confirmation_path(resource_name), :class => "a-orange"%>
-<% end -%>
-
-<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
- <%= link_to t('helpers.no_unlock_instructions'), new_unlock_path(resource_name), :class => "a-orange" %>
-<% end -%>
-
-<%#- if devise_mapping.omniauthable? %>
- <%#- resource_class.omniauth_providers.each do |provider| %>
- <%#= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
- <%# end -%>
+<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
+ <%= link_to t('helpers.forgot_password'), new_password_path(resource_name), :class => "a-orange"%>
+<% end -%>
+
+<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+ <%= link_to t('helpers.no_pass_instructions'), new_confirmation_path(resource_name), :class => "a-orange"%>
+<% end -%>
+
+<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
+ <%= link_to t('helpers.no_unlock_instructions'), new_unlock_path(resource_name), :class => "a-orange" %>
+<% end -%>
+
+<%#- if devise_mapping.omniauthable? %>
+ <%#- resource_class.omniauth_providers.each do |provider| %>
+ <%#= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
+ <%# end -%>
<%# end -%>
\ No newline at end of file
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb
index b632e4f..40792b2 100644
--- a/app/views/devise/unlocks/new.html.erb
+++ b/app/views/devise/unlocks/new.html.erb
@@ -1,12 +1,12 @@
-
<%= t('custom_devise.resend_unlock') %>
-
-<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
- <%= devise_error_messages! %>
-
-
<%= f.label :email %>
- <%= f.email_field :email, :autofocus => true %>
-
-
<%= f.submit "Resend unlock instructions" %>
-<% end %>
-
-<%= render "devise/shared/links" %>
+
<%= t('custom_devise.resend_unlock') %>
+
+<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
+ <%= devise_error_messages! %>
+
+
<%= f.label :email %>
+ <%= f.email_field :email, :autofocus => true %>
+
+
<%= f.submit "Resend unlock instructions" %>
+<% end %>
+
+<%= render "devise/shared/links" %>
diff --git a/app/views/dmptemplates/_add_question.html.erb b/app/views/dmptemplates/_add_question.html.erb
index 08d7450..1caf54c 100644
--- a/app/views/dmptemplates/_add_question.html.erb
+++ b/app/views/dmptemplates/_add_question.html.erb
@@ -177,5 +177,3 @@
<%end%>
-
-
diff --git a/app/views/dmptemplates/_add_section.html.erb b/app/views/dmptemplates/_add_section.html.erb
index e5facd8..b445c85 100644
--- a/app/views/dmptemplates/_add_section.html.erb
+++ b/app/views/dmptemplates/_add_section.html.erb
@@ -1,54 +1,54 @@
-
-
-<% @new_section = Section.new %>
-<% @new_section.number = version.sections.count + 1 %>
-
-
-<%= form_for @new_section, :url => {:action => "admin_createsection"} do |f| %>
- <%= f.hidden_field :version_id, :value => version.id %>
- <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
-
-
-
-
-
-
- <%= f.text_field :title, :as => :string, :class => "text_field", :placeholder => t("org_admin.templates.section_title_placeholder")%>
-
-
-
-
-
-
-
-
-
-
- <%= t("org_admin.templates.phase_order_label") %>
-
- <%= f.number_field :number, :in => 1..15, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.section_number_help_text") %>
-
-
- <%= t("org_admin.templates.desc_label") %>
-
-
- <%= text_area_tag("section-desc", "" , class: "tinymce") %>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "section_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.templates.section_desc_help_text_html"))%>
-
-
-
-
-
-
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.cancel"), "#", :id => "", :class => "btn cancel" %>
-
-
-
-
-
-<%end%>
-
-
+
+
+<% @new_section = Section.new %>
+<% @new_section.number = version.sections.count + 1 %>
+
+
+<%= form_for @new_section, :url => {:action => "admin_createsection"} do |f| %>
+ <%= f.hidden_field :version_id, :value => version.id %>
+ <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
+
+
+
+
+
+
+ <%= f.text_field :title, :as => :string, :class => "text_field", :placeholder => t("org_admin.templates.section_title_placeholder")%>
+
+
+
+
+
+
+
+
+
+
+ <%= t("org_admin.templates.phase_order_label") %>
+
+ <%= f.number_field :number, :in => 1..15, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.section_number_help_text") %>
+
+
+ <%= t("org_admin.templates.desc_label") %>
+
+
+ <%= text_area_tag("section-desc", "" , class: "tinymce") %>
+
+
+ <%= link_to( image_tag("help_button.png"), "#", :class => "section_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.templates.section_desc_help_text_html"))%>
+
+
+
+
+
+
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.cancel"), "#", :id => "", :class => "btn cancel" %>
+
+
+
+
+
+<%end%>
+
+
diff --git a/app/views/dmptemplates/_add_suggested_answer.html.erb b/app/views/dmptemplates/_add_suggested_answer.html.erb
index ec9d98b..03e11b7 100644
--- a/app/views/dmptemplates/_add_suggested_answer.html.erb
+++ b/app/views/dmptemplates/_add_suggested_answer.html.erb
@@ -1,25 +1,25 @@
-
-<%= form_for :suggested_answer, :url => {:action => "admin_createsuggestedanswer"} do |f| %>
- <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
- <%= f.hidden_field :question_id, :value => question.id %>
-
-
-
- <%= t("org_admin.questions.suggested_or_example_answer_label")%>
-
-
- <%= f.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
- <%= f.text_area :text, :rows => 5 %>
-
-
-
-
-
-
-
-
-
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.cancel"), "#", :id => "cancel_suugested_answer", :class => "btn cancel" %>
-
-<%end%>
+
+<%= form_for :suggested_answer, :url => {:action => "admin_createsuggestedanswer"} do |f| %>
+ <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
+ <%= f.hidden_field :question_id, :value => question.id %>
+
+
+
+ <%= t("org_admin.questions.suggested_or_example_answer_label")%>
+
+
+ <%= f.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
+ <%= f.text_area :text, :rows => 5 %>
+
+
+
+
+
+
+
+
+
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.cancel"), "#", :id => "cancel_suugested_answer", :class => "btn cancel" %>
+
+<%end%>
diff --git a/app/views/dmptemplates/_admin_nav_tabs.html.erb b/app/views/dmptemplates/_admin_nav_tabs.html.erb
index f04a7a1..6974892 100644
--- a/app/views/dmptemplates/_admin_nav_tabs.html.erb
+++ b/app/views/dmptemplates/_admin_nav_tabs.html.erb
@@ -1,4 +1,4 @@
-
+
@@ -20,9 +20,9 @@
<% end %>
- <% if current_user.is_org_admin? && (dmptemplate.org_type != t("helpers.org_type.funder") || current_user.org_type == t("helpers.org_type.funder")) then %>
+ <% if current_user.is_org_admin? && (dmptemplate.org_type != constant("organisation_types.funder")|| current_user.org_type == constant("organisation_types.funder")) then %>
<% if active == 'add_plan' then %>
-
+
<% else %>
<% end %>
diff --git a/app/views/dmptemplates/_edit_guidance.html.erb b/app/views/dmptemplates/_edit_guidance.html.erb
index 839e8e0..8debbca 100644
--- a/app/views/dmptemplates/_edit_guidance.html.erb
+++ b/app/views/dmptemplates/_edit_guidance.html.erb
@@ -1,26 +1,26 @@
-
-<%= form_for(suggested_answer, :url => admin_updatesuggestedanswer_dmptemplate_path(suggested_answer), :html => { :method => :put}) do |f| %>
- <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
-
-
-
- <%= t("org_admin.questions.suggested_or_example_answer_label")%>
-
-
- <%= f.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
- <%= f.text_area :text, :rows => 5 %>
-
-
-
-
-
-
-
-
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.delete"), admin_destroysuggestedanswer_dmptemplate_path(:suggested_answer => suggested_answer.id),
- :confirm => t("org_admin.questions.delete_suggested_answer_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%>
- <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
- <%= link_to t("helpers.submit.cancel"), "#", :class => "btn cancel cancel_edit_suggested_answer" %>
-
-<%end%>
+
+<%= form_for(suggested_answer, :url => admin_updatesuggestedanswer_dmptemplate_path(suggested_answer), :html => { :method => :put}) do |f| %>
+ <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
+
+
+
+ <%= t("org_admin.questions.suggested_or_example_answer_label")%>
+
+
+ <%= f.select :is_example, {t("org_admin.questions.example_answer_label") => true, t("org_admin.questions.suggested_answer_label") => false} %>
+ <%= f.text_area :text, :rows => 5 %>
+
+
+
+
+
+
+
+
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.delete"), admin_destroysuggestedanswer_dmptemplate_path(:suggested_answer => suggested_answer.id),
+ :confirm => t("org_admin.questions.delete_suggested_answer_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%>
+ <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
+ <%= link_to t("helpers.submit.cancel"), "#", :class => "btn cancel cancel_edit_suggested_answer" %>
+
+<%end%>
diff --git a/app/views/dmptemplates/_edit_phase.html.erb b/app/views/dmptemplates/_edit_phase.html.erb
index 3d1ac1d..1536a48 100644
--- a/app/views/dmptemplates/_edit_phase.html.erb
+++ b/app/views/dmptemplates/_edit_phase.html.erb
@@ -1,45 +1,45 @@
-
-
-<%= form_for(phase, :url => admin_updatephase_dmptemplate_path(phase), :html => { :method => :put}) do |f| %>
-
-
- <%= t('org_admin.templates.phase_details_label')%>
-
-
- <%= raw t('org_admin.templates.phase_details_text_html')%>
-
-
-
-
-
-
- <%= t('org_admin.templates.title_label') %>
- <%= f.text_field :title,
- :as => :string,
- :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.phase_title_help_text') %>
-
-
- <%= t('org_admin.templates.phase_order_label') %>
- <%= f.number_field :number, :in => 0..5, :class => "number_field has-tooltip", 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.phase_number_help_text') %>
-
-
- <%= t('org_admin.templates.desc_label') %>
-
-
- <%= text_area_tag("phase-desc", phase.description, class: "tinymce") %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'phase_desc_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.phase_desc_help_text_html'))%>
-
-
-
-
-
-
-
-
- <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <%= link_to t('helpers.submit.cancel'), admin_phase_dmptemplate_path(phase), :class => 'btn cancel' %>
-
-
+
+
+<%= form_for(phase, :url => admin_updatephase_dmptemplate_path(phase), :html => { :method => :put}) do |f| %>
+
+
+ <%= t('org_admin.templates.phase_details_label')%>
+
+
+ <%= raw t('org_admin.templates.phase_details_text_html')%>
+
+
+
+
+
+
+ <%= t('org_admin.templates.title_label') %>
+ <%= f.text_field :title,
+ :as => :string,
+ :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.phase_title_help_text') %>
+
+
+ <%= t('org_admin.templates.phase_order_label') %>
+ <%= f.number_field :number, :in => 0..5, :class => "number_field has-tooltip", 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.phase_number_help_text') %>
+
+
+ <%= t('org_admin.templates.desc_label') %>
+
+
+ <%= text_area_tag("phase-desc", phase.description, class: "tinymce") %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'phase_desc_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.phase_desc_help_text_html'))%>
+
+
+
+
+
+
+
+
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
+ <%= link_to t('helpers.submit.cancel'), admin_phase_dmptemplate_path(phase), :class => 'btn cancel' %>
+
+
<%end%>
\ No newline at end of file
diff --git a/app/views/dmptemplates/_edit_section.html.erb b/app/views/dmptemplates/_edit_section.html.erb
index abc789e..8f7f8b4 100644
--- a/app/views/dmptemplates/_edit_section.html.erb
+++ b/app/views/dmptemplates/_edit_section.html.erb
@@ -12,7 +12,7 @@
<%else%>
<% toggle = 'accordion-body collapse section-collapse' %>
<%end%>
-
+
<%if @new_sec then%>
<% toggle = 'accordion-body section-collapse in collapse'%>
<%end%>
@@ -22,7 +22,7 @@
<%= s.text_field :title, :as => :string, :class => 'text_field', :placeholder => t('org_admin.templates.section_title_placeholder') %>
-
+
@@ -56,7 +56,7 @@
<%= s.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <% if !section.version.published? || phase.dmptemplate.org_type == t("helpers.org_type.funder") then%>
+ <% if !section.version.published? || phase.dmptemplate.org_type == constant("organisation_types.funder") then%>
<%= link_to t("helpers.submit.delete"), admin_destroysection_dmptemplate_path(:section_id => section.id),
:confirm => t("org_admin.templates.section_delete_message", :section_title => section.title ), :method => :delete, :class => "btn btn-primary"%>
<%end%>
@@ -86,13 +86,13 @@
<%end%>
<% question_left = question_left - 1 %>
-
+
<%end%>
<%end%>
- <% if !section.version.published? || phase.dmptemplate.org_type == t("helpers.org_type.funder") then%>
-
+ <% if !section.version.published? || phase.dmptemplate.org_type == constant("organisation_types.funder") then%>
+
<%if @questions.count != 0 %>
<%end%>
diff --git a/app/views/dmptemplates/_edit_suggested_answer.html.erb b/app/views/dmptemplates/_edit_suggested_answer.html.erb
index e81eabc..2f78934 100644
--- a/app/views/dmptemplates/_edit_suggested_answer.html.erb
+++ b/app/views/dmptemplates/_edit_suggested_answer.html.erb
@@ -1,26 +1,26 @@
-
-<%= form_for(suggested_answer, :url => admin_updatesuggestedanswer_dmptemplate_path(suggested_answer), :html => { :method => :put}) do |f| %>
- <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
-
-
-
- <%= t('org_admin.questions.suggested_or_example_answer_label')%>
-
-
- <%= f.select :is_example, {t('org_admin.questions.example_answer_label') => true, t('org_admin.questions.suggested_answer_label') => false} %>
- <%= f.text_area :text, :rows => 5 %>
-
-
-
-
-
-
-
-
- <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <%= link_to t("helpers.submit.delete"), admin_destroysuggestedanswer_dmptemplate_path(:suggested_answer => suggested_answer.id),
- :confirm => t("org_admin.questions.delete_suggested_answer_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%>
- <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
- <%= link_to t('helpers.submit.cancel'), '#', :class => 'btn cancel cancel_edit_suggested_answer' %>
-
-<%end%>
+
+<%= form_for(suggested_answer, :url => admin_updatesuggestedanswer_dmptemplate_path(suggested_answer), :html => { :method => :put}) do |f| %>
+ <%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
+
+
+
+ <%= t('org_admin.questions.suggested_or_example_answer_label')%>
+
+
+ <%= f.select :is_example, {t('org_admin.questions.example_answer_label') => true, t('org_admin.questions.suggested_answer_label') => false} %>
+ <%= f.text_area :text, :rows => 5 %>
+
+
+
+
+
+
+
+
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
+ <%= link_to t("helpers.submit.delete"), admin_destroysuggestedanswer_dmptemplate_path(:suggested_answer => suggested_answer.id),
+ :confirm => t("org_admin.questions.delete_suggested_answer_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%>
+ <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
+ <%= link_to t('helpers.submit.cancel'), '#', :class => 'btn cancel cancel_edit_suggested_answer' %>
+
+<%end%>
diff --git a/app/views/dmptemplates/_edit_template.html.erb b/app/views/dmptemplates/_edit_template.html.erb
index 1a8d6f8..dbea10a 100644
--- a/app/views/dmptemplates/_edit_template.html.erb
+++ b/app/views/dmptemplates/_edit_template.html.erb
@@ -1,52 +1,52 @@
-
-
-<%= form_for(dmptemplate, :url => admin_update_dmptemplate_path(dmptemplate), :html => { :method => :put}) do |f| %>
-
-
-
- <%= t('org_admin.templates.title_label') %>
- <%= f.text_field :title, :as => :string,
- :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.title_help_text') %>
-
-
- <%= t('org_admin.templates.desc_label') %>
-
- <%= text_area_tag("template-desc", dmptemplate.description, class: "tinymce") %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'template_desc_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.desc_help_text_html'))%>
-
-
-
-
- <%= t('org_admin.templates.published_label') %>
- <%if dmptemplate.published? || dmptemplate.has_published_versions? then%>
- <%= f.check_box :published, :as => :check_boxes %>
- <%else%>
- <%= t('org_admin.templates.cannot_publish')%>
- <%end%>
-
-
-
- <%= t('org_admin.templates.created') %>
-
- <%= l dmptemplate.created_at.to_date, :formats => :short %>
-
-
-
- <%= t('org_admin.templates.last_updated') %>
-
- <%= l dmptemplate.updated_at.to_date, :formats => :short %>
-
-
-
-
-
-
- <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <%= link_to t('helpers.submit.cancel'), admin_template_dmptemplate_path(dmptemplate), :class => 'btn cancel' %>
-
-
-
-
+
+
+<%= form_for(dmptemplate, :url => admin_update_dmptemplate_path(dmptemplate), :html => { :method => :put}) do |f| %>
+
+
+
+ <%= t('org_admin.templates.title_label') %>
+ <%= f.text_field :title, :as => :string,
+ :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.title_help_text') %>
+
+
+ <%= t('org_admin.templates.desc_label') %>
+
+ <%= text_area_tag("template-desc", dmptemplate.description, class: "tinymce") %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'template_desc_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.desc_help_text_html'))%>
+
+
+
+
+ <%= t('org_admin.templates.published_label') %>
+ <%if dmptemplate.published? || dmptemplate.has_published_versions? then%>
+ <%= f.check_box :published, :as => :check_boxes %>
+ <%else%>
+ <%= t('org_admin.templates.cannot_publish')%>
+ <%end%>
+
+
+
+ <%= t('org_admin.templates.created') %>
+
+ <%= l dmptemplate.created_at.to_date, :formats => :short %>
+
+
+
+ <%= t('org_admin.templates.last_updated') %>
+
+ <%= l dmptemplate.updated_at.to_date, :formats => :short %>
+
+
+
+
+
+
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
+ <%= link_to t('helpers.submit.cancel'), admin_template_dmptemplate_path(dmptemplate), :class => 'btn cancel' %>
+
+
+
+
<%end%>
\ No newline at end of file
diff --git a/app/views/dmptemplates/_edit_version.html.erb b/app/views/dmptemplates/_edit_version.html.erb
index 7e52bdf..416fdb7 100644
--- a/app/views/dmptemplates/_edit_version.html.erb
+++ b/app/views/dmptemplates/_edit_version.html.erb
@@ -1,47 +1,47 @@
-
-
-
-<%= form_for(version, :url => admin_updateversion_dmptemplate_path(version, :edit => edit, :phase => phase), :html => { :method => :put}) do |f| %>
-
-
- <%= t('org_admin.templates.version_details_label')%>
-
-
-
-
-
-
- <%= t('org_admin.templates.title_label') %>
- <%= f.text_field :title, :as => :string,
- :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.phase_title_help_text') %>
-
-
-
- <%= t('org_admin.templates.desc_label') %>
-
- <%= text_area_tag("version-desc", version.description, class: "tinymce") %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'version_desc_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.versions.desc_help_text_html'))%>
-
-
-
-
- <%= t('org_admin.templates.published_label') %>
- <%= f.check_box :published, :as => :check_boxes %>
-
-
-
-
-
-
-
- <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <%= link_to t('helpers.submit.cancel'), admin_phase_dmptemplate_path(phase), :class => 'btn cancel' %>
-
-
-
-<%end%>
-
-
+
+
+
+<%= form_for(version, :url => admin_updateversion_dmptemplate_path(version, :edit => edit, :phase => phase), :html => { :method => :put}) do |f| %>
+
+
+ <%= t('org_admin.templates.version_details_label')%>
+
+
+
+
+
+
+ <%= t('org_admin.templates.title_label') %>
+ <%= f.text_field :title, :as => :string,
+ :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.templates.phase_title_help_text') %>
+
+
+
+ <%= t('org_admin.templates.desc_label') %>
+
+ <%= text_area_tag("version-desc", version.description, class: "tinymce") %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'version_desc_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.versions.desc_help_text_html'))%>
+
+
+
+
+ <%= t('org_admin.templates.published_label') %>
+ <%= f.check_box :published, :as => :check_boxes %>
+
+
+
+
+
+
+
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
+ <%= link_to t('helpers.submit.cancel'), admin_phase_dmptemplate_path(phase), :class => 'btn cancel' %>
+
+
+
+<%end%>
+
+
\ No newline at end of file
diff --git a/app/views/dmptemplates/_guidance_display.html.erb b/app/views/dmptemplates/_guidance_display.html.erb
index 888f801..8438b71 100644
--- a/app/views/dmptemplates/_guidance_display.html.erb
+++ b/app/views/dmptemplates/_guidance_display.html.erb
@@ -1,47 +1,47 @@
-
-
-
-
- <% if !question.guidance.nil? && question.guidance != "" then %>
-
-
-
-
<%= raw question.guidance %>
-
-
- <% end %>
-
- <% question.guidance_for_question(question, current_user.organisation).each_pair do |title,guidance| %>
-
-
-
-
<%= raw guidance.text %>
-
-
- <% end %>
-
-
-
-
-
- <%= render :partial => "add_guidance", locals: {question: question} %>
-
-
+
+
+
+
+ <% if !question.guidance.nil? && question.guidance != "" then %>
+
+
+
+
<%= raw question.guidance %>
+
+
+ <% end %>
+
+ <% question.guidance_for_question(question, current_user.organisation).each_pair do |title,guidance| %>
+
+
+
+
<%= raw guidance.text %>
+
+
+ <% end %>
+
+
+
+
+
+ <%= render :partial => "add_guidance", locals: {question: question} %>
+
+
\ No newline at end of file
diff --git a/app/views/dmptemplates/_option_fields.html.erb b/app/views/dmptemplates/_option_fields.html.erb
index ac69280..21f3e80 100644
--- a/app/views/dmptemplates/_option_fields.html.erb
+++ b/app/views/dmptemplates/_option_fields.html.erb
@@ -1,7 +1,7 @@
-
-
- <%= f.number_field :number,:in => 1..20, :class => "number_field option"%>
- <%= f.text_field :text, :as => :string, :class => "small_text_field" %>
- <%= f.check_box :is_default %>
- <%= f.hidden_field :_destroy %><%= t('org_admin.remove_option_label') %>
-
+
+
+ <%= f.number_field :number,:in => 1..20, :class => "number_field option"%>
+ <%= f.text_field :text, :as => :string, :class => "small_text_field" %>
+ <%= f.check_box :is_default %>
+ <%= f.hidden_field :_destroy %><%= t('org_admin.remove_option_label') %>
+
diff --git a/app/views/dmptemplates/_preview_question.html.erb b/app/views/dmptemplates/_preview_question.html.erb
index f055bfa..79d6459 100644
--- a/app/views/dmptemplates/_preview_question.html.erb
+++ b/app/views/dmptemplates/_preview_question.html.erb
@@ -1,124 +1,124 @@
-
-
-
-
-
- <% q_format = question.question_format%>
-
-
-
-
-
-<%= render :partial => "guidance_display", locals: {question: question}%>
+
+
+
+
+
+ <% q_format = question.question_format%>
+
+
+
+
+
+
+
+<%= render :partial => "guidance_display", locals: {question: question}%>
diff --git a/app/views/dmptemplates/_show_phase.html.erb b/app/views/dmptemplates/_show_phase.html.erb
index af8c397..01117cf 100644
--- a/app/views/dmptemplates/_show_phase.html.erb
+++ b/app/views/dmptemplates/_show_phase.html.erb
@@ -4,18 +4,18 @@
<%= t('org_admin.templates.phase_details_label')%>
- <% if @phase.dmptemplate.org_type != t("helpers.org_type.funder") || current_user.org_type == t("helpers.org_type.funder") then %>
+ <% if @phase.dmptemplate.org_type != constant("organisation_types.funder") || current_user.org_type == constant("organisation_types.funder") then %>
<%= link_to t("org_admin.templates.edit_phase_details_label"), '#', :class => "btn btn-primary", :id => "edit_phase_button"%>
<%end%>
-<%if @phase.dmptemplate.org_type != t("helpers.org_type.funder") then%>
+<%if @phase.dmptemplate.org_type != constant("organisation_types.funder") then%>
<%= raw t('org_admin.templates.phase_details_text_html')%>
-
-<%end%>
+
+<%end%>
@@ -34,4 +34,4 @@
<%= raw @phase.description %>
-
\ No newline at end of file
+
diff --git a/app/views/dmptemplates/_show_phases_sections.html.erb b/app/views/dmptemplates/_show_phases_sections.html.erb
index e0640bc..6822565 100644
--- a/app/views/dmptemplates/_show_phases_sections.html.erb
+++ b/app/views/dmptemplates/_show_phases_sections.html.erb
@@ -1,36 +1,36 @@
-
+
<%= raw phase.description %>
-
+
<% if phase.versions.any? then %>
-
+
<% version = phase.versions.where("published = ?", true).first %>
<% if version.nil? then%>
<% version = phase.versions.order("updated_at DESC").first %>
<%end%>
-
-
+
+
-
+
<%if phase.has_sections == true then %>
<%= link_to t("helpers.preview"), admin_previewphase_dmptemplate_path(version), :class => 'btn btn-primary'%>
- <%end%>
+ <%end%>
<% if phase.latest_published_version == nil then%>
<%= link_to t("helpers.submit.delete"), admin_destroyphase_dmptemplate_path(:phase_id => phase.id),
:confirm => t("org_admin.templates.phase_delete_message", :phase_title => phase.title ), :method => :delete, :class => "btn btn-primary"%>
- <%end%>
- <%if phase.dmptemplate.org_type == t("helpers.org_type.funder") && current_user.org_type != t("helpers.org_type.funder") then%>
+ <%end%>
+ <%if phase.dmptemplate.org_type == constant("organisation_types.funder") && current_user.org_type != constant("organisation_types.funder") then%>
<% b_label = t('org_admin.templates.view_phase_label')%>
<%else %>
<% b_label = t('org_admin.templates.edit_phase_label')%>
- <%end%>
+ <%end%>
<%= link_to b_label, admin_phase_dmptemplate_path(phase), :class => "btn btn-primary" %>
-
+
<% if version.sections.any? then %>
@@ -47,26 +47,27 @@
<%= section.title %>
-
+
<% if section.questions.any? %>
<% questions = section.questions.order("number ASC") %>
<% questions.each do |ques|%>
- <%= ques.text %>
-
+
<%end%>
- <%end%>
+ <%end%>
- <%end%>
+ <%end%>
<%end%>
-
+
-
+
<%end%>
-
-<%end%>
+
+<%end%>
+
\ No newline at end of file
diff --git a/app/views/dmptemplates/_show_question.html.erb b/app/views/dmptemplates/_show_question.html.erb
index da4d1fb..df79c2b 100644
--- a/app/views/dmptemplates/_show_question.html.erb
+++ b/app/views/dmptemplates/_show_question.html.erb
@@ -12,7 +12,7 @@
<%= t('org_admin.questions.question_number_label')%>
<%= question.number%>
-
+
<%= t('org_admin.questions.question_text_label')%>
@@ -28,7 +28,7 @@
<% if !question.options.to_a.nil? then %>
<% question.options.to_a.sort_by{|op| op['number']}.each do |o| %>
- <%= o.text %>
- <%end%>
+ <%end%>
<% end %>
<% end %>
@@ -43,7 +43,7 @@
<%= t('org_admin.questions.default_value_label')%>
<%= raw question.default_value %>
- <%end%>
+ <%end%>
<% end %>
@@ -57,12 +57,12 @@
<%= t("org_admin.questions.option_comment_hide")%>
<%end%>
<%end%>
-
+
-
+
- <% if (question.section.version.phase.dmptemplate.org_type != t("helpers.org_type.funder") && question.section.organisation_id == current_user.organisation_id ) then%>
+ <% if (question.section.version.phase.dmptemplate.org_type != constant("organisation_types.funder") && question.section.organisation_id == current_user.organisation_id ) then%>
<% suggested_answer = question.get_suggested_answer(current_user.organisation.id) %>
<% if !suggested_answer.nil? && suggested_answer.text != "" then %>
@@ -71,12 +71,12 @@
<%= t('org_admin.questions.example_answer_label')%>
<%else%>
<%= t('org_admin.questions.suggested_answer_label')%>
- <%end%>
+ <%end%>
<%= raw suggested_answer.text %>
<%end%>
- <%end%>
+ <%end%>
<%if !question.guidance.nil? then %>
@@ -92,9 +92,9 @@
<% i = 1%>
<% themes_q.each do |t|%>
<%= t.title %>
- <% if themes_q.count > i then%>
- ,
- <% i +=1 %>
+ <% if themes_q.count > i then%>
+ ,
+ <% i +=1 %>
<% end %>
<%end%>
@@ -103,7 +103,7 @@
- <% if (question.section.version.phase.dmptemplate.org_type == t("helpers.org_type.funder") && question.section.organisation_id != current_user.organisation_id ) then%>
+ <% if (question.section.version.phase.dmptemplate.org_type == constant("organisation_types.funder") && question.section.organisation_id != current_user.organisation_id ) then%>
<% suggested_answer = question.get_suggested_answer(current_user.organisation.id) %>
<% if !suggested_answer.nil? && suggested_answer.text != "" then %>
@@ -112,20 +112,20 @@
<%= render :partial => 'edit_suggested_answer', locals: {suggested_answer: suggested_answer, question: question} %>
-
+
<%end%>
-
-
+
+
<%= render :partial => 'add_suggested_answer', locals: {question: question} %>
-
-
-
+
+
+
<%end%>
-
+
- <%if (@edit == 'true'&& question.section.organisation_id == current_user.organisation_id) || (question.section.version.phase.dmptemplate.org_type == t("helpers.org_type.funder") && question.section.organisation_id == current_user.organisation_id && current_user.org_type != t("helpers.org_type.funder")) then%>
+ <%if (@edit == 'true'&& question.section.organisation_id == current_user.organisation_id) || (question.section.version.phase.dmptemplate.org_type == constant("organisation_types.funder") && question.section.organisation_id == current_user.organisation_id && current_user.org_type != constant("organisation_types.funder")) then%>
<%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
<%= link_to t("org_admin.questions.question_edit_button"), '# ', :class => "btn btn-primary edit_question_button"%>
@@ -134,20 +134,20 @@
:confirm => t("org_admin.questions.delete_message", :question_text => question.text ), :method => :delete, :class => "btn btn-primary"%>
<%end%>
- <%elsif (@edit == 'false' && question.section.organisation_id != current_user.organisation_id )|| (question.section.version.phase.dmptemplate.org_type == t("helpers.org_type.funder") && question.section.organisation_id != current_user.organisation_id ) then%>
+ <%elsif (@edit == 'false' && question.section.organisation_id != current_user.organisation_id )|| (question.section.version.phase.dmptemplate.org_type == constant("organisation_types.funder") && question.section.organisation_id != current_user.organisation_id ) then%>
<% suggested_answer = question.get_suggested_answer(current_user.organisation.id) %>
<% if suggested_answer.nil? then %>
- <%end%>
+
+
+ <%end%>
<%end%>
-
+
-
+
<%= render :partial => 'guidance_display', locals: {question: question}%>
diff --git a/app/views/dmptemplates/_show_section.html.erb b/app/views/dmptemplates/_show_section.html.erb
index 7041cc0..1dbf719 100644
--- a/app/views/dmptemplates/_show_section.html.erb
+++ b/app/views/dmptemplates/_show_section.html.erb
@@ -1,43 +1,43 @@
-
-<%if @open && @section_id == section.id then%>
- <% toggle = 'accordion-body section-collapse in collapse'%>
-<%else%>
- <% toggle = 'accordion-body collapse section-collapse' %>
-<%end%>
-
-
-
-
- <%= raw section.description %>
-
-
- <% section.questions.order("number").each do |question| %>
- <% last_question_id = section.questions.order("number DESC").first.id %>
-
-
-
- <%= render :partial => 'show_question', locals: {question: question}%>
-
-
- <% if last_question_id == question.id then %>
-
- <% else %>
-
- <% end %>
-
- <%end%>
-
-
-
+
+<%if @open && @section_id == section.id then%>
+ <% toggle = 'accordion-body section-collapse in collapse'%>
+<%else%>
+ <% toggle = 'accordion-body collapse section-collapse' %>
+<%end%>
+
+
+
+
+ <%= raw section.description %>
+
+
+ <% section.questions.order("number").each do |question| %>
+ <% last_question_id = section.questions.order("number DESC").first.id %>
+
+
+
+ <%= render :partial => 'show_question', locals: {question: question}%>
+
+
+ <% if last_question_id == question.id then %>
+
+ <% else %>
+
+ <% end %>
+
+ <%end%>
+
+
+
diff --git a/app/views/dmptemplates/_show_suggested_answer.html.erb b/app/views/dmptemplates/_show_suggested_answer.html.erb
index c20fff6..888dd45 100644
--- a/app/views/dmptemplates/_show_suggested_answer.html.erb
+++ b/app/views/dmptemplates/_show_suggested_answer.html.erb
@@ -1,19 +1,19 @@
-
-
-
-
- <% 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 %>
-
-
-
-
-
- <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
- <%= link_to t("org_admin.questions.edit_suggested_answer_button"), '# ', :class => "btn btn-primary edit_form_for_suggested_answer"%>
-
+
+
+
+
+ <% 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 %>
+
+
+
+
+
+ <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
+ <%= link_to t("org_admin.questions.edit_suggested_answer_button"), '# ', :class => "btn btn-primary edit_form_for_suggested_answer"%>
+
diff --git a/app/views/dmptemplates/_show_template.html.erb b/app/views/dmptemplates/_show_template.html.erb
index a904ebb..7cfec9d 100644
--- a/app/views/dmptemplates/_show_template.html.erb
+++ b/app/views/dmptemplates/_show_template.html.erb
@@ -1,6 +1,6 @@
-<% if @dmptemplate.org_type != t("helpers.org_type.funder") || current_user.org_type == t("helpers.org_type.funder") then %>
+<% if @dmptemplate.org_type != constant("organisation_types.funder") || current_user.org_type == constant("organisation_types.funder") then %>
<%= link_to t("org_admin.templates.edit_details"), '# ', :class => "btn btn-primary", :id => "edit_template_button"%>
@@ -41,4 +41,3 @@
<%= l dmptemplate.updated_at.to_date, :formats => :short %>
-
\ No newline at end of file
diff --git a/app/views/dmptemplates/_show_version.html.erb b/app/views/dmptemplates/_show_version.html.erb
index 0214afe..3e1456e 100644
--- a/app/views/dmptemplates/_show_version.html.erb
+++ b/app/views/dmptemplates/_show_version.html.erb
@@ -1,42 +1,42 @@
-
-
-
-
- <%= t('org_admin.templates.version_details_label')%>
-
-
-
-
-
- <%= t('org_admin.templates.title_label') %>
- <%= version.title %>
-
- <% if version.description != "" then%>
-
- <%= t('org_admin.templates.desc_label') %>
- <%= raw version.description %>
-
- <%end%>
-
- <%= t('org_admin.templates.published_label') %>
- <%= version.published %>
-
-
- <%= t('org_admin.templates.created') %>
-
- <%= l version.created_at.to_date, :formats => :short %>
-
-
-
- <%= t('org_admin.templates.last_updated') %>
-
- <%= l version.updated_at.to_date, :formats => :short %>
-
-
-
-
-
-
-
-
-
+
+
+
+
+ <%= t('org_admin.templates.version_details_label')%>
+
+
+
+
+
+ <%= t('org_admin.templates.title_label') %>
+ <%= version.title %>
+
+ <% if version.description != "" then%>
+
+ <%= t('org_admin.templates.desc_label') %>
+ <%= raw version.description %>
+
+ <%end%>
+
+ <%= t('org_admin.templates.published_label') %>
+ <%= version.published %>
+
+
+ <%= t('org_admin.templates.created') %>
+
+ <%= l version.created_at.to_date, :formats => :short %>
+
+
+
+ <%= t('org_admin.templates.last_updated') %>
+
+ <%= l version.updated_at.to_date, :formats => :short %>
+
+
+
+
+
+
+
+
+
diff --git a/app/views/dmptemplates/_versions_table.html.erb b/app/views/dmptemplates/_versions_table.html.erb
index 3e38730..259fb5f 100644
--- a/app/views/dmptemplates/_versions_table.html.erb
+++ b/app/views/dmptemplates/_versions_table.html.erb
@@ -1,72 +1,72 @@
-<%if !phase.versions.nil? then %>
-
-
<%= t('org_admin.templates.versions_label')%>
-
- <%= t('org_admin.versions.versions_text_html')%>
-
-
-
-
-
- <%= t('org_admin.templates.title_label')%>
- <%= t('org_admin.templates.published_label')%>
- <%= t('org_admin.templates.created')%>
- <%= t('org_admin.templates.last_updated') %>
- <%= t('org_admin.templates.actions') %>
-
-
-
- <% phase.versions.each do |v|%>
-
-
-
-
-
<%= t('org_admin.versions.edit_alert_text')%>
-
-
-
-
-
- <%= v.title %>
-
-
- <%= v.published %>
-
-
- <%= l v.created_at.to_date, :formats => :short %>
-
-
- <%= l v.updated_at.to_date, :formats => :short %>
-
-
- <%= link_to t("helpers.view"), admin_phase_dmptemplate_path( :version_id => v.id, :id => phase.id , :edit => 'false'), :class => "dmp_table_link"%>
- <% if v.published? then%>
-
- <%= t('org_admin.versions.edit_label')%>
-
- <%= link_to t("helpers.preview"), admin_previewphase_dmptemplate_path(v), :class => "dmp_table_link" %>
- <%else%>
- <%= link_to t("org_admin.versions.edit_label"), admin_phase_dmptemplate_path(phase, :version_id => v.id, :edit => 'true'), :class => "dmp_table_link" %>
- <%= link_to t("helpers.preview"), admin_previewphase_dmptemplate_path(v), :class => "dmp_table_link" %>
- <%#= link_to t("helpers.submit.delete"), admin_destroyversion_dmptemplate_path(:version_id => v.id, :phase => phase , :edit => 'false'),
- :confirm => t("org_admin.versions.delete_message", :version_title => v.title ), :method => :delete, :class => "dmp_table_link"%>
- <%end%>
-
-
-
-
-
- <%end%>
-
-
-
-
-
-
-<%end%>
+<%if !phase.versions.nil? then %>
+
+
<%= t('org_admin.templates.versions_label')%>
+
+ <%= t('org_admin.versions.versions_text_html')%>
+
+
+
+
+
+ <%= t('org_admin.templates.title_label')%>
+ <%= t('org_admin.templates.published_label')%>
+ <%= t('org_admin.templates.created')%>
+ <%= t('org_admin.templates.last_updated') %>
+ <%= t('org_admin.templates.actions') %>
+
+
+
+ <% phase.versions.each do |v|%>
+
+
+
+
+
<%= t('org_admin.versions.edit_alert_text')%>
+
+
+
+
+
+ <%= v.title %>
+
+
+ <%= v.published %>
+
+
+ <%= l v.created_at.to_date, :formats => :short %>
+
+
+ <%= l v.updated_at.to_date, :formats => :short %>
+
+
+ <%= link_to t("helpers.view"), admin_phase_dmptemplate_path( :version_id => v.id, :id => phase.id , :edit => 'false'), :class => "dmp_table_link"%>
+ <% if v.published? then%>
+
+ <%= t('org_admin.versions.edit_label')%>
+
+ <%= link_to t("helpers.preview"), admin_previewphase_dmptemplate_path(v), :class => "dmp_table_link" %>
+ <%else%>
+ <%= link_to t("org_admin.versions.edit_label"), admin_phase_dmptemplate_path(phase, :version_id => v.id, :edit => 'true'), :class => "dmp_table_link" %>
+ <%= link_to t("helpers.preview"), admin_previewphase_dmptemplate_path(v), :class => "dmp_table_link" %>
+ <%#= link_to t("helpers.submit.delete"), admin_destroyversion_dmptemplate_path(:version_id => v.id, :phase => phase , :edit => 'false'),
+ :confirm => t("org_admin.versions.delete_message", :version_title => v.title ), :method => :delete, :class => "dmp_table_link"%>
+ <%end%>
+
+
+
+
+
+ <%end%>
+
+
+
+
+
+
+<%end%>
diff --git a/app/views/dmptemplates/admin_addphase.html.erb b/app/views/dmptemplates/admin_addphase.html.erb
index d8109eb..6e8a336 100644
--- a/app/views/dmptemplates/admin_addphase.html.erb
+++ b/app/views/dmptemplates/admin_addphase.html.erb
@@ -1,75 +1,75 @@
-<%- model_class = Phase -%>
-<%= stylesheet_link_tag "admin" %>
-<% javascript "admin.js" %>
-
-
- <%= @dmptemplate.title %>
-
-
- <%= link_to t("org_admin.templates.view_all_templates"),
- admin_index_dmptemplate_path,
- :class => "btn btn-primary" %>
-
-
-
-
-
-
-<%= render :partial => "admin_nav_tabs", locals: {dmptemplate: @dmptemplate, active: "add_plan"} %>
-
-
-
-
-
-
-
-
-
-
- <%= form_for :phase, :url => { :action => "admin_createphase"} do |f| %>
-
- <%= t("org_admin.templates.phase_details_label")%>
-
- <%= raw t("org_admin.templates.phase_new_text_html")%>
-
-
- <%= f.hidden_field :dmptemplate_id, :value => @dmptemplate.id%>
-
-
- <%= t("org_admin.templates.title_label") %>
- <%= f.text_field :title,
- :as => :string,
- :class => "text_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.phase_title_help_text") %>
-
-
- <%= t("org_admin.templates.phase_order_label") %>
- <%= f.number_field :number, :in => 1..5, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.phase_number_help_text") %>
-
-
- <%= t("org_admin.templates.desc_label") %>
-
-
- <%= text_area_tag("phase-desc","" , class: "tinymce") %>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "phase_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.templates.phase_desc_help_text_html"))%>
-
-
-
-
-
-
-
-
-
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.cancel"), admin_dmptemplate_path(@dmptemplate), :class => "btn cancel" %>
-
-
- <%end%>
-
-
-
-
-
+<%- model_class = Phase -%>
+<%= stylesheet_link_tag "admin" %>
+<% javascript "admin.js" %>
+
+
+ <%= @dmptemplate.title %>
+
+
+ <%= link_to t("org_admin.templates.view_all_templates"),
+ admin_index_dmptemplate_path,
+ :class => "btn btn-primary" %>
+
+
+
+
+
+
+<%= render :partial => "admin_nav_tabs", locals: {dmptemplate: @dmptemplate, active: "add_plan"} %>
+
+
+
+
+
+
+
+
+
+
+ <%= form_for :phase, :url => { :action => "admin_createphase"} do |f| %>
+
+ <%= t("org_admin.templates.phase_details_label")%>
+
+ <%= raw t("org_admin.templates.phase_new_text_html")%>
+
+
+ <%= f.hidden_field :dmptemplate_id, :value => @dmptemplate.id%>
+
+
+ <%= t("org_admin.templates.title_label") %>
+ <%= f.text_field :title,
+ :as => :string,
+ :class => "text_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.phase_title_help_text") %>
+
+
+ <%= t("org_admin.templates.phase_order_label") %>
+ <%= f.number_field :number, :in => 1..5, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.phase_number_help_text") %>
+
+
+ <%= t("org_admin.templates.desc_label") %>
+
+
+ <%= text_area_tag("phase-desc","" , class: "tinymce") %>
+
+
+ <%= link_to( image_tag("help_button.png"), "#", :class => "phase_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.templates.phase_desc_help_text_html"))%>
+
+
+
+
+
+
+
+
+
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.cancel"), admin_dmptemplate_path(@dmptemplate), :class => "btn cancel" %>
+
+
+ <%end%>
+
+
+
+
+
<%= tinymce :content_css => asset_path("application.css") %>
\ No newline at end of file
diff --git a/app/views/dmptemplates/admin_index.html.erb b/app/views/dmptemplates/admin_index.html.erb
index 5440687..64a2097 100644
--- a/app/views/dmptemplates/admin_index.html.erb
+++ b/app/views/dmptemplates/admin_index.html.erb
@@ -5,7 +5,7 @@
- <%= t('org_admin.templates.own_temp') %>
+ <%= t('org_admin.templates.own_temp') %>
@@ -34,8 +34,8 @@
- <% @dmptemplates_own.each do |org_template| %>
-
+ <% @dmptemplates_own.each do |org_template| %>
+
<%= org_template.title%>
@@ -64,28 +64,28 @@
<% b_label = t('helpers.submit.edit')%>
<%else%>
<% b_label = t('helpers.view')%>
- <%end%>
+ <%end%>
<%= link_to b_label, admin_template_dmptemplate_path(org_template), :class => "dmp_table_link"%>
- <%end%>
+ <%end%>
-
-<%end%>
+
+<%end%>
-<% if current_user.org_type != t("helpers.org_type.funder") then %>
+<% if current_user.org_type != constant("organisation_types.funder") then %>
<%= t("org_admin.templates.funders_temp") %>
-
+
<% if @dmptemplates_funders.count > 0 then %>
-
+
@@ -97,8 +97,8 @@
-
- <% @dmptemplates_funders.each do |org_template| %>
+
+ <% @dmptemplates_funders.each do |org_template| %>
<% if org_template.published? ||org_template.has_customisations?(current_user.organisation_id, org_template) then %>
@@ -126,28 +126,28 @@
<%end%>
<%end%>
<%= l last_updated.to_date, :formats => :short %>
-
+
<%if current_user.is_org_admin? then%>
- <% if org_template.org_type == t("helpers.org_type.funder") then %>
+ <% if org_template.org_type == constant("organisation_types.funder") then %>
<%if org_template.has_customisations?(current_user.organisation_id, org_template) then%>
<% b_label = t("org_admin.templates.edit_customisation")%>
- <%else%>
+ <%else%>
<% b_label = t("org_admin.templates.customise")%>
- <%end%>
+ <%end%>
<%else%>
<% b_label = t("helpers.submit.edit")%>
- <%end%>
+ <%end%>
<%else%>
<% b_label = t("helpers.view")%>
- <%end%>
+ <%end%>
<%= link_to b_label, admin_template_dmptemplate_path(org_template), :class => "dmp_table_link"%>
<%end%>
- <%end%>
+ <%end%>
<%end%>
-<%end%>
\ No newline at end of file
+<%end%>
diff --git a/app/views/dmptemplates/admin_new.html.erb b/app/views/dmptemplates/admin_new.html.erb
index 07b75a7..798f855 100644
--- a/app/views/dmptemplates/admin_new.html.erb
+++ b/app/views/dmptemplates/admin_new.html.erb
@@ -1,48 +1,48 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript "admin.js" %>
-
-
- <%= t("org_admin.templates.new_label") %>
-
-
- <%= link_to t("org_admin.templates.view_all_templates"),
- admin_index_dmptemplate_path,
- :class => "btn btn-primary" %>
-
-
-
-
-
-
-
- <%= raw t("org_admin.templates.create_new_template_text_html")%>
-
- <%= form_for :dmptemplate, :url => {:action => "admin_create"} do |f| %>
-
-
- <%= t("org_admin.templates.title_label") %>
- <%= f.text_field :title, :as => :string,
- :class => "text_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.title_help_text") %>
-
-
- <%= t("org_admin.templates.desc_label") %>
-
- <%= text_area_tag("template-desc", "", class: "tinymce") %>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "template_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.template_desc_help_text_html"))%>
-
-
-
-
-
-
-
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.cancel"), admin_index_dmptemplate_path, :class => "btn cancel" %>
-
-
- <%end%>
-
-
+<%= stylesheet_link_tag "admin" %>
+<% javascript "admin.js" %>
+
+
+ <%= t("org_admin.templates.new_label") %>
+
+
+ <%= link_to t("org_admin.templates.view_all_templates"),
+ admin_index_dmptemplate_path,
+ :class => "btn btn-primary" %>
+
+
+
+
+
+
+
+ <%= raw t("org_admin.templates.create_new_template_text_html")%>
+
+ <%= form_for :dmptemplate, :url => {:action => "admin_create"} do |f| %>
+
+
+ <%= t("org_admin.templates.title_label") %>
+ <%= f.text_field :title, :as => :string,
+ :class => "text_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.title_help_text") %>
+
+
+ <%= t("org_admin.templates.desc_label") %>
+
+ <%= text_area_tag("template-desc", "", class: "tinymce") %>
+
+
+ <%= link_to( image_tag("help_button.png"), "#", :class => "template_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.template_desc_help_text_html"))%>
+
+
+
+
+
+
+
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.cancel"), admin_index_dmptemplate_path, :class => "btn cancel" %>
+
+
+ <%end%>
+
+
<%= tinymce :content_css => asset_path("application.css") %>
\ No newline at end of file
diff --git a/app/views/dmptemplates/admin_phase.html.erb b/app/views/dmptemplates/admin_phase.html.erb
index 0621f7e..18ee0a2 100644
--- a/app/views/dmptemplates/admin_phase.html.erb
+++ b/app/views/dmptemplates/admin_phase.html.erb
@@ -9,7 +9,7 @@
<%= link_to t("org_admin.templates.view_all_templates"),
admin_index_dmptemplate_path,
:class => 'btn btn-primary' %>
-
+
@@ -20,62 +20,61 @@
-
+
-
+
<%= render :partial => "show_phase", locals: {phase: @phase}%>
- <% if @phase.dmptemplate.org_type != t("helpers.org_type.funder") || current_user.org_type == t("helpers.org_type.funder") then %>
+ <% if @phase.dmptemplate.org_type != constant("organisation_types.funder") || current_user.org_type == constant("organisation_types.funder") then %>
<%= render :partial => "edit_phase", locals: {phase: @phase}%>
-
+
<%= render :partial => "versions_table", locals: {phase: @phase}%>
- <%end%>
-
+ <%end%>
+
- <% if @edit == "false" || (@phase.dmptemplate.org_type == t("helpers.org_type.funder") && current_user.org_type != t("helpers.org_type.funder")) then%>
+ <% if @edit == "false" || (@phase.dmptemplate.org_type == constant("organisation_types.funder") && current_user.org_type != constant("organisation_types.funder")) then%>
<%= render :partial => 'show_version', locals: {version: @version}%>
- <%elsif @edit == "true" || current_user.org_type == t("helpers.org_type.funder") then %>
+ <%elsif @edit == "true" || current_user.org_type == constant("organisation_types.funder") then %>
<%= render :partial => 'edit_version', locals: {version: @version, edit: @edit, phase: @phase} %>
- <%end%>
+ <%end%>
-
+
<% @sections.order("number ASC").each do |section| %>
- <%if (@edit == "true" && section.organisation_id == current_user.organisation_id) ||
- (@phase.dmptemplate.org_type == t("helpers.org_type.funder") && section.organisation_id == current_user.organisation_id && current_user.org_type != t("helpers.org_type.funder"))then%>
+ <%if (@edit == "true" && section.organisation_id == current_user.organisation_id) ||
+ (@phase.dmptemplate.org_type == constant("organisation_types.funder") && section.organisation_id == current_user.organisation_id && current_user.org_type != constant("organisation_types.funder"))then%>
<%= render :partial => 'edit_section', locals: {section: section, edit: @edit, phase: @phase, version: @version} %>
<%elsif (section.organisation_id == @phase.dmptemplate.organisation_id ) || ( section.organisation_id == current_user.organisation_id) then%>
<%= render :partial => 'show_section', locals: {section: section}%>
- <%end%>
+ <%end%>
<% end %>
-
-
+
+
-
-
+
+
- <% if !@version.published? || (@phase.dmptemplate.org_type == t("helpers.org_type.funder") && current_user.org_type != t("helpers.org_type.funder"))then %>
-
+ <% if !@version.published? || (@phase.dmptemplate.org_type == constant("organisation_types.funder") && current_user.org_type != constant("organisation_types.funder"))then %>
+
<%= render :partial => 'add_section', locals: {version: @version} %>
-
+
- <%end%>
-
-
-<%= tinymce :content_css => asset_path('application.css') %>
\ No newline at end of file
+
+ <%end%>
+
+
diff --git a/app/views/dmptemplates/admin_previewphase.html.erb b/app/views/dmptemplates/admin_previewphase.html.erb
index 3cf5b64..12c2507 100644
--- a/app/views/dmptemplates/admin_previewphase.html.erb
+++ b/app/views/dmptemplates/admin_previewphase.html.erb
@@ -1,64 +1,64 @@
-<%- model_class = Phase -%>
-<%= stylesheet_link_tag "admin" %>
-
-
- <%= @version.phase.dmptemplate.title %>
-
-
- <%= link_to t("org_admin.templates.back_to_edit_phase_label"),
- admin_phase_dmptemplate_path(:id => @version.phase_id, :version_id => @version.id, :edit => "true"),
- :class => 'btn btn-primary' %>
- <%= link_to t("org_admin.templates.view_all_templates"),
- admin_index_dmptemplate_path,
- :class => 'btn btn-primary' %>
-
-
-
-
-
-
-<%= render :partial => "admin_nav_tabs", locals: {dmptemplate: @version.phase.dmptemplate, active: @version.phase_id} %>
-
-
-
-
- <% sections = @version.sections %>
- <% sections.order(:number).each do |section| %>
- <%if (section.organisation_id == @version.phase.dmptemplate.organisation_id ) || ( section.organisation_id == current_user.organisation_id) then%>
-
-
-
-
-
- <%= raw section.description %>
-
-
- <% section.questions.order("number").each do |question| %>
- <% last_question_id = section.questions.order("number DESC").first.id%>
-
-
- <%= render :partial => 'preview_question', locals: {question: question}%>
-
- <% if last_question_id == question.id then %>
-
- <% else %>
-
- <% end %>
-
- <%end%>
-
-
-
- <%end%>
- <%end%>
-
+<%- model_class = Phase -%>
+<%= stylesheet_link_tag "admin" %>
+
+
+ <%= @version.phase.dmptemplate.title %>
+
+
+ <%= link_to t("org_admin.templates.back_to_edit_phase_label"),
+ admin_phase_dmptemplate_path(:id => @version.phase_id, :version_id => @version.id, :edit => "true"),
+ :class => 'btn btn-primary' %>
+ <%= link_to t("org_admin.templates.view_all_templates"),
+ admin_index_dmptemplate_path,
+ :class => 'btn btn-primary' %>
+
+
+
+
+
+
+<%= render :partial => "admin_nav_tabs", locals: {dmptemplate: @version.phase.dmptemplate, active: @version.phase_id} %>
+
+
+
+
+ <% sections = @version.sections %>
+ <% sections.order(:number).each do |section| %>
+ <%if (section.organisation_id == @version.phase.dmptemplate.organisation_id ) || ( section.organisation_id == current_user.organisation_id) then%>
+
+
+
+
+
+ <%= raw section.description %>
+
+
+ <% section.questions.order("number").each do |question| %>
+ <% last_question_id = section.questions.order("number DESC").first.id%>
+
+
+ <%= render :partial => 'preview_question', locals: {question: question}%>
+
+ <% if last_question_id == question.id then %>
+
+ <% else %>
+
+ <% end %>
+
+ <%end%>
+
+
+
+ <%end%>
+ <%end%>
+
\ No newline at end of file
diff --git a/app/views/dmptemplates/admin_template.html.erb b/app/views/dmptemplates/admin_template.html.erb
index 2d36206..642fb15 100644
--- a/app/views/dmptemplates/admin_template.html.erb
+++ b/app/views/dmptemplates/admin_template.html.erb
@@ -8,7 +8,7 @@
<%= link_to t("org_admin.templates.view_all_templates"),
admin_index_dmptemplate_path,
:class => 'btn btn-primary' %>
-
+
@@ -19,14 +19,14 @@
- <% if @dmptemplate.org_type != t("helpers.org_type.funder") || current_user.org_type == t("helpers.org_type.funder") then %>
+ <% if @dmptemplate.org_type != constant("organisation_types.funder") || current_user.org_type == constant("organisation_types.funder") then %>
<%= render :partial => "edit_template", locals: {dmptemplate: @dmptemplate}%>
-
- <%end%>
+
+ <%end%>
<%= render :partial => "show_template", locals: {dmptemplate: @dmptemplate}%>
-
+
<% if !@dmptemplate.phases.nil? then %>
@@ -35,7 +35,7 @@
<%= render :partial => 'show_phases_sections', locals: {phase: phase}%>
<%end%>
- <%else%>
+ <%else%>
<% @dmptemplate.phases.order(:number).each do |phase| %>
-
- <%end%>
- <%end%>
- <%end%>
-
+
+ <%end%>
+ <%end%>
+ <%end%>
+
-<%= tinymce :content_css => asset_path('application.css') %>
\ No newline at end of file
+<%= tinymce :content_css => asset_path('application.css') %>
diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb
index 88303f2..2ea27f8 100644
--- a/app/views/guidance_groups/admin_edit.html.erb
+++ b/app/views/guidance_groups/admin_edit.html.erb
@@ -1,97 +1,97 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript 'admin.js' %>
-
-
- <%= t('org_admin.guidance.guidance_group_label') %>
-
-
- <%= link_to t("org_admin.guidance.view_all_guidance"),
- admin_index_guidance_path,
- :class => 'btn btn-primary' %>
-
-
-
-
-
-
-
-
- <%= form_for(@guidance_group, :url => admin_update_guidance_group_path(@guidance_group), :html => {:method => :put}) do |f| %>
-
-
-
- <%= t('org_admin.guidance_group.name_label') %>
-
-
- <%= f.text_field :name,
- :as => :string,
- :class => 'text_field' %>
-
-
-
- <%= link_to(image_tag('help_button.png'), '#', :class => 'guidance_group_title_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.title_help_text_html')) %>
-
-
-
-
- <%= t('org_admin.guidance.template') %>
-
-
- <% if @guidance_group.dmptemplate_ids == [] then %>
- <% default_select = "" %>
- <% else %>
- <% default_select = @guidance_group.dmptemplate_ids %>
- <% end %>
- <%= f.select :dmptemplate_ids, options_for_select(
- [['All templates', ""]].concat(Dmptemplate.funders_and_own_templates(current_user.organisation_id).collect { |g| [g.title, g.id] }), :selected => default_select), {},
- {:prompt => false, :multiple => true} %>
-
-
- <%= link_to(image_tag('help_button.png'), '#', :class => 'guidance_group_template_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.template_help_text_html')) %>
-
-
-
-
-
- <% if @guidance_group.published == true then %>
-
- <%= t('org_admin.templates.published_label') %>
-
-
- <%= f.check_box :published %>
-
-
-
-
-
-
- <% end %>
-
-
- <%= t('org_admin.guidance_group.subset') %>
-
-
- <%= f.check_box :optional_subset %> <%= t('org_admin.guidance_group.subset_eg') %>
-
-
- <%= link_to(image_tag('help_button.png'), '#', :class => 'guidance_group_subset_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.subset_option_help_text')) %>
-
-
-
-
-
-
-
-
-
- <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <% if @guidance_group.published == false then %>
- <%= f.submit t('helpers.submit.publish'), :name => "save_publish", :class => "btn btn-primary" %>
- <% end %>
- <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn cancel' %>
-
-
-
- <% end %>
-
-
+<%= stylesheet_link_tag "admin" %>
+<% javascript 'admin.js' %>
+
+
+ <%= t('org_admin.guidance.guidance_group_label') %>
+
+
+ <%= link_to t("org_admin.guidance.view_all_guidance"),
+ admin_index_guidance_path,
+ :class => 'btn btn-primary' %>
+
+
+
+
+
+
+
+
+ <%= form_for(@guidance_group, :url => admin_update_guidance_group_path(@guidance_group), :html => {:method => :put}) do |f| %>
+
+
+
+ <%= t('org_admin.guidance_group.name_label') %>
+
+
+ <%= f.text_field :name,
+ :as => :string,
+ :class => 'text_field' %>
+
+
+
+ <%= link_to(image_tag('help_button.png'), '#', :class => 'guidance_group_title_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.title_help_text_html')) %>
+
+
+
+
+ <%= t('org_admin.guidance.template') %>
+
+
+ <% if @guidance_group.dmptemplate_ids == [] then %>
+ <% default_select = "" %>
+ <% else %>
+ <% default_select = @guidance_group.dmptemplate_ids %>
+ <% end %>
+ <%= f.select :dmptemplate_ids, options_for_select(
+ [['All templates', ""]].concat(Dmptemplate.funders_and_own_templates(current_user.organisation_id).collect { |g| [g.title, g.id] }), :selected => default_select), {},
+ {:prompt => false, :multiple => true} %>
+
+
+ <%= link_to(image_tag('help_button.png'), '#', :class => 'guidance_group_template_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.template_help_text_html')) %>
+
+
+
+
+
+ <% if @guidance_group.published == true then %>
+
+ <%= t('org_admin.templates.published_label') %>
+
+
+ <%= f.check_box :published %>
+
+
+
+
+
+
+ <% end %>
+
+
+ <%= t('org_admin.guidance_group.subset') %>
+
+
+ <%= f.check_box :optional_subset %> <%= t('org_admin.guidance_group.subset_eg') %>
+
+
+ <%= link_to(image_tag('help_button.png'), '#', :class => 'guidance_group_subset_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.subset_option_help_text')) %>
+
+
+
+
+
+
+
+
+
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
+ <% if @guidance_group.published == false then %>
+ <%= f.submit t('helpers.submit.publish'), :name => "save_publish", :class => "btn btn-primary" %>
+ <% end %>
+ <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn cancel' %>
+
+
+
+ <% end %>
+
+
diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb
index 20b3a04..4bd3367 100644
--- a/app/views/guidance_groups/admin_new.html.erb
+++ b/app/views/guidance_groups/admin_new.html.erb
@@ -1,71 +1,71 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript 'admin.js' %>
-
-
- <%= t("org_admin.guidance.guidance_group_label") %>
-
-
- <%= link_to t("org_admin.guidance.view_all_guidance"),
- admin_index_guidance_path,
- :class => "btn btn-primary" %>
-
-
-
-
-
-
-
-
- <%= form_for :guidance_group, :url => {:action => "admin_create"} do |f| %>
-
-
-
- <%= t('org_admin.guidance_group.name_label') %>
-
- <%= f.text_field :name,
- :as => :string,
- :class => "text_field" %>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => 'guidance_group_title_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t("org_admin.guidance_group.title_help_text_html"))%>
-
-
-
-
-
- <%= t("org_admin.guidance.template") %>
-
- <%= f.select :dmptemplate_ids, options_for_select(
- [['All templates', ""]].concat( Dmptemplate.funders_and_own_templates(current_user.organisation_id).collect{ |g| [g.title, g.id] })),{} ,
- {:prompt => false , :multiple => true}%>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_template_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.template_help_text_html'))%>
-
-
-
-
- <%= t('org_admin.guidance_group.subset') %>
-
- <%= f.check_box :optional_subset %> <%= t('org_admin.guidance_group.subset_eg') %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_subset_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.subset_option_help_text'))%>
-
-
-
-
-
-
-
-
-
-
- <%= f.submit t("helpers.submit.save"), :name => "draft", :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.cancel"), :back, :class => "btn cancel btn-secondary" %>
-
-
-
- <%end%>
-
-
+<%= stylesheet_link_tag "admin" %>
+<% javascript 'admin.js' %>
+
+
+ <%= t("org_admin.guidance.guidance_group_label") %>
+
+
+ <%= link_to t("org_admin.guidance.view_all_guidance"),
+ admin_index_guidance_path,
+ :class => "btn btn-primary" %>
+
+
+
+
+
+
+
+
+ <%= form_for :guidance_group, :url => {:action => "admin_create"} do |f| %>
+
+
+
+ <%= t('org_admin.guidance_group.name_label') %>
+
+ <%= f.text_field :name,
+ :as => :string,
+ :class => "text_field" %>
+
+
+ <%= link_to( image_tag("help_button.png"), "#", :class => 'guidance_group_title_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t("org_admin.guidance_group.title_help_text_html"))%>
+
+
+
+
+
+ <%= t("org_admin.guidance.template") %>
+
+ <%= f.select :dmptemplate_ids, options_for_select(
+ [['All templates', ""]].concat( Dmptemplate.funders_and_own_templates(current_user.organisation_id).collect{ |g| [g.title, g.id] })),{} ,
+ {:prompt => false , :multiple => true}%>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_template_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.template_help_text_html'))%>
+
+
+
+
+ <%= t('org_admin.guidance_group.subset') %>
+
+ <%= f.check_box :optional_subset %> <%= t('org_admin.guidance_group.subset_eg') %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_subset_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance_group.subset_option_help_text'))%>
+
+
+
+
+
+
+
+
+
+
+ <%= f.submit t("helpers.submit.save"), :name => "draft", :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.cancel"), :back, :class => "btn cancel btn-secondary" %>
+
+
+
+ <%end%>
+
+
diff --git a/app/views/guidance_groups/admin_show.html.erb b/app/views/guidance_groups/admin_show.html.erb
index fe641ab..a5998ec 100644
--- a/app/views/guidance_groups/admin_show.html.erb
+++ b/app/views/guidance_groups/admin_show.html.erb
@@ -1,92 +1,92 @@
-<%= stylesheet_link_tag "admin" %>
-
-
- <%= t("org_admin.guidance.guidance_group_label") %>
-
-
-
- <%= link_to t("org_admin.guidance.view_all_guidance"),
- admin_index_guidance_path,
- :class => "btn btn-primary" %>
-
-
-
-
-
-
-
-
-
-
-
- <%= t("org_admin.guidance_group.name_label") %>
- <%= raw @guidance_group.name %>
-
-
-
- <% if @guidance_group.dmptemplates.count == 1 then %>
- <%= t("org_admin.guidance.template") %>
- <% else %>
- <%= t("org_admin.guidance.templates") %>
- <% end %>
-
-
- <% i = 1 %>
- <% if @guidance_group.dmptemplates.count == 0 then %>
- <% list = Dmptemplate.funders_and_own_templates(current_user.organisation_id) %>
- <% list.each do |tem| %>
- <%= tem.title %>
- <% if list.count > i then %>
- ,
- <% i +=1 %>
- <% end %>
- <% end %>
- <% else %>
- <% @guidance_group.dmptemplates.each do |tem| %>
- <%= tem.title %>
- <% if @guidance_group.dmptemplates.count > i then %>
- ,
- <% i +=1 %>
- <% end %>
- <% end %>
- <% end %>
-
-
-
- <%= t('org_admin.templates.published_label') %>
-
- <% if @guidance_group.published.nil? || @guidance_group.published == false then %>
- <%= t("helpers.no_label") %>
- <% else %>
- <%= t("helpers.yes_label") %>
- <% end %>
-
-
-
-
- <%= t("org_admin.guidance_group.subset") %>
-
- <% if @guidance_group.optional_subset.nil? || @guidance_group.optional_subset == false then %>
- <%= t('helpers.no_label') %>
- <% else %>
- <%= t('helpers.yes_label') %>
- <% end %>
-
-
-
- <%= t("org_admin.guidance.created") %>
- <%= l @guidance_group.created_at.to_date, :formats => :short %>
-
-
- <%= t("org_admin.guidance.last_updated") %>
- <%= l @guidance_group.updated_at.to_date, :formats => :short %>
-
-
-
-
- <%= link_to t("helpers.submit.edit"), admin_edit_guidance_group_path(@guidance_group.id), :class => "btn btn-primary" %>
- <%= link_to t("helpers.submit.back"), :back, :class => "btn cancel" %>
-
-
-
+<%= stylesheet_link_tag "admin" %>
+
+
+ <%= t("org_admin.guidance.guidance_group_label") %>
+
+
+
+ <%= link_to t("org_admin.guidance.view_all_guidance"),
+ admin_index_guidance_path,
+ :class => "btn btn-primary" %>
+
+
+
+
+
+
+
+
+
+
+
+ <%= t("org_admin.guidance_group.name_label") %>
+ <%= raw @guidance_group.name %>
+
+
+
+ <% if @guidance_group.dmptemplates.count == 1 then %>
+ <%= t("org_admin.guidance.template") %>
+ <% else %>
+ <%= t("org_admin.guidance.templates") %>
+ <% end %>
+
+
+ <% i = 1 %>
+ <% if @guidance_group.dmptemplates.count == 0 then %>
+ <% list = Dmptemplate.funders_and_own_templates(current_user.organisation_id) %>
+ <% list.each do |tem| %>
+ <%= tem.title %>
+ <% if list.count > i then %>
+ ,
+ <% i +=1 %>
+ <% end %>
+ <% end %>
+ <% else %>
+ <% @guidance_group.dmptemplates.each do |tem| %>
+ <%= tem.title %>
+ <% if @guidance_group.dmptemplates.count > i then %>
+ ,
+ <% i +=1 %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+
+
+ <%= t('org_admin.templates.published_label') %>
+
+ <% if @guidance_group.published.nil? || @guidance_group.published == false then %>
+ <%= t("helpers.no_label") %>
+ <% else %>
+ <%= t("helpers.yes_label") %>
+ <% end %>
+
+
+
+
+ <%= t("org_admin.guidance_group.subset") %>
+
+ <% if @guidance_group.optional_subset.nil? || @guidance_group.optional_subset == false then %>
+ <%= t('helpers.no_label') %>
+ <% else %>
+ <%= t('helpers.yes_label') %>
+ <% end %>
+
+
+
+ <%= t("org_admin.guidance.created") %>
+ <%= l @guidance_group.created_at.to_date, :formats => :short %>
+
+
+ <%= t("org_admin.guidance.last_updated") %>
+ <%= l @guidance_group.updated_at.to_date, :formats => :short %>
+
+
+
+
+ <%= link_to t("helpers.submit.edit"), admin_edit_guidance_group_path(@guidance_group.id), :class => "btn btn-primary" %>
+ <%= link_to t("helpers.submit.back"), :back, :class => "btn cancel" %>
+
+
+
\ No newline at end of file
diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb
index 0f2e0c8..e6a47f9 100644
--- a/app/views/guidances/admin_edit.html.erb
+++ b/app/views/guidances/admin_edit.html.erb
@@ -1,157 +1,157 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript 'admin.js' %>
-
-
- <%= t('org_admin.guidance_label') %>
-
-
- <%= link_to t("org_admin.guidance.add_guidance"),
- admin_new_guidance_path,
- :class => 'btn btn-primary' %>
- <%= link_to t("org_admin.guidance.view_all_guidance"),
- admin_index_guidance_path,
- :class => 'btn btn-primary' %>
-
-
-
-
-
-
-
-
- <%= form_for(@guidance, :url => admin_update_guidance_path(@guidance), :html => { :method => :put , :id => 'edit_guidance_form'}) do |f| %>
-
-
-
- <%= t('org_admin.guidance.text_label') %>
-
- <%= text_area_tag("guidance-text", @guidance.text, class: "tinymce") %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_text_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.text_help_text_html'))%>
-
-
-
-
-
- <%= t('org_admin.guidance.by_theme_or_by_question') %>
-
- <% if !@guidance.question_id.nil? then %>
- <% select_op = 2 %>
- <% else%>
- <% select_op = 1%>
- <%end%>
- <%= hidden_field 'select_op' , :value => select_op, :id => 'edit_guid_ques_flag' %>
-
- <%= select_tag "g_options", options_for_select({t('org_admin.guidance.by_themes_label') => 1,
- t('org_admin.guidance.by_question_label') => 2}, select_op) %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_apply_to_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.apply_to_help_text_html'))%>
-
-
-
-
-
-
- <%= 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 => 'guidance_by_themes_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_themes_help_text_html'))%>
-
-
-
-
-
-
- <% if !@guidance.question_id.nil? then %>
- <% dmp_template_id = @guidance.question.section.version.phase.dmptemplate_id %>
- <% phase_id = @guidance.question.section.version.phase_id %>
- <% version_id = @guidance.question.section.version_id %>
- <% section_id = @guidance.question.section_id %>
-
- <%= collection_select(:phase, :dmptemplate_id, Dmptemplate.all.order('title'), :id, :title, {:prompt => "Select a template", :selected => dmp_template_id}, {:id => 'templates_select'}) %>
-
-
- <%= collection_select(:version, :phase_id, Phase.where("dmptemplate_id = ?", dmp_template_id).order('title ASC'), :id, :title, {:prompt => I18n.t('helpers.select_phase'), :selected => phase_id}, {:id => 'phases_select'}) %>
-
- <%= collection_select(:section, :version_id, Version.where("phase_id = ?", phase_id).order('title ASC'), :id, :title, {:prompt => I18n.t('helpers.select_version'), :selected => version_id}, {:id => 'versions_select'}) %>
-
- <%= collection_select(:question, :section_id, Section.where("version_id = ?", version_id).order('title ASC'), :id, :title, {:prompt => I18n.t('helpers.select_section'), :selected => section_id }, {:id => 'sections_select'}) %>
-
- <%= collection_select(:guidance, :question_id, Question.where("section_id = ?", section_id).order('text ASC'), :id, :text, {:prompt => I18n.t('helpers.select_question')}, {:id => 'questions_select'}) %>
- <%else%>
- <%= collection_select(nil, :dmptemplate_id, @dmptemplates, :id, :title, {:prompt => I18n.t('helpers.select_template')}, {:id => 'templates_select'}) %>
-
- <%= collection_select(nil, :phase_id, @phases, :id, :title, {:prompt => I18n.t('helpers.select_phase')}, {:id => 'phases_select'}) %>
-
- <%= collection_select(nil, :version_id, @versions, :id, :title, {:prompt => I18n.t('helpers.select_version')}, {:id => 'versions_select'}) %>
-
- <%= collection_select(nil, :section_id, @sections, :id, :title, {:prompt => I18n.t('helpers.select_section')}, {:id => 'sections_select'}) %>
-
- <%= collection_select(nil, :question_id, @questions, :id, :text, {:prompt => I18n.t('helpers.select_question')}, {:id => 'questions_select'}) %>
- <%end%>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_by_question_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_question_help_text_html'))%>
-
-
-
-
-
-
-
- <%= t('org_admin.guidance.published') %>
-
- <%= f.check_box :published , :as => :check_boxes%>
-
-
-
-
-
-
-
- <%= t('org_admin.guidance.guidance_group_label') %>
-
- <%= f.collection_select(:guidance_group_ids,
- GuidanceGroup.where("organisation_id = ?", current_user.organisation_id).order('name ASC'),
- :id, :name, {:prompt => false, :include_blank => 'None'}, {:multiple => false})%>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_select_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.guidance_group_select_help_text_html'))%>
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%= tinymce :content_css => asset_path('application.css') %>
- <%end%>
-
-
-
-
-
-
+<%= stylesheet_link_tag "admin" %>
+<% javascript 'admin.js' %>
+
+
+ <%= t('org_admin.guidance_label') %>
+
+
+ <%= link_to t("org_admin.guidance.add_guidance"),
+ admin_new_guidance_path,
+ :class => 'btn btn-primary' %>
+ <%= link_to t("org_admin.guidance.view_all_guidance"),
+ admin_index_guidance_path,
+ :class => 'btn btn-primary' %>
+
+
+
+
+
+
+
+
+ <%= form_for(@guidance, :url => admin_update_guidance_path(@guidance), :html => { :method => :put , :id => 'edit_guidance_form'}) do |f| %>
+
+
+
+ <%= t('org_admin.guidance.text_label') %>
+
+ <%= text_area_tag("guidance-text", @guidance.text, class: "tinymce") %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_text_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.text_help_text_html'))%>
+
+
+
+
+
+ <%= t('org_admin.guidance.by_theme_or_by_question') %>
+
+ <% if !@guidance.question_id.nil? then %>
+ <% select_op = 2 %>
+ <% else%>
+ <% select_op = 1%>
+ <%end%>
+ <%= hidden_field 'select_op' , :value => select_op, :id => 'edit_guid_ques_flag' %>
+
+ <%= select_tag "g_options", options_for_select({t('org_admin.guidance.by_themes_label') => 1,
+ t('org_admin.guidance.by_question_label') => 2}, select_op) %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_apply_to_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.apply_to_help_text_html'))%>
+
+
+
+
+
+
+ <%= 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 => 'guidance_by_themes_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_themes_help_text_html'))%>
+
+
+
+
+
+
+ <% if !@guidance.question_id.nil? then %>
+ <% dmp_template_id = @guidance.question.section.version.phase.dmptemplate_id %>
+ <% phase_id = @guidance.question.section.version.phase_id %>
+ <% version_id = @guidance.question.section.version_id %>
+ <% section_id = @guidance.question.section_id %>
+
+ <%= collection_select(:phase, :dmptemplate_id, Dmptemplate.all.order('title'), :id, :title, {:prompt => "Select a template", :selected => dmp_template_id}, {:id => 'templates_select'}) %>
+
+
+ <%= collection_select(:version, :phase_id, Phase.where("dmptemplate_id = ?", dmp_template_id).order('title ASC'), :id, :title, {:prompt => I18n.t('helpers.select_phase'), :selected => phase_id}, {:id => 'phases_select'}) %>
+
+ <%= collection_select(:section, :version_id, Version.where("phase_id = ?", phase_id).order('title ASC'), :id, :title, {:prompt => I18n.t('helpers.select_version'), :selected => version_id}, {:id => 'versions_select'}) %>
+
+ <%= collection_select(:question, :section_id, Section.where("version_id = ?", version_id).order('title ASC'), :id, :title, {:prompt => I18n.t('helpers.select_section'), :selected => section_id }, {:id => 'sections_select'}) %>
+
+ <%= collection_select(:guidance, :question_id, Question.where("section_id = ?", section_id).order('text ASC'), :id, :text, {:prompt => I18n.t('helpers.select_question')}, {:id => 'questions_select'}) %>
+ <%else%>
+ <%= collection_select(nil, :dmptemplate_id, @dmptemplates, :id, :title, {:prompt => I18n.t('helpers.select_template')}, {:id => 'templates_select'}) %>
+
+ <%= collection_select(nil, :phase_id, @phases, :id, :title, {:prompt => I18n.t('helpers.select_phase')}, {:id => 'phases_select'}) %>
+
+ <%= collection_select(nil, :version_id, @versions, :id, :title, {:prompt => I18n.t('helpers.select_version')}, {:id => 'versions_select'}) %>
+
+ <%= collection_select(nil, :section_id, @sections, :id, :title, {:prompt => I18n.t('helpers.select_section')}, {:id => 'sections_select'}) %>
+
+ <%= collection_select(nil, :question_id, @questions, :id, :text, {:prompt => I18n.t('helpers.select_question')}, {:id => 'questions_select'}) %>
+ <%end%>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_by_question_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_question_help_text_html'))%>
+
+
+
+
+
+
+
+ <%= t('org_admin.guidance.published') %>
+
+ <%= f.check_box :published , :as => :check_boxes%>
+
+
+
+
+
+
+
+ <%= t('org_admin.guidance.guidance_group_label') %>
+
+ <%= f.collection_select(:guidance_group_ids,
+ GuidanceGroup.where("organisation_id = ?", current_user.organisation_id).order('name ASC'),
+ :id, :name, {:prompt => false, :include_blank => 'None'}, {:multiple => false})%>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_select_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.guidance_group_select_help_text_html'))%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= tinymce :content_css => asset_path('application.css') %>
+ <%end%>
+
+
+
+
+
+
diff --git a/app/views/guidances/admin_index.html.erb b/app/views/guidances/admin_index.html.erb
index 596b023..f808526 100644
--- a/app/views/guidances/admin_index.html.erb
+++ b/app/views/guidances/admin_index.html.erb
@@ -1,174 +1,174 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript "admin.js" %>
-
-
-
- <%= t("org_admin.guidance_group.guidance_group_list") %>
-
-
-
- <%= raw t("org_admin.guidance_group.guidance_group_text_html")%>
-
-
-
- <%= link_to t("org_admin.guidance_group.add_guidance_group"), admin_new_guidance_group_path(), :class => "btn btn-primary" %>
-
-
-
-
-<% if @guidance_groups.count > 0 then%>
-
-
-
- <%= t("org_admin.guidance_group.name_label") %>
- <%= t("org_admin.guidance.template") %>
- <%= t("org_admin.guidance.published") %>
- <%= t("org_admin.guidance_group.subset") %>
- <%= t("org_admin.guidance.last_updated") %>
- <%= t("org_admin.guidance.actions") %>
-
-
-
- <% !@guidance_groups.each do |guidance_gr| %>
-
-
- <%= guidance_gr.name %>
-
- <% guidance_group_temp = guidance_gr.dmptemplate_ids %>
- <% if guidance_group_temp != [] then %>
-
- <% i = 1 %>
- <% guidance_group_temp.each do |t| %>
- <% temp = Dmptemplate.find(t) %>
- <%= temp.title %>
-
- <% if guidance_group_temp.count > i then%>
- ,
- <% i +=1 %>
- <% end %>
- <%end%>
-
- <%else%>
-
- <%= t("org_admin.guidance_group.all_temp")%>
-
- <%end%>
-
- <%if guidance_gr.published.nil? || guidance_gr.published == false then%>
- <%= t("helpers.no_label")%>
- <%else%>
- <%= t("helpers.yes_label")%>
- <%end%>
-
-
- <%if guidance_gr.optional_subset.nil? || guidance_gr.optional_subset == false then%>
- <%= t("helpers.no_label")%>
- <%else%>
- <%= t("helpers.yes_label")%>
- <%end%>
-
-
-
- <%= l guidance_gr.updated_at.to_date, :formats => :short %>
-
-
- <%= link_to t("helpers.view"), admin_show_guidance_group_path(guidance_gr), :class => "dmp_table_link"%>
- <%= link_to t("helpers.submit.edit"), admin_edit_guidance_group_path(guidance_gr), :class => "dmp_table_link"%>
- <%= link_to t("helpers.submit.delete"), admin_destroy_guidance_group_path(guidance_gr),
- :confirm => t("org_admin.guidance_group.delete_message", :guidance_group_name => guidance_gr.name ), :method => :delete, :class => "dmp_table_link"%>
-
-
-
- <%end%>
-
-
-<%end%>
-
-
-
-
-
- <%= t("org_admin.guidance.guidance_list") %>
-
-
-
- <%= raw t("org_admin.guidance.guidance_text_html")%>
-
-
-
-
- <%= link_to t("org_admin.guidance.add_guidance"),
- admin_new_guidance_path(),
- :class => "btn btn-primary" %>
-
-
-
-
-
-
-<% if @guidances.count > 0 then%>
-
-
-
- <%= t("org_admin.guidance.text_label") %>
- <%= t("org_admin.guidance.themes_label") %>
- <%= t("org_admin.guidance.question_label") %>
- <%= t("org_admin.guidance.guidance_group_label") %>
- <%= t("org_admin.guidance.last_updated") %>
- <%= t("org_admin.guidance.actions") %>
-
-
-
- <% @guidances.each do |guidance| %>
- <% if guidance.in_group_belonging_to?(current_user.organisation_id) then %>
-
-
- <%= guidance.text.html_safe%>
-
- <% if guidance.themes != [] then %>
-
- <% guidance.themes.each do |th| %>
- <%= th.title %>
- <%end%>
-
- <%else%>
-
- -
-
- <%end%>
- <% if !guidance.question_id.nil? then %>
-
- <%= raw guidance.question.text.truncate(70, omission: t('helpers.truncate_continued')) %>
-
- <%else%>
-
- -
-
- <%end%>
- <% if guidance.guidance_groups != [] then %>
-
- <% guidance.guidance_groups.each do |p|%>
- <%= p.name %>
- <%end%>
-
- <%else%>
-
- -
-
- <%end%>
-
- <%= l guidance.updated_at.to_date, :formats => :short %>
-
-
- <%= link_to t("helpers.view"), admin_show_guidance_path(guidance), :class => "dmp_table_link"%>
- <%= link_to t("helpers.submit.edit"), admin_edit_guidance_path(guidance), :class => "dmp_table_link"%>
- <%= link_to t("helpers.submit.delete"), admin_destroy_guidance_path(guidance),
- :confirm => t("org_admin.guidance.delete_message_html", :guidance_summary => truncate(sanitize(guidance.text,:tags => %w(br a)), :length => 20 , :omission => t('helpers.truncate_continued')) ), :method => :delete, :class => "dmp_table_link"%>
-
-
- <%end%>
- <%end%>
-
-
-<%end%>
-
+<%= stylesheet_link_tag "admin" %>
+<% javascript "admin.js" %>
+
+
+
+ <%= t("org_admin.guidance_group.guidance_group_list") %>
+
+
+
+ <%= raw t("org_admin.guidance_group.guidance_group_text_html")%>
+
+
+
+ <%= link_to t("org_admin.guidance_group.add_guidance_group"), admin_new_guidance_group_path(), :class => "btn btn-primary" %>
+
+
+
+
+<% if @guidance_groups.count > 0 then%>
+
+
+
+ <%= t("org_admin.guidance_group.name_label") %>
+ <%= t("org_admin.guidance.template") %>
+ <%= t("org_admin.guidance.published") %>
+ <%= t("org_admin.guidance_group.subset") %>
+ <%= t("org_admin.guidance.last_updated") %>
+ <%= t("org_admin.guidance.actions") %>
+
+
+
+ <% !@guidance_groups.each do |guidance_gr| %>
+
+
+ <%= guidance_gr.name %>
+
+ <% guidance_group_temp = guidance_gr.dmptemplate_ids %>
+ <% if guidance_group_temp != [] then %>
+
+ <% i = 1 %>
+ <% guidance_group_temp.each do |t| %>
+ <% temp = Dmptemplate.find(t) %>
+ <%= temp.title %>
+
+ <% if guidance_group_temp.count > i then%>
+ ,
+ <% i +=1 %>
+ <% end %>
+ <%end%>
+
+ <%else%>
+
+ <%= t("org_admin.guidance_group.all_temp")%>
+
+ <%end%>
+
+ <%if guidance_gr.published.nil? || guidance_gr.published == false then%>
+ <%= t("helpers.no_label")%>
+ <%else%>
+ <%= t("helpers.yes_label")%>
+ <%end%>
+
+
+ <%if guidance_gr.optional_subset.nil? || guidance_gr.optional_subset == false then%>
+ <%= t("helpers.no_label")%>
+ <%else%>
+ <%= t("helpers.yes_label")%>
+ <%end%>
+
+
+
+ <%= l guidance_gr.updated_at.to_date, :formats => :short %>
+
+
+ <%= link_to t("helpers.view"), admin_show_guidance_group_path(guidance_gr), :class => "dmp_table_link"%>
+ <%= link_to t("helpers.submit.edit"), admin_edit_guidance_group_path(guidance_gr), :class => "dmp_table_link"%>
+ <%= link_to t("helpers.submit.delete"), admin_destroy_guidance_group_path(guidance_gr),
+ :confirm => t("org_admin.guidance_group.delete_message", :guidance_group_name => guidance_gr.name ), :method => :delete, :class => "dmp_table_link"%>
+
+
+
+ <%end%>
+
+
+<%end%>
+
+
+
+
+
+ <%= t("org_admin.guidance.guidance_list") %>
+
+
+
+ <%= raw t("org_admin.guidance.guidance_text_html")%>
+
+
+
+
+ <%= link_to t("org_admin.guidance.add_guidance"),
+ admin_new_guidance_path(),
+ :class => "btn btn-primary" %>
+
+
+
+
+
+
+<% if @guidances.count > 0 then%>
+
+
+
+ <%= t("org_admin.guidance.text_label") %>
+ <%= t("org_admin.guidance.themes_label") %>
+ <%= t("org_admin.guidance.question_label") %>
+ <%= t("org_admin.guidance.guidance_group_label") %>
+ <%= t("org_admin.guidance.last_updated") %>
+ <%= t("org_admin.guidance.actions") %>
+
+
+
+ <% @guidances.each do |guidance| %>
+ <% if guidance.in_group_belonging_to?(current_user.organisation_id) then %>
+
+
+ <%= guidance.text.html_safe%>
+
+ <% if guidance.themes != [] then %>
+
+ <% guidance.themes.each do |th| %>
+ <%= th.title %>
+ <%end%>
+
+ <%else%>
+
+ -
+
+ <%end%>
+ <% if !guidance.question_id.nil? then %>
+
+ <%= raw guidance.question.text.truncate(70, omission: t('helpers.truncate_continued')) %>
+
+ <%else%>
+
+ -
+
+ <%end%>
+ <% if guidance.guidance_groups != [] then %>
+
+ <% guidance.guidance_groups.each do |p|%>
+ <%= p.name %>
+ <%end%>
+
+ <%else%>
+
+ -
+
+ <%end%>
+
+ <%= l guidance.updated_at.to_date, :formats => :short %>
+
+
+ <%= link_to t("helpers.view"), admin_show_guidance_path(guidance), :class => "dmp_table_link"%>
+ <%= link_to t("helpers.submit.edit"), admin_edit_guidance_path(guidance), :class => "dmp_table_link"%>
+ <%= link_to t("helpers.submit.delete"), admin_destroy_guidance_path(guidance),
+ :confirm => t("org_admin.guidance.delete_message_html", :guidance_summary => truncate(sanitize(guidance.text,:tags => %w(br a)), :length => 20 , :omission => t('helpers.truncate_continued')) ), :method => :delete, :class => "dmp_table_link"%>
+
+
+ <%end%>
+ <%end%>
+
+
+<%end%>
+
diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb
index 94d90fe..9676554 100644
--- a/app/views/guidances/admin_new.html.erb
+++ b/app/views/guidances/admin_new.html.erb
@@ -1,127 +1,127 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript 'admin.js' %>
-
-
- <%= t('org_admin.guidance.new_label') %>
-
-
- <%= link_to t("org_admin.guidance.view_all_guidance"),
- admin_index_guidance_path,
- :class => 'btn btn-primary' %>
-
-
-
-
-
-
-
- <%= form_for :guidance, :url => {:action => 'admin_create'}, :html => {:id => 'new_guidance_form'} do |f| %>
-
-
- <%= t('org_admin.guidance.text_label') %>
-
- <%= text_area_tag("guidance-text", "", class: "tinymce") %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_text_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.text_help_text_html'))%>
-
-
-
-
-
- <%= t('org_admin.guidance.by_theme_or_by_question') %>
-
- <%= select_tag "g_options", options_for_select([[t('org_admin.guidance.by_themes_label'), 1],
- [t('org_admin.guidance.by_question_label'), 2]]) %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_apply_to_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.apply_to_help_text_html'))%>
-
-
-
-
-
- <%= 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 => 'guidance_by_themes_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_themes_help_text_html'))%>
-
-
-
-
-
-
- <%= collection_select(nil, :dmptemplate_id, @dmptemplates, :id, :title, {:prompt => I18n.t('helpers.select_template')}, {:id => 'templates_select'}) %>
-
- <%= collection_select(nil, :phase_id, @phases, :id, :title, {:prompt => I18n.t('helpers.select_phase')}, {:id => 'phases_select'}) %>
-
- <%= collection_select(nil, :version_id, @versions, :id, :title, {:prompt => I18n.t('helpers.select_version')}, {:id => 'versions_select'}) %>
-
- <%= collection_select(nil, :section_id, @sections, :id, :title, {:prompt => I18n.t('helpers.select_section')}, {:id => 'sections_select'}) %>
-
- <%= collection_select(nil, :question_id, @questions, :id, :text, {:prompt => I18n.t('helpers.select_question')}, {:id => 'questions_select'}) %>
-
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_by_question_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_question_help_text_html'))%>
-
-
-
-
-
-
-
- <%= t('org_admin.guidance.published') %>
-
- <%= f.check_box :published , :as => :check_boxes%>
-
-
-
-
-
-
-
- <%= t('org_admin.guidance.guidance_group_label') %>
-
- <%= f.collection_select(:guidance_group_ids,
- GuidanceGroup.where("organisation_id = ?", current_user.organisation_id).order('name ASC'),
- :id, :name, {:prompt => false, :include_blank => 'None'}, {:multiple => false})%>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_select_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.guidance_group_select_help_text_html'))%>
-
-
-
-
-
-
-
-
-
-
-
-
- <%= tinymce :content_css => asset_path('application.css') %>
- <%end%>
-
-
-
-
-
-
-
-
-
+<%= stylesheet_link_tag "admin" %>
+<% javascript 'admin.js' %>
+
+
+ <%= t('org_admin.guidance.new_label') %>
+
+
+ <%= link_to t("org_admin.guidance.view_all_guidance"),
+ admin_index_guidance_path,
+ :class => 'btn btn-primary' %>
+
+
+
+
+
+
+
+ <%= form_for :guidance, :url => {:action => 'admin_create'}, :html => {:id => 'new_guidance_form'} do |f| %>
+
+
+ <%= t('org_admin.guidance.text_label') %>
+
+ <%= text_area_tag("guidance-text", "", class: "tinymce") %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_text_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.text_help_text_html'))%>
+
+
+
+
+
+ <%= t('org_admin.guidance.by_theme_or_by_question') %>
+
+ <%= select_tag "g_options", options_for_select([[t('org_admin.guidance.by_themes_label'), 1],
+ [t('org_admin.guidance.by_question_label'), 2]]) %>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_apply_to_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.apply_to_help_text_html'))%>
+
+
+
+
+
+ <%= 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 => 'guidance_by_themes_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_themes_help_text_html'))%>
+
+
+
+
+
+
+ <%= collection_select(nil, :dmptemplate_id, @dmptemplates, :id, :title, {:prompt => I18n.t('helpers.select_template')}, {:id => 'templates_select'}) %>
+
+ <%= collection_select(nil, :phase_id, @phases, :id, :title, {:prompt => I18n.t('helpers.select_phase')}, {:id => 'phases_select'}) %>
+
+ <%= collection_select(nil, :version_id, @versions, :id, :title, {:prompt => I18n.t('helpers.select_version')}, {:id => 'versions_select'}) %>
+
+ <%= collection_select(nil, :section_id, @sections, :id, :title, {:prompt => I18n.t('helpers.select_section')}, {:id => 'sections_select'}) %>
+
+ <%= collection_select(nil, :question_id, @questions, :id, :text, {:prompt => I18n.t('helpers.select_question')}, {:id => 'questions_select'}) %>
+
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_by_question_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.by_question_help_text_html'))%>
+
+
+
+
+
+
+
+ <%= t('org_admin.guidance.published') %>
+
+ <%= f.check_box :published , :as => :check_boxes%>
+
+
+
+
+
+
+
+ <%= t('org_admin.guidance.guidance_group_label') %>
+
+ <%= f.collection_select(:guidance_group_ids,
+ GuidanceGroup.where("organisation_id = ?", current_user.organisation_id).order('name ASC'),
+ :id, :name, {:prompt => false, :include_blank => 'None'}, {:multiple => false})%>
+
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_select_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.guidance.guidance_group_select_help_text_html'))%>
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= tinymce :content_css => asset_path('application.css') %>
+ <%end%>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/guidances/admin_show.html.erb b/app/views/guidances/admin_show.html.erb
index d7994e0..a8f8d6e 100644
--- a/app/views/guidances/admin_show.html.erb
+++ b/app/views/guidances/admin_show.html.erb
@@ -1,75 +1,75 @@
-<%= stylesheet_link_tag "admin" %>
-
-
- <%= t("org_admin.guidance_label") %>
-
-
-
- <%= link_to t("org_admin.guidance.add_guidance"),
- admin_new_guidance_path,
- :class => "btn btn-primary" %>
- <%= link_to t("org_admin.guidance.view_all_guidance"),
- admin_index_guidance_path,
- :class => "btn btn-primary" %>
-
-
-
-
-
-
-
-
-
-
-
- <%= t("org_admin.guidance.text_label") %>
- <%= raw @guidance.text %>
-
- <% if @guidance.themes !=[] then %>
-
- <%= t("org_admin.guidance.themes_label") %>
- <% @guidance.themes.each do |th|%>
- <%= th.title %>
- <%end%>
-
-
- <%end%>
- <% if !@guidance.question_id.nil? %>
-
- <%= t("org_admin.guidance.question_label") %>
- <%= raw @guidance.question.text %>
-
- <%end%>
-
- <%= t("org_admin.guidance.guidance_group_label") %>
- <% @guidance.guidance_groups.each do |p|%>
- <%= p.name %>
- <%end%>
-
-
-
- <%= t("org_admin.guidance.published") %>
- <%if @guidance.published == false || @guidance.published.nil? then%>
- <%= t("helpers.no_label")%>
- <%else%>
- <%= t("helpers.yes_label")%>
- <%end%>
-
-
-
- <%= t("org_admin.guidance.created") %>
- <%= l @guidance.created_at.to_date, :formats => :short %>
-
-
- <%= t("org_admin.guidance.last_updated") %>
- <%= l @guidance.updated_at.to_date, :formats => :short %>
-
-
-
-
- <%= link_to t("helpers.submit.edit"), admin_edit_guidance_path(@guidance.id), :class => "btn btn-primary"%>
- <%= link_to t("helpers.submit.back"), :back, :class => "btn cancel" %>
-
-
-
+<%= stylesheet_link_tag "admin" %>
+
+
+ <%= t("org_admin.guidance_label") %>
+
+
+
+ <%= link_to t("org_admin.guidance.add_guidance"),
+ admin_new_guidance_path,
+ :class => "btn btn-primary" %>
+ <%= link_to t("org_admin.guidance.view_all_guidance"),
+ admin_index_guidance_path,
+ :class => "btn btn-primary" %>
+
+
+
+
+
+
+
+
+
+
+
+ <%= t("org_admin.guidance.text_label") %>
+ <%= raw @guidance.text %>
+
+ <% if @guidance.themes !=[] then %>
+
+ <%= t("org_admin.guidance.themes_label") %>
+ <% @guidance.themes.each do |th|%>
+ <%= th.title %>
+ <%end%>
+
+
+ <%end%>
+ <% if !@guidance.question_id.nil? %>
+
+ <%= t("org_admin.guidance.question_label") %>
+ <%= raw @guidance.question.text %>
+
+ <%end%>
+
+ <%= t("org_admin.guidance.guidance_group_label") %>
+ <% @guidance.guidance_groups.each do |p|%>
+ <%= p.name %>
+ <%end%>
+
+
+
+ <%= t("org_admin.guidance.published") %>
+ <%if @guidance.published == false || @guidance.published.nil? then%>
+ <%= t("helpers.no_label")%>
+ <%else%>
+ <%= t("helpers.yes_label")%>
+ <%end%>
+
+
+
+ <%= t("org_admin.guidance.created") %>
+ <%= l @guidance.created_at.to_date, :formats => :short %>
+
+
+ <%= t("org_admin.guidance.last_updated") %>
+ <%= l @guidance.updated_at.to_date, :formats => :short %>
+
+
+
+
+ <%= link_to t("helpers.submit.edit"), admin_edit_guidance_path(@guidance.id), :class => "btn btn-primary"%>
+ <%= link_to t("helpers.submit.back"), :back, :class => "btn cancel" %>
+
+
+
\ No newline at end of file
diff --git a/app/views/guidances/update_phases.js.erb b/app/views/guidances/update_phases.js.erb
index 9ffffce..3be4344 100644
--- a/app/views/guidances/update_phases.js.erb
+++ b/app/views/guidances/update_phases.js.erb
@@ -1,5 +1,5 @@
-$('#phases_select').html("<%= escape_javascript(options_for_select(@phases)) %>");
-$('#versions_select').html("<%= escape_javascript(options_for_select(@versions)) %>");
-$('#sections_select').html("<%= escape_javascript(options_for_select(@sections)) %>");
-$('#questions_select').html("<%= escape_javascript(options_for_select(@questions)) %>");
+$('#phases_select').html("<%= escape_javascript(options_for_select(@phases)) %>");
+$('#versions_select').html("<%= escape_javascript(options_for_select(@versions)) %>");
+$('#sections_select').html("<%= escape_javascript(options_for_select(@sections)) %>");
+$('#questions_select').html("<%= escape_javascript(options_for_select(@questions)) %>");
\ No newline at end of file
diff --git a/app/views/guidances/update_sections.js.erb b/app/views/guidances/update_sections.js.erb
index 9f4e438..710716c 100644
--- a/app/views/guidances/update_sections.js.erb
+++ b/app/views/guidances/update_sections.js.erb
@@ -1,2 +1,2 @@
-$('#sections_select').html("<%= escape_javascript(options_for_select(@sections)) %>");
+$('#sections_select').html("<%= escape_javascript(options_for_select(@sections)) %>");
$('#questions_select').html("<%= escape_javascript(options_for_select(@questions)) %>");
\ No newline at end of file
diff --git a/app/views/guidances/update_versions.js.erb b/app/views/guidances/update_versions.js.erb
index f1e8701..f8bcf54 100644
--- a/app/views/guidances/update_versions.js.erb
+++ b/app/views/guidances/update_versions.js.erb
@@ -1,3 +1,3 @@
-$('#versions_select').html("<%= escape_javascript(options_for_select(@versions)) %>");
-$('#sections_select').html("<%= escape_javascript(options_for_select(@sections)) %>");
+$('#versions_select').html("<%= escape_javascript(options_for_select(@versions)) %>");
+$('#sections_select').html("<%= escape_javascript(options_for_select(@sections)) %>");
$('#questions_select').html("<%= escape_javascript(options_for_select(@questions)) %>");
\ 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 4ce6dcf..2502460 100644
--- a/app/views/layouts/_dmponline_footer.html.erb
+++ b/app/views/layouts/_dmponline_footer.html.erb
@@ -6,7 +6,6 @@
<%= t("contact_page.title") %>
|
<%= t("terms_page.title") %>
-
diff --git a/app/views/layouts/_dmponline_header.html.erb b/app/views/layouts/_dmponline_header.html.erb
index 44a58af..b02f3dd 100644
--- a/app/views/layouts/_dmponline_header.html.erb
+++ b/app/views/layouts/_dmponline_header.html.erb
@@ -1,23 +1,23 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/layouts/_dmponline_navigation.html.erb b/app/views/layouts/_dmponline_navigation.html.erb
index 9486669..7db4f41 100644
--- a/app/views/layouts/_dmponline_navigation.html.erb
+++ b/app/views/layouts/_dmponline_navigation.html.erb
@@ -90,18 +90,24 @@
<%= t("helpers.help_label") %>
- <% Language.all.order("name ASC").each do |language|%>
- <% if I18n.locale == language.name %>
-
- <% else %>
-
+
+
+ <%= t('helpers.change_language')%>
+
+
+
- <% end %>
+
+
<%end%>
-
-
diff --git a/app/views/layouts/_dmponline_org_branding.html.erb b/app/views/layouts/_dmponline_org_branding.html.erb
index d0e337d..3a0b3a1 100644
--- a/app/views/layouts/_dmponline_org_branding.html.erb
+++ b/app/views/layouts/_dmponline_org_branding.html.erb
@@ -1,34 +1,34 @@
-
-
- <% if user_signed_in? then%>
- <% if current_user.organisation.present? then%>
-
- <% if current_user.organisation.logo_file_name.present? then%>
-
- <%end%>
-
-
- <% if current_user.organisation.banner_text.present? then%>
-
-
- <%end%>
- <%end%>
-
- <%end%>
+
+
+ <% if user_signed_in? then%>
+ <% if current_user.organisation.present? then%>
+
+ <% if current_user.organisation.logo_file_name.present? then%>
+
+ <%end%>
+
+
+ <% if current_user.organisation.banner_text.present? then%>
+
+
+ <%end%>
+ <%end%>
+
+ <%end%>
\ No newline at end of file
diff --git a/app/views/layouts/_dmponline_signin_signout.html.erb b/app/views/layouts/_dmponline_signin_signout.html.erb
index 75560cc..f649068 100644
--- a/app/views/layouts/_dmponline_signin_signout.html.erb
+++ b/app/views/layouts/_dmponline_signin_signout.html.erb
@@ -1,33 +1,33 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/views/organisations/admin_edit.html.erb b/app/views/organisations/admin_edit.html.erb
index 399be54..109a94f 100644
--- a/app/views/organisations/admin_edit.html.erb
+++ b/app/views/organisations/admin_edit.html.erb
@@ -1,81 +1,98 @@
-<%= stylesheet_link_tag "admin" %>
-<% javascript 'admin.js' %>
-
-
- <%= t('org_admin.org_details_label') %>
-
-
-
-
-
-
- <%= form_for(@organisation, :url => admin_update_organisation_path(@organisation), :html => { :id => "edit_org_details", :method => :put}) do |f| %>
-
- <% if @organisation.logo_file_name.present? then%>
-
- <%= image_tag("#{@organisation.logo_file_name}", class: "org_logo_admin_area" )%>
-
- <%end%>
-
-
-
-
- <%= t('org_admin.org_name') %>
- <%= f.text_field :name,
- :as => :string,
- :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.name_help_text') %>
-
-
- <%= t('org_admin.org_abbr') %>
-
- <%= f.text_field :abbreviation,
- :as => :string,
- :class => 'text_field' %>
-
-
- <%= link_to( image_tag('help_button.png'), '#', :class => 'org_abbr_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.desc_help_text_html'))%>
-
-
-
-
-
-
- <%= t('org_admin.org_desc') %>
- <%= f.text_area :description, {
- :rows => 5,
- :class => 'text_area has-tooltip', 'data-toggle' => "tooltip", 'data-html' => "true", 'title'=> t('org_admin.desc_help_text_html')} %>
-
-
- <%= t('org_admin.org_banner_text') %>
-
- <%= text_area_tag("org_banner_text", @organisation.banner_text, class: "tinymce") %>
-
-
-
- <%= t('org_admin.org_target_url') %>
- <%= f.text_field :target_url,
- :as => :string,
- :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.target_url_help_text') %>
-
-
- <%= t('org_admin.org_type') %>
- <%= @organisation.organisation_type.name %>
-
-
-
-
-
-
-
-
-
- <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
- <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn btn-primary' %>
-
-
-
- <%end%>
-
-
-
-<%= tinymce :content_css => asset_path('application.css') %>
+<%= stylesheet_link_tag "admin" %>
+<% javascript 'admin.js' %>
+
+
+ <%= t('org_admin.org_details_label') %>
+
+
+
+
+
+
+ <%= form_for(@organisation, :url => admin_update_organisation_path(@organisation), :html => {:id => "edit_org_details", :method => :put}) do |f| %>
+
+ <% if @organisation.logo_file_name.present? then %>
+
+ <%= image_tag("#{@organisation.logo_file_name}", class: "org_logo_admin_area") %>
+
+ <% end %>
+
+
+
+
+ <%= t('org_admin.org_name') %>
+ <%= f.text_field :name,
+ :as => :string,
+ :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.name_help_text') %>
+
+
+ <%= t('org_admin.org_abbr') %>
+
+
+ <%= f.text_field :abbreviation,
+ :as => :string,
+ :class => 'text_field' %>
+
+
+ <%= link_to(image_tag('help_button.png'), '#', :class => 'org_abbr_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.desc_help_text_html')) %>
+
+
+
+
+
+
+ <%= t('org_admin.org_desc') %>
+ <%= f.text_area :description, {
+ :rows => 5,
+ :class => 'text_area has-tooltip', 'data-toggle' => "tooltip", 'data-html' => "true", 'title' => t('org_admin.desc_help_text_html')} %>
+
+
+ <%= t('org_admin.org_banner_text') %>
+
+ <%= text_area_tag("org_banner_text", @organisation.banner_text, class: "tinymce") %>
+
+
+
+ <%= t('org_admin.org_target_url') %>
+ <%= f.text_field :target_url,
+ :as => :string,
+ :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.target_url_help_text') %>
+
+
+ <%= t('org_admin.org_default_language') %>
+
+
+ <%= collection_select(:@organisation,
+ :language_id, Language.all.order("name"),
+ :id, :name, {selected: Language.where(default_language: true).first.id},
+ {:class => "typeahead org_sign_up"}) %>
+
+
+ <%= link_to(image_tag('help_button.png'), '#', :class => 'org_abbr_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.org_default_language_help_text')) %>
+
+
+
+
+
+
+ <%= t('org_admin.org_type') %>
+ <%= @organisation.organisation_type.name %>
+
+
+
+
+
+
+
+
+
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %>
+ <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn btn-primary' %>
+
+
+
+ <% end %>
+
+
+
+<%= tinymce :content_css => asset_path('application.css') %>
diff --git a/app/views/organisations/admin_show.html.erb b/app/views/organisations/admin_show.html.erb
index 501fce5..cd6b834 100644
--- a/app/views/organisations/admin_show.html.erb
+++ b/app/views/organisations/admin_show.html.erb
@@ -1,80 +1,80 @@
-<%= stylesheet_link_tag "admin" %>
-
-
- <%= t('org_admin.org_details_label') %>
-
-<%= t('org_admin.org_text')%>
-
-
-
-
-
-
-
-
- <% if @organisation.logo_file_name.present? then%>
-
- <%= image_tag("#{@organisation.logo_file_name}", class: "org_logo_admin_area" )%>
-
- <%end%>
-
-
-
- <% if @organisation.name.present? then%>
-
- <%= t('org_admin.org_name') %>
- <%= @organisation.name %>
-
- <%end%>
- <% if @organisation.abbreviation.present? then%>
-
- <%= t('org_admin.org_abbr') %>
- <%= @organisation.abbreviation %>
-
- <%end%>
- <% if @organisation.description.present? then%>
-
- <%= t('org_admin.org_desc') %>
- <%= raw @organisation.description %>
-
- <%end%>
- <% if @organisation.banner_text.present? then%>
-
- <%= t('org_admin.org_banner_text') %>
- <%= raw @organisation.banner_text %>
-
- <%end%>
- <% if @organisation.target_url.present? then%>
-
- <%= t('org_admin.org_target_url') %>
- <%= @organisation.target_url %>
-
- <%end%>
- <% if @organisation.organisation_type_id.present? then%>
-
- <%= t('org_admin.org_type') %>
- <%= @organisation.organisation_type.name %>
-
- <%end%>
- <% if @organisation.parent_id.present? then%>
-
- <%= t('org_admin.parent_org') %>
- <%= @organisation.parent.name %>
-
- <%end%>
-
- <%= t('org_admin.last_updated') %>
- <%= l @organisation.updated_at.to_date, :formats => :short %>
-
-
-
-
-
-
- <%= link_to t("helpers.submit.edit"), admin_edit_organisation_path(current_user.organisation), :class => 'btn btn-primary'%>
-
-
-
+<%= stylesheet_link_tag "admin" %>
+
+
+ <%= t('org_admin.org_details_label') %>
+
+<%= t('org_admin.org_text')%>
+
+
+
+
+
+
+
+
+ <% if @organisation.logo_file_name.present? then%>
+
+ <%= image_tag("#{@organisation.logo_file_name}", class: "org_logo_admin_area" )%>
+
+ <%end%>
+
+
+
+ <% if @organisation.name.present? then%>
+
+ <%= t('org_admin.org_name') %>
+ <%= @organisation.name %>
+
+ <%end%>
+ <% if @organisation.abbreviation.present? then%>
+
+ <%= t('org_admin.org_abbr') %>
+ <%= @organisation.abbreviation %>
+
+ <%end%>
+ <% if @organisation.description.present? then%>
+
+ <%= t('org_admin.org_desc') %>
+ <%= raw @organisation.description %>
+
+ <%end%>
+ <% if @organisation.banner_text.present? then%>
+
+ <%= t('org_admin.org_banner_text') %>
+ <%= raw @organisation.banner_text %>
+
+ <%end%>
+ <% if @organisation.target_url.present? then%>
+
+ <%= t('org_admin.org_target_url') %>
+ <%= @organisation.target_url %>
+
+ <%end%>
+ <% if @organisation.organisation_type_id.present? then%>
+
+ <%= t('org_admin.org_type') %>
+ <%= @organisation.organisation_type.name %>
+
+ <%end%>
+ <% if @organisation.parent_id.present? then%>
+
+ <%= t('org_admin.parent_org') %>
+ <%= @organisation.parent.name %>
+
+ <%end%>
+
+ <%= t('org_admin.last_updated') %>
+ <%= l @organisation.updated_at.to_date, :formats => :short %>
+
+
+
+
+
+
+ <%= link_to t("helpers.submit.edit"), admin_edit_organisation_path(current_user.organisation), :class => 'btn btn-primary'%>
+
+
+
\ No newline at end of file
diff --git a/app/views/plans/_add_comment.html.erb b/app/views/plans/_add_comment.html.erb
index 220f4f1..0d8aa49 100644
--- a/app/views/plans/_add_comment.html.erb
+++ b/app/views/plans/_add_comment.html.erb
@@ -1,20 +1,20 @@
-
-
-<% @new_comment = Comment.new %>
-
-<%= form_for :new_comment, :url => {:controller => :comments, :action => :create } , :html=>{:method=>:post, :id => "new_comment_form_#{questionId}", :class => "add_comment_form"} do |f| %>
- <%= f.hidden_field :user_id, :value => current_user.id %>
- <%= f.hidden_field :question_id, :value => questionId %>
- <%= f.hidden_field :plan_id, :value => planId %>
-
- <%= text_area_tag("#{questionId}new_comment_text".to_sym, "" , class: "tinymce") %>
-
- <% question = Question.find(questionId)%>
-
-
- <%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
- <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary new_comment_submit_button" %>
-
-
+
+
+<% @new_comment = Comment.new %>
+
+<%= form_for :new_comment, :url => {:controller => :comments, :action => :create } , :html=>{:method=>:post, :id => "new_comment_form_#{questionId}", :class => "add_comment_form"} do |f| %>
+ <%= f.hidden_field :user_id, :value => current_user.id %>
+ <%= f.hidden_field :question_id, :value => questionId %>
+ <%= f.hidden_field :plan_id, :value => planId %>
+
+ <%= text_area_tag("#{questionId}new_comment_text".to_sym, "" , class: "tinymce") %>
+
+ <% question = Question.find(questionId)%>
+
+
+ <%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
+ <%= hidden_field_tag :question_id, question.id, :class => "question_id" %>
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary new_comment_submit_button" %>
+
+
<%end%>
\ No newline at end of file
diff --git a/app/views/plans/_archive_comment.html.erb b/app/views/plans/_archive_comment.html.erb
index aacc94c..03ba05c 100644
--- a/app/views/plans/_archive_comment.html.erb
+++ b/app/views/plans/_archive_comment.html.erb
@@ -1,28 +1,28 @@
-
-
-<%= form_for(comment, :url => {:controller => :comments, :action => :archive } , :html => { :method => :put, :class => "archive_comment_form", :id => "archive_comment_form_#{comment.id}"}) do |f| %>
- <%= f.hidden_field :id, :value => comment.id %>
- <%= f.hidden_field :archived_by, :value => current_user.id %>
-
- <%= render :partial => "view_comment", locals: {comment: comment} %>
-
- <% if current_user.id == comment.user_id then %>
- <%= t('helpers.comments.archive_own_comment_question')%>
- <% button_label = t("helpers.comments.archive_own_comment_button_label") %>
- <% else%>
- <%= t("helpers.comments.archive_comment_question")%>
- <% button_label = t("helpers.comments.archive_comment_button_label") %>
- <%end%>
-
-
-
- <% question = Question.find(comment.question_id)%>
- <%= hidden_field_tag :plan_id, comment.plan_id, :class => "plan_id" %>
- <%= hidden_field_tag :comment_id, comment.id, :class => "comment_id" %>
- <%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
- <%= f.submit button_label, :class => "btn btn-primary archive_comment_submit_button" %>
- <%= hidden_field_tag :comment_id, comment.id, :class => "comment_id" %>
- <%= link_to t("helpers.submit.cancel"), "#", :class => "cancel_archive_comment btn cancel" %>
-
-
+
+
+<%= form_for(comment, :url => {:controller => :comments, :action => :archive } , :html => { :method => :put, :class => "archive_comment_form", :id => "archive_comment_form_#{comment.id}"}) do |f| %>
+ <%= f.hidden_field :id, :value => comment.id %>
+ <%= f.hidden_field :archived_by, :value => current_user.id %>
+
+ <%= render :partial => "view_comment", locals: {comment: comment} %>
+
+ <% if current_user.id == comment.user_id then %>
+ <%= t('helpers.comments.archive_own_comment_question')%>
+ <% button_label = t("helpers.comments.archive_own_comment_button_label") %>
+ <% else%>
+ <%= t("helpers.comments.archive_comment_question")%>
+ <% button_label = t("helpers.comments.archive_comment_button_label") %>
+ <%end%>
+
+
+
+ <% question = Question.find(comment.question_id)%>
+ <%= hidden_field_tag :plan_id, comment.plan_id, :class => "plan_id" %>
+ <%= hidden_field_tag :comment_id, comment.id, :class => "comment_id" %>
+ <%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
+ <%= f.submit button_label, :class => "btn btn-primary archive_comment_submit_button" %>
+ <%= hidden_field_tag :comment_id, comment.id, :class => "comment_id" %>
+ <%= link_to t("helpers.submit.cancel"), "#", :class => "cancel_archive_comment btn cancel" %>
+
+
<%end%>
\ No newline at end of file
diff --git a/app/views/plans/_comments.html.erb b/app/views/plans/_comments.html.erb
index c203abe..9fd8d19 100644
--- a/app/views/plans/_comments.html.erb
+++ b/app/views/plans/_comments.html.erb
@@ -1,35 +1,35 @@
-
-
-
-
-<% @comments = Comment.where("question_id = ? && plan_id = ?", questionId, plan_id) %>
-<%= hidden_field_tag :question_id, questionId, :class => "question_id" %>
-
-<% if @comments.count > 0 then%>
-
-
-
-
-
- <%= render :partial => "list_comments", locals: {comments: @comments}%>
-
-
-
-
-
-
-
-
-
-<% else%>
- <%= t("helpers.comments.add_comment_text")%>
- <%= render :partial => "add_comment", locals: {questionId: questionId, planId: plan_id}%>
-<% end%>
+
+
+
+
+<% @comments = Comment.where("question_id = ? && plan_id = ?", questionId, plan_id) %>
+<%= hidden_field_tag :question_id, questionId, :class => "question_id" %>
+
+<% if @comments.count > 0 then%>
+
+
+
+
+
+ <%= render :partial => "list_comments", locals: {comments: @comments}%>
+
+
+
+
+
+
+
+
+
+<% else%>
+ <%= t("helpers.comments.add_comment_text")%>
+ <%= render :partial => "add_comment", locals: {questionId: questionId, planId: plan_id}%>
+<% end%>
diff --git a/app/views/plans/_edit_comment.html.erb b/app/views/plans/_edit_comment.html.erb
index cb8114e..5ea6c8b 100644
--- a/app/views/plans/_edit_comment.html.erb
+++ b/app/views/plans/_edit_comment.html.erb
@@ -1,18 +1,18 @@
-
-
-<%= form_for(comment, :url => {:controller => :comments, :action => :update } , :html => { :method => :put, :class => "edit_comment_form", :id=> "edit_comment_form_#{comment.id}"}) do |f| %>
- <%= f.hidden_field :id, :value => comment.id %>
-
- <%= text_area_tag("#{comment.id}_comment_text".to_sym, comment.text , class: "tinymce") %>
-
-
-
-
- <% question = Question.find(comment.question_id)%>
- <%= hidden_field_tag :plan_id, comment.plan_id, :class => "plan_id" %>
- <%= hidden_field_tag :comment_id, comment.id, :class => "comment_id" %>
- <%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary edit_comment_submit_button" %>
-
-
+
+
+<%= form_for(comment, :url => {:controller => :comments, :action => :update } , :html => { :method => :put, :class => "edit_comment_form", :id=> "edit_comment_form_#{comment.id}"}) do |f| %>
+ <%= f.hidden_field :id, :value => comment.id %>
+
+ <%= text_area_tag("#{comment.id}_comment_text".to_sym, comment.text , class: "tinymce") %>
+
+
+
+
+ <% question = Question.find(comment.question_id)%>
+ <%= hidden_field_tag :plan_id, comment.plan_id, :class => "plan_id" %>
+ <%= hidden_field_tag :comment_id, comment.id, :class => "comment_id" %>
+ <%= hidden_field_tag :section_id, question.section_id, :class => "section_id" %>
+ <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary edit_comment_submit_button" %>
+
+
<%end%>
\ No newline at end of file
diff --git a/app/views/plans/_export.html.erb b/app/views/plans/_export.html.erb
index 73425c0..6c0e8de 100644
--- a/app/views/plans/_export.html.erb
+++ b/app/views/plans/_export.html.erb
@@ -1,9 +1,9 @@
-
-
-
- <%= render :partial => "/shared/export_links", locals: {plan: plan} %>
-
+
+
+
+ <%= render :partial => "/shared/export_links", locals: {plan: plan} %>
+
\ No newline at end of file
diff --git a/app/views/plans/_form.html.erb b/app/views/plans/_form.html.erb
index 0a37122..b7424e0 100644
--- a/app/views/plans/_form.html.erb
+++ b/app/views/plans/_form.html.erb
@@ -1,32 +1,32 @@
-<%= form_for @plan, :html => { :class => 'form-horizontal' } do |f| %>
-
- <%= f.label :locked, :class => 'control-label' %>
-
- <%= f.check_box :locked, :class => 'check_box' %>
-
-
-
- <%= f.label :project_id, :class => 'control-label' %>
-
- <%= f.number_field :project_id, :class => 'number_field' %>
-
-
-
- <%= f.label :version_id, :class => 'control-label' %>
-
- <%= f.number_field :version_id, :class => 'number_field' %>
-
-
-
- <%= f.label :slug, :class => 'control-label' %>
-
- <%= f.text_field :slug, :class => 'text_field' %>
-
-
-
-
- <%= f.submit nil, :class => 'btn btn-primary' %>
- <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
- plans_path, :class => 'btn' %>
-
-<% end %>
+<%= form_for @plan, :html => { :class => 'form-horizontal' } do |f| %>
+
+ <%= f.label :locked, :class => 'control-label' %>
+
+ <%= f.check_box :locked, :class => 'check_box' %>
+
+
+
+ <%= f.label :project_id, :class => 'control-label' %>
+
+ <%= f.number_field :project_id, :class => 'number_field' %>
+
+
+
+ <%= f.label :version_id, :class => 'control-label' %>
+
+ <%= f.number_field :version_id, :class => 'number_field' %>
+
+
+
+ <%= f.label :slug, :class => 'control-label' %>
+
+ <%= f.text_field :slug, :class => 'text_field' %>
+
+
+
+
+ <%= f.submit nil, :class => 'btn btn-primary' %>
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
+ plans_path, :class => 'btn' %>
+
+<% end %>
diff --git a/app/views/plans/_guidance_settings.html.erb b/app/views/plans/_guidance_settings.html.erb
index 1c422c5..946c2e7 100644
--- a/app/views/plans/_guidance_settings.html.erb
+++ b/app/views/plans/_guidance_settings.html.erb
@@ -1,9 +1,9 @@
-
-
-
-
-
+
\ No newline at end of file
diff --git a/app/views/plans/_list_comments.html.erb b/app/views/plans/_list_comments.html.erb
index ca42f53..84b9eef 100644
--- a/app/views/plans/_list_comments.html.erb
+++ b/app/views/plans/_list_comments.html.erb
@@ -1,80 +1,80 @@
-
-<% if comments.count > 1 then%>
- <% style_to_add = "height:150px; overflow-y:auto;" %>
-<%else%>
- <% style_to_add = "" %>
-<%end%>
-
-
-
-
- <% comments.order("updated_at DESC").each do |c|%>
-
-
- <% user = User.find(c.user_id) %>
- <%= user.name %>
- (<%= l c.updated_at, format: :custom %>)
-
-
- <% if c.archived == true then %>
- <% if c.archived_by == current_user.id then%>
- <%= t("helpers.comments.retracted")%>
- <% else %>
- <% archived_by_user = User.find(c.archived_by) %>
- <%= t("helpers.comments.clear_by")%> <%= archived_by_user.name %>
- <%end%>
- <%else%>
- <%= link_to t("helpers.comments.view_label"),"#", :class => "dmp_table_link view_comment_button" %>
- <%= hidden_field_tag :comment_id, c.id, :class => "comment_id" %>
- <% if current_user.id == c.user_id then %>
- <%= link_to t("helpers.comments.edit_label"),"#", :class => "dmp_table_link edit_comment_button" %>
-
- <%= hidden_field_tag :comment_id, c.id, :class => "comment_id" %>
- <%= link_to t("helpers.comments.retract_label"),"#", :class => "dmp_table_link archive_comment_button" %>
- <% end%>
- <% project_id = Plan.find(c.plan_id).project_id%>
- <% if (Project.find(project_id).administerable_by(current_user.id) && current_user.id != c.user_id )then%>
- <%= hidden_field_tag :comment_id, c.id, :class => "comment_id" %>
- <%= link_to t("helpers.comments.clear_label"),"#", :class => "dmp_table_link archive_comment_button" %>
- <% end%>
- <%end%>
-
-
-
- <%end%>
-
-
-
-
-
-
-
-<% comments_not_archived = comments.where("archived IS NULL") %>
-<% latest_comment = comments_not_archived.order("updated_at DESC").first %>
-<% if !latest_comment.nil? then%>
-
-<%end%>
-
-<%comments.order("updated_at DESC").each do |com|%>
-
-
-
-
-
-
-
-
-
- <%end%>
+
+<% if comments.count > 1 then%>
+ <% style_to_add = "height:150px; overflow-y:auto;" %>
+<%else%>
+ <% style_to_add = "" %>
+<%end%>
+
+
+
+
+ <% comments.order("updated_at DESC").each do |c|%>
+
+
+ <% user = User.find(c.user_id) %>
+ <%= user.name %>
+ (<%= l c.updated_at, format: :custom %>)
+
+
+ <% if c.archived == true then %>
+ <% if c.archived_by == current_user.id then%>
+ <%= t("helpers.comments.retracted")%>
+ <% else %>
+ <% archived_by_user = User.find(c.archived_by) %>
+ <%= t("helpers.comments.clear_by")%> <%= archived_by_user.name %>
+ <%end%>
+ <%else%>
+ <%= link_to t("helpers.comments.view_label"),"#", :class => "dmp_table_link view_comment_button" %>
+ <%= hidden_field_tag :comment_id, c.id, :class => "comment_id" %>
+ <% if current_user.id == c.user_id then %>
+ <%= link_to t("helpers.comments.edit_label"),"#", :class => "dmp_table_link edit_comment_button" %>
+
+ <%= hidden_field_tag :comment_id, c.id, :class => "comment_id" %>
+ <%= link_to t("helpers.comments.retract_label"),"#", :class => "dmp_table_link archive_comment_button" %>
+ <% end%>
+ <% project_id = Plan.find(c.plan_id).project_id%>
+ <% if (Project.find(project_id).administerable_by(current_user.id) && current_user.id != c.user_id )then%>
+ <%= hidden_field_tag :comment_id, c.id, :class => "comment_id" %>
+ <%= link_to t("helpers.comments.clear_label"),"#", :class => "dmp_table_link archive_comment_button" %>
+ <% end%>
+ <%end%>
+
+
+
+ <%end%>
+
+
+
+
+
+
+
+<% comments_not_archived = comments.where("archived IS NULL") %>
+<% latest_comment = comments_not_archived.order("updated_at DESC").first %>
+<% if !latest_comment.nil? then%>
+
+<%end%>
+
+<%comments.order("updated_at DESC").each do |com|%>
+
+
+
+
+
+
+
+
+
+ <%end%>
diff --git a/app/views/plans/_view_comment.html.erb b/app/views/plans/_view_comment.html.erb
index d3f8296..2141349 100644
--- a/app/views/plans/_view_comment.html.erb
+++ b/app/views/plans/_view_comment.html.erb
@@ -1,12 +1,12 @@
-
-<% user = User.find(comment.user_id) %>
-
-
-
+
+<% user = User.find(comment.user_id) %>
+
+
+
diff --git a/app/views/plans/edit.html.erb b/app/views/plans/edit.html.erb
index c2d20d7..0bd9403 100644
--- a/app/views/plans/edit.html.erb
+++ b/app/views/plans/edit.html.erb
@@ -1,140 +1,140 @@
-<%- model_class = Plan -%>
-<% javascript "plans.js" %>
-
-
-
-
-<%= render :partial => "/projects/project_title", locals: {project: @plan.project} %>
-
-
-<% status = @plan.status %>
-
- <%space_used = status["space_used"].to_i
- space_title = t("helpers.plan.export.space_used", space_used: space_used, num_pages: @plan.dmptemplate.settings(:export).max_pages)
- answered = %(#{status["num_answers"]}/#{status["num_questions"]})%>
-
- <%= answered -%> <%= t("helpers.project.questions_answered")%>
- ;" title="<%= answered -%> <%= t("helpers.project.questions_answered")%>">
-
-
-
- = 100 ? "class=bar-full-text" : "" -%>><%= space_title -%>
- " style="width: <%= space_used -%>%;" title="<%= space_title -%>">
-
-
-
-<% readonly = nil %>
-<% if ! @plan.editable_by(current_user.id) then %>
- <% readonly = "always" %>
-<% end %>
-
-
-<%= render :partial => "/projects/project_nav_tabs", locals: {project: @plan.project, active: @plan.id} %>
-
-
-
-
-
-
- <% sections = @plan.sections %>
- <% sections.each do |section| %>
- <% locked = @plan.locked(section.id, current_user.id) %>
- <% if readonly == nil && locked["locked"] then %>
- <% readonly = "conditional" %>
- <% end %>
-
-
- <% if session[:question_id_comments].to_i != 0 then %>
- <% question_from_comment = Question.find(session[:question_id_comments])%>
- <% if section.id == question_from_comment.section_id then %>
- <%= hidden_field_tag :comment_section_id, question_from_comment.section_id, :class => "comment_section_id" %>
- <%end%>
- <% end%>
-
-
-
-
- <% num_section_questions = @plan.status["sections"][section.id]["num_questions"] %>
- <% num_section_answers = @plan.status["sections"][section.id]["num_answers"] %>
- <% question_word = "questions" %>
- <% if num_section_questions == 1 then %>
- <% question_word = "question" %>
- <% end %>
- <% section_status = "#{num_section_questions} #{question_word}, #{num_section_answers} answered" %>
-
-
-
- <%= raw section.description %>
-
-
-
-
<%= t ('helpers.loading')%>
-
-
-
<%= t ('helpers.saving')%>
-
-
-
<%= t ('helpers.removing')%>
-
-
-
style="display:none"<% end %>>
- <% if locked["locked"] then %>
-
<%= t("helpers.project.share.locked_section_text")%><%= locked["locked_by"] %>
- <% end %>
-
- <% section.questions.order("number").each do |question| %>
- <% if question.id == session[:question_id_comments].to_i then id_css = "current_question" end %>
-
- <%= render partial: "answer_form", locals: {question: question, readonly: readonly, last_question_id: section.questions.order("number DESC").first.id} %>
-
- <% end %>
-
-
-
-
-
-
-
-
-
-
<%= t("helpers.project.not_saved_answers_text_alert")%>
-
-
<%= t("helpers.project.not_saved_answers_confirmation_alert")%>
-
-
-
-
- <% end %>
-
- <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %>
-
-
-<%= render :partial => "export", locals: {plan: @plan} %>
-
-
-<% session.delete(:question_id_comments)%>
+<%- model_class = Plan -%>
+<% javascript "plans.js" %>
+
+
+
+
+<%= render :partial => "/projects/project_title", locals: {project: @plan.project} %>
+
+
+<% status = @plan.status %>
+
+ <%space_used = status["space_used"].to_i
+ space_title = t("helpers.plan.export.space_used", space_used: space_used, num_pages: @plan.dmptemplate.settings(:export).max_pages)
+ answered = %(#{status["num_answers"]}/#{status["num_questions"]})%>
+
+ <%= answered -%> <%= t("helpers.project.questions_answered")%>
+ ;" title="<%= answered -%> <%= t("helpers.project.questions_answered")%>">
+
+
+
+ = 100 ? "class=bar-full-text" : "" -%>><%= space_title -%>
+ " style="width: <%= space_used -%>%;" title="<%= space_title -%>">
+
+
+
+<% readonly = nil %>
+<% if ! @plan.editable_by(current_user.id) then %>
+ <% readonly = "always" %>
+<% end %>
+
+
+<%= render :partial => "/projects/project_nav_tabs", locals: {project: @plan.project, active: @plan.id} %>
+
+
+
+
+
+
+ <% sections = @plan.sections %>
+ <% sections.each do |section| %>
+ <% locked = @plan.locked(section.id, current_user.id) %>
+ <% if readonly == nil && locked["locked"] then %>
+ <% readonly = "conditional" %>
+ <% end %>
+
+
+ <% if session[:question_id_comments].to_i != 0 then %>
+ <% question_from_comment = Question.find(session[:question_id_comments])%>
+ <% if section.id == question_from_comment.section_id then %>
+ <%= hidden_field_tag :comment_section_id, question_from_comment.section_id, :class => "comment_section_id" %>
+ <%end%>
+ <% end%>
+
+
+
+
+ <% num_section_questions = @plan.status["sections"][section.id]["num_questions"] %>
+ <% num_section_answers = @plan.status["sections"][section.id]["num_answers"] %>
+ <% question_word = "questions" %>
+ <% if num_section_questions == 1 then %>
+ <% question_word = "question" %>
+ <% end %>
+ <% section_status = "#{num_section_questions} #{question_word}, #{num_section_answers} answered" %>
+
+
+
+ <%= raw section.description %>
+
+
+
+
<%= t ('helpers.loading')%>
+
+
+
<%= t ('helpers.saving')%>
+
+
+
<%= t ('helpers.removing')%>
+
+
+
style="display:none"<% end %>>
+ <% if locked["locked"] then %>
+
<%= t("helpers.project.share.locked_section_text")%><%= locked["locked_by"] %>
+ <% end %>
+
+ <% section.questions.order("number").each do |question| %>
+ <% if question.id == session[:question_id_comments].to_i then id_css = "current_question" end %>
+
+ <%= render partial: "answer_form", locals: {question: question, readonly: readonly, last_question_id: section.questions.order("number DESC").first.id} %>
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+
<%= t("helpers.project.not_saved_answers_text_alert")%>
+
+
<%= t("helpers.project.not_saved_answers_confirmation_alert")%>
+
+
+
+
+ <% end %>
+
+ <%= tinymce :content_css => asset_path("application.css"), :setup => "function(editor){editor.on('change', function(e){$.fn.check_textarea(editor)});}" %>
+
+
+<%= render :partial => "export", locals: {plan: @plan} %>
+
+
+<% session.delete(:question_id_comments)%>
diff --git a/app/views/plans/export.docx.caracal b/app/views/plans/export.docx.caracal
index 834c535..b75f64d 100644
--- a/app/views/plans/export.docx.caracal
+++ b/app/views/plans/export.docx.caracal
@@ -1,252 +1,252 @@
-#-----------------------------------------------------
-# page settings
-#-----------------------------------------------------
-
-docx.page_numbers true do
- align :center
-end
-
-docx.font do
- name 'Arial'
-end
-
-docx.p do
- size 32
-end
-
-
-#---------------------------------------------
-# Structure for docx format
-#---------------------------------------------
-
-docx.h1 @exported_plan.plan.project.title.upcase, font: 'Arial', color: '000000'
-docx.h2 @exported_plan.plan.title.upcase, font: 'Arial', color: '000000'
-
-#---- PLAN ADMIN DETAILS -----
-if @exported_plan.admin_details.present?
- docx.p
- docx.h3 'Admin Details'.upcase , italic: false, font: 'Arial', color: '000000'
- @exported_plan.admin_details.each do |field|
- value = @exported_plan.send(field)
- label = "helpers.plan.export.#{field}"
- if value.present?
- docx.p do
- text I18n.t(label), bold: true, color: '000000'
- text ': ', bold: true, color: '000000'
- text value
- end
- end
- end
-end
-
-
-#---- PLAN SECTIONS, QUESTIONS AND ANSWERS -----
-@exported_plan.sections.each do |section|
- docx.p
- docx.h3 section.title.upcase, italic: false, font: 'Arial', color: '000000'
-
- @exported_plan.questions_for_section(section.id).each do |question|
- docx.p question.text, bold: true
-
- answer = @exported_plan.plan.answer(question.id, false)
- if answer.nil?
- docx.p 'Question not answered', italic: true
- else
- q_format = question.question_format
- if q_format.title == I18n.t("helpers.checkbox") || q_format.title == I18n.t("helpers.multi_select_box") ||
- q_format.title == I18n.t("helpers.radio_buttons") || q_format.title == I18n.t("helpers.dropdown") then
- answer.options.each do |option|
- docx.ul do
- if !option.text.nil?
- li option.text
- end
- end
- end
- end
-
- if !answer.text.nil? && question.option_comment_display == true then
- search_answer = Nokogiri::HTML::DocumentFragment.parse "
"
- search_answer.at(".//div").inner_html = answer.text
-
- if search_answer.css('table').present? then
- table_content = search_answer.css('table').css('tbody')
-
- if table_content.size > 0 then
- table_array = Array.new
-
- table_content.css('tr').each do |tr|
- row_th_array = Array.new
- row_td_array = Array.new
-
- if tr.search('th') then
- tr.search('th').each do |cell|
- row_th_array << cell.text.to_s
- end
- end
-
- if tr.search('td') then
- tr.search('td').each do |td_cell|
- if !td_cell.text.to_s.blank? then
- new_val = Nokogiri::HTML::DocumentFragment.parse "
"
- new_val.at(".//p").inner_html = td_cell
- td_tags = new_val.at_css('td').children.map {|x| x.name.strip}
- td_text = new_val.at_css('td').children.map {|x| x.text.strip}
-
- start_c = 0
- end_c = td_tags.size
-
- c1 = Caracal::Core::Models::TableCellModel.new do
- while start_c < end_c do
- p do
- #-- TEXT
- if td_tags[start_c] == 'text' then
- text td_text[start_c]
- else
- #-- LINK
- if td_tags[start_c] == 'a' then
- l_address = ""
- l_text = td_text[start_c]
- #-- GET HREF
- td_cell.search('a').each do |link|
- if link.content == td_text[start_c] then
- l_address = link["href"]
- end
- end
- link td_text[start_c], l_address
- #-- BOLD TEXT
- else
- if td_tags[start_c] == 'strong' && td_text[start_c] != "" then
- text td_text[start_c], bold: true
- text ' '
- #-- ITALIC TEXT
- else
- if td_tags[start_c] == 'em' && td_text[start_c] != "" then
- text td_text[start_c], italic: true
- text ' '
- end
- end
- end
- end
- end
- start_c += 1
- end
- end
- row_td_array << c1
- else
- row_td_array << td_cell.text.to_s
- end
- end
- end
-
- #--- check if all cells are empty
- if row_td_array.size > 0 then
- if row_td_array.all?(&:blank?) then
- row_td_array = []
- end
- end
-
- if !row_th_array.empty? then
- table_array << row_th_array
- end
- if !row_td_array.empty? then
- table_array << row_td_array
- end
-
- end
-
- #--- build the table layout
- docx.table table_array, border_size: 4 do
- cell_style rows[0], bold: true, background: 'fbb400'
- cell_style cells, size: 18, margins: { top: 100, bottom: 0, left: 100, right: 100 }
- end
-
- end
-
- else
- higher_level = search_answer.search('div.container').children.map {|x| x.name.strip}
- all_text = search_answer.search('div.container').children.map {|x| x.inner_html.strip}
- high_count = 0
- high_end_count = higher_level.size
-
- while high_count < high_end_count do
-
- if higher_level[high_count] == 'p' then
- inner_txt_with_tags = Nokogiri::HTML::DocumentFragment.parse "
"
- inner_txt_with_tags.at(".//p").inner_html = all_text[high_count]
- tags_type = inner_txt_with_tags.at_css('p').children.map {|x| x.name.strip}
- inner_txt = inner_txt_with_tags.at_css('p').children.map {|x| x.text.strip}
-
- start_count = 0
- end_counter = tags_type.size
-
- docx.p do
- while start_count < end_counter do
- text_val = inner_txt[start_count].to_s
- #-- TEXT
- if tags_type[start_count] == 'text' && text_val != "" then
- text text_val
- text ' '
- #-- LINK
- else
- if tags_type[start_count] == 'a' && text_val != "" then
- l_text = text_val
- l_address = ""
- # all links
- search_answer.search('a').each do |link|
- if link.content == text_val then
- l_address = link["href"]
- end
- end
- link text_val, l_address
- #-- BOLD TEXT
- else
- if tags_type[start_count] == 'strong' && text_val != "" then
- text text_val, bold: true
- text ' '
- #-- ITALIC TEXT
- else
- if tags_type[start_count] == 'em' && text_val != "" then
- text text_val, italic: true
- text ' '
- end
- end
- end
- end
- start_count +=1
- end
- end
- #-- END OF P
- else
- if higher_level[high_count] == 'ul' then
- ul_text = search_answer.search('ul').children.map {|x| x.text.strip}
- docx.ul do
- ul_text.each do |txt|
- if !txt.blank?
- li txt
- end
- end
- end
- else
- if higher_level[high_count] == 'ol' then
- ol_text = search_answer.search('ol').children.map {|x| x.text.strip}
- docx.ol do
- ol_text.each do |txt|
- if !txt.blank?
- li txt
- end
- end
- end
- end
- end
- end
-
- high_count += 1
- end
- end
- end
- end
- #-- add a new line
- docx.p
- end
-end
-
+#-----------------------------------------------------
+# page settings
+#-----------------------------------------------------
+
+docx.page_numbers true do
+ align :center
+end
+
+docx.font do
+ name 'Arial'
+end
+
+docx.p do
+ size 32
+end
+
+
+#---------------------------------------------
+# Structure for docx format
+#---------------------------------------------
+
+docx.h1 @exported_plan.plan.project.title.upcase, font: 'Arial', color: '000000'
+docx.h2 @exported_plan.plan.title.upcase, font: 'Arial', color: '000000'
+
+#---- PLAN ADMIN DETAILS -----
+if @exported_plan.admin_details.present?
+ docx.p
+ docx.h3 'Admin Details'.upcase , italic: false, font: 'Arial', color: '000000'
+ @exported_plan.admin_details.each do |field|
+ value = @exported_plan.send(field)
+ label = "helpers.plan.export.#{field}"
+ if value.present?
+ docx.p do
+ text I18n.t(label), bold: true, color: '000000'
+ text ': ', bold: true, color: '000000'
+ text value
+ end
+ end
+ end
+end
+
+
+#---- PLAN SECTIONS, QUESTIONS AND ANSWERS -----
+@exported_plan.sections.each do |section|
+ docx.p
+ docx.h3 section.title.upcase, italic: false, font: 'Arial', color: '000000'
+
+ @exported_plan.questions_for_section(section.id).each do |question|
+ docx.p question.text, bold: true
+
+ answer = @exported_plan.plan.answer(question.id, false)
+ if answer.nil?
+ docx.p 'Question not answered', italic: true
+ else
+ q_format = question.question_format
+ if q_format.title == I18n.t("helpers.checkbox") || q_format.title == I18n.t("helpers.multi_select_box") ||
+ q_format.title == I18n.t("helpers.radio_buttons") || q_format.title == I18n.t("helpers.dropdown") then
+ answer.options.each do |option|
+ docx.ul do
+ if !option.text.nil?
+ li option.text
+ end
+ end
+ end
+ end
+
+ if !answer.text.nil? && question.option_comment_display == true then
+ search_answer = Nokogiri::HTML::DocumentFragment.parse "
"
+ search_answer.at(".//div").inner_html = answer.text
+
+ if search_answer.css('table').present? then
+ table_content = search_answer.css('table').css('tbody')
+
+ if table_content.size > 0 then
+ table_array = Array.new
+
+ table_content.css('tr').each do |tr|
+ row_th_array = Array.new
+ row_td_array = Array.new
+
+ if tr.search('th') then
+ tr.search('th').each do |cell|
+ row_th_array << cell.text.to_s
+ end
+ end
+
+ if tr.search('td') then
+ tr.search('td').each do |td_cell|
+ if !td_cell.text.to_s.blank? then
+ new_val = Nokogiri::HTML::DocumentFragment.parse "
"
+ new_val.at(".//p").inner_html = td_cell
+ td_tags = new_val.at_css('td').children.map {|x| x.name.strip}
+ td_text = new_val.at_css('td').children.map {|x| x.text.strip}
+
+ start_c = 0
+ end_c = td_tags.size
+
+ c1 = Caracal::Core::Models::TableCellModel.new do
+ while start_c < end_c do
+ p do
+ #-- TEXT
+ if td_tags[start_c] == 'text' then
+ text td_text[start_c]
+ else
+ #-- LINK
+ if td_tags[start_c] == 'a' then
+ l_address = ""
+ l_text = td_text[start_c]
+ #-- GET HREF
+ td_cell.search('a').each do |link|
+ if link.content == td_text[start_c] then
+ l_address = link["href"]
+ end
+ end
+ link td_text[start_c], l_address
+ #-- BOLD TEXT
+ else
+ if td_tags[start_c] == 'strong' && td_text[start_c] != "" then
+ text td_text[start_c], bold: true
+ text ' '
+ #-- ITALIC TEXT
+ else
+ if td_tags[start_c] == 'em' && td_text[start_c] != "" then
+ text td_text[start_c], italic: true
+ text ' '
+ end
+ end
+ end
+ end
+ end
+ start_c += 1
+ end
+ end
+ row_td_array << c1
+ else
+ row_td_array << td_cell.text.to_s
+ end
+ end
+ end
+
+ #--- check if all cells are empty
+ if row_td_array.size > 0 then
+ if row_td_array.all?(&:blank?) then
+ row_td_array = []
+ end
+ end
+
+ if !row_th_array.empty? then
+ table_array << row_th_array
+ end
+ if !row_td_array.empty? then
+ table_array << row_td_array
+ end
+
+ end
+
+ #--- build the table layout
+ docx.table table_array, border_size: 4 do
+ cell_style rows[0], bold: true, background: 'fbb400'
+ cell_style cells, size: 18, margins: { top: 100, bottom: 0, left: 100, right: 100 }
+ end
+
+ end
+
+ else
+ higher_level = search_answer.search('div.container').children.map {|x| x.name.strip}
+ all_text = search_answer.search('div.container').children.map {|x| x.inner_html.strip}
+ high_count = 0
+ high_end_count = higher_level.size
+
+ while high_count < high_end_count do
+
+ if higher_level[high_count] == 'p' then
+ inner_txt_with_tags = Nokogiri::HTML::DocumentFragment.parse "
"
+ inner_txt_with_tags.at(".//p").inner_html = all_text[high_count]
+ tags_type = inner_txt_with_tags.at_css('p').children.map {|x| x.name.strip}
+ inner_txt = inner_txt_with_tags.at_css('p').children.map {|x| x.text.strip}
+
+ start_count = 0
+ end_counter = tags_type.size
+
+ docx.p do
+ while start_count < end_counter do
+ text_val = inner_txt[start_count].to_s
+ #-- TEXT
+ if tags_type[start_count] == 'text' && text_val != "" then
+ text text_val
+ text ' '
+ #-- LINK
+ else
+ if tags_type[start_count] == 'a' && text_val != "" then
+ l_text = text_val
+ l_address = ""
+ # all links
+ search_answer.search('a').each do |link|
+ if link.content == text_val then
+ l_address = link["href"]
+ end
+ end
+ link text_val, l_address
+ #-- BOLD TEXT
+ else
+ if tags_type[start_count] == 'strong' && text_val != "" then
+ text text_val, bold: true
+ text ' '
+ #-- ITALIC TEXT
+ else
+ if tags_type[start_count] == 'em' && text_val != "" then
+ text text_val, italic: true
+ text ' '
+ end
+ end
+ end
+ end
+ start_count +=1
+ end
+ end
+ #-- END OF P
+ else
+ if higher_level[high_count] == 'ul' then
+ ul_text = search_answer.search('ul').children.map {|x| x.text.strip}
+ docx.ul do
+ ul_text.each do |txt|
+ if !txt.blank?
+ li txt
+ end
+ end
+ end
+ else
+ if higher_level[high_count] == 'ol' then
+ ol_text = search_answer.search('ol').children.map {|x| x.text.strip}
+ docx.ol do
+ ol_text.each do |txt|
+ if !txt.blank?
+ li txt
+ end
+ end
+ end
+ end
+ end
+ end
+
+ high_count += 1
+ end
+ end
+ end
+ end
+ #-- add a new line
+ docx.p
+ end
+end
+
diff --git a/app/views/plans/export.html.erb b/app/views/plans/export.html.erb
index 59943eb..2643963 100644
--- a/app/views/plans/export.html.erb
+++ b/app/views/plans/export.html.erb
@@ -1,77 +1,77 @@
-
-
<%= @plan.project.title %>
-
<%= @plan.version.phase.title %>
-
-
- <%
- details = @exported_plan.admin_details
- if details.present?
- %>
-
<%= t('org_admin.admin_details') %>
-
-
-
- <%= t('helpers.title')%>
- <%= t('helpers.desc')%>
-
-
-
- <%
- details.each do |field|
- value = @exported_plan.send(field)
- if value.present?
- %>
-
- - <%= t("helpers.plan.export.#{field}") -%>
- <%= value -%>
-
- <% end %>
- <% end %>
-
-
- <% end %>
- <% @exported_plan.sections.each do |section| %>
-
<%= section.title %>
-
-
-
- <%= t('helpers.questions_label')%>
- <%= t('helpers.answers_label')%>
-
-
-
- <% questions = @exported_plan.questions_for_section(section.id) %>
- <% questions.each do |question| %>
-
-
- - <%= question.text %>
-
-
- <% answer = @plan.answer(question.id, false) %>
- <% if answer.nil? then %>
- Question not answered.
- <% else %>
- <% q_format = question.question_format %>
- <% 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%>
-
- <% answer.options.each do |option| %>
- <%= option.text %>
- <% end %>
-
- <% if question.option_comment_display == true then%>
- <%= raw answer.text %>
- <% end %>
- <%else%>
- <%= raw answer.text %>
- <%end%>
- <% end %>
-
-
- <% end %>
-
-
- <% end %>
-
-
-
+
+
<%= @plan.project.title %>
+
<%= @plan.version.phase.title %>
+
+
+ <%
+ details = @exported_plan.admin_details
+ if details.present?
+ %>
+
<%= t('org_admin.admin_details') %>
+
+
+
+ <%= t('helpers.title')%>
+ <%= t('helpers.desc')%>
+
+
+
+ <%
+ details.each do |field|
+ value = @exported_plan.send(field)
+ if value.present?
+ %>
+
+ - <%= t("helpers.plan.export.#{field}") -%>
+ <%= value -%>
+
+ <% end %>
+ <% end %>
+
+
+ <% end %>
+ <% @exported_plan.sections.each do |section| %>
+
<%= section.title %>
+
+
+
+ <%= t('helpers.questions_label')%>
+ <%= t('helpers.answers_label')%>
+
+
+
+ <% questions = @exported_plan.questions_for_section(section.id) %>
+ <% questions.each do |question| %>
+
+
+ - <%= question.text %>
+
+
+ <% answer = @plan.answer(question.id, false) %>
+ <% if answer.nil? then %>
+ Question not answered.
+ <% else %>
+ <% q_format = question.question_format %>
+ <% 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%>
+
+ <% answer.options.each do |option| %>
+ <%= option.text %>
+ <% end %>
+
+ <% if question.option_comment_display == true then%>
+ <%= raw answer.text %>
+ <% end %>
+ <%else%>
+ <%= raw answer.text %>
+ <%end%>
+ <% end %>
+
+
+ <% end %>
+
+
+ <% end %>
+
+
+
diff --git a/app/views/plans/export.json.jbuilder b/app/views/plans/export.json.jbuilder
index 6e8465c..7277da5 100644
--- a/app/views/plans/export.json.jbuilder
+++ b/app/views/plans/export.json.jbuilder
@@ -1,47 +1,47 @@
-json.project_title @exported_plan.plan.project.title
-json.phase_title @exported_plan.plan.version.phase.title
-
-details = @exported_plan.admin_details
-
-if details.present?
- json.details do
- details.each do |field|
- value = @exported_plan.send(field)
- json.set! field.to_sym, value if value.present?
- end
- end
-end
-
-json.sections do
- @exported_plan.sections.each do |section|
- json.set! section.number do
- json.title section.title
- json.questions do
- @exported_plan.questions_for_section(section.id).each do |question|
- json.set! question.number do
- json.question_text question.text
-
- answer = @exported_plan.plan.answer(question.id, false)
- q_format = question.question_format
-
- if answer.present?
- if (q_format.title == "Check box" || q_format.title == "Multi select box" ||
- q_format.title == "Radio buttons" || q_format.title == "Dropdown")
- json.selections do
- answer.options.each do |o|
- json.set! o.number, o.text
- end
- end
- if question.option_comment_display == true
- json.comment_text (answer.try(:text) || 'No comment')
- end
- else
- json.answer_text (answer.try(:text) || 'Question not answered')
- end
- end
- end
- end
- end
- end
- end
-end
+json.project_title @exported_plan.plan.project.title
+json.phase_title @exported_plan.plan.version.phase.title
+
+details = @exported_plan.admin_details
+
+if details.present?
+ json.details do
+ details.each do |field|
+ value = @exported_plan.send(field)
+ json.set! field.to_sym, value if value.present?
+ end
+ end
+end
+
+json.sections do
+ @exported_plan.sections.each do |section|
+ json.set! section.number do
+ json.title section.title
+ json.questions do
+ @exported_plan.questions_for_section(section.id).each do |question|
+ json.set! question.number do
+ json.question_text question.text
+
+ answer = @exported_plan.plan.answer(question.id, false)
+ q_format = question.question_format
+
+ if answer.present?
+ if (q_format.title == "Check box" || q_format.title == "Multi select box" ||
+ q_format.title == "Radio buttons" || q_format.title == "Dropdown")
+ json.selections do
+ answer.options.each do |o|
+ json.set! o.number, o.text
+ end
+ end
+ if question.option_comment_display == true
+ json.comment_text (answer.try(:text) || 'No comment')
+ end
+ else
+ json.answer_text (answer.try(:text) || 'Question not answered')
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/app/views/plans/export.pdf.erb b/app/views/plans/export.pdf.erb
index 3400dcd..9eca87a 100644
--- a/app/views/plans/export.pdf.erb
+++ b/app/views/plans/export.pdf.erb
@@ -1,72 +1,72 @@
-
-
-
-
-
- <% if @plan.project.dmptemplate.phases.count > 1 then %>
- <%= "#{@plan.project.title} - #{@plan.title}" %>
- <% else %>
- <%= @plan.project.title %>
- <% end %>
-
-
-
-
-
<%= @plan.title %>
- <% @exported_plan.admin_details.each do |field|
- value = @exported_plan.send(field)
- if value.present?
- %>
-
<%= t("helpers.plan.export.#{field}") -%> <%= value -%>
- <% end %>
- <% end %>
-
- <% @exported_plan.sections.each do |section| %>
-
<%= section.title %>
- <% questions = @exported_plan.questions_for_section(section.id) %>
- <% questions.each_with_index do |question, idx| %>
-
- <% unless idx == 0 && question.text == section.title %>
-
<%= question.text %>
- <% end %>
- <% answer = @plan.answer(question.id, false) %>
- <% if answer.nil? then %>
-
<%= t('helpers.plan.export.pdf.question_not_answered') -%>
- <% else %>
- <% q_format = question.question_format%>
-
- <% 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%>
-
- <% answer.options.each do |option| %>
- <%= option.text %>
- <% end %>
-
-
- <% if question.option_comment_display == true then%>
- <% if !answer.text.nil? then %>
- <%= raw answer.text.gsub(/
(\s||<\/td>| )*(<\/tr>| )/,"") %>
- <%end%>
- <%end%>
- <%else%>
-
- <% if !answer.text.nil? then %>
- <%= raw answer.text.gsub(/ (\s||<\/td>| )*(<\/tr>| )/,"") %>
- <%end%>
- <% end %>
- <% end %>
-
- <% end %>
- <% end %>
-
+
+
+
+
+
+ <% if @plan.project.dmptemplate.phases.count > 1 then %>
+ <%= "#{@plan.project.title} - #{@plan.title}" %>
+ <% else %>
+ <%= @plan.project.title %>
+ <% end %>
+
+
+
+
+ <%= @plan.title %>
+ <% @exported_plan.admin_details.each do |field|
+ value = @exported_plan.send(field)
+ if value.present?
+ %>
+ <%= t("helpers.plan.export.#{field}") -%> <%= value -%>
+ <% end %>
+ <% end %>
+
+ <% @exported_plan.sections.each do |section| %>
+ <%= section.title %>
+ <% questions = @exported_plan.questions_for_section(section.id) %>
+ <% questions.each_with_index do |question, idx| %>
+
+ <% unless idx == 0 && question.text == section.title %>
+
<%= question.text %>
+ <% end %>
+ <% answer = @plan.answer(question.id, false) %>
+ <% if answer.nil? then %>
+
<%= t('helpers.plan.export.pdf.question_not_answered') -%>
+ <% else %>
+ <% q_format = question.question_format%>
+
+ <% 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%>
+
+ <% answer.options.each do |option| %>
+ <%= option.text %>
+ <% end %>
+
+
+ <% if question.option_comment_display == true then%>
+ <% if !answer.text.nil? then %>
+ <%= raw answer.text.gsub(/
(\s||<\/td>| )*(<\/tr>| )/,"") %>
+ <%end%>
+ <%end%>
+ <%else%>
+
+ <% if !answer.text.nil? then %>
+ <%= raw answer.text.gsub(/ (\s||<\/td>| )*(<\/tr>| )/,"") %>
+ <%end%>
+ <% end %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/plans/export.xml.builder b/app/views/plans/export.xml.builder
index 3c2180d..f6ef4d4 100644
--- a/app/views/plans/export.xml.builder
+++ b/app/views/plans/export.xml.builder
@@ -1,51 +1,51 @@
-xml.instruct!
-xml.plan("id" => @plan.id) do
- xml.project(@plan.project.title, "id" => @plan.project.id)
- xml.phase(@plan.version.phase.title, "id" => @plan.version.phase.id)
-
- details = @exported_plan.admin_details
- if details.present?
- xml.details do
- details.each do |field|
- value = @exported_plan.send(field)
- xml.detail(value, title: t("helpers.plan.export.#{field}")) if value.present?
- end
- end
- end
-
- xml.sections do
- @exported_plan.sections.each do |section|
- xml.section("id" => section.id, "number" => section.number, "title" => section.title) do
- xml.answers do
- questions = @exported_plan.questions_for_section(section.id)
- questions.each do |question|
-
- xml.question("id" => question.id, "number" => question.number, "question_format" => question.question_format ) do
- q_format = question.question_format
- xml.question_text question.text
- answer = @plan.answer(question.id, false)
- if ! answer.nil? then
- xml.answer("id" => answer.id) do #should add user and date info here
- 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
- xml.selections do
- answer.options.each do |option|
- xml.selection(option.text, "id" => option.id, "number" => option.number)
- end
- end
- if question.option_comment_display == true then
- xml.comment_text answer.text
- end
- else
- xml.answer_text answer.text
- end
-
- end
- end
- end
- end
- end
- end
- end
- end
-end
+xml.instruct!
+xml.plan("id" => @plan.id) do
+ xml.project(@plan.project.title, "id" => @plan.project.id)
+ xml.phase(@plan.version.phase.title, "id" => @plan.version.phase.id)
+
+ details = @exported_plan.admin_details
+ if details.present?
+ xml.details do
+ details.each do |field|
+ value = @exported_plan.send(field)
+ xml.detail(value, title: t("helpers.plan.export.#{field}")) if value.present?
+ end
+ end
+ end
+
+ xml.sections do
+ @exported_plan.sections.each do |section|
+ xml.section("id" => section.id, "number" => section.number, "title" => section.title) do
+ xml.answers do
+ questions = @exported_plan.questions_for_section(section.id)
+ questions.each do |question|
+
+ xml.question("id" => question.id, "number" => question.number, "question_format" => question.question_format ) do
+ q_format = question.question_format
+ xml.question_text question.text
+ answer = @plan.answer(question.id, false)
+ if ! answer.nil? then
+ xml.answer("id" => answer.id) do #should add user and date info here
+ 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
+ xml.selections do
+ answer.options.each do |option|
+ xml.selection(option.text, "id" => option.id, "number" => option.number)
+ end
+ end
+ if question.option_comment_display == true then
+ xml.comment_text answer.text
+ end
+ else
+ xml.answer_text answer.text
+ end
+
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/app/views/plans/index.html.erb b/app/views/plans/index.html.erb
index f917cf4..94c4305 100644
--- a/app/views/plans/index.html.erb
+++ b/app/views/plans/index.html.erb
@@ -1,42 +1,42 @@
-<%- model_class = Plan -%>
-
-
-
-
- <%= model_class.human_attribute_name(:id) %>
- <%= model_class.human_attribute_name(:locked) %>
- <%= model_class.human_attribute_name(:project_id) %>
- <%= model_class.human_attribute_name(:version_id) %>
- <%= model_class.human_attribute_name(:slug) %>
- <%= model_class.human_attribute_name(:created_at) %>
- <%=t '.actions', :default => t("helpers.actions") %>
-
-
-
- <% @plans.each do |plan| %>
-
- <%= link_to plan.id, plan_path(plan) %>
- <%= plan.locked %>
- <%= plan.project_id %>
- <%= plan.version_id %>
- <%= plan.slug %>
- <%=l plan.created_at %>
-
- <%= link_to t('.edit', :default => t("helpers.links.edit")),
- edit_project_plan_path(plan), :class => 'btn btn-mini' %>
- <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
- plan_path(plan),
- :method => :delete,
- :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => t('helpers.project.share.confirmation_question'))) },
- :class => 'btn btn-mini btn-danger' %>
-
-
- <% end %>
-
-
-
-<%= link_to t('.new', :default => t("helpers.links.new")),
- new_plan_path,
- :class => 'btn btn-primary' %>
+<%- model_class = Plan -%>
+
+
+
+
+ <%= model_class.human_attribute_name(:id) %>
+ <%= model_class.human_attribute_name(:locked) %>
+ <%= model_class.human_attribute_name(:project_id) %>
+ <%= model_class.human_attribute_name(:version_id) %>
+ <%= model_class.human_attribute_name(:slug) %>
+ <%= model_class.human_attribute_name(:created_at) %>
+ <%=t '.actions', :default => t("helpers.actions") %>
+
+
+
+ <% @plans.each do |plan| %>
+
+ <%= link_to plan.id, plan_path(plan) %>
+ <%= plan.locked %>
+ <%= plan.project_id %>
+ <%= plan.version_id %>
+ <%= plan.slug %>
+ <%=l plan.created_at %>
+
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
+ edit_project_plan_path(plan), :class => 'btn btn-mini' %>
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
+ plan_path(plan),
+ :method => :delete,
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => t('helpers.project.share.confirmation_question'))) },
+ :class => 'btn btn-mini btn-danger' %>
+
+
+ <% end %>
+
+
+
+<%= link_to t('.new', :default => t("helpers.links.new")),
+ new_plan_path,
+ :class => 'btn btn-primary' %>
diff --git a/app/views/plans/show.html.erb b/app/views/plans/show.html.erb
index 1061f85..2dd347a 100644
--- a/app/views/plans/show.html.erb
+++ b/app/views/plans/show.html.erb
@@ -1,27 +1,27 @@
-<%- model_class = Plan -%>
-
-
-
- <%= model_class.human_attribute_name(:locked) %>:
- <%= @plan.locked %>
- <%= model_class.human_attribute_name(:project_id) %>:
- <%= @plan.project_id %>
- <%= model_class.human_attribute_name(:version_id) %>:
- <%= @plan.version_id %>
- <%= model_class.human_attribute_name(:slug) %>:
- <%= @plan.slug %>
-
-
-
- <%= link_to t('.back', :default => t("helpers.links.back")),
- plans_path, :class => 'btn' %>
- <%= link_to t('.edit', :default => t("helpers.links.edit")),
- edit_project_plan_path(@plan), :class => 'btn' %>
- <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
- plan_path(@plan),
- :method => 'delete',
- :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => t('helpers.project.share.confirmation_question'))) },
- :class => 'btn btn-danger' %>
-
+<%- model_class = Plan -%>
+
+
+
+ <%= model_class.human_attribute_name(:locked) %>:
+ <%= @plan.locked %>
+ <%= model_class.human_attribute_name(:project_id) %>:
+ <%= @plan.project_id %>
+ <%= model_class.human_attribute_name(:version_id) %>:
+ <%= @plan.version_id %>
+ <%= model_class.human_attribute_name(:slug) %>:
+ <%= @plan.slug %>
+
+
+
+ <%= link_to t('.back', :default => t("helpers.links.back")),
+ plans_path, :class => 'btn' %>
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
+ edit_project_plan_path(@plan), :class => 'btn' %>
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
+ plan_path(@plan),
+ :method => 'delete',
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => t('helpers.project.share.confirmation_question'))) },
+ :class => 'btn btn-danger' %>
+
diff --git a/app/views/projects/_dropdowns_new_project.html.erb b/app/views/projects/_dropdowns_new_project.html.erb
index badd00d..4adc75e 100644
--- a/app/views/projects/_dropdowns_new_project.html.erb
+++ b/app/views/projects/_dropdowns_new_project.html.erb
@@ -11,11 +11,11 @@
-
- <%= f.input :funder_id, :as => :select, :collection => @funders, :label => t('helpers.project.create_page.funders_question'), :input_html => { :multiple => false, :class => ["select2", "select2-container"] }, :include_blank => t('helpers.org_type.funder') %>
-
+
+ <%= f.input :funder_id, :as => :select, :collection => @funders, :label => t('helpers.project.create_page.funders_question'), :input_html => { :multiple => false, :class => ["select2", "select2-container"] }, :include_blank => constant("organisation_types.funder") %>
+
-
+
@@ -30,7 +30,7 @@
- <%= f.input :institution_id, :as => :select, :collection => @institutions, :label => t('helpers.project.create_page.institution_question'), :input_html => { :multiple => false, :class => "typeahead" }, :include_blank => t('helpers.org_type.organisation') %>
+ <%= f.input :institution_id, :as => :select, :collection => @institutions, :label => t('helpers.project.create_page.institution_question'), :input_html => { :multiple => false, :class => "typeahead" }, :include_blank => constant("organisation_types.organisation") %>
<%= t('helpers.project.not_applicable')%>
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index c13a4bc..526577f 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -1,27 +1,27 @@
-
- <%= form_for @project, :html => { :class => 'form-horizontal' } do |f| %>
-
- <%= f.label t('helpers.title'), :class => 'left-label' %>
-
- <%= f.text_field :title, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('helpers.project.project_name_help_text') %>
-
-
-
- <%= f.label t('helpers.project.grant_title'), :class => 'left-label' %>
-
- <%= f.text_field :grant_number, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('helpers.project.grant_help_text') %>
-
-
-
- <%= f.label t('helpers.note'), :class => 'left-label' %>
-
- <%= f.text_area :note, :class => 'text_area', :rows => 10 %>
-
-
-
- <%= f.submit t("helpers.submit.save"), :class => 'btn btn-primary' %>
- <%= link_to t("helpers.links.cancel"),
- projects_path, :class => 'btn' %>
-
- <% end %>
-
+
+ <%= form_for @project, :html => { :class => 'form-horizontal' } do |f| %>
+
+ <%= f.label t('helpers.title'), :class => 'left-label' %>
+
+ <%= f.text_field :title, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('helpers.project.project_name_help_text') %>
+
+
+
+ <%= f.label t('helpers.project.grant_title'), :class => 'left-label' %>
+
+ <%= f.text_field :grant_number, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('helpers.project.grant_help_text') %>
+
+
+
+ <%= f.label t('helpers.note'), :class => 'left-label' %>
+
+ <%= f.text_area :note, :class => 'text_area', :rows => 10 %>
+
+
+
+ <%= f.submit t("helpers.submit.save"), :class => 'btn btn-primary' %>
+ <%= link_to t("helpers.links.cancel"),
+ projects_path, :class => 'btn' %>
+
+ <% end %>
+
diff --git a/app/views/projects/_project_details.html.erb b/app/views/projects/_project_details.html.erb
index a500b7d..aa8be11 100644
--- a/app/views/projects/_project_details.html.erb
+++ b/app/views/projects/_project_details.html.erb
@@ -4,9 +4,9 @@
<%= t('helpers.project.project_details_text_html')%>
-
+
-
+
<% if @project.administerable_by(current_user.id) then %>
@@ -27,7 +27,7 @@
<%= @project.identifier %>
<%else%>
-
- <%end%>
+ <%end%>
@@ -36,8 +36,8 @@
<% if !@project.grant_number.nil? && @project.grant_number!= "" then %>
<%= @project.grant_number %>
<%else%>
- -
- <%end%>
+ -
+ <%end%>
@@ -46,7 +46,7 @@
<%= @project.principal_investigator %>
<%else%>
-
- <%end%>
+ <%end%>
<% if !@project.principal_investigator_identifier.nil? && @project.principal_investigator_identifier != "" then %>
@@ -56,14 +56,14 @@
<%= @project.principal_investigator_identifier %>
- <%end%>
+ <%end%>
<%= t('helpers.project.project_data_contact') %>
<% if !@project.data_contact.nil? && @project.data_contact != "" then%>
<%= @project.data_contact %>
<%else%>
-
- <%end%>
+ <%end%>
@@ -72,7 +72,7 @@
<%= @project.description %>
<%else%>
-
- <%end%>
+ <%end%>
@@ -93,7 +93,7 @@
<%= semantic_form_for @project, :url => {:controller => :projects, :action => :update }, :html=>{:method=>:put} do |f| %>
<%= f.inputs do %>
-
+
@@ -129,7 +129,7 @@
<%= t('helpers.project.project_data_contact') %>
- <%= f.text_field :data_contact, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('helpers.project.project_data_contact_help_text') %>
+ <%= f.text_field :data_contact, :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('helpers.project.project_data_contact_help_text') %>
@@ -138,41 +138,41 @@
<%= f.text_area :description, { :rows => 7, :class => 'text_area has-tooltip', 'data-toggle' => "tooltip", 'data-html' => "true", 'title'=> t('helpers.project.project_desc_help_text_html')} %>
-
+
<% end %>
- <%= f.actions do %>
+ <%= f.actions do %>
<%end%>
- <%end%>
+ <%end%>
<% end %>
<%= t('helpers.project.project_static_info')%>
- <%if @project.dmptemplate.organisation.organisation_type.name == t('helpers.org_type.funder') %>
+ <%if @project.dmptemplate.organisation.organisation_type.name == constant("organisation_types.funder")%>
- <%= t('helpers.org_type.funder') %>
+ <%= constant("organisation_types.funder") %>
<%= @project.dmptemplate.organisation.name %>
<%end%>
<%if !@project.organisation_id.nil? %>
- <%= t('helpers.org_type.institution') %>
+ <%= constant("organisation_types.institution") %>
<%= @project.organisation.name %>
<%end%>
-
+
<% if @project.plans.any? %>
<% if @project.plans.count == 1 then %>
<% @project.plans.each do |plan| %>
-
+
<%= link_to t('helpers.answer_questions'), [:edit, @project, plan], :class => 'btn btn-primary' %>
<%= t('helpers.export') %>
@@ -194,28 +194,28 @@
<%= section.title %>
-
+
<% if section.questions.any? %>
<% questions = section.questions.sort_by(&:number) %>
<% questions.each do |ques|%>
- <%= ques.text %>
-
+
<%end%>
- <%end%>
+ <%end%>
-
+
<%end%>
-
+
- <%end%>
+ <%end%>
<%end%>
- <%else%>
+ <%else%>
<%= raw @project.dmptemplate.description %>
-
+
<% @project.plans.each do |plan| %>
@@ -235,7 +235,7 @@
<%= raw plan.version.phase.description %>
-
+
<% if !plan.sections.nil? %>
@@ -250,31 +250,28 @@
<%= section.title %>
-
+
<% if section.questions.any? %>
<% questions = section.questions.sort_by(&:number) %>
<% questions.each do |ques|%>
- <%= ques.text %>
-
+
<%end%>
- <%end%>
+ <%end%>
-
+
<%end%>
-
+
<%end%>
-
- <%end%>
- <%end%>
- <%end%>
-
-
-
-
\ No newline at end of file
+
+ <%end%>
+ <%end%>
+ <%end%>
+
diff --git a/app/views/projects/_project_list_head.html.erb b/app/views/projects/_project_list_head.html.erb
index 121cd61..a19e5d4 100644
--- a/app/views/projects/_project_list_head.html.erb
+++ b/app/views/projects/_project_list_head.html.erb
@@ -1,6 +1,6 @@
-
- <% @selected_columns.each do |column| %>
- <%= project_list_head(column) %>
- <% end %>
- <%= t("helpers.select_action")%>
-
+
+ <% @selected_columns.each do |column| %>
+ <%= project_list_head(column) %>
+ <% end %>
+ <%= t("helpers.select_action")%>
+
diff --git a/app/views/projects/_project_nav_tabs.html.erb b/app/views/projects/_project_nav_tabs.html.erb
index c1470e3..9e860f6 100644
--- a/app/views/projects/_project_nav_tabs.html.erb
+++ b/app/views/projects/_project_nav_tabs.html.erb
@@ -1,45 +1,45 @@
-
-
-
-
- <% if active == "show_project" then %>
-
- <% else %>
-
- <% end %>
- <%= link_to t("helpers.project.tab_plan"), project_path(project) %>
-
-
- <% project.plans.each do |plan| %>
- <% if active == plan.id then %>
-
- <% else %>
-
- <% end %>
- <% if active == "show_project" || active == "share_project" || active == "export_page" then %>
- <%= link_to plan.version.phase.title, [:edit, @project, plan]%>
- <% else %>
- <%= link_to plan.version.phase.title, [:edit, @plan.project, plan]%>
- <% end %>
-
- <% end %>
-
- <% if project.administerable_by(current_user.id) then %>
- <% if active == "share_project" then %>
-
- <% else %>
-
- <% end %>
- <%= link_to t("helpers.project.share.tab_share"), ["share", project] %>
-
- <% end %>
-
- <% if active == "export_page" then %>
-
- <% else %>
-
- <% end %>
- <%= link_to t("helpers.project.tab_export"), ["export",project] %>
-
-
+
+
+
+
+ <% if active == "show_project" then %>
+
+ <% else %>
+
+ <% end %>
+ <%= link_to t("helpers.project.tab_plan"), project_path(project) %>
+
+
+ <% project.plans.each do |plan| %>
+ <% if active == plan.id then %>
+
+ <% else %>
+
+ <% end %>
+ <% if active == "show_project" || active == "share_project" || active == "export_page" then %>
+ <%= link_to plan.version.phase.title, [:edit, @project, plan]%>
+ <% else %>
+ <%= link_to plan.version.phase.title, [:edit, @plan.project, plan]%>
+ <% end %>
+
+ <% end %>
+
+ <% if project.administerable_by(current_user.id) then %>
+ <% if active == "share_project" then %>
+
+ <% else %>
+
+ <% end %>
+ <%= link_to t("helpers.project.share.tab_share"), ["share", project] %>
+
+ <% end %>
+
+ <% if active == "export_page" then %>
+
+ <% else %>
+
+ <% end %>
+ <%= link_to t("helpers.project.tab_export"), ["export",project] %>
+
+
\ No newline at end of file
diff --git a/app/views/projects/_project_title.html.erb b/app/views/projects/_project_title.html.erb
index 719f93f..9a18861 100644
--- a/app/views/projects/_project_title.html.erb
+++ b/app/views/projects/_project_title.html.erb
@@ -1,8 +1,8 @@
-
-
-
-
- <%= project.title %>
-
-
+
+
+
+
+ <%= project.title %>
+
+
\ No newline at end of file
diff --git a/app/views/projects/_toolbar.html.erb b/app/views/projects/_toolbar.html.erb
index 2bbcca4..710ffa3 100644
--- a/app/views/projects/_toolbar.html.erb
+++ b/app/views/projects/_toolbar.html.erb
@@ -1,12 +1,12 @@
-
+
diff --git a/app/views/projects/edit.html.erb b/app/views/projects/edit.html.erb
index 7a89a8c..c5e940d 100644
--- a/app/views/projects/edit.html.erb
+++ b/app/views/projects/edit.html.erb
@@ -1,9 +1,9 @@
-<%- model_class = Project -%>
-
-
-<%= render :partial => "/projects/project_title", locals: {project: @project} %>
-
-
-<%= render :partial => "project_nav_tabs", locals: {project: @project, active: "edit_project"} %>
-
-<%= render :partial => 'form' %>
+<%- model_class = Project -%>
+
+
+<%= render :partial => "/projects/project_title", locals: {project: @project} %>
+
+
+<%= render :partial => "project_nav_tabs", locals: {project: @project, active: "edit_project"} %>
+
+<%= render :partial => 'form' %>
diff --git a/app/views/projects/export.html.erb b/app/views/projects/export.html.erb
index 91cbe43..37f1a18 100644
--- a/app/views/projects/export.html.erb
+++ b/app/views/projects/export.html.erb
@@ -1,41 +1,41 @@
-<%- model_class = Project -%>
-
-
-<%= render :partial => "/projects/project_title", locals: {project: @project} %>
-
-
-<%= render :partial => "project_nav_tabs", locals: {project: @project, active: "export_page"} %>
-
-
-
-
- <%= raw t('helpers.project.export_text_html')%>
-
-
- <% if @project.plans.any? %>
- <% if @project.plans.count == 1 then %>
- <% @project.plans.each do |plan| %>
- <%= render :partial => "/shared/export_links", locals: {plan: plan} %>
- <% end %>
- <%else%>
- <% @project.plans.each do |plan| %>
-
-
-
-
-
- <%= render :partial => "/shared/export_links", locals: {plan: plan} %>
-
-
-
-
- <%end%>
- <%end%>
- <%end%>
-
+<%- model_class = Project -%>
+
+
+<%= render :partial => "/projects/project_title", locals: {project: @project} %>
+
+
+<%= render :partial => "project_nav_tabs", locals: {project: @project, active: "export_page"} %>
+
+
+
+
+ <%= raw t('helpers.project.export_text_html')%>
+
+
+ <% if @project.plans.any? %>
+ <% if @project.plans.count == 1 then %>
+ <% @project.plans.each do |plan| %>
+ <%= render :partial => "/shared/export_links", locals: {plan: plan} %>
+ <% end %>
+ <%else%>
+ <% @project.plans.each do |plan| %>
+
+
+
+
+
+ <%= render :partial => "/shared/export_links", locals: {plan: plan} %>
+
+
+
+
+ <%end%>
+ <%end%>
+ <%end%>
+
\ No newline at end of file
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index b0e2ddd..f62ebe6 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -1,42 +1,42 @@
-<%- model_class = Project -%>
-<% javascript "toolbar.js" %>
-
- <%= t("helpers.project.projects_title") %>
-
-
-
-<% if @has_projects %>
-
-
- <%= raw t("helpers.project.project_text_when_project")%>
-
-
- <%= render(partial: "toolbar") %>
-
-
- <%= render(partial: "project_list_head") %>
-
-
- <% if @projects.any? %>
- <% @projects.each do |project| %>
- <%= render(partial: "project_list_item", locals: { project: project } ) %>
- <% end %>
- <% else %>
- <%= t("helpers.project.filter.no_plans_match", filter: params[:filter]) %>
- <% end %>
-
-
-
-
-<% else %>
-
- <%= raw t("helpers.project.project_text_when_no_project")%>
-
-<% end %>
-
-
-
- <%= link_to t(".new", :default => t("helpers.project.create")),
- new_project_path,
- :class => "btn btn-primary" %>
-
+<%- model_class = Project -%>
+<% javascript "toolbar.js" %>
+
+ <%= t("helpers.project.projects_title") %>
+
+
+
+<% if @has_projects %>
+
+
+ <%= raw t("helpers.project.project_text_when_project")%>
+
+
+ <%= render(partial: "toolbar") %>
+
+
+ <%= render(partial: "project_list_head") %>
+
+
+ <% if @projects.any? %>
+ <% @projects.each do |project| %>
+ <%= render(partial: "project_list_item", locals: { project: project } ) %>
+ <% end %>
+ <% else %>
+ <%= t("helpers.project.filter.no_plans_match", filter: params[:filter]) %>
+ <% end %>
+
+
+
+
+<% else %>
+
+ <%= raw t("helpers.project.project_text_when_no_project")%>
+
+<% end %>
+
+
+
+ <%= link_to t(".new", :default => t("helpers.project.create")),
+ new_project_path,
+ :class => "btn btn-primary" %>
+
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb
index 83137f6..ba153a0 100644
--- a/app/views/projects/new.html.erb
+++ b/app/views/projects/new.html.erb
@@ -11,9 +11,9 @@
<%= raw t("helpers.project.confirmation_text_desc")%>
-
<%= t("helpers.org_type.funder")%>: <%= t("helpers.none")%>
-
<%= t("helpers.org_type.institution")%>: <%= @project.organisation.nil? ? t("helpers.none") : @project.organisation %>
-
<%= t("helpers.org_type.template")%>:
+
<%= constant("organisation_types.funder")%>: <%= t("helpers.none")%>
+
<%= constant("organisation_types.institution")%>: <%= @project.organisation.nil? ? t("helpers.none") : @project.organisation %>
+
<%= constant("organisation_types.template")%>:
<%= t("helpers.org_type.other_guidance")%>:
-
diff --git a/app/views/static_pages/roadmap.html.erb b/app/views/static_pages/roadmap.html.erb
index 904db80..311ca4b 100644
--- a/app/views/static_pages/roadmap.html.erb
+++ b/app/views/static_pages/roadmap.html.erb
@@ -45,4 +45,4 @@
application_user_group_subscription_url: Rails.configuration.branding[:application][:user_group_subscription_url])%>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/views/token_permission_types/index.html.erb b/app/views/token_permission_types/index.html.erb
index 7832b4e..f7be6ec 100644
--- a/app/views/token_permission_types/index.html.erb
+++ b/app/views/token_permission_types/index.html.erb
@@ -1,14 +1,14 @@
-
-<% @user.organisation.token_permission_types.each do |token_type|%>
-
- <%= token_type.token_type %>
-
-
-
-
-
- <%= token_type.text_desription %>
-
-
-
+
+<% @user.organisation.token_permission_types.each do |token_type|%>
+
+ <%= token_type.token_type %>
+
+
+
+
+
+ <%= token_type.text_desription %>
+
+
+
<% end %>
\ No newline at end of file
diff --git a/app/views/user_mailer/api_token_granted_notification.html.erb b/app/views/user_mailer/api_token_granted_notification.html.erb
index 817a6ff..e72d6f2 100644
--- a/app/views/user_mailer/api_token_granted_notification.html.erb
+++ b/app/views/user_mailer/api_token_granted_notification.html.erb
@@ -1,6 +1,6 @@
-
<% t('custom_devise.hello') %><%= @user.name %>
-
-
-
-<% t('helpers.api_granted') %>"<%= link_to t('helpers.api_view_token'), controller: "users", action: "edit") %>".
-
+
<% t('custom_devise.hello') %><%= @user.name %>
+
+
+
+<% t('helpers.api_granted') %>"<%= link_to t('helpers.api_view_token'), controller: "users", action: "edit") %>".
+
diff --git a/app/views/user_mailer/permissions_change_notification.html.erb b/app/views/user_mailer/permissions_change_notification.html.erb
index 2ca98f5..26d84db 100644
--- a/app/views/user_mailer/permissions_change_notification.html.erb
+++ b/app/views/user_mailer/permissions_change_notification.html.erb
@@ -1,12 +1,12 @@
-
<%= t('custom_devise.hello') %><%= @project_group.user.name %>
-
-<%
-access_level = "read-only"
-if @project_group.access_level == 2 then
- access_level = "editor"
-elsif @project_group.access_level == 3 then
- access_level = "co-owner"
-end
-%>
-
-
<%= t('helpers.mailer.permission_relating') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>"<%= t('helpers.mailer.changed') %><%= access_level %><%= t('helpers.mailer.access') %>
+
<%= t('custom_devise.hello') %><%= @project_group.user.name %>
+
+<%
+access_level = "read-only"
+if @project_group.access_level == 2 then
+ access_level = "editor"
+elsif @project_group.access_level == 3 then
+ access_level = "co-owner"
+end
+%>
+
+
<%= t('helpers.mailer.permission_relating') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>"<%= t('helpers.mailer.changed') %><%= access_level %><%= t('helpers.mailer.access') %>
diff --git a/app/views/user_mailer/project_access_removed_notification.html.erb b/app/views/user_mailer/project_access_removed_notification.html.erb
index 3f64022..79f8d29 100644
--- a/app/views/user_mailer/project_access_removed_notification.html.erb
+++ b/app/views/user_mailer/project_access_removed_notification.html.erb
@@ -1,3 +1,3 @@
-
<%= t('custom_devise.hello') %><%= @user.name %>
-
-
<%= t('helpers.mailer.access_to') %>"<%= @project.title %>"<%= t('helpers.mailer.removed') %>
+
<%= t('custom_devise.hello') %><%= @user.name %>
+
+
<%= t('helpers.mailer.access_to') %>"<%= @project.title %>"<%= t('helpers.mailer.removed') %>
diff --git a/app/views/user_mailer/sharing_notification.html.erb b/app/views/user_mailer/sharing_notification.html.erb
index 6c41933..8ed0f53 100644
--- a/app/views/user_mailer/sharing_notification.html.erb
+++ b/app/views/user_mailer/sharing_notification.html.erb
@@ -1,12 +1,12 @@
-
<%= t('custom_devise.hello') %><%= @project_group.user.name %>
-
-<%
-access_level = "read-only"
-if @project_group.access_level == 2 then
- access_level = "editor"
-elsif @project_group.access_level == 3 then
- access_level = "co-owner"
-end
-%>
-
-
<%= t('helpers.mailer.given') %><%= access_level %><%= t('helpers.mailer.access_two') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>".
+
<%= t('custom_devise.hello') %><%= @project_group.user.name %>
+
+<%
+access_level = "read-only"
+if @project_group.access_level == 2 then
+ access_level = "editor"
+elsif @project_group.access_level == 3 then
+ access_level = "co-owner"
+end
+%>
+
+
<%= t('helpers.mailer.given') %><%= access_level %><%= t('helpers.mailer.access_two') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>".
diff --git a/app/views/users/admin_api_update.html.erb b/app/views/users/admin_api_update.html.erb
index e7e94f1..3f26ec2 100644
--- a/app/views/users/admin_api_update.html.erb
+++ b/app/views/users/admin_api_update.html.erb
@@ -13,6 +13,7 @@
<%= t('org_admin.user_name') %>
<%= t('org_admin.last_logged_in') %>
<%= t('org_admin.how_many_plans') %>
+
<%= t('org_admin.is_org_admin') %>
<% if current_user.organisation.token_permission_types.count > 0 %>
<%= t('org_admin.api_privleges') %>
<% end %>
@@ -42,15 +43,18 @@
<%= user.project_groups.count %>
<% end %>
+
+ <%= check_box_tag "org_admin_ids[]", user.id, user.is_org_admin? %>
+
<% if current_user.organisation.token_permission_types.count > 0 %>
- <%= check_box_tag "user_ids[]", user.id, user.api_token !="" %>
+ <%= check_box_tag "api_user_ids[]", user.id, user.api_token !="" %>
<% end %>
<% end %>
<% end %>
- <%= submit_tag "Update API Privleges" %>
+ <%= submit_tag "Update Users" %>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/admin_index.html.erb b/app/views/users/admin_index.html.erb
index e7e94f1..3f26ec2 100644
--- a/app/views/users/admin_index.html.erb
+++ b/app/views/users/admin_index.html.erb
@@ -13,6 +13,7 @@
<%= t('org_admin.user_name') %>
<%= t('org_admin.last_logged_in') %>
<%= t('org_admin.how_many_plans') %>
+
<%= t('org_admin.is_org_admin') %>
<% if current_user.organisation.token_permission_types.count > 0 %>
<%= t('org_admin.api_privleges') %>
<% end %>
@@ -42,15 +43,18 @@
<%= user.project_groups.count %>
<% end %>
+
+ <%= check_box_tag "org_admin_ids[]", user.id, user.is_org_admin? %>
+
<% if current_user.organisation.token_permission_types.count > 0 %>
- <%= check_box_tag "user_ids[]", user.id, user.api_token !="" %>
+ <%= check_box_tag "api_user_ids[]", user.id, user.api_token !="" %>
<% end %>
<% end %>
<% end %>
- <%= submit_tag "Update API Privleges" %>
+ <%= submit_tag "Update Users" %>
<% end %>
\ No newline at end of file
diff --git a/bin/bundle b/bin/bundle
index 66e9889..9c6dfa0 100755
--- a/bin/bundle
+++ b/bin/bundle
@@ -1,3 +1,3 @@
-#!/usr/bin/env ruby
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
-load Gem.bin_path('bundler', 'bundle')
+#!/usr/bin/env ruby
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+load Gem.bin_path('bundler', 'bundle')
diff --git a/bin/rails b/bin/rails
index 5191e69..f236603 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
-APP_PATH = File.expand_path('../../config/application', __FILE__)
-require_relative '../config/boot'
-require 'rails/commands'
+#!/usr/bin/env ruby
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require_relative '../config/boot'
+require 'rails/commands'
diff --git a/bin/rake b/bin/rake
index 1724048..8704afd 100755
--- a/bin/rake
+++ b/bin/rake
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
-require_relative '../config/boot'
-require 'rake'
-Rake.application.run
+#!/usr/bin/env ruby
+require_relative '../config/boot'
+require 'rake'
+Rake.application.run
diff --git a/bin/setup b/bin/setup
index acdb2c1..37305c7 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,29 +1,29 @@
-#!/usr/bin/env ruby
-require 'pathname'
-
-# path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
-
-Dir.chdir APP_ROOT do
- # This script is a starting point to setup your application.
- # Add necessary setup steps to this file:
-
- puts "== Installing dependencies =="
- system "gem install bundler --conservative"
- system "bundle check || bundle install"
-
- # puts "\n== Copying sample files =="
- # unless File.exist?("config/database.yml")
- # system "cp config/database.yml.sample config/database.yml"
- # end
-
- puts "\n== Preparing database =="
- system "bin/rake db:setup"
-
- puts "\n== Removing old logs and tempfiles =="
- system "rm -f log/*"
- system "rm -rf tmp/cache"
-
- puts "\n== Restarting application server =="
- system "touch tmp/restart.txt"
-end
+#!/usr/bin/env ruby
+require 'pathname'
+
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+Dir.chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file:
+
+ puts "== Installing dependencies =="
+ system "gem install bundler --conservative"
+ system "bundle check || bundle install"
+
+ # puts "\n== Copying sample files =="
+ # unless File.exist?("config/database.yml")
+ # system "cp config/database.yml.sample config/database.yml"
+ # end
+
+ puts "\n== Preparing database =="
+ system "bin/rake db:setup"
+
+ puts "\n== Removing old logs and tempfiles =="
+ system "rm -f log/*"
+ system "rm -rf tmp/cache"
+
+ puts "\n== Restarting application server =="
+ system "touch tmp/restart.txt"
+end
diff --git a/config/application.rb b/config/application.rb
index 43372bb..3400116 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -69,6 +69,7 @@
config.assets.precompile += %w(admin.css)
config.autoload_paths += %W(#{config.root}/lib)
+ config.action_controller.include_all_helpers = true
# Set the default host for mailer URLs
config.action_mailer.default_url_options = { :host => 'example@dcc.ac.uk' }
diff --git a/config/boot.rb b/config/boot.rb
index f2830ae..9b29e60 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,6 +1,6 @@
-require 'rubygems'
-
-# Set up gems listed in the Gemfile.
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
-
-require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
diff --git a/config/environment.rb b/config/environment.rb
index c3db0e9..c82b616 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,9 +1,9 @@
-# Load the Rails application.
-require File.expand_path('../application', __FILE__)
-
-#init a debugger
-Rails.logger = Logger.new(STDOUT)
-
-# Initialize the Rails application.
-#DMPonline4::Application.initialize!
+# Load the Rails application.
+require File.expand_path('../application', __FILE__)
+
+#init a debugger
+Rails.logger = Logger.new(STDOUT)
+
+# Initialize the Rails application.
+#DMPonline4::Application.initialize!
Rails.application.initialize!
\ No newline at end of file
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 0a209de..7abb30e 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,11 +1,9 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
-
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
-
# Do not eager load code on boot.
config.eager_load = false
@@ -21,7 +19,6 @@
# 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.
@@ -30,30 +27,28 @@
# 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
-
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
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
-
+
# Load Branded terminology (e.g. organization name, application name, etc.)
config.branding = config_for(:branding).deep_symbolize_keys
-end
-BetterErrors::Midleware.allow_ip! "10.0.2.2" if defined?(BetterErrors) && Rails.env == :development
\ No newline at end of file
+ BetterErrors::Midleware.allow_ip! "10.0.2.2" if defined?(BetterErrors) && Rails.env == :development
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 1c19f08..20f8f5a 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -14,6 +14,7 @@
# 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.
diff --git a/config/initializers/active_admin.rb b/config/initializers/active_admin.rb
index e83172e..2e1c9c6 100644
--- a/config/initializers/active_admin.rb
+++ b/config/initializers/active_admin.rb
@@ -56,7 +56,7 @@
# within the application controller.
# config.authentication_method = :authenticate_admin_user!
config.authentication_method = :authenticate_admin!
-
+
# == User Authorization
#
# Active Admin will automatically call an authorization
@@ -271,4 +271,4 @@
# of those filters by default here.
#
# config.include_default_association_filters = true
-end
+end
\ No newline at end of file
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
index 59385cd..803738d 100644
--- a/config/initializers/backtrace_silencers.rb
+++ b/config/initializers/backtrace_silencers.rb
@@ -1,7 +1,7 @@
-# Be sure to restart your server when you modify this file.
-
-# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
-# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
-
-# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
-# Rails.backtrace_cleaner.remove_silencers!
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/contac_us_example.rb b/config/initializers/contac_us_example.rb
index b2300ff..0d3b4f6 100644
--- a/config/initializers/contac_us_example.rb
+++ b/config/initializers/contac_us_example.rb
@@ -1,27 +1,27 @@
-# 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 = "example@email.address"
-
- # ==> 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'
-
-end
+# 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 = "example@email.address"
+
+ # ==> 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'
+
+end
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
index 90baf61..9ab4617 100644
--- a/config/initializers/cookies_serializer.rb
+++ b/config/initializers/cookies_serializer.rb
@@ -1,3 +1,3 @@
-# Be sure to restart your server when you modify this file.
-
+# Be sure to restart your server when you modify this file.
+
Rails.application.config.action_dispatch.cookies_serializer = :hybrid
\ No newline at end of file
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index dfb762e..52deedb 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -1,265 +1,265 @@
-# 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'
-
- # ==> 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 = 'please-change-me-at-config-initializers-devise@example.com'
-
- # Configure the class responsible to send e-mails.
- # config.mailer = 'Devise::Mailer'
-
- # ==> ORM configuration
- # Load and configure the ORM. Supports :active_record (default) and
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
- # available as additional gems.
- require 'devise/orm/active_record'
-
- # ==> Configuration for any authentication mechanism
- # Configure which keys are used when authenticating a user. The default is
- # just :email. You can configure it to use [:username, :subdomain], so for
- # authenticating a user, both parameters are required. Remember that those
- # parameters are used only when authenticating and not when retrieving from
- # 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]
-
- # 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
- # find_for_authentication method and considered in your model lookup. For instance,
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
- # The same considerations mentioned for authentication_keys also apply to request_keys.
- # config.request_keys = []
-
- # 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]
-
- # 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]
-
- # 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
- # given strategies, for example, `config.params_authenticatable = [:database]` will
- # enable it only for database (email + password) authentication.
- # config.params_authenticatable = true
-
- # 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 = [:database]` will
- # enable it only for database authentication. The supported strategies are:
- # :database = Support basic authentication with authentication key + password
- # config.http_authenticatable = false
-
- # 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'
-
- # It will change confirmation, password recovery and other workflows
- # to behave the same regardless if the e-mail provided was right or wrong.
- # Does not affect registerable.
- # config.paranoid = true
-
- # By default Devise will store the user in session. You can skip storage for
- # 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
- 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. 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 = 'fce14df8477896bd9cc8ea3724d97270a5f19cb6544173d17b7e148cf360bf16449d96318275bfb3efde7b3b377db06cede2b64efb0a6d07dd02dd5076f639c9'
-
- # 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 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 their account.
- # config.allow_unconfirmed_access_for = 2.days
-
- # A period that the user is allowed to confirm their account before their
- # token becomes invalid. For example, if set to 3.days, the user can confirm
- # their account within 3 days after the mail was sent, but on the fourth day
- # their account can't be confirmed with the token any more.
- # Default is nil, meaning there is no restriction on how long a user can take
- # before confirming their account.
- # config.confirm_within = 3.days
-
- # 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 = true
-
- # Defines which key will be used when confirming an account
- # 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.
- # config.rememberable_options = {}
-
- # ==> Configuration for :validatable
- # 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
- # to give user feedback and not to assert the e-mail validity.
- # config.email_regexp = /\A[^@]+@[^@]+\z/
-
- # ==> 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 = 30.minutes
-
- # ==> Configuration for :lockable
- # Defines which strategy will be used to lock an account.
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
- # :none = No lock strategy. You should handle locking by yourself.
- # config.lock_strategy = :failed_attempts
-
- # Defines which key will be used when locking and unlocking an account
- # config.unlock_keys = [:email]
-
- # Defines which strategy will be used to unlock an account.
- # :email = Sends an unlock link to the user email
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
- # :both = Enables both strategies
- # :none = No unlock strategy. You should handle unlocking by yourself.
- # config.unlock_strategy = :both
-
- # Number of authentication tries before locking an account if lock_strategy
- # is failed attempts.
- # config.maximum_attempts = 20
-
- # 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]
-
- # 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,
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
- # REST_AUTH_SITE_KEY to pepper).
- #
- # Require the `devise-encryptable` gem when using anything other than bcrypt
- # config.encryptor = :sha512
-
- # ==> 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
- # are using only default views.
- # config.scoped_views = false
-
- # Configure the default scope given to Warden. By default it's the first
- # devise role declared in your routes (usually :user).
- # config.default_scope = :user
-
- # Set this configuration to false if you want /users/sign_out to sign out
- # only the current scope. By default, Devise signs out all scopes.
- # config.sign_out_all_scopes = true
-
- # ==> Navigation configuration
- # Lists the formats that should be treated as navigational. Formats like
- # :html, should redirect to the sign in page when the user does not have
- # access, but formats like :xml or :json, should return 401.
- #
- # If you have any extra navigational formats, like :iphone or :mobile, you
- # should add them to the navigational formats lists.
- #
- # The "*/*" below is required to match Internet Explorer requests.
- # config.navigational_formats = ['*/*', :html]
-
- # The default HTTP method used to sign out a resource. Default is :delete.
- config.sign_out_via = :delete
-
- # ==> 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'
-
- # ==> Warden configuration
- # If you want to use other strategies, that are not supported by Devise, or
- # change the failure app, you can configure them inside the config.warden block.
- #
- # config.warden do |manager|
- # manager.intercept_401 = false
- # manager.default_strategies(scope: :user).unshift :some_external_strategy
- # end
-
- # ==> Mountable engine configurations
- # When using Devise inside an engine, let's call it `MyEngine`, and this engine
- # 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'
- #
- # 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,
- # so you need to do it manually. For the users scope, it would be:
- # config.omniauth_path_prefix = '/my_engine/users/auth'
-end
+# 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'
+
+ # ==> 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 = 'please-change-me-at-config-initializers-devise@example.com'
+
+ # Configure the class responsible to send e-mails.
+ # config.mailer = 'Devise::Mailer'
+
+ # ==> ORM configuration
+ # Load and configure the ORM. Supports :active_record (default) and
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
+ # available as additional gems.
+ require 'devise/orm/active_record'
+
+ # ==> Configuration for any authentication mechanism
+ # Configure which keys are used when authenticating a user. The default is
+ # just :email. You can configure it to use [:username, :subdomain], so for
+ # authenticating a user, both parameters are required. Remember that those
+ # parameters are used only when authenticating and not when retrieving from
+ # 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]
+
+ # 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
+ # find_for_authentication method and considered in your model lookup. For instance,
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
+ # config.request_keys = []
+
+ # 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]
+
+ # 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]
+
+ # 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
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
+ # enable it only for database (email + password) authentication.
+ # config.params_authenticatable = true
+
+ # 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 = [:database]` will
+ # enable it only for database authentication. The supported strategies are:
+ # :database = Support basic authentication with authentication key + password
+ # config.http_authenticatable = false
+
+ # 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'
+
+ # It will change confirmation, password recovery and other workflows
+ # to behave the same regardless if the e-mail provided was right or wrong.
+ # Does not affect registerable.
+ # config.paranoid = true
+
+ # By default Devise will store the user in session. You can skip storage for
+ # 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
+ 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. 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 = 'fce14df8477896bd9cc8ea3724d97270a5f19cb6544173d17b7e148cf360bf16449d96318275bfb3efde7b3b377db06cede2b64efb0a6d07dd02dd5076f639c9'
+
+ # 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 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 their account.
+ # config.allow_unconfirmed_access_for = 2.days
+
+ # A period that the user is allowed to confirm their account before their
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
+ # their account within 3 days after the mail was sent, but on the fourth day
+ # their account can't be confirmed with the token any more.
+ # Default is nil, meaning there is no restriction on how long a user can take
+ # before confirming their account.
+ # config.confirm_within = 3.days
+
+ # 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 = true
+
+ # Defines which key will be used when confirming an account
+ # 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.
+ # config.rememberable_options = {}
+
+ # ==> Configuration for :validatable
+ # 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
+ # to give user feedback and not to assert the e-mail validity.
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
+
+ # ==> 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 = 30.minutes
+
+ # ==> Configuration for :lockable
+ # Defines which strategy will be used to lock an account.
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
+ # :none = No lock strategy. You should handle locking by yourself.
+ # config.lock_strategy = :failed_attempts
+
+ # Defines which key will be used when locking and unlocking an account
+ # config.unlock_keys = [:email]
+
+ # Defines which strategy will be used to unlock an account.
+ # :email = Sends an unlock link to the user email
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
+ # :both = Enables both strategies
+ # :none = No unlock strategy. You should handle unlocking by yourself.
+ # config.unlock_strategy = :both
+
+ # Number of authentication tries before locking an account if lock_strategy
+ # is failed attempts.
+ # config.maximum_attempts = 20
+
+ # 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]
+
+ # 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,
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
+ # REST_AUTH_SITE_KEY to pepper).
+ #
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
+ # config.encryptor = :sha512
+
+ # ==> 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
+ # are using only default views.
+ # config.scoped_views = false
+
+ # Configure the default scope given to Warden. By default it's the first
+ # devise role declared in your routes (usually :user).
+ # config.default_scope = :user
+
+ # Set this configuration to false if you want /users/sign_out to sign out
+ # only the current scope. By default, Devise signs out all scopes.
+ # config.sign_out_all_scopes = true
+
+ # ==> Navigation configuration
+ # Lists the formats that should be treated as navigational. Formats like
+ # :html, should redirect to the sign in page when the user does not have
+ # access, but formats like :xml or :json, should return 401.
+ #
+ # If you have any extra navigational formats, like :iphone or :mobile, you
+ # should add them to the navigational formats lists.
+ #
+ # The "*/*" below is required to match Internet Explorer requests.
+ # config.navigational_formats = ['*/*', :html]
+
+ # The default HTTP method used to sign out a resource. Default is :delete.
+ config.sign_out_via = :delete
+
+ # ==> 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'
+
+ # ==> Warden configuration
+ # If you want to use other strategies, that are not supported by Devise, or
+ # change the failure app, you can configure them inside the config.warden block.
+ #
+ # config.warden do |manager|
+ # manager.intercept_401 = false
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
+ # end
+
+ # ==> Mountable engine configurations
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
+ # 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'
+ #
+ # 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,
+ # so you need to do it manually. For the users scope, it would be:
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
+end
diff --git a/config/initializers/devise_example.rb b/config/initializers/devise_example.rb
index 241c6a8..17b481e 100644
--- a/config/initializers/devise_example.rb
+++ b/config/initializers/devise_example.rb
@@ -1,278 +1,278 @@
-# 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|
-
- 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 = "example@email.address"
-
- # Configure the class responsible to send e-mails.
- # config.mailer = "Devise::Mailer"
-
- # ==> ORM configuration
- # Load and configure the ORM. Supports :active_record (default) and
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
- # available as additional gems.
- require 'devise/orm/active_record'
-
- # ==> Configuration for any authentication mechanism
- # Configure which keys are used when authenticating a user. The default is
- # just :email. You can configure it to use [:username, :subdomain], so for
- # authenticating a user, both parameters are required. Remember that those
- # parameters are used only when authenticating and not when retrieving from
- # 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 ]
-
- # 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
- # find_for_authentication method and considered in your model lookup. For instance,
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
- # The same considerations mentioned for authentication_keys also apply to request_keys.
- # config.request_keys = []
-
- # 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 ]
-
- # 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 ]
-
- # 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
- # given strategies, for example, `config.params_authenticatable = [:database]` will
- # enable it only for database (email + password) authentication.
- # config.params_authenticatable = true
-
- # 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:
- # :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.
- # config.http_authenticatable_on_xhr = true
-
- # 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.
- # Does not affect registerable.
- # 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.
- # 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
- config.skip_session_storage = [:http_auth]
-
- # ==> 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
-
- # Setup a pepper to generate the encrypted password.
- config.pepper = "EXAMPLE OF PEPPER TO GENERATE THE ENCRYPTED PASSWORD"
-
- # ==> 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
-
- # 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
-
- # ==> 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,
- # access will be blocked just in the third day. Default is 0.days, meaning
- # the user cannot access the website without confirming his account.
- # config.allow_unconfirmed_access_for = 2.days
-
- # A period that the user is allowed to confirm their account before their
- # token becomes invalid. For example, if set to 3.days, the user can confirm
- # their account within 3 days after the mail was sent, but on the fourth day
- # their account can't be confirmed with the token any more.
- # Default is nil, meaning there is no restriction on how long a user can take
- # before confirming their account.
- # config.confirm_within = 3.days
-
- # 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
-
- # Defines which key will be used when confirming an account
- # config.confirmation_keys = [ :email ]
-
- # ==> Configuration for :rememberable
- # The time the user will be remembered without asking for credentials again.
- # config.remember_for = 2.weeks
-
- # 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.
- # config.rememberable_options = {}
-
- # ==> Configuration for :validatable
- # Range for password length. Default is 8..128.
- config.password_length = 8..128
-
- # Email regex used to validate email formats. It simply asserts that
- # one (and only one) @ exists in the given string. This is mainly
- # to give user feedback and not to assert the e-mail validity.
- # config.email_regexp = /\A[^@]+@[^@]+\z/
-
- # ==> 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
-
- # ==> Configuration for :lockable
- # Defines which strategy will be used to lock an account.
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
- # :none = No lock strategy. You should handle locking by yourself.
- # config.lock_strategy = :failed_attempts
-
- # Defines which key will be used when locking and unlocking an account
- # config.unlock_keys = [ :email ]
-
- # Defines which strategy will be used to unlock an account.
- # :email = Sends an unlock link to the user email
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
- # :both = Enables both strategies
- # :none = No unlock strategy. You should handle unlocking by yourself.
- # config.unlock_strategy = :both
-
- # Number of authentication tries before locking an account if lock_strategy
- # is failed attempts.
- # config.maximum_attempts = 20
-
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
- # config.unlock_in = 1.hour
-
- # ==> Configuration for :recoverable
- #
- # Defines which key will be used when recovering the password for an account
- # 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
-
- # ==> 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,
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
- # REST_AUTH_SITE_KEY to pepper).
- #
- # 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
- # are using only default views.
- # config.scoped_views = false
-
- # Configure the default scope given to Warden. By default it's the first
- # devise role declared in your routes (usually :user).
- # config.default_scope = :user
-
- # Set this configuration to false if you want /users/sign_out to sign out
- # only the current scope. By default, Devise signs out all scopes.
- # config.sign_out_all_scopes = true
-
- # ==> Navigation configuration
- # Lists the formats that should be treated as navigational. Formats like
- # :html, should redirect to the sign in page when the user does not have
- # access, but formats like :xml or :json, should return 401.
- #
- # If you have any extra navigational formats, like :iphone or :mobile, you
- # should add them to the navigational formats lists.
- #
- # The "*/*" below is required to match Internet Explorer requests.
- # config.navigational_formats = ["*/*", :html]
-
- # The default HTTP method used to sign out a resource. Default is :delete.
- config.sign_out_via = :delete
-
- # ==> 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'
-
- # ==> Warden configuration
- # If you want to use other strategies, that are not supported by Devise, or
- # change the failure app, you can configure them inside the config.warden block.
- #
- # config.warden do |manager|
- # manager.intercept_401 = false
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
- # end
-
- # ==> Mountable engine configurations
- # When using Devise inside an engine, let's call it `MyEngine`, and this engine
- # 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"
- #
- # 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,
- # 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
-
-end
+# 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|
+
+ 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 = "example@email.address"
+
+ # Configure the class responsible to send e-mails.
+ # config.mailer = "Devise::Mailer"
+
+ # ==> ORM configuration
+ # Load and configure the ORM. Supports :active_record (default) and
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
+ # available as additional gems.
+ require 'devise/orm/active_record'
+
+ # ==> Configuration for any authentication mechanism
+ # Configure which keys are used when authenticating a user. The default is
+ # just :email. You can configure it to use [:username, :subdomain], so for
+ # authenticating a user, both parameters are required. Remember that those
+ # parameters are used only when authenticating and not when retrieving from
+ # 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 ]
+
+ # 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
+ # find_for_authentication method and considered in your model lookup. For instance,
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
+ # config.request_keys = []
+
+ # 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 ]
+
+ # 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 ]
+
+ # 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
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
+ # enable it only for database (email + password) authentication.
+ # config.params_authenticatable = true
+
+ # 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:
+ # :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.
+ # config.http_authenticatable_on_xhr = true
+
+ # 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.
+ # Does not affect registerable.
+ # 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.
+ # 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
+ config.skip_session_storage = [:http_auth]
+
+ # ==> 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
+
+ # Setup a pepper to generate the encrypted password.
+ config.pepper = "EXAMPLE OF PEPPER TO GENERATE THE ENCRYPTED PASSWORD"
+
+ # ==> 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
+
+ # 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
+
+ # ==> 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,
+ # access will be blocked just in the third day. Default is 0.days, meaning
+ # the user cannot access the website without confirming his account.
+ # config.allow_unconfirmed_access_for = 2.days
+
+ # A period that the user is allowed to confirm their account before their
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
+ # their account within 3 days after the mail was sent, but on the fourth day
+ # their account can't be confirmed with the token any more.
+ # Default is nil, meaning there is no restriction on how long a user can take
+ # before confirming their account.
+ # config.confirm_within = 3.days
+
+ # 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
+
+ # Defines which key will be used when confirming an account
+ # config.confirmation_keys = [ :email ]
+
+ # ==> Configuration for :rememberable
+ # The time the user will be remembered without asking for credentials again.
+ # config.remember_for = 2.weeks
+
+ # 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.
+ # config.rememberable_options = {}
+
+ # ==> Configuration for :validatable
+ # Range for password length. Default is 8..128.
+ config.password_length = 8..128
+
+ # Email regex used to validate email formats. It simply asserts that
+ # one (and only one) @ exists in the given string. This is mainly
+ # to give user feedback and not to assert the e-mail validity.
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
+
+ # ==> 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
+
+ # ==> Configuration for :lockable
+ # Defines which strategy will be used to lock an account.
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
+ # :none = No lock strategy. You should handle locking by yourself.
+ # config.lock_strategy = :failed_attempts
+
+ # Defines which key will be used when locking and unlocking an account
+ # config.unlock_keys = [ :email ]
+
+ # Defines which strategy will be used to unlock an account.
+ # :email = Sends an unlock link to the user email
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
+ # :both = Enables both strategies
+ # :none = No unlock strategy. You should handle unlocking by yourself.
+ # config.unlock_strategy = :both
+
+ # Number of authentication tries before locking an account if lock_strategy
+ # is failed attempts.
+ # config.maximum_attempts = 20
+
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
+ # config.unlock_in = 1.hour
+
+ # ==> Configuration for :recoverable
+ #
+ # Defines which key will be used when recovering the password for an account
+ # 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
+
+ # ==> 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,
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
+ # REST_AUTH_SITE_KEY to pepper).
+ #
+ # 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
+ # are using only default views.
+ # config.scoped_views = false
+
+ # Configure the default scope given to Warden. By default it's the first
+ # devise role declared in your routes (usually :user).
+ # config.default_scope = :user
+
+ # Set this configuration to false if you want /users/sign_out to sign out
+ # only the current scope. By default, Devise signs out all scopes.
+ # config.sign_out_all_scopes = true
+
+ # ==> Navigation configuration
+ # Lists the formats that should be treated as navigational. Formats like
+ # :html, should redirect to the sign in page when the user does not have
+ # access, but formats like :xml or :json, should return 401.
+ #
+ # If you have any extra navigational formats, like :iphone or :mobile, you
+ # should add them to the navigational formats lists.
+ #
+ # The "*/*" below is required to match Internet Explorer requests.
+ # config.navigational_formats = ["*/*", :html]
+
+ # The default HTTP method used to sign out a resource. Default is :delete.
+ config.sign_out_via = :delete
+
+ # ==> 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'
+
+ # ==> Warden configuration
+ # If you want to use other strategies, that are not supported by Devise, or
+ # change the failure app, you can configure them inside the config.warden block.
+ #
+ # config.warden do |manager|
+ # manager.intercept_401 = false
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
+ # end
+
+ # ==> Mountable engine configurations
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
+ # 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"
+ #
+ # 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,
+ # 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
+
+end
diff --git a/config/initializers/formtastic.rb b/config/initializers/formtastic.rb
index eb9391a..3cf1aef 100644
--- a/config/initializers/formtastic.rb
+++ b/config/initializers/formtastic.rb
@@ -1,79 +1,79 @@
-# encoding: utf-8
-
-# Set the default text field size when input is a string. Default is nil.
-# Formtastic::FormBuilder.default_text_field_size = 50
-
-# Set the default text area height when input is a text. Default is 20.
-# Formtastic::FormBuilder.default_text_area_height = 5
-
-# Set the default text area width when input is a text. Default is nil.
-# Formtastic::FormBuilder.default_text_area_width = 50
-
-# Should all fields be considered "required" by default?
-# Defaults to true.
-# Formtastic::FormBuilder.all_fields_required_by_default = true
-
-# Should select fields have a blank option/prompt by default?
-# Defaults to true.
-# Formtastic::FormBuilder.include_blank_for_select_by_default = true
-
-# Set the string that will be appended to the labels/fieldsets which are required
-# It accepts string or procs and the default is a localized version of
-# '
* '. In other words, if you configure formtastic.required
-# in your locale, it will replace the abbr title properly. But if you don't want to use
-# abbr tag, you can simply give a string as below
-# Formtastic::FormBuilder.required_string = "(required)"
-
-# Set the string that will be appended to the labels/fieldsets which are optional
-# Defaults to an empty string ("") and also accepts procs (see required_string above)
-# Formtastic::FormBuilder.optional_string = "(optional)"
-
-# Set the way inline errors will be displayed.
-# Defaults to :sentence, valid options are :sentence, :list, :first and :none
-# Formtastic::FormBuilder.inline_errors = :sentence
-# Formtastic uses the following classes as default for hints, inline_errors and error list
-
-# If you override the class here, please ensure to override it in your stylesheets as well
-# Formtastic::FormBuilder.default_hint_class = "inline-hints"
-# Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
-# Formtastic::FormBuilder.default_error_list_class = "errors"
-
-# Set the method to call on label text to transform or format it for human-friendly
-# reading when formtastic is used without object. Defaults to :humanize.
-# Formtastic::FormBuilder.label_str_method = :humanize
-
-# Set the array of methods to try calling on parent objects in :select and :radio inputs
-# for the text inside each @
@ tag or alongside each radio @ @. The first method
-# that is found on the object will be used.
-# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
-# Formtastic::FormBuilder.collection_label_methods = [
-# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
-
-# Specifies if labels/hints for input fields automatically be looked up using I18n.
-# Default value: true. Overridden for specific fields by setting value to true,
-# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
-# Formtastic::FormBuilder.i18n_lookups_by_default = false
-
-# Specifies if I18n lookups of the default I18n Localizer should be cached to improve performance.
-# Defaults to true.
-# Formtastic::FormBuilder.i18n_cache_lookups = false
-
-# Specifies the class to use for localization lookups. You can create your own
-# class and use it instead by subclassing Formtastic::Localizer (which is the default).
-# Formtastic::FormBuilder.i18n_localizer = MyOwnLocalizer
-
-# You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
-# specifying that class here. Defaults to Formtastic::FormBuilder.
-# Formtastic::Helpers::FormHelper.builder = MyCustomBuilder
-
-# You can opt-in to Formtastic's use of the HTML5 `required` attribute on ` `, ``
-# and `` tags by setting this to false (defaults to true).
-# Formtastic::FormBuilder.use_required_attribute = true
-
-# You can opt-in to new HTML5 browser validations (for things like email and url inputs) by setting
-# this to false. Doing so will add a `novalidate` attribute to the `` tag.
-# See http://diveintohtml5.org/forms.html#validation for more info.
-# Formtastic::FormBuilder.perform_browser_validations = true
-
-Formtastic::FormBuilder.action_class_finder = Formtastic::ActionClassFinder
+# encoding: utf-8
+
+# Set the default text field size when input is a string. Default is nil.
+# Formtastic::FormBuilder.default_text_field_size = 50
+
+# Set the default text area height when input is a text. Default is 20.
+# Formtastic::FormBuilder.default_text_area_height = 5
+
+# Set the default text area width when input is a text. Default is nil.
+# Formtastic::FormBuilder.default_text_area_width = 50
+
+# Should all fields be considered "required" by default?
+# Defaults to true.
+# Formtastic::FormBuilder.all_fields_required_by_default = true
+
+# Should select fields have a blank option/prompt by default?
+# Defaults to true.
+# Formtastic::FormBuilder.include_blank_for_select_by_default = true
+
+# Set the string that will be appended to the labels/fieldsets which are required
+# It accepts string or procs and the default is a localized version of
+# '* '. In other words, if you configure formtastic.required
+# in your locale, it will replace the abbr title properly. But if you don't want to use
+# abbr tag, you can simply give a string as below
+# Formtastic::FormBuilder.required_string = "(required)"
+
+# Set the string that will be appended to the labels/fieldsets which are optional
+# Defaults to an empty string ("") and also accepts procs (see required_string above)
+# Formtastic::FormBuilder.optional_string = "(optional)"
+
+# Set the way inline errors will be displayed.
+# Defaults to :sentence, valid options are :sentence, :list, :first and :none
+# Formtastic::FormBuilder.inline_errors = :sentence
+# Formtastic uses the following classes as default for hints, inline_errors and error list
+
+# If you override the class here, please ensure to override it in your stylesheets as well
+# Formtastic::FormBuilder.default_hint_class = "inline-hints"
+# Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
+# Formtastic::FormBuilder.default_error_list_class = "errors"
+
+# Set the method to call on label text to transform or format it for human-friendly
+# reading when formtastic is used without object. Defaults to :humanize.
+# Formtastic::FormBuilder.label_str_method = :humanize
+
+# Set the array of methods to try calling on parent objects in :select and :radio inputs
+# for the text inside each @@ tag or alongside each radio @ @. The first method
+# that is found on the object will be used.
+# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
+# Formtastic::FormBuilder.collection_label_methods = [
+# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
+
+# Specifies if labels/hints for input fields automatically be looked up using I18n.
+# Default value: true. Overridden for specific fields by setting value to true,
+# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
+# Formtastic::FormBuilder.i18n_lookups_by_default = false
+
+# Specifies if I18n lookups of the default I18n Localizer should be cached to improve performance.
+# Defaults to true.
+# Formtastic::FormBuilder.i18n_cache_lookups = false
+
+# Specifies the class to use for localization lookups. You can create your own
+# class and use it instead by subclassing Formtastic::Localizer (which is the default).
+# Formtastic::FormBuilder.i18n_localizer = MyOwnLocalizer
+
+# You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
+# specifying that class here. Defaults to Formtastic::FormBuilder.
+# Formtastic::Helpers::FormHelper.builder = MyCustomBuilder
+
+# You can opt-in to Formtastic's use of the HTML5 `required` attribute on ` `, ``
+# and `` tags by setting this to false (defaults to true).
+# Formtastic::FormBuilder.use_required_attribute = true
+
+# You can opt-in to new HTML5 browser validations (for things like email and url inputs) by setting
+# this to false. Doing so will add a `novalidate` attribute to the `` tag.
+# See http://diveintohtml5.org/forms.html#validation for more info.
+# Formtastic::FormBuilder.perform_browser_validations = true
+
+Formtastic::FormBuilder.action_class_finder = Formtastic::ActionClassFinder
Formtastic::FormBuilder.input_class_finder = Formtastic::InputClassFinder
\ No newline at end of file
diff --git a/config/initializers/friendly_id.rb b/config/initializers/friendly_id.rb
index 1b2a4fa..dbbd053 100644
--- a/config/initializers/friendly_id.rb
+++ b/config/initializers/friendly_id.rb
@@ -1,88 +1,88 @@
-# FriendlyId Global Configuration
-#
-# Use this to set up shared configuration options for your entire application.
-# Any of the configuration options shown here can also be applied to single
-# models by passing arguments to the `friendly_id` class method or defining
-# methods in your model.
-#
-# To learn more, check out the guide:
-#
-# http://norman.github.io/friendly_id/file.Guide.html
-
-FriendlyId.defaults do |config|
- # ## Reserved Words
- #
- # Some words could conflict with Rails's routes when used as slugs, or are
- # undesirable to allow as slugs. Edit this list as needed for your app.
- config.use :reserved
-
- config.reserved_words = %w(new edit index session login logout users admin
- stylesheets assets javascripts images)
-
- # ## Friendly Finders
- #
- # Uncomment this to use friendly finders in all models. By default, if
- # you wish to find a record by its friendly id, you must do:
- #
- # MyModel.friendly.find('foo')
- #
- # If you uncomment this, you can do:
- #
- # MyModel.find('foo')
- #
- # This is significantly more convenient but may not be appropriate for
- # all applications, so you must explicity opt-in to this behavior. You can
- # always also configure it on a per-model basis if you prefer.
- #
- # Something else to consider is that using the :finders addon boosts
- # performance because it will avoid Rails-internal code that makes runtime
- # calls to `Module.extend`.
- #
- config.use :finders
- #
- # ## Slugs
- #
- # Most applications will use the :slugged module everywhere. If you wish
- # to do so, uncomment the following line.
- #
- # config.use :slugged
- #
- # By default, FriendlyId's :slugged addon expects the slug column to be named
- # 'slug', but you can change it if you wish.
- #
- # config.slug_column = 'slug'
- #
- # When FriendlyId can not generate a unique ID from your base method, it appends
- # a UUID, separated by a single dash. You can configure the character used as the
- # separator. If you're upgrading from FriendlyId 4, you may wish to replace this
- # with two dashes.
- #
- # config.sequence_separator = '-'
- #
- # ## Tips and Tricks
- #
- # ### Controlling when slugs are generated
- #
- # As of FriendlyId 5.0, new slugs are generated only when the slug field is
- # nil, but if you're using a column as your base method can change this
- # behavior by overriding the `should_generate_new_friendly_id` method that
- # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
- # more like 4.0.
- #
- # config.use Module.new {
- # def should_generate_new_friendly_id?
- # slug.blank? || _changed?
- # end
- # }
- #
- # FriendlyId uses Rails's `parameterize` method to generate slugs, but for
- # languages that don't use the Roman alphabet, that's not usually sufficient.
- # Here we use the Babosa library to transliterate Russian Cyrillic slugs to
- # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.
- #
- # config.use Module.new {
- # def normalize_friendly_id(text)
- # text.to_slug.normalize! :transliterations => [:russian, :latin]
- # end
- # }
-end
+# FriendlyId Global Configuration
+#
+# Use this to set up shared configuration options for your entire application.
+# Any of the configuration options shown here can also be applied to single
+# models by passing arguments to the `friendly_id` class method or defining
+# methods in your model.
+#
+# To learn more, check out the guide:
+#
+# http://norman.github.io/friendly_id/file.Guide.html
+
+FriendlyId.defaults do |config|
+ # ## Reserved Words
+ #
+ # Some words could conflict with Rails's routes when used as slugs, or are
+ # undesirable to allow as slugs. Edit this list as needed for your app.
+ config.use :reserved
+
+ config.reserved_words = %w(new edit index session login logout users admin
+ stylesheets assets javascripts images)
+
+ # ## Friendly Finders
+ #
+ # Uncomment this to use friendly finders in all models. By default, if
+ # you wish to find a record by its friendly id, you must do:
+ #
+ # MyModel.friendly.find('foo')
+ #
+ # If you uncomment this, you can do:
+ #
+ # MyModel.find('foo')
+ #
+ # This is significantly more convenient but may not be appropriate for
+ # all applications, so you must explicity opt-in to this behavior. You can
+ # always also configure it on a per-model basis if you prefer.
+ #
+ # Something else to consider is that using the :finders addon boosts
+ # performance because it will avoid Rails-internal code that makes runtime
+ # calls to `Module.extend`.
+ #
+ config.use :finders
+ #
+ # ## Slugs
+ #
+ # Most applications will use the :slugged module everywhere. If you wish
+ # to do so, uncomment the following line.
+ #
+ # config.use :slugged
+ #
+ # By default, FriendlyId's :slugged addon expects the slug column to be named
+ # 'slug', but you can change it if you wish.
+ #
+ # config.slug_column = 'slug'
+ #
+ # When FriendlyId can not generate a unique ID from your base method, it appends
+ # a UUID, separated by a single dash. You can configure the character used as the
+ # separator. If you're upgrading from FriendlyId 4, you may wish to replace this
+ # with two dashes.
+ #
+ # config.sequence_separator = '-'
+ #
+ # ## Tips and Tricks
+ #
+ # ### Controlling when slugs are generated
+ #
+ # As of FriendlyId 5.0, new slugs are generated only when the slug field is
+ # nil, but if you're using a column as your base method can change this
+ # behavior by overriding the `should_generate_new_friendly_id` method that
+ # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
+ # more like 4.0.
+ #
+ # config.use Module.new {
+ # def should_generate_new_friendly_id?
+ # slug.blank? || _changed?
+ # end
+ # }
+ #
+ # FriendlyId uses Rails's `parameterize` method to generate slugs, but for
+ # languages that don't use the Roman alphabet, that's not usually sufficient.
+ # Here we use the Babosa library to transliterate Russian Cyrillic slugs to
+ # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.
+ #
+ # config.use Module.new {
+ # def normalize_friendly_id(text)
+ # text.to_slug.normalize! :transliterations => [:russian, :latin]
+ # end
+ # }
+end
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index ac033bf..d173fb9 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -1,16 +1,16 @@
-# Be sure to restart your server when you modify this file.
-
-# Add new inflection rules using the following format. Inflections
-# are locale specific, and you may define rules for as many different
-# locales as you wish. All of these examples are active by default:
-# ActiveSupport::Inflector.inflections(:en) do |inflect|
-# inflect.plural /^(ox)$/i, '\1en'
-# inflect.singular /^(ox)en/i, '\1'
-# inflect.irregular 'person', 'people'
-# inflect.uncountable %w( fish sheep )
-# end
-
-# These inflection rules are supported but not enabled by default:
-# ActiveSupport::Inflector.inflections(:en) do |inflect|
-# inflect.acronym 'RESTful'
-# end
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format. Inflections
+# are locale specific, and you may define rules for as many different
+# locales as you wish. All of these examples are active by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+# inflect.acronym 'RESTful'
+# end
diff --git a/config/initializers/jbuilder_prettify.rb b/config/initializers/jbuilder_prettify.rb
index ae96d1f..cd12502 100644
--- a/config/initializers/jbuilder_prettify.rb
+++ b/config/initializers/jbuilder_prettify.rb
@@ -1,27 +1,27 @@
-# config/initializers/jbuilder_prettify.rb
-require "jbuilder"
-
-class Jbuilder
- ##
- # Allows you to set @prettify manually in your .jbuilder files.
- # Example:
- # json.prettify true
- # json.prettify false
- #
- attr_accessor :prettify
-
- alias_method :_original_target, :target!
-
- ##
- # A shortcut to enabling prettify.
- # Example:
- # json.prettify!
- #
- def prettify!
- @prettify = true
- end
-
- def target!
- @prettify ? ::JSON.pretty_generate(@attributes) : _original_target
- end
+# config/initializers/jbuilder_prettify.rb
+require "jbuilder"
+
+class Jbuilder
+ ##
+ # Allows you to set @prettify manually in your .jbuilder files.
+ # Example:
+ # json.prettify true
+ # json.prettify false
+ #
+ attr_accessor :prettify
+
+ alias_method :_original_target, :target!
+
+ ##
+ # A shortcut to enabling prettify.
+ # Example:
+ # json.prettify!
+ #
+ def prettify!
+ @prettify = true
+ end
+
+ def target!
+ @prettify ? ::JSON.pretty_generate(@attributes) : _original_target
+ end
end
\ No newline at end of file
diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb
index c41fb69..850d282 100644
--- a/config/initializers/locale.rb
+++ b/config/initializers/locale.rb
@@ -1,18 +1,30 @@
-module DMPRoadmap
+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]
-
+ 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 = :'en-US'
+ # initializers are run before migrations, languages table might not be present
+ if ActiveRecord::Base.connection.tables.include?('languages') &&
+ ActiveRecord::Base.connection.column_exists?(:languages, :default_language)
+
+ # If a default language is not defined in the DB use en-UK
+ if Language.where(default_language: true).empty?
+ config.i18n.default_locale = 'en-UK'
+ else
+ config.i18n.default_locale = Language.where(default_language: true).first.abbreviation
+ end
+
+ else
+ config.i18n.default_locale = 'en-UK' # if this is not set then admin area is not working, which is required to change the default_language
+ end
# set fallback locale
config.i18n.fallbacks = true
end
-end
+end
\ No newline at end of file
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
index c31a93a..04d2d70 100644
--- a/config/initializers/mime_types.rb
+++ b/config/initializers/mime_types.rb
@@ -1,8 +1,8 @@
-# Be sure to restart your server when you modify this file.
-
-# Add new mime types for use in respond_to blocks:
-# Mime::Type.register "text/richtext", :rtf
-Mime::Type.register_alias "text/html", :partial
-
-# Rails 4 already registers the DOCX mime type
-#Mime::Type.register "application/vnd.openxmlformats-officedocument.wordprocessingml.document", :docx
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+Mime::Type.register_alias "text/html", :partial
+
+# Rails 4 already registers the DOCX mime type
+#Mime::Type.register "application/vnd.openxmlformats-officedocument.wordprocessingml.document", :docx
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index 38e7f89..ddc6ce1 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -1,20 +1,20 @@
-Rails.application.config.middleware.use OmniAuth::Builder do
- provider :shibboleth, {
- # We're using a UK Access Management Federation IdPs here
- # Shibboleth server config needs to return eppn and persistent-id attributes
- # Priority given to eppn in controller if present, assuming persistent-id always populated
- # Doing this the omniauth way rather than using REMOTE_USER
- # See controllers/users/omniauth_callbacks_controller.rb
- # Shibboleth authentication is enabled in config/application.rb
- :uid_field => :"persistent-id",
- :fields => [],
- :extra_fields => [
- :eppn,
- :affiliation,
- :entitlement,
- :"unscoped-affiliation",
- :"targeted-id",
- :mail
- ],
- }
-end
+Rails.application.config.middleware.use OmniAuth::Builder do
+ provider :shibboleth, {
+ # We're using a UK Access Management Federation IdPs here
+ # Shibboleth server config needs to return eppn and persistent-id attributes
+ # Priority given to eppn in controller if present, assuming persistent-id always populated
+ # Doing this the omniauth way rather than using REMOTE_USER
+ # See controllers/users/omniauth_callbacks_controller.rb
+ # Shibboleth authentication is enabled in config/application.rb
+ :uid_field => :"persistent-id",
+ :fields => [],
+ :extra_fields => [
+ :eppn,
+ :affiliation,
+ :entitlement,
+ :"unscoped-affiliation",
+ :"targeted-id",
+ :mail
+ ],
+ }
+end
diff --git a/config/initializers/recaptcha_example.rb b/config/initializers/recaptcha_example.rb
index be00be4..a9e681a 100644
--- a/config/initializers/recaptcha_example.rb
+++ b/config/initializers/recaptcha_example.rb
@@ -1,5 +1,5 @@
-Recaptcha.configure do |config|
- config.public_key = 'replace_this_with_your_public_key'
- config.private_key = 'replace_this_with_your_private_key'
- config.proxy = 'http://someproxy.com:port'
-end
+Recaptcha.configure do |config|
+ config.public_key = 'replace_this_with_your_public_key'
+ config.private_key = 'replace_this_with_your_private_key'
+ config.proxy = 'http://someproxy.com:port'
+end
diff --git a/config/initializers/rolify.rb b/config/initializers/rolify.rb
index c8df67a..45fd03f 100644
--- a/config/initializers/rolify.rb
+++ b/config/initializers/rolify.rb
@@ -1,8 +1,8 @@
-Rolify.configure do |config|
- # By default ORM adapter is ActiveRecord. uncomment to use mongoid
- # config.use_mongoid
-
- # Dynamic shortcuts for User class (user.is_admin? like methods). Default is: false
- # Enable this feature _after_ running rake db:migrate as it relies on the roles table
- # config.use_dynamic_shortcuts
+Rolify.configure do |config|
+ # By default ORM adapter is ActiveRecord. uncomment to use mongoid
+ # config.use_mongoid
+
+ # Dynamic shortcuts for User class (user.is_admin? like methods). Default is: false
+ # Enable this feature _after_ running rake db:migrate as it relies on the roles table
+ # config.use_dynamic_shortcuts
end
\ No newline at end of file
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index 2ab3eb1..c6ae5d6 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,3 +1,3 @@
-# Be sure to restart your server when you modify this file.
-
-Rails.application.config.session_store :cookie_store, key: '_dmproadmap_session'
+# Be sure to restart your server when you modify this file.
+
+Rails.application.config.session_store :cookie_store, key: '_dmproadmap_session'
diff --git a/config/initializers/swagger.rb b/config/initializers/swagger.rb
index a9dfeaf..7a0eb95 100644
--- a/config/initializers/swagger.rb
+++ b/config/initializers/swagger.rb
@@ -1,16 +1,16 @@
-class Swagger::Docs::Config
- def self.transform_path(path, api_version)
- # Make a distiction between the APIs and the API documentation paths
- "apidocs/#{path}"
- end
-end
-
-Swagger::Docs::Config.register_apis({
- '0.0' => {
- controller_base_path: '',
- api_file_path: 'public/apidocs',
- base_path: 'http://localhost:3000',
- clean_directory: true,
- api_extention_type: :json
- }
-})
+class Swagger::Docs::Config
+ def self.transform_path(path, api_version)
+ # Make a distiction between the APIs and the API documentation paths
+ "apidocs/#{path}"
+ end
+end
+
+Swagger::Docs::Config.register_apis({
+ '0.0' => {
+ controller_base_path: '',
+ api_file_path: 'public/apidocs',
+ base_path: 'http://localhost:3000',
+ clean_directory: true,
+ api_extention_type: :json
+ }
+})
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
index 33725e9..466d360 100644
--- a/config/initializers/wrap_parameters.rb
+++ b/config/initializers/wrap_parameters.rb
@@ -1,14 +1,14 @@
-# Be sure to restart your server when you modify this file.
-
-# This file contains settings for ActionController::ParamsWrapper which
-# is enabled by default.
-
-# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
-ActiveSupport.on_load(:action_controller) do
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
-end
-
-# To enable root element in JSON for ActiveRecord objects.
-# ActiveSupport.on_load(:active_record) do
-# self.include_root_in_json = true
-# end
+# Be sure to restart your server when you modify this file.
+
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
+end
+
+# To enable root element in JSON for ActiveRecord objects.
+# ActiveSupport.on_load(:active_record) do
+# self.include_root_in_json = true
+# end
diff --git a/config/locales/bootstrap/de.bootstrap.yml b/config/locales/bootstrap/de.bootstrap.yml
index c176c40..00d724e 100644
--- a/config/locales/bootstrap/de.bootstrap.yml
+++ b/config/locales/bootstrap/de.bootstrap.yml
@@ -1,18 +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"
+# 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
index a2f4e3f..b19a32b 100644
--- a/config/locales/bootstrap/en-UK.bootstrap.yml
+++ b/config/locales/bootstrap/en-UK.bootstrap.yml
@@ -15,4 +15,4 @@
edit: "Edit"
save: "Save"
new: "New"
- delete: "Delete"
+ delete: "Delete"
\ No newline at end of file
diff --git a/config/locales/bootstrap/fr.bootstrap.yml b/config/locales/bootstrap/fr.bootstrap.yml
index 2e52bb1..b71db6a 100644
--- a/config/locales/bootstrap/fr.bootstrap.yml
+++ b/config/locales/bootstrap/fr.bootstrap.yml
@@ -1,17 +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"
-
+
+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/de.yml b/config/locales/de.yml
index ac52602..2090542 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -798,4 +798,4 @@
"
footer:
- terms_of_use: "Universität Kiel , Kiel, SH, Deutschland Nutzungsbedingungen
"
+ terms_of_use: "Universität Kiel , Kiel, SH, Deutschland Nutzungsbedingungen
"
\ No newline at end of file
diff --git a/config/locales/devise/devise.de.yml b/config/locales/devise/devise.de.yml
index c521c2f..72df6c7 100644
--- a/config/locales/devise/devise.de.yml
+++ b/config/locales/devise/devise.de.yml
@@ -1,78 +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:"
+# 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
index b19053b..e4e844f 100644
--- a/config/locales/devise/devise.en-UK.yml
+++ b/config/locales/devise/devise.en-UK.yml
@@ -1,59 +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:"
+# 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
index 87a03be..59c4f02 100644
--- a/config/locales/devise/devise.fr.yml
+++ b/config/locales/devise/devise.fr.yml
@@ -1,82 +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: "
+# 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
index 2f5e1a7..dccce7d 100644
--- a/config/locales/devise/devise_invitable.de.yml
+++ b/config/locales/devise/devise_invitable.de.yml
@@ -1,23 +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.
"
+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
index e268eb1..d0f4ebd 100644
--- a/config/locales/devise/devise_invitable.en-UK.yml
+++ b/config/locales/devise/devise_invitable.en-UK.yml
@@ -14,4 +14,4 @@
submit_button: "Set my password"
mailer:
invitation_instructions:
- subject: 'Invitation instructions'
+ subject: 'Invitation instructions'
\ No newline at end of file
diff --git a/config/locales/devise/devise_invitable.fr.yml b/config/locales/devise/devise_invitable.fr.yml
index aee1fd4..35272db 100644
--- a/config/locales/devise/devise_invitable.fr.yml
+++ b/config/locales/devise/devise_invitable.fr.yml
@@ -1,23 +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.
"
+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.yml b/config/locales/en-UK.yml
index ac22481..f423d90 100644
--- a/config/locales/en-UK.yml
+++ b/config/locales/en-UK.yml
@@ -42,6 +42,12 @@
screencast_error_text: "Your browser does not support the video tag."
admin:
+ language: "Language"
+ language_name: "Language name"
+ language_abbreviation: "Language abbreviation"
+ language_is_default: "Is default language"
+ yes: "Yes"
+ no: "No"
org_title: "Organisation name"
org: "Organisation"
orgs: "Organisations"
@@ -126,6 +132,8 @@
no_section: 'No section'
org_admin:
+ org_default_language: "Organisation language"
+ org_default_language_help_text: "Please select your default language from the dropdown list. This will be displayed to users in your organisation, unless they have a different preference or choose another language from the dropdown options on the homepage. If your language is not available and you wish to provide a translation, please contact us."
admin_area: "Admin area"
admin_details: "Admin Details"
template_label: "Templates"
@@ -321,6 +329,7 @@
contact_label: "Contact"
jisc: "The %{organisation_abbreviation} is funded by"
format: "format"
+ change_language: "Change language"
sign_in: "Sign in"
sign_out: "Sign out"
@@ -337,6 +346,7 @@
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."
+ user_details_language: "Language"
remember_me: "Remember me"
org_not_listed: "My organisation isn't listed."
@@ -924,4 +934,24 @@
org_not_funder: '{"Error":"Organisation specified is not a funder"}'
org_multiple_templates: '{"Error":"Organisation 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
+ bad_resource: '{"Error":"You do not have authorisation to view this resource"}'
+
+ magic_strings:
+ organisation_types:
+ funder: 'Funder'
+ organisation: 'Organisation'
+ project: 'Project'
+ institution: 'Institution'
+ research_institute: 'Research Institute'
+ template: 'Template'
+ managing_organisation: 'Digital Curation Center'
+ user_role_types:
+ super_admin: 'admin'
+ organisational_admin: 'org_admin'
+ user: 'user'
+ api_endpoint_types:
+ guidances: 'guidances'
+ plans: 'plans'
+ templates: 'templates'
+ statistics: 'statistics'
+ languages:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 0eb4e58..89f8880 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -784,4 +784,4 @@
-
En utilisant l'outil, vous comprenez et acceptez ces conditions.
"
+ En utilisant l'outil, vous comprenez et acceptez ces conditions.
"
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 5b9d30a..154efc8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,5 @@
Rails.application.routes.draw do
+
devise_for :users, :controllers => {:registrations => "registrations", :confirmations => 'confirmations', :passwords => 'passwords', :sessions => 'sessions', :omniauth_callbacks => 'users/omniauth_callbacks'} do
get "/users/sign_out", :to => "devise/sessions#destroy"
end
@@ -7,6 +8,11 @@
get 'auth/shibboleth' => 'users/omniauth_shibboleth_request#redirect', :as => 'user_omniauth_shibboleth'
get 'auth/shibboleth/assoc' => 'users/omniauth_shibboleth_request#associate', :as => 'user_shibboleth_assoc'
+ # fix for activeadmin signout bug
+ devise_scope :user do
+ get '/users/sign_out' => 'devise/sessions#destroy'
+ end
+
ActiveAdmin.routes(self)
#organisation admin area
@@ -177,8 +183,16 @@
namespace :api, defaults: {format: :json} do
namespace :v0 do
resources :guidance_groups, only: [:index, :show]
- resources :guidances, only: [:index, :show]
resources :plans, only: :create, controller: "projects", path: "plans"
+ resources :templates, only: :index, controller: "dmptemplates", path: "templates"
+ resource :statistics, only: [], controller: "statistics", path: "statistics" do
+ member do
+ get :users_joined
+ get :using_template
+ get :plans_by_template
+ get :plans
+ end
+ end
end
end
diff --git a/config/secrets_example.yml b/config/secrets_example.yml
index 4b578ea..ed59ff2 100644
--- a/config/secrets_example.yml
+++ b/config/secrets_example.yml
@@ -1,24 +1,24 @@
-# Be sure to restart your server when you modify this file.
-
-# Your secret key is used for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-# You can use `rake secret` to generate a secure secret key.
-
-# Make sure the secrets in this file are kept private
-# if you're sharing your code publicly.
-
-development:
- secret_key_base: SECRET_KEY_EXAMPLE
-
-test:
- secret_key_base: SECRET_KEY_EXAMPLE
-
-# Do not keep production secrets in the repository,
-# instead read values from the environment.
-production:
- secret_key_base: SECRET_KEY_EXAMPLE
-
- #<%= ENV["SECRET_KEY_BASE"] %>
+# Be sure to restart your server when you modify this file.
+
+# Your secret key is used for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+# You can use `rake secret` to generate a secure secret key.
+
+# Make sure the secrets in this file are kept private
+# if you're sharing your code publicly.
+
+development:
+ secret_key_base: SECRET_KEY_EXAMPLE
+
+test:
+ secret_key_base: SECRET_KEY_EXAMPLE
+
+# Do not keep production secrets in the repository,
+# instead read values from the environments.
+production:
+ secret_key_base: SECRET_KEY_EXAMPLE
+
+ #<%= ENV["SECRET_KEY_BASE"] %>
diff --git a/config/tinymce.yml b/config/tinymce.yml
index 9f24713..bc00326 100644
--- a/config/tinymce.yml
+++ b/config/tinymce.yml
@@ -1,19 +1,19 @@
-statusbar: false
-menubar: false
-toolbar: bold italic | bullist numlist | link | table
-plugins:
- - table
- #- autoresize
- - link
- - paste
-target_list: false
-autoresize_min_height: 130
-extended_valid_elements: "iframe[tooltip] , a[href|target=_blank]"
-extended_valid_elements: "a[href|target=_blank]"
-paste_auto_cleanup_on_paste : true
-paste_remove_styles: true
-paste_retain_style_properties: "none"
-paste_convert_middot_lists: true
-paste_remove_styles_if_webkit: true
-paste_remove_spans: true
+statusbar: false
+menubar: false
+toolbar: bold italic | bullist numlist | link | table
+plugins:
+ - table
+ #- autoresize
+ - link
+ - paste
+target_list: false
+autoresize_min_height: 130
+extended_valid_elements: "iframe[tooltip] , a[href|target=_blank]"
+extended_valid_elements: "a[href|target=_blank]"
+paste_auto_cleanup_on_paste : true
+paste_remove_styles: true
+paste_retain_style_properties: "none"
+paste_convert_middot_lists: true
+paste_remove_styles_if_webkit: true
+paste_remove_spans: true
paste_strip_class_attributes: "all"
\ No newline at end of file
diff --git a/db/migrate/20130603140800_create_phases.rb b/db/migrate/20130603140800_create_phases.rb
index fbef5d9..a632127 100644
--- a/db/migrate/20130603140800_create_phases.rb
+++ b/db/migrate/20130603140800_create_phases.rb
@@ -1,13 +1,13 @@
-class CreatePhases < ActiveRecord::Migration
- def change
- create_table :phases do |t|
- t.string :title
- t.text :description
- t.integer :number
- t.references :dmptemplate
-
- t.timestamps
- end
- add_index :phases, :dmptemplate_id
- end
-end
+class CreatePhases < ActiveRecord::Migration
+ def change
+ create_table :phases do |t|
+ t.string :title
+ t.text :description
+ t.integer :number
+ t.references :dmptemplate
+
+ t.timestamps
+ end
+ add_index :phases, :dmptemplate_id
+ end
+end
diff --git a/db/migrate/20130603143109_create_versions.rb b/db/migrate/20130603143109_create_versions.rb
index 4c10b60..4060565 100644
--- a/db/migrate/20130603143109_create_versions.rb
+++ b/db/migrate/20130603143109_create_versions.rb
@@ -1,14 +1,14 @@
-class CreateVersions < ActiveRecord::Migration
- def change
- create_table :versions do |t|
- t.string :title
- t.text :description
- t.integer :published
- t.integer :number
- t.references :phase
-
- t.timestamps
- end
- add_index :versions, :phase_id
- end
-end
+class CreateVersions < ActiveRecord::Migration
+ def change
+ create_table :versions do |t|
+ t.string :title
+ t.text :description
+ t.integer :published
+ t.integer :number
+ t.references :phase
+
+ t.timestamps
+ end
+ add_index :versions, :phase_id
+ end
+end
diff --git a/db/migrate/20130611111340_create_user_types.rb b/db/migrate/20130611111340_create_user_types.rb
index f21e4aa..c141064 100644
--- a/db/migrate/20130611111340_create_user_types.rb
+++ b/db/migrate/20130611111340_create_user_types.rb
@@ -1,10 +1,10 @@
-class CreateUserTypes < ActiveRecord::Migration
- def change
- create_table :user_types do |t|
- t.string :user_type_name
- t.text :user_type_desc
-
- t.timestamps
- end
- end
-end
+class CreateUserTypes < ActiveRecord::Migration
+ def change
+ create_table :user_types do |t|
+ t.string :user_type_name
+ t.text :user_type_desc
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611111359_create_user_statuses.rb b/db/migrate/20130611111359_create_user_statuses.rb
index ac4187d..9d91714 100644
--- a/db/migrate/20130611111359_create_user_statuses.rb
+++ b/db/migrate/20130611111359_create_user_statuses.rb
@@ -1,10 +1,10 @@
-class CreateUserStatuses < ActiveRecord::Migration
- def change
- create_table :user_statuses do |t|
- t.string :user_status_name
- t.text :user_status_desc
-
- t.timestamps
- end
- end
-end
+class CreateUserStatuses < ActiveRecord::Migration
+ def change
+ create_table :user_statuses do |t|
+ t.string :user_status_name
+ t.text :user_status_desc
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611113325_create_organisation_types.rb b/db/migrate/20130611113325_create_organisation_types.rb
index 50ba107..5badb82 100644
--- a/db/migrate/20130611113325_create_organisation_types.rb
+++ b/db/migrate/20130611113325_create_organisation_types.rb
@@ -1,10 +1,10 @@
-class CreateOrganisationTypes < ActiveRecord::Migration
- def change
- create_table :organisation_types do |t|
- t.string :org_type_name
- t.text :org_type_desc
-
- t.timestamps
- end
- end
-end
+class CreateOrganisationTypes < ActiveRecord::Migration
+ def change
+ create_table :organisation_types do |t|
+ t.string :org_type_name
+ t.text :org_type_desc
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611132258_create_user_role_types.rb b/db/migrate/20130611132258_create_user_role_types.rb
index 04a32be..450da04 100644
--- a/db/migrate/20130611132258_create_user_role_types.rb
+++ b/db/migrate/20130611132258_create_user_role_types.rb
@@ -1,10 +1,10 @@
-class CreateUserRoleTypes < ActiveRecord::Migration
- def change
- create_table :user_role_types do |t|
- t.string :user_role_type_name
- t.text :user_role_type_desc
-
- t.timestamps
- end
- end
-end
+class CreateUserRoleTypes < ActiveRecord::Migration
+ def change
+ create_table :user_role_types do |t|
+ t.string :user_role_type_name
+ t.text :user_role_type_desc
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611133033_create_questions.rb b/db/migrate/20130611133033_create_questions.rb
index 80d3e34..d5fab39 100644
--- a/db/migrate/20130611133033_create_questions.rb
+++ b/db/migrate/20130611133033_create_questions.rb
@@ -1,18 +1,18 @@
-class CreateQuestions < ActiveRecord::Migration
- def change
- create_table :questions do |t|
- t.text :question_text
- t.string :question_type
- t.text :question_default_value
- t.text :question_suggested_answer
- t.text :question_guidance
- t.integer :question_order
- t.integer :question_parent_id
- t.integer :question_dependency_id
- t.text :question_dependency_text
- t.integer :section_id
-
- t.timestamps
- end
- end
-end
+class CreateQuestions < ActiveRecord::Migration
+ def change
+ create_table :questions do |t|
+ t.text :question_text
+ t.string :question_type
+ t.text :question_default_value
+ t.text :question_suggested_answer
+ t.text :question_guidance
+ t.integer :question_order
+ t.integer :question_parent_id
+ t.integer :question_dependency_id
+ t.text :question_dependency_text
+ t.integer :section_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611135155_create_answers.rb b/db/migrate/20130611135155_create_answers.rb
index 91e5834..a2e5279 100644
--- a/db/migrate/20130611135155_create_answers.rb
+++ b/db/migrate/20130611135155_create_answers.rb
@@ -1,12 +1,12 @@
-class CreateAnswers < ActiveRecord::Migration
- def change
- create_table :answers do |t|
- t.text :answer_text
- t.integer :plan_id
- t.integer :user_id
- t.integer :question_id
-
- t.timestamps
- end
- end
-end
+class CreateAnswers < ActiveRecord::Migration
+ def change
+ create_table :answers do |t|
+ t.text :answer_text
+ t.integer :plan_id
+ t.integer :user_id
+ t.integer :question_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611135806_create_users.rb b/db/migrate/20130611135806_create_users.rb
index b43bb37..e09d671 100644
--- a/db/migrate/20130611135806_create_users.rb
+++ b/db/migrate/20130611135806_create_users.rb
@@ -1,18 +1,18 @@
-class CreateUsers < ActiveRecord::Migration
- def change
- create_table :users do |t|
- t.string :user_firstname
- t.string :user_surname
- t.string :user_email
- t.string :user_password
- t.string :user_orcid_id
- t.string :user_shibboleth_id
- t.integer :user_type_id
- t.integer :user_status_id
- t.integer :user_login_count
- t.datetime :user_last_login
-
- t.timestamps
- end
- end
-end
+class CreateUsers < ActiveRecord::Migration
+ def change
+ create_table :users do |t|
+ t.string :user_firstname
+ t.string :user_surname
+ t.string :user_email
+ t.string :user_password
+ t.string :user_orcid_id
+ t.string :user_shibboleth_id
+ t.integer :user_type_id
+ t.integer :user_status_id
+ t.integer :user_login_count
+ t.datetime :user_last_login
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611140229_create_pages.rb b/db/migrate/20130611140229_create_pages.rb
index 96fe274..6b7ef7b 100644
--- a/db/migrate/20130611140229_create_pages.rb
+++ b/db/migrate/20130611140229_create_pages.rb
@@ -1,17 +1,17 @@
-class CreatePages < ActiveRecord::Migration
- def change
- create_table :pages do |t|
- t.string :pag_title
- t.text :pag_body_text
- t.string :pag_slug
- t.integer :pag_menu
- t.integer :pag_menu_position
- t.string :pag_target_url
- t.string :pag_location
- t.boolean :pag_public
- t.integer :org_id
-
- t.timestamps
- end
- end
-end
+class CreatePages < ActiveRecord::Migration
+ def change
+ create_table :pages do |t|
+ t.string :pag_title
+ t.text :pag_body_text
+ t.string :pag_slug
+ t.integer :pag_menu
+ t.integer :pag_menu_position
+ t.string :pag_target_url
+ t.string :pag_location
+ t.boolean :pag_public
+ t.integer :org_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611141026_create_projects.rb b/db/migrate/20130611141026_create_projects.rb
index 68bec13..a3d5ba4 100644
--- a/db/migrate/20130611141026_create_projects.rb
+++ b/db/migrate/20130611141026_create_projects.rb
@@ -1,12 +1,12 @@
-class CreateProjects < ActiveRecord::Migration
- def change
- create_table :projects do |t|
- t.string :project_title
- t.text :project_note
- t.boolean :project_locked
- t.integer :dmptemplate_id
-
- t.timestamps
- end
- end
-end
+class CreateProjects < ActiveRecord::Migration
+ def change
+ create_table :projects do |t|
+ t.string :project_title
+ t.text :project_note
+ t.boolean :project_locked
+ t.integer :dmptemplate_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611151644_create_plans.rb b/db/migrate/20130611151644_create_plans.rb
index e6a22b9..83ea6e5 100644
--- a/db/migrate/20130611151644_create_plans.rb
+++ b/db/migrate/20130611151644_create_plans.rb
@@ -1,11 +1,11 @@
-class CreatePlans < ActiveRecord::Migration
- def change
- create_table :plans do |t|
- t.boolean :plan_locked
- t.integer :project_id
- t.integer :version_id
-
- t.timestamps
- end
- end
-end
+class CreatePlans < ActiveRecord::Migration
+ def change
+ create_table :plans do |t|
+ t.boolean :plan_locked
+ t.integer :project_id
+ t.integer :version_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611151704_create_plan_sections.rb b/db/migrate/20130611151704_create_plan_sections.rb
index dc6313d..1d1656c 100644
--- a/db/migrate/20130611151704_create_plan_sections.rb
+++ b/db/migrate/20130611151704_create_plan_sections.rb
@@ -1,13 +1,13 @@
-class CreatePlanSections < ActiveRecord::Migration
- def change
- create_table :plan_sections do |t|
- t.boolean :plan_section_edit
- t.datetime :plan_section_at
- t.integer :user_editing_id
- t.integer :section_id
- t.integer :plan_id
-
- t.timestamps
- end
- end
-end
+class CreatePlanSections < ActiveRecord::Migration
+ def change
+ create_table :plan_sections do |t|
+ t.boolean :plan_section_edit
+ t.datetime :plan_section_at
+ t.integer :user_editing_id
+ t.integer :section_id
+ t.integer :plan_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611151729_create_project_groups.rb b/db/migrate/20130611151729_create_project_groups.rb
index eeb02f4..6dc8d4d 100644
--- a/db/migrate/20130611151729_create_project_groups.rb
+++ b/db/migrate/20130611151729_create_project_groups.rb
@@ -1,12 +1,12 @@
-class CreateProjectGroups < ActiveRecord::Migration
- def change
- create_table :project_groups do |t|
- t.boolean :project_creator
- t.boolean :project_editor
- t.integer :user_id
- t.integer :project_id
-
- t.timestamps
- end
- end
-end
+class CreateProjectGroups < ActiveRecord::Migration
+ def change
+ create_table :project_groups do |t|
+ t.boolean :project_creator
+ t.boolean :project_editor
+ t.integer :user_id
+ t.integer :project_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611151750_create_project_partners.rb b/db/migrate/20130611151750_create_project_partners.rb
index 80b528b..2fbb5ec 100644
--- a/db/migrate/20130611151750_create_project_partners.rb
+++ b/db/migrate/20130611151750_create_project_partners.rb
@@ -1,11 +1,11 @@
-class CreateProjectPartners < ActiveRecord::Migration
- def change
- create_table :project_partners do |t|
- t.integer :org_id
- t.integer :project_id
- t.boolean :leader_org
-
- t.timestamps
- end
- end
-end
+class CreateProjectPartners < ActiveRecord::Migration
+ def change
+ create_table :project_partners do |t|
+ t.integer :org_id
+ t.integer :project_id
+ t.boolean :leader_org
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611152208_create_user_org_roles.rb b/db/migrate/20130611152208_create_user_org_roles.rb
index bb5c58c..6d76da7 100644
--- a/db/migrate/20130611152208_create_user_org_roles.rb
+++ b/db/migrate/20130611152208_create_user_org_roles.rb
@@ -1,11 +1,11 @@
-class CreateUserOrgRoles < ActiveRecord::Migration
- def change
- create_table :user_org_roles do |t|
- t.integer :user_id
- t.integer :org_id
- t.integer :user_role_type_id
-
- t.timestamps
- end
- end
-end
+class CreateUserOrgRoles < ActiveRecord::Migration
+ def change
+ create_table :user_org_roles do |t|
+ t.integer :user_id
+ t.integer :org_id
+ t.integer :user_role_type_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611153828_create_dmptemplates.rb b/db/migrate/20130611153828_create_dmptemplates.rb
index 4d9afde..0a777fd 100644
--- a/db/migrate/20130611153828_create_dmptemplates.rb
+++ b/db/migrate/20130611153828_create_dmptemplates.rb
@@ -1,13 +1,13 @@
-class CreateDmptemplates < ActiveRecord::Migration
- def change
- create_table :dmptemplates do |t|
- t.string :template_title
- t.text :template_desc
- t.boolean :template_published
- t.integer :user_id
- t.integer :org_id
-
- t.timestamps
- end
- end
-end
+class CreateDmptemplates < ActiveRecord::Migration
+ def change
+ create_table :dmptemplates do |t|
+ t.string :template_title
+ t.text :template_desc
+ t.boolean :template_published
+ t.integer :user_id
+ t.integer :org_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611153921_create_sections.rb b/db/migrate/20130611153921_create_sections.rb
index 0c79c5c..e09576a 100644
--- a/db/migrate/20130611153921_create_sections.rb
+++ b/db/migrate/20130611153921_create_sections.rb
@@ -1,13 +1,13 @@
-class CreateSections < ActiveRecord::Migration
- def change
- create_table :sections do |t|
- t.string :section_title
- t.text :section_desc
- t.integer :section_order
- t.integer :version_id
- t.integer :org_id
-
- t.timestamps
- end
- end
-end
+class CreateSections < ActiveRecord::Migration
+ def change
+ create_table :sections do |t|
+ t.string :section_title
+ t.text :section_desc
+ t.integer :section_order
+ t.integer :version_id
+ t.integer :org_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611154055_create_file_uploads.rb b/db/migrate/20130611154055_create_file_uploads.rb
index 5ad3fa1..47b662b 100644
--- a/db/migrate/20130611154055_create_file_uploads.rb
+++ b/db/migrate/20130611154055_create_file_uploads.rb
@@ -1,15 +1,15 @@
-class CreateFileUploads < ActiveRecord::Migration
- def change
- create_table :file_uploads do |t|
- t.string :file_upload_name
- t.string :file_upload_title
- t.text :file_upload_desc
- t.integer :file_upload_size
- t.boolean :file_upload_published
- t.string :file_upload_location
- t.integer :file_type_id
-
- t.timestamps
- end
- end
-end
+class CreateFileUploads < ActiveRecord::Migration
+ def change
+ create_table :file_uploads do |t|
+ t.string :file_upload_name
+ t.string :file_upload_title
+ t.text :file_upload_desc
+ t.integer :file_upload_size
+ t.boolean :file_upload_published
+ t.string :file_upload_location
+ t.integer :file_type_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130611154109_create_file_types.rb b/db/migrate/20130611154109_create_file_types.rb
index 8f9ff41..7856a7f 100644
--- a/db/migrate/20130611154109_create_file_types.rb
+++ b/db/migrate/20130611154109_create_file_types.rb
@@ -1,12 +1,12 @@
-class CreateFileTypes < ActiveRecord::Migration
- def change
- create_table :file_types do |t|
- t.string :file_type_name
- t.string :icon_name
- t.integer :icon_size
- t.string :icon_location
-
- t.timestamps
- end
- end
-end
+class CreateFileTypes < ActiveRecord::Migration
+ def change
+ create_table :file_types do |t|
+ t.string :file_type_name
+ t.string :icon_name
+ t.integer :icon_size
+ t.string :icon_location
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130612113321_create_organisations.rb b/db/migrate/20130612113321_create_organisations.rb
index 0f210b5..0b95dc5 100644
--- a/db/migrate/20130612113321_create_organisations.rb
+++ b/db/migrate/20130612113321_create_organisations.rb
@@ -1,18 +1,18 @@
-class CreateOrganisations < ActiveRecord::Migration
- def change
- create_table :organisations do |t|
- t.string :org_name
- t.string :org_abbre
- t.text :org_desc
- t.string :org_target_url
- t.integer :org_logo_file_id
- t.integer :org_banner_file_id
- t.integer :org_type_id
- t.string :org_domain
- t.integer :org_wayfless_entite
- t.integer :org_stylesheet_file_id
-
- t.timestamps
- end
- end
-end
+class CreateOrganisations < ActiveRecord::Migration
+ def change
+ create_table :organisations do |t|
+ t.string :org_name
+ t.string :org_abbre
+ t.text :org_desc
+ t.string :org_target_url
+ t.integer :org_logo_file_id
+ t.integer :org_banner_file_id
+ t.integer :org_type_id
+ t.string :org_domain
+ t.integer :org_wayfless_entite
+ t.integer :org_stylesheet_file_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130612133806_create_themes.rb b/db/migrate/20130612133806_create_themes.rb
index 75d71eb..0420e46 100644
--- a/db/migrate/20130612133806_create_themes.rb
+++ b/db/migrate/20130612133806_create_themes.rb
@@ -1,10 +1,10 @@
-class CreateThemes < ActiveRecord::Migration
- def change
- create_table :themes do |t|
- t.string :theme_title
- t.text :theme_desc
-
- t.timestamps
- end
- end
-end
+class CreateThemes < ActiveRecord::Migration
+ def change
+ create_table :themes do |t|
+ t.string :theme_title
+ t.text :theme_desc
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130612133938_create_guidances.rb b/db/migrate/20130612133938_create_guidances.rb
index 2739f61..7061529 100644
--- a/db/migrate/20130612133938_create_guidances.rb
+++ b/db/migrate/20130612133938_create_guidances.rb
@@ -1,12 +1,12 @@
-class CreateGuidances < ActiveRecord::Migration
- def change
- create_table :guidances do |t|
- t.text :guidance_text
- t.integer :guidance_file_id
- t.integer :org_id
- t.integer :theme_id
-
- t.timestamps
- end
- end
-end
+class CreateGuidances < ActiveRecord::Migration
+ def change
+ create_table :guidances do |t|
+ t.text :guidance_text
+ t.integer :guidance_file_id
+ t.integer :org_id
+ t.integer :theme_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130621101824_fix_column_names.rb b/db/migrate/20130621101824_fix_column_names.rb
index 986a3bb..bd88e97 100644
--- a/db/migrate/20130621101824_fix_column_names.rb
+++ b/db/migrate/20130621101824_fix_column_names.rb
@@ -1,117 +1,117 @@
-class FixColumnNames < ActiveRecord::Migration
- def change
- change_table :answers do |t|
- t.rename :answer_text, :text
- end
- change_table :dmptemplates do |t|
- t.rename :template_desc, :description
- t.rename :template_title, :title
- t.rename :template_published, :published
- t.rename :org_id, :organisation_id
- end
- change_table :plan_sections do |t|
- t.rename :plan_section_at, :at
- t.rename :plan_section_edit, :edit
- end
- change_table :file_types do |t|
- t.rename :file_type_name, :name
- end
- change_table :file_uploads do |t|
- t.rename :file_upload_desc, :description
- t.rename :file_upload_location, :location
- t.rename :file_upload_name, :name
- t.rename :file_upload_title, :title
- t.rename :file_upload_published, :published
- t.rename :file_upload_size, :size
- end
- change_table :guidances do |t|
- t.rename :guidance_file_id, :file_id
- t.rename :guidance_text, :text
- t.rename :org_id, :organisation_id
- end
- change_table :organisation_types do |t|
- t.rename :org_type_name, :name
- t.rename :org_type_desc, :description
- end
- change_table :organisations do |t|
- t.rename :org_abbre, :abbreviation
- t.rename :org_banner_file_id, :banner_file_id
- t.rename :org_domain, :domain
- t.rename :org_desc, :description
- t.rename :org_logo_file_id, :logo_file_id
- t.rename :org_stylesheet_file_id, :stylesheet_file_id
- t.rename :org_name, :name
- t.rename :org_target_url, :target_url
- t.rename :org_type_id, :organisation_type_id
- t.rename :org_wayfless_entite, :wayfless_entity
- end
- change_table :pages do |t|
- t.rename :org_id, :organisation_id
- t.rename :pag_body_text, :body_text
- t.rename :pag_location, :location
- t.rename :pag_menu, :menu
- t.rename :pag_menu_position, :menu_position
- t.rename :pag_public, :public
- t.rename :pag_slug, :slug
- t.rename :pag_target_url, :target_url
- t.rename :pag_title, :title
- end
- change_table :plans do |t|
- t.rename :plan_locked, :locked
- end
- change_table :projects do |t|
- t.rename :project_locked, :locked
- t.rename :project_note, :note
- t.rename :project_title, :title
- end
- change_table :project_partners do |t|
- t.rename :org_id, :organisation_id
- end
- change_table :questions do |t|
- t.rename :question_default_value, :default_value
- t.rename :question_dependency_id, :dependency_id
- t.rename :question_dependency_text, :dependency_text
- t.rename :question_guidance, :guidance
- t.rename :question_order, :number
- t.rename :question_parent_id, :parent_id
- t.rename :question_suggested_answer, :suggested_answer
- t.rename :question_text, :text
- t.rename :question_type, :type
- end
- change_table :sections do |t|
- t.rename :section_desc, :description
- t.rename :section_order, :number
- t.rename :section_title, :title
- t.rename :org_id, :organisation_id
- end
- change_table :themes do |t|
- t.rename :theme_desc, :description
- t.rename :theme_title, :title
- end
- change_table :user_org_roles do |t|
- t.rename :org_id, :organisation_id
- end
- change_table :user_role_types do |t|
- t.rename :user_role_type_desc, :description
- t.rename :user_role_type_name, :name
- end
- change_table :user_statuses do |t|
- t.rename :user_status_desc, :description
- t.rename :user_status_name, :name
- end
- change_table :user_types do |t|
- t.rename :user_type_desc, :description
- t.rename :user_type_name, :name
- end
- change_table :users do |t|
- t.rename :user_email, :email
- t.rename :user_firstname, :firstname
- t.rename :user_last_login, :last_login
- t.rename :user_login_count, :login_count
- t.rename :user_orcid_id, :orcid_id
- t.rename :user_password, :password
- t.rename :user_shibboleth_id, :shibboleth_id
- t.rename :user_surname, :surname
- end
- end
+class FixColumnNames < ActiveRecord::Migration
+ def change
+ change_table :answers do |t|
+ t.rename :answer_text, :text
+ end
+ change_table :dmptemplates do |t|
+ t.rename :template_desc, :description
+ t.rename :template_title, :title
+ t.rename :template_published, :published
+ t.rename :org_id, :organisation_id
+ end
+ change_table :plan_sections do |t|
+ t.rename :plan_section_at, :at
+ t.rename :plan_section_edit, :edit
+ end
+ change_table :file_types do |t|
+ t.rename :file_type_name, :name
+ end
+ change_table :file_uploads do |t|
+ t.rename :file_upload_desc, :description
+ t.rename :file_upload_location, :location
+ t.rename :file_upload_name, :name
+ t.rename :file_upload_title, :title
+ t.rename :file_upload_published, :published
+ t.rename :file_upload_size, :size
+ end
+ change_table :guidances do |t|
+ t.rename :guidance_file_id, :file_id
+ t.rename :guidance_text, :text
+ t.rename :org_id, :organisation_id
+ end
+ change_table :organisation_types do |t|
+ t.rename :org_type_name, :name
+ t.rename :org_type_desc, :description
+ end
+ change_table :organisations do |t|
+ t.rename :org_abbre, :abbreviation
+ t.rename :org_banner_file_id, :banner_file_id
+ t.rename :org_domain, :domain
+ t.rename :org_desc, :description
+ t.rename :org_logo_file_id, :logo_file_id
+ t.rename :org_stylesheet_file_id, :stylesheet_file_id
+ t.rename :org_name, :name
+ t.rename :org_target_url, :target_url
+ t.rename :org_type_id, :organisation_type_id
+ t.rename :org_wayfless_entite, :wayfless_entity
+ end
+ change_table :pages do |t|
+ t.rename :org_id, :organisation_id
+ t.rename :pag_body_text, :body_text
+ t.rename :pag_location, :location
+ t.rename :pag_menu, :menu
+ t.rename :pag_menu_position, :menu_position
+ t.rename :pag_public, :public
+ t.rename :pag_slug, :slug
+ t.rename :pag_target_url, :target_url
+ t.rename :pag_title, :title
+ end
+ change_table :plans do |t|
+ t.rename :plan_locked, :locked
+ end
+ change_table :projects do |t|
+ t.rename :project_locked, :locked
+ t.rename :project_note, :note
+ t.rename :project_title, :title
+ end
+ change_table :project_partners do |t|
+ t.rename :org_id, :organisation_id
+ end
+ change_table :questions do |t|
+ t.rename :question_default_value, :default_value
+ t.rename :question_dependency_id, :dependency_id
+ t.rename :question_dependency_text, :dependency_text
+ t.rename :question_guidance, :guidance
+ t.rename :question_order, :number
+ t.rename :question_parent_id, :parent_id
+ t.rename :question_suggested_answer, :suggested_answer
+ t.rename :question_text, :text
+ t.rename :question_type, :type
+ end
+ change_table :sections do |t|
+ t.rename :section_desc, :description
+ t.rename :section_order, :number
+ t.rename :section_title, :title
+ t.rename :org_id, :organisation_id
+ end
+ change_table :themes do |t|
+ t.rename :theme_desc, :description
+ t.rename :theme_title, :title
+ end
+ change_table :user_org_roles do |t|
+ t.rename :org_id, :organisation_id
+ end
+ change_table :user_role_types do |t|
+ t.rename :user_role_type_desc, :description
+ t.rename :user_role_type_name, :name
+ end
+ change_table :user_statuses do |t|
+ t.rename :user_status_desc, :description
+ t.rename :user_status_name, :name
+ end
+ change_table :user_types do |t|
+ t.rename :user_type_desc, :description
+ t.rename :user_type_name, :name
+ end
+ change_table :users do |t|
+ t.rename :user_email, :email
+ t.rename :user_firstname, :firstname
+ t.rename :user_last_login, :last_login
+ t.rename :user_login_count, :login_count
+ t.rename :user_orcid_id, :orcid_id
+ t.rename :user_password, :password
+ t.rename :user_shibboleth_id, :shibboleth_id
+ t.rename :user_surname, :surname
+ end
+ end
end
\ No newline at end of file
diff --git a/db/migrate/20130625125419_fix_question_theme_relation.rb b/db/migrate/20130625125419_fix_question_theme_relation.rb
index b1831cd..57b4d58 100644
--- a/db/migrate/20130625125419_fix_question_theme_relation.rb
+++ b/db/migrate/20130625125419_fix_question_theme_relation.rb
@@ -1,14 +1,14 @@
-class FixQuestionThemeRelation < ActiveRecord::Migration
- def self.up
- create_table :questions_themes, :id => false do |t|
- t.references :question, :null => false
- t.references :theme, :null => false
- end
-
- add_index :questions_themes, [:question_id, :theme_id]
- end
-
- def self.down
- drop_table :questions_themes
- end
-end
+class FixQuestionThemeRelation < ActiveRecord::Migration
+ def self.up
+ create_table :questions_themes, :id => false do |t|
+ t.references :question, :null => false
+ t.references :theme, :null => false
+ end
+
+ add_index :questions_themes, [:question_id, :theme_id]
+ end
+
+ def self.down
+ drop_table :questions_themes
+ end
+end
diff --git a/db/migrate/20130705113828_add_locale_to_themes.rb b/db/migrate/20130705113828_add_locale_to_themes.rb
index f8456ab..5d24d40 100644
--- a/db/migrate/20130705113828_add_locale_to_themes.rb
+++ b/db/migrate/20130705113828_add_locale_to_themes.rb
@@ -1,5 +1,5 @@
-class AddLocaleToThemes < ActiveRecord::Migration
- def change
- add_column :themes, :locale, :string
- end
-end
+class AddLocaleToThemes < ActiveRecord::Migration
+ def change
+ add_column :themes, :locale, :string
+ end
+end
diff --git a/db/migrate/20130705145146_update_type_column_in_questions.rb b/db/migrate/20130705145146_update_type_column_in_questions.rb
index 247af35..73d3e54 100644
--- a/db/migrate/20130705145146_update_type_column_in_questions.rb
+++ b/db/migrate/20130705145146_update_type_column_in_questions.rb
@@ -1,7 +1,7 @@
-class UpdateTypeColumnInQuestions < ActiveRecord::Migration
- def change
- change_table :questions do |t|
- t.rename :type, :question_type
- end
- end
-end
+class UpdateTypeColumnInQuestions < ActiveRecord::Migration
+ def change
+ change_table :questions do |t|
+ t.rename :type, :question_type
+ end
+ end
+end
diff --git a/db/migrate/20130705151214_add_locale_to_templates.rb b/db/migrate/20130705151214_add_locale_to_templates.rb
index e332c7c..7244aa3 100644
--- a/db/migrate/20130705151214_add_locale_to_templates.rb
+++ b/db/migrate/20130705151214_add_locale_to_templates.rb
@@ -1,5 +1,5 @@
-class AddLocaleToTemplates < ActiveRecord::Migration
- def change
- add_column :dmptemplates, :locale, :string
- end
-end
+class AddLocaleToTemplates < ActiveRecord::Migration
+ def change
+ add_column :dmptemplates, :locale, :string
+ end
+end
diff --git a/db/migrate/20130708092900_devise_create_admin_users.rb b/db/migrate/20130708092900_devise_create_admin_users.rb
index fec1f73..ac03c44 100644
--- a/db/migrate/20130708092900_devise_create_admin_users.rb
+++ b/db/migrate/20130708092900_devise_create_admin_users.rb
@@ -1,53 +1,53 @@
-class DeviseCreateAdminUsers < ActiveRecord::Migration
- def migrate(direction)
- super
- # Create a default user
-# briley - 2016-06-06 -- removed obsolete AdminUser creation. Model no longer exists in code base!
-# AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password') if direction == :up
- end
-
- def change
- create_table(:admin_users) do |t|
- ## Database authenticatable
- t.string :email, :null => false, :default => ""
- t.string :encrypted_password, :null => false, :default => ""
-
- ## Recoverable
- t.string :reset_password_token
- t.datetime :reset_password_sent_at
-
- ## Rememberable
- t.datetime :remember_created_at
-
- ## Trackable
- t.integer :sign_in_count, :default => 0
- t.datetime :current_sign_in_at
- t.datetime :last_sign_in_at
- t.string :current_sign_in_ip
- t.string :last_sign_in_ip
-
- ## Confirmable
- # t.string :confirmation_token
- # t.datetime :confirmed_at
- # t.datetime :confirmation_sent_at
- # t.string :unconfirmed_email # Only if using reconfirmable
-
- ## Lockable
- # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
- # t.string :unlock_token # Only if unlock strategy is :email or :both
- # t.datetime :locked_at
-
- ## Token authenticatable
- # t.string :authentication_token
-
-
- t.timestamps
- end
-
- add_index :admin_users, :email, :unique => true
- add_index :admin_users, :reset_password_token, :unique => true
- # add_index :admin_users, :confirmation_token, :unique => true
- # add_index :admin_users, :unlock_token, :unique => true
- # add_index :admin_users, :authentication_token, :unique => true
- end
-end
+class DeviseCreateAdminUsers < ActiveRecord::Migration
+ def migrate(direction)
+ super
+ # Create a default user
+# briley - 2016-06-06 -- removed obsolete AdminUser creation. Model no longer exists in code base!
+# AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password') if direction == :up
+ end
+
+ def change
+ create_table(:admin_users) do |t|
+ ## Database authenticatable
+ t.string :email, :null => false, :default => ""
+ t.string :encrypted_password, :null => false, :default => ""
+
+ ## Recoverable
+ t.string :reset_password_token
+ t.datetime :reset_password_sent_at
+
+ ## Rememberable
+ t.datetime :remember_created_at
+
+ ## Trackable
+ t.integer :sign_in_count, :default => 0
+ t.datetime :current_sign_in_at
+ t.datetime :last_sign_in_at
+ t.string :current_sign_in_ip
+ t.string :last_sign_in_ip
+
+ ## Confirmable
+ # t.string :confirmation_token
+ # t.datetime :confirmed_at
+ # t.datetime :confirmation_sent_at
+ # t.string :unconfirmed_email # Only if using reconfirmable
+
+ ## Lockable
+ # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
+ # t.datetime :locked_at
+
+ ## Token authenticatable
+ # t.string :authentication_token
+
+
+ t.timestamps
+ end
+
+ add_index :admin_users, :email, :unique => true
+ add_index :admin_users, :reset_password_token, :unique => true
+ # add_index :admin_users, :confirmation_token, :unique => true
+ # add_index :admin_users, :unlock_token, :unique => true
+ # add_index :admin_users, :authentication_token, :unique => true
+ end
+end
diff --git a/db/migrate/20130708092904_create_admin_notes.rb b/db/migrate/20130708092904_create_admin_notes.rb
deleted file mode 100644
index e106af3..0000000
--- a/db/migrate/20130708092904_create_admin_notes.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-class CreateAdminNotes < ActiveRecord::Migration
- def self.up
- create_table :admin_notes do |t|
- t.string :resource_id, :null => false
- t.string :resource_type, :null => false
- t.references :admin_user, :polymorphic => true
- t.text :body
- t.timestamps
- end
- add_index :admin_notes, [:resource_type, :resource_id]
- add_index :admin_notes, [:admin_user_type, :admin_user_id]
- end
-
- def self.down
- drop_table :admin_notes
- end
-end
diff --git a/db/migrate/20130708092905_move_admin_notes_to_comments.rb b/db/migrate/20130708092905_move_admin_notes_to_comments.rb
deleted file mode 100644
index cca4c8e..0000000
--- a/db/migrate/20130708092905_move_admin_notes_to_comments.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-class MoveAdminNotesToComments < ActiveRecord::Migration
- def self.up
- remove_index :admin_notes, [:admin_user_type, :admin_user_id]
- rename_table :admin_notes, :active_admin_comments
- rename_column :active_admin_comments, :admin_user_type, :author_type
- rename_column :active_admin_comments, :admin_user_id, :author_id
- add_column :active_admin_comments, :namespace, :string
- add_index :active_admin_comments, [:namespace]
- add_index :active_admin_comments, [:author_type, :author_id]
-
- # Update all the existing comments to the default namespace
- say "Updating any existing comments to the #{ActiveAdmin.application.default_namespace} namespace."
- comments_table_name = ActiveRecord::Migration.proper_table_name("active_admin_comments")
- execute "UPDATE #{comments_table_name} SET namespace='#{ActiveAdmin.application.default_namespace}'"
- end
-
- def self.down
- remove_index :active_admin_comments, :column => [:author_type, :author_id]
- remove_index :active_admin_comments, :column => [:namespace]
- remove_column :active_admin_comments, :namespace
- rename_column :active_admin_comments, :author_id, :admin_user_id
- rename_column :active_admin_comments, :author_type, :admin_user_type
- rename_table :active_admin_comments, :admin_notes
- add_index :admin_notes, [:admin_user_type, :admin_user_id]
- end
-end
diff --git a/db/migrate/20130717093801_add_slug_to_projects.rb b/db/migrate/20130717093801_add_slug_to_projects.rb
index 62284f7..31f2470 100644
--- a/db/migrate/20130717093801_add_slug_to_projects.rb
+++ b/db/migrate/20130717093801_add_slug_to_projects.rb
@@ -1,6 +1,6 @@
-class AddSlugToProjects < ActiveRecord::Migration
- def change
- add_column :projects, :slug, :string
- add_index :projects, :slug, unique: true
- end
-end
+class AddSlugToProjects < ActiveRecord::Migration
+ def change
+ add_column :projects, :slug, :string
+ add_index :projects, :slug, unique: true
+ end
+end
diff --git a/db/migrate/20130717093814_add_slug_to_phases.rb b/db/migrate/20130717093814_add_slug_to_phases.rb
index cd46865..d1f34e2 100644
--- a/db/migrate/20130717093814_add_slug_to_phases.rb
+++ b/db/migrate/20130717093814_add_slug_to_phases.rb
@@ -1,6 +1,6 @@
-class AddSlugToPhases < ActiveRecord::Migration
- def change
- add_column :phases, :slug, :string
- add_index :phases, :slug, unique: true
- end
-end
+class AddSlugToPhases < ActiveRecord::Migration
+ def change
+ add_column :phases, :slug, :string
+ add_index :phases, :slug, unique: true
+ end
+end
diff --git a/db/migrate/20130717115239_add_slug_to_plans.rb b/db/migrate/20130717115239_add_slug_to_plans.rb
index 0497464..79b2465 100644
--- a/db/migrate/20130717115239_add_slug_to_plans.rb
+++ b/db/migrate/20130717115239_add_slug_to_plans.rb
@@ -1,6 +1,6 @@
-class AddSlugToPlans < ActiveRecord::Migration
- def change
- add_column :plans, :slug, :string
- add_index :plans, :slug, unique: true
- end
-end
+class AddSlugToPlans < ActiveRecord::Migration
+ def change
+ add_column :plans, :slug, :string
+ add_index :plans, :slug, unique: true
+ end
+end
diff --git a/db/migrate/20130717125231_create_options.rb b/db/migrate/20130717125231_create_options.rb
index 1c17b8f..faf9ff3 100644
--- a/db/migrate/20130717125231_create_options.rb
+++ b/db/migrate/20130717125231_create_options.rb
@@ -1,12 +1,12 @@
-class CreateOptions < ActiveRecord::Migration
- def change
- create_table :options do |t|
- t.references :question
- t.string :text
- t.integer :number
- t.boolean :is_default
-
- t.timestamps
- end
- end
-end
+class CreateOptions < ActiveRecord::Migration
+ def change
+ create_table :options do |t|
+ t.references :question
+ t.string :text
+ t.integer :number
+ t.boolean :is_default
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130717125748_add_multiple_choice_and_multiple_permitted_and_is_expanded_to_questions.rb b/db/migrate/20130717125748_add_multiple_choice_and_multiple_permitted_and_is_expanded_to_questions.rb
index 95779c3..84713f5 100644
--- a/db/migrate/20130717125748_add_multiple_choice_and_multiple_permitted_and_is_expanded_to_questions.rb
+++ b/db/migrate/20130717125748_add_multiple_choice_and_multiple_permitted_and_is_expanded_to_questions.rb
@@ -1,7 +1,7 @@
-class AddMultipleChoiceAndMultiplePermittedAndIsExpandedToQuestions < ActiveRecord::Migration
- def change
- add_column :questions, :multiple_choice, :boolean
- add_column :questions, :multiple_permitted, :boolean
- add_column :questions, :is_expanded, :boolean
- end
-end
+class AddMultipleChoiceAndMultiplePermittedAndIsExpandedToQuestions < ActiveRecord::Migration
+ def change
+ add_column :questions, :multiple_choice, :boolean
+ add_column :questions, :multiple_permitted, :boolean
+ add_column :questions, :is_expanded, :boolean
+ end
+end
diff --git a/db/migrate/20130717130107_add_answer_options_relation.rb b/db/migrate/20130717130107_add_answer_options_relation.rb
index 3d25e0a..000870d 100644
--- a/db/migrate/20130717130107_add_answer_options_relation.rb
+++ b/db/migrate/20130717130107_add_answer_options_relation.rb
@@ -1,14 +1,14 @@
-class AddAnswerOptionsRelation < ActiveRecord::Migration
- def up
- create_table :answers_options, :id => false do |t|
- t.references :answer, :null => false
- t.references :option, :null => false
- end
-
- add_index :answers_options, [:answer_id, :option_id]
- end
-
- def down
- drop_table :answers_options
- end
-end
+class AddAnswerOptionsRelation < ActiveRecord::Migration
+ def up
+ create_table :answers_options, :id => false do |t|
+ t.references :answer, :null => false
+ t.references :option, :null => false
+ end
+
+ add_index :answers_options, [:answer_id, :option_id]
+ end
+
+ def down
+ drop_table :answers_options
+ end
+end
diff --git a/db/migrate/20130724112909_add_devise_to_users.rb b/db/migrate/20130724112909_add_devise_to_users.rb
index 9de098b..649084a 100644
--- a/db/migrate/20130724112909_add_devise_to_users.rb
+++ b/db/migrate/20130724112909_add_devise_to_users.rb
@@ -1,53 +1,53 @@
-class AddDeviseToUsers < ActiveRecord::Migration
- def self.up
- change_table(:users) do |t|
- ## Database authenticatable
- t.change :email, :string, :null => false, :default => ""
- t.string :encrypted_password, :null => false, :default => ""
-
- ## Recoverable
- t.string :reset_password_token
- t.datetime :reset_password_sent_at
-
- ## Rememberable
- t.datetime :remember_created_at
-
- ## Trackable
- t.integer :sign_in_count, :default => 0
- t.datetime :current_sign_in_at
- t.datetime :last_sign_in_at
- t.string :current_sign_in_ip
- t.string :last_sign_in_ip
-
- ## Confirmable
- # t.string :confirmation_token
- # t.datetime :confirmed_at
- # t.datetime :confirmation_sent_at
- # t.string :unconfirmed_email # Only if using reconfirmable
-
- ## Lockable
- # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
- # t.string :unlock_token # Only if unlock strategy is :email or :both
- # t.datetime :locked_at
-
- ## Token authenticatable
- # t.string :authentication_token
-
-
- # Uncomment below if timestamps were not included in your original model.
- # t.timestamps
- end
-
- add_index :users, :email, :unique => true
- add_index :users, :reset_password_token, :unique => true
- # add_index :users, :confirmation_token, :unique => true
- # add_index :users, :unlock_token, :unique => true
- # add_index :users, :authentication_token, :unique => true
- end
-
- def self.down
- # By default, we don't want to make any assumption about how to roll back a migration when your
- # model already existed. Please edit below which fields you would like to remove in this migration.
- raise ActiveRecord::IrreversibleMigration
- end
-end
+class AddDeviseToUsers < ActiveRecord::Migration
+ def self.up
+ change_table(:users) do |t|
+ ## Database authenticatable
+ t.change :email, :string, :null => false, :default => ""
+ t.string :encrypted_password, :null => false, :default => ""
+
+ ## Recoverable
+ t.string :reset_password_token
+ t.datetime :reset_password_sent_at
+
+ ## Rememberable
+ t.datetime :remember_created_at
+
+ ## Trackable
+ t.integer :sign_in_count, :default => 0
+ t.datetime :current_sign_in_at
+ t.datetime :last_sign_in_at
+ t.string :current_sign_in_ip
+ t.string :last_sign_in_ip
+
+ ## Confirmable
+ # t.string :confirmation_token
+ # t.datetime :confirmed_at
+ # t.datetime :confirmation_sent_at
+ # t.string :unconfirmed_email # Only if using reconfirmable
+
+ ## Lockable
+ # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
+ # t.datetime :locked_at
+
+ ## Token authenticatable
+ # t.string :authentication_token
+
+
+ # Uncomment below if timestamps were not included in your original model.
+ # t.timestamps
+ end
+
+ add_index :users, :email, :unique => true
+ add_index :users, :reset_password_token, :unique => true
+ # add_index :users, :confirmation_token, :unique => true
+ # add_index :users, :unlock_token, :unique => true
+ # add_index :users, :authentication_token, :unique => true
+ end
+
+ def self.down
+ # By default, we don't want to make any assumption about how to roll back a migration when your
+ # model already existed. Please edit below which fields you would like to remove in this migration.
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20130724123043_rolify_create_roles.rb b/db/migrate/20130724123043_rolify_create_roles.rb
index 999c94a..2c53acd 100644
--- a/db/migrate/20130724123043_rolify_create_roles.rb
+++ b/db/migrate/20130724123043_rolify_create_roles.rb
@@ -1,19 +1,19 @@
-class RolifyCreateRoles < ActiveRecord::Migration
- def change
- create_table(:roles) do |t|
- t.string :name
- t.references :resource, :polymorphic => true
-
- t.timestamps
- end
-
- create_table(:users_roles, :id => false) do |t|
- t.references :user
- t.references :role
- end
-
- add_index(:roles, :name)
- add_index(:roles, [ :name, :resource_type, :resource_id ])
- add_index(:users_roles, [ :user_id, :role_id ])
- end
-end
+class RolifyCreateRoles < ActiveRecord::Migration
+ def change
+ create_table(:roles) do |t|
+ t.string :name
+ t.references :resource, :polymorphic => true
+
+ t.timestamps
+ end
+
+ create_table(:users_roles, :id => false) do |t|
+ t.references :user
+ t.references :role
+ end
+
+ add_index(:roles, :name)
+ add_index(:roles, [ :name, :resource_type, :resource_id ])
+ add_index(:users_roles, [ :user_id, :role_id ])
+ end
+end
diff --git a/db/migrate/20130730102219_change_plan_section_columns.rb b/db/migrate/20130730102219_change_plan_section_columns.rb
index 69a2435..514ec8c 100644
--- a/db/migrate/20130730102219_change_plan_section_columns.rb
+++ b/db/migrate/20130730102219_change_plan_section_columns.rb
@@ -1,13 +1,13 @@
-class ChangePlanSectionColumns < ActiveRecord::Migration
- def up
- rename_column :plan_sections, :edit, :locked
- rename_column :plan_sections, :user_editing_id, :user_id
- remove_column :plan_sections, :at
- end
-
- def down
- rename_column :plan_sections, :locked, :edit
- rename_column :plan_sections, :user_id, :user_editing_id
- add_column :plan_sections, :at
- end
-end
+class ChangePlanSectionColumns < ActiveRecord::Migration
+ def up
+ rename_column :plan_sections, :edit, :locked
+ rename_column :plan_sections, :user_editing_id, :user_id
+ remove_column :plan_sections, :at
+ end
+
+ def down
+ rename_column :plan_sections, :locked, :edit
+ rename_column :plan_sections, :user_id, :user_editing_id
+ add_column :plan_sections, :at
+ end
+end
diff --git a/db/migrate/20130731124011_add_organisation_to_project.rb b/db/migrate/20130731124011_add_organisation_to_project.rb
index 4176783..b564465 100644
--- a/db/migrate/20130731124011_add_organisation_to_project.rb
+++ b/db/migrate/20130731124011_add_organisation_to_project.rb
@@ -1,5 +1,5 @@
-class AddOrganisationToProject < ActiveRecord::Migration
- def change
- add_column :projects, :organisation_id, :integer
- end
-end
+class AddOrganisationToProject < ActiveRecord::Migration
+ def change
+ add_column :projects, :organisation_id, :integer
+ end
+end
diff --git a/db/migrate/20130731124532_add_parent_to_organisation.rb b/db/migrate/20130731124532_add_parent_to_organisation.rb
index 8b35c85..a3ee9a6 100644
--- a/db/migrate/20130731124532_add_parent_to_organisation.rb
+++ b/db/migrate/20130731124532_add_parent_to_organisation.rb
@@ -1,5 +1,5 @@
-class AddParentToOrganisation < ActiveRecord::Migration
- def change
- add_column :organisations, :parent_id, :integer
- end
-end
+class AddParentToOrganisation < ActiveRecord::Migration
+ def change
+ add_column :organisations, :parent_id, :integer
+ end
+end
diff --git a/db/migrate/20130731130811_update_guidance_columns.rb b/db/migrate/20130731130811_update_guidance_columns.rb
index 028a8a7..b3a1051 100644
--- a/db/migrate/20130731130811_update_guidance_columns.rb
+++ b/db/migrate/20130731130811_update_guidance_columns.rb
@@ -1,9 +1,9 @@
-class UpdateGuidanceColumns < ActiveRecord::Migration
- def up
- rename_column :guidances, :organisation_id, :guidance_group_id
- end
-
- def down
- rename_column :guidances, :guidance_group_id, :organisation_id
- end
-end
+class UpdateGuidanceColumns < ActiveRecord::Migration
+ def up
+ rename_column :guidances, :organisation_id, :guidance_group_id
+ end
+
+ def down
+ rename_column :guidances, :guidance_group_id, :organisation_id
+ end
+end
diff --git a/db/migrate/20130731131354_create_guidance_groups.rb b/db/migrate/20130731131354_create_guidance_groups.rb
index e533708..4b7e4c6 100644
--- a/db/migrate/20130731131354_create_guidance_groups.rb
+++ b/db/migrate/20130731131354_create_guidance_groups.rb
@@ -1,10 +1,10 @@
-class CreateGuidanceGroups < ActiveRecord::Migration
- def change
- create_table :guidance_groups do |t|
- t.string :name
- t.references :organisation
-
- t.timestamps
- end
- end
-end
+class CreateGuidanceGroups < ActiveRecord::Migration
+ def change
+ create_table :guidance_groups do |t|
+ t.string :name
+ t.references :organisation
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130731131846_drop_project_partners.rb b/db/migrate/20130731131846_drop_project_partners.rb
index 94cd705..62232d1 100644
--- a/db/migrate/20130731131846_drop_project_partners.rb
+++ b/db/migrate/20130731131846_drop_project_partners.rb
@@ -1,15 +1,15 @@
-class DropProjectPartners < ActiveRecord::Migration
- def up
- drop_table :project_partners
- end
-
- def down
- create_table :project_partners do |t|
- t.integer :organisation_id
- t.integer :project_id
- t.boolean :leader_org
-
- t.timestamps
- end
- end
-end
+class DropProjectPartners < ActiveRecord::Migration
+ def up
+ drop_table :project_partners
+ end
+
+ def down
+ create_table :project_partners do |t|
+ t.integer :organisation_id
+ t.integer :project_id
+ t.boolean :leader_org
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130731132153_link_guidance_to_guidance_groups.rb b/db/migrate/20130731132153_link_guidance_to_guidance_groups.rb
index ec45005..a8ed6ee 100644
--- a/db/migrate/20130731132153_link_guidance_to_guidance_groups.rb
+++ b/db/migrate/20130731132153_link_guidance_to_guidance_groups.rb
@@ -1,14 +1,14 @@
-class LinkGuidanceToGuidanceGroups < ActiveRecord::Migration
- def self.up
- create_table :guidance_in_group, :id => false do |t|
- t.references :guidance, :null => false
- t.references :guidance_group, :null => false
- end
-
- add_index :guidance_in_group, [:guidance_id, :guidance_group_id]
- end
-
- def self.down
- drop_table :guidance_in_group
- end
-end
+class LinkGuidanceToGuidanceGroups < ActiveRecord::Migration
+ def self.up
+ create_table :guidance_in_group, :id => false do |t|
+ t.references :guidance, :null => false
+ t.references :guidance_group, :null => false
+ end
+
+ add_index :guidance_in_group, [:guidance_id, :guidance_group_id]
+ end
+
+ def self.down
+ drop_table :guidance_in_group
+ end
+end
diff --git a/db/migrate/20130731133039_link_guidance_groups_to_projects.rb b/db/migrate/20130731133039_link_guidance_groups_to_projects.rb
index 3a3243e..ff35db8 100644
--- a/db/migrate/20130731133039_link_guidance_groups_to_projects.rb
+++ b/db/migrate/20130731133039_link_guidance_groups_to_projects.rb
@@ -1,14 +1,14 @@
-class LinkGuidanceGroupsToProjects < ActiveRecord::Migration
- def self.up
- create_table :project_guidance, :id => false do |t|
- t.references :project, :null => false
- t.references :guidance_group, :null => false
- end
-
- add_index :project_guidance, [:project_id, :guidance_group_id]
- end
-
- def self.down
- drop_table :project_guidance
- end
-end
+class LinkGuidanceGroupsToProjects < ActiveRecord::Migration
+ def self.up
+ create_table :project_guidance, :id => false do |t|
+ t.references :project, :null => false
+ t.references :guidance_group, :null => false
+ end
+
+ add_index :project_guidance, [:project_id, :guidance_group_id]
+ end
+
+ def self.down
+ drop_table :project_guidance
+ end
+end
diff --git a/db/migrate/20130812100100_add_release_time_to_plan_section.rb b/db/migrate/20130812100100_add_release_time_to_plan_section.rb
index 9ed032b..2683d86 100644
--- a/db/migrate/20130812100100_add_release_time_to_plan_section.rb
+++ b/db/migrate/20130812100100_add_release_time_to_plan_section.rb
@@ -1,11 +1,11 @@
-class AddReleaseTimeToPlanSection < ActiveRecord::Migration
- def up
- remove_column :plan_sections, :locked
- add_column :plan_sections, :release_time, :datetime
- end
-
- def down
- add_column :plan_sections, :locked, :boolean
- remove_column :plan_sections, :release_time
- end
-end
+class AddReleaseTimeToPlanSection < ActiveRecord::Migration
+ def up
+ remove_column :plan_sections, :locked
+ add_column :plan_sections, :release_time, :datetime
+ end
+
+ def down
+ add_column :plan_sections, :locked, :boolean
+ remove_column :plan_sections, :release_time
+ end
+end
diff --git a/db/migrate/20130902141025_add_is_default_to_dmptemplate.rb b/db/migrate/20130902141025_add_is_default_to_dmptemplate.rb
index c1c6bf0..d4a958f 100644
--- a/db/migrate/20130902141025_add_is_default_to_dmptemplate.rb
+++ b/db/migrate/20130902141025_add_is_default_to_dmptemplate.rb
@@ -1,5 +1,5 @@
-class AddIsDefaultToDmptemplate < ActiveRecord::Migration
- def change
- add_column :dmptemplates, :is_default, :boolean
- end
-end
+class AddIsDefaultToDmptemplate < ActiveRecord::Migration
+ def change
+ add_column :dmptemplates, :is_default, :boolean
+ end
+end
diff --git a/db/migrate/20130902141150_add_grant_number_to_project.rb b/db/migrate/20130902141150_add_grant_number_to_project.rb
index 457e809..9bdb50d 100644
--- a/db/migrate/20130902141150_add_grant_number_to_project.rb
+++ b/db/migrate/20130902141150_add_grant_number_to_project.rb
@@ -1,5 +1,5 @@
-class AddGrantNumberToProject < ActiveRecord::Migration
- def change
- add_column :projects, :grant_number, :string
- end
-end
+class AddGrantNumberToProject < ActiveRecord::Migration
+ def change
+ add_column :projects, :grant_number, :string
+ end
+end
diff --git a/db/migrate/20130902142403_add_organisation_id_to_user.rb b/db/migrate/20130902142403_add_organisation_id_to_user.rb
index 2f6153e..5fbb6b8 100644
--- a/db/migrate/20130902142403_add_organisation_id_to_user.rb
+++ b/db/migrate/20130902142403_add_organisation_id_to_user.rb
@@ -1,5 +1,5 @@
-class AddOrganisationIdToUser < ActiveRecord::Migration
- def change
- add_column :users, :organisation_id, :integer
- end
-end
+class AddOrganisationIdToUser < ActiveRecord::Migration
+ def change
+ add_column :users, :organisation_id, :integer
+ end
+end
diff --git a/db/migrate/20130903072531_remove_organisation_id_from_user.rb b/db/migrate/20130903072531_remove_organisation_id_from_user.rb
index dc832b7..ada85b3 100644
--- a/db/migrate/20130903072531_remove_organisation_id_from_user.rb
+++ b/db/migrate/20130903072531_remove_organisation_id_from_user.rb
@@ -1,9 +1,9 @@
-class RemoveOrganisationIdFromUser < ActiveRecord::Migration
- def up
- remove_column :users, :organisation_id
- end
-
- def down
- add_column :users, :organisation_id, :integer
- end
-end
+class RemoveOrganisationIdFromUser < ActiveRecord::Migration
+ def up
+ remove_column :users, :organisation_id
+ end
+
+ def down
+ add_column :users, :organisation_id, :integer
+ end
+end
diff --git a/db/migrate/20130903084409_create_option_warnings.rb b/db/migrate/20130903084409_create_option_warnings.rb
index ed08e05..295f31c 100644
--- a/db/migrate/20130903084409_create_option_warnings.rb
+++ b/db/migrate/20130903084409_create_option_warnings.rb
@@ -1,10 +1,10 @@
-class CreateOptionWarnings < ActiveRecord::Migration
- def change
- create_table :option_warnings do |t|
- t.references :organisation
- t.references :option
- t.text :text
- t.timestamps
- end
- end
-end
+class CreateOptionWarnings < ActiveRecord::Migration
+ def change
+ create_table :option_warnings do |t|
+ t.references :organisation
+ t.references :option
+ t.text :text
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20130903123015_create_friendly_id_slugs.rb b/db/migrate/20130903123015_create_friendly_id_slugs.rb
index c92a34b..d8577c3 100644
--- a/db/migrate/20130903123015_create_friendly_id_slugs.rb
+++ b/db/migrate/20130903123015_create_friendly_id_slugs.rb
@@ -8,7 +8,7 @@
t.datetime :created_at
end
add_index :friendly_id_slugs, :sluggable_id
- add_index :friendly_id_slugs, [:slug, :sluggable_type], :unique => true, :length => {:slug => 191, :sluggable_type => 40}
+ add_index :friendly_id_slugs, [:slug, :sluggable_type], :unique => true
add_index :friendly_id_slugs, :sluggable_type
end
diff --git a/db/migrate/20130905073232_remove_slug_from_plans.rb b/db/migrate/20130905073232_remove_slug_from_plans.rb
index c79437a..a06bdee 100644
--- a/db/migrate/20130905073232_remove_slug_from_plans.rb
+++ b/db/migrate/20130905073232_remove_slug_from_plans.rb
@@ -1,9 +1,9 @@
-class RemoveSlugFromPlans < ActiveRecord::Migration
- def up
- remove_column :plans, :slug
- end
-
- def down
- add_column :plans, :slug, :string
- end
-end
+class RemoveSlugFromPlans < ActiveRecord::Migration
+ def up
+ remove_column :plans, :slug
+ end
+
+ def down
+ add_column :plans, :slug, :string
+ end
+end
diff --git a/db/migrate/20130913134657_add_fields_to_projects.rb b/db/migrate/20130913134657_add_fields_to_projects.rb
index 9e0e41a..12f3c5a 100644
--- a/db/migrate/20130913134657_add_fields_to_projects.rb
+++ b/db/migrate/20130913134657_add_fields_to_projects.rb
@@ -1,9 +1,9 @@
-class AddFieldsToProjects < ActiveRecord::Migration
- def change
- add_column :projects, :identifier, :string
- add_column :projects, :description, :string
- add_column :projects, :principal_investigator, :string
- add_column :projects, :principal_investigator_identifier, :string
- add_column :projects, :data_contact, :string
- end
-end
+class AddFieldsToProjects < ActiveRecord::Migration
+ def change
+ add_column :projects, :identifier, :string
+ add_column :projects, :description, :string
+ add_column :projects, :principal_investigator, :string
+ add_column :projects, :principal_investigator_identifier, :string
+ add_column :projects, :data_contact, :string
+ end
+end
diff --git a/db/migrate/20130913161023_add_external_guidance_url_to_phases.rb b/db/migrate/20130913161023_add_external_guidance_url_to_phases.rb
index d514f02..5cd7e47 100644
--- a/db/migrate/20130913161023_add_external_guidance_url_to_phases.rb
+++ b/db/migrate/20130913161023_add_external_guidance_url_to_phases.rb
@@ -1,5 +1,5 @@
-class AddExternalGuidanceUrlToPhases < ActiveRecord::Migration
- def change
- add_column :phases, :external_guidance_url, :string
- end
-end
+class AddExternalGuidanceUrlToPhases < ActiveRecord::Migration
+ def change
+ add_column :phases, :external_guidance_url, :string
+ end
+end
diff --git a/db/migrate/20130918130838_add_confirmable_to_users.rb b/db/migrate/20130918130838_add_confirmable_to_users.rb
index e9bed48..9daa516 100644
--- a/db/migrate/20130918130838_add_confirmable_to_users.rb
+++ b/db/migrate/20130918130838_add_confirmable_to_users.rb
@@ -1,15 +1,15 @@
-class AddConfirmableToUsers < ActiveRecord::Migration
-
- def self.up
- add_column :users, :confirmation_token, :string
- add_column :users, :confirmed_at, :datetime
- add_column :users, :confirmation_sent_at, :datetime
- add_index :users, :confirmation_token, :unique => true
- User.update_all(:confirmed_at => Time.now)
- end
-
- def self.down
- remove_column :users, :confirmation_token, :confirmed_at, :confirmation_sent_at
- end
-
-end
+class AddConfirmableToUsers < ActiveRecord::Migration
+
+ def self.up
+ add_column :users, :confirmation_token, :string
+ add_column :users, :confirmed_at, :datetime
+ add_column :users, :confirmation_sent_at, :datetime
+ add_index :users, :confirmation_token, :unique => true
+ User.update_all(:confirmed_at => Time.now)
+ end
+
+ def self.down
+ remove_column :users, :confirmation_token, :confirmed_at, :confirmation_sent_at
+ end
+
+end
diff --git a/db/migrate/20130918154825_devise_invitable_add_to_users.rb b/db/migrate/20130918154825_devise_invitable_add_to_users.rb
index 3bc7f92..622b691 100644
--- a/db/migrate/20130918154825_devise_invitable_add_to_users.rb
+++ b/db/migrate/20130918154825_devise_invitable_add_to_users.rb
@@ -1,24 +1,24 @@
-class DeviseInvitableAddToUsers < ActiveRecord::Migration
- def up
- change_table :users do |t|
- t.string :invitation_token
- t.datetime :invitation_created_at
- t.datetime :invitation_sent_at
- t.datetime :invitation_accepted_at
- t.integer :invitation_limit
- t.references :invited_by, :polymorphic => true
- t.index :invitation_token, :unique => true # for invitable
- t.index :invited_by_id
- end
-
- # And allow null encrypted_password and password_salt:
- change_column_null :users, :encrypted_password, true
- end
-
- def down
- change_table :users do |t|
- t.remove_references :invited_by, :polymorphic => true
- t.remove :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token
- end
- end
-end
+class DeviseInvitableAddToUsers < ActiveRecord::Migration
+ def up
+ change_table :users do |t|
+ t.string :invitation_token
+ t.datetime :invitation_created_at
+ t.datetime :invitation_sent_at
+ t.datetime :invitation_accepted_at
+ t.integer :invitation_limit
+ t.references :invited_by, :polymorphic => true
+ t.index :invitation_token, :unique => true # for invitable
+ t.index :invited_by_id
+ end
+
+ # And allow null encrypted_password and password_salt:
+ change_column_null :users, :encrypted_password, true
+ end
+
+ def down
+ change_table :users do |t|
+ t.remove_references :invited_by, :polymorphic => true
+ t.remove :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token
+ end
+ end
+end
diff --git a/db/migrate/20130926121718_add_project_administrator_to_project_groups.rb b/db/migrate/20130926121718_add_project_administrator_to_project_groups.rb
index 5166e47..be49054 100644
--- a/db/migrate/20130926121718_add_project_administrator_to_project_groups.rb
+++ b/db/migrate/20130926121718_add_project_administrator_to_project_groups.rb
@@ -1,5 +1,5 @@
-class AddProjectAdministratorToProjectGroups < ActiveRecord::Migration
- def change
- add_column :project_groups, :project_administrator, :boolean
- end
-end
+class AddProjectAdministratorToProjectGroups < ActiveRecord::Migration
+ def change
+ add_column :project_groups, :project_administrator, :boolean
+ end
+end
diff --git a/db/migrate/20130927091932_add_other_organisation_to_users.rb b/db/migrate/20130927091932_add_other_organisation_to_users.rb
index b369a33..d8d0400 100644
--- a/db/migrate/20130927091932_add_other_organisation_to_users.rb
+++ b/db/migrate/20130927091932_add_other_organisation_to_users.rb
@@ -1,5 +1,5 @@
-class AddOtherOrganisationToUsers < ActiveRecord::Migration
- def change
- add_column :users, :other_organisation, :string
- end
-end
+class AddOtherOrganisationToUsers < ActiveRecord::Migration
+ def change
+ add_column :users, :other_organisation, :string
+ end
+end
diff --git a/db/migrate/20130927092206_add_is_other_to_organisations.rb b/db/migrate/20130927092206_add_is_other_to_organisations.rb
index 6b59a8a..cae183c 100644
--- a/db/migrate/20130927092206_add_is_other_to_organisations.rb
+++ b/db/migrate/20130927092206_add_is_other_to_organisations.rb
@@ -1,5 +1,5 @@
-class AddIsOtherToOrganisations < ActiveRecord::Migration
- def change
- add_column :organisations, :is_other, :boolean
- end
-end
+class AddIsOtherToOrganisations < ActiveRecord::Migration
+ def change
+ add_column :organisations, :is_other, :boolean
+ end
+end
diff --git a/db/migrate/20131108151505_add_dmptemplate_id_to_guidance.rb b/db/migrate/20131108151505_add_dmptemplate_id_to_guidance.rb
index 39211b9..3dbe80c 100644
--- a/db/migrate/20131108151505_add_dmptemplate_id_to_guidance.rb
+++ b/db/migrate/20131108151505_add_dmptemplate_id_to_guidance.rb
@@ -1,5 +1,5 @@
-class AddDmptemplateIdToGuidance < ActiveRecord::Migration
- def change
- add_column :guidances, :dmptemplate_id, :integer
- end
-end
+class AddDmptemplateIdToGuidance < ActiveRecord::Migration
+ def change
+ add_column :guidances, :dmptemplate_id, :integer
+ end
+end
diff --git a/db/migrate/20131111090129_create_suggested_answers.rb b/db/migrate/20131111090129_create_suggested_answers.rb
index 4f9f0c8..34a863e 100644
--- a/db/migrate/20131111090129_create_suggested_answers.rb
+++ b/db/migrate/20131111090129_create_suggested_answers.rb
@@ -1,10 +1,10 @@
-class CreateSuggestedAnswers < ActiveRecord::Migration
- def change
- create_table :suggested_answers do |t|
- t.references :question
- t.references :organisation
- t.text :text
- t.timestamps
- end
- end
-end
+class CreateSuggestedAnswers < ActiveRecord::Migration
+ def change
+ create_table :suggested_answers do |t|
+ t.references :question
+ t.references :organisation
+ t.text :text
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20131118094629_change_versions_published.rb b/db/migrate/20131118094629_change_versions_published.rb
index cf03782..dc8deb4 100644
--- a/db/migrate/20131118094629_change_versions_published.rb
+++ b/db/migrate/20131118094629_change_versions_published.rb
@@ -1,5 +1,5 @@
-class ChangeVersionsPublished < ActiveRecord::Migration
- def change
- change_column :versions, :published, :boolean
- end
-end
+class ChangeVersionsPublished < ActiveRecord::Migration
+ def change
+ change_column :versions, :published, :boolean
+ end
+end
diff --git a/db/migrate/20131126133804_add_dmponline3_to_users.rb b/db/migrate/20131126133804_add_dmponline3_to_users.rb
index 27697e0..33f7908 100644
--- a/db/migrate/20131126133804_add_dmponline3_to_users.rb
+++ b/db/migrate/20131126133804_add_dmponline3_to_users.rb
@@ -1,5 +1,5 @@
-class AddDmponline3ToUsers < ActiveRecord::Migration
- def change
- add_column :users, :dmponline3, :boolean
- end
-end
+class AddDmponline3ToUsers < ActiveRecord::Migration
+ def change
+ add_column :users, :dmponline3, :boolean
+ end
+end
diff --git a/db/migrate/20131126135301_add_accept_terms_to_users.rb b/db/migrate/20131126135301_add_accept_terms_to_users.rb
index 01d433e..13745ad 100644
--- a/db/migrate/20131126135301_add_accept_terms_to_users.rb
+++ b/db/migrate/20131126135301_add_accept_terms_to_users.rb
@@ -1,5 +1,5 @@
-class AddAcceptTermsToUsers < ActiveRecord::Migration
- def change
- add_column :users, :accept_terms, :boolean
- end
-end
+class AddAcceptTermsToUsers < ActiveRecord::Migration
+ def change
+ add_column :users, :accept_terms, :boolean
+ end
+end
diff --git a/db/migrate/20131127100520_create_splash_logs.rb b/db/migrate/20131127100520_create_splash_logs.rb
index f95b219..c8d88af 100644
--- a/db/migrate/20131127100520_create_splash_logs.rb
+++ b/db/migrate/20131127100520_create_splash_logs.rb
@@ -1,8 +1,8 @@
-class CreateSplashLogs < ActiveRecord::Migration
- def change
- create_table :splash_logs do |t|
- t.string :destination
- t.timestamps
- end
- end
-end
+class CreateSplashLogs < ActiveRecord::Migration
+ def change
+ create_table :splash_logs do |t|
+ t.string :destination
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20131128150644_add_sort_name_to_organisations.rb b/db/migrate/20131128150644_add_sort_name_to_organisations.rb
index 0265d28..ebd227c 100644
--- a/db/migrate/20131128150644_add_sort_name_to_organisations.rb
+++ b/db/migrate/20131128150644_add_sort_name_to_organisations.rb
@@ -1,5 +1,5 @@
-class AddSortNameToOrganisations < ActiveRecord::Migration
- def change
- add_column :organisations, :sort_name, :string
- end
-end
+class AddSortNameToOrganisations < ActiveRecord::Migration
+ def change
+ add_column :organisations, :sort_name, :string
+ end
+end
diff --git a/db/migrate/20131129143550_create_exported_plans.rb b/db/migrate/20131129143550_create_exported_plans.rb
index 5ee7e42..46dbcda 100644
--- a/db/migrate/20131129143550_create_exported_plans.rb
+++ b/db/migrate/20131129143550_create_exported_plans.rb
@@ -1,10 +1,10 @@
-class CreateExportedPlans < ActiveRecord::Migration
- def change
- create_table :exported_plans do |t|
- t.references :plan
- t.references :user
- t.string :format
- t.timestamps
- end
- end
-end
+class CreateExportedPlans < ActiveRecord::Migration
+ def change
+ create_table :exported_plans do |t|
+ t.references :plan
+ t.references :user
+ t.string :format
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20131212111049_add_is_example_to_suggested_answers.rb b/db/migrate/20131212111049_add_is_example_to_suggested_answers.rb
index 230c470..f8ab643 100644
--- a/db/migrate/20131212111049_add_is_example_to_suggested_answers.rb
+++ b/db/migrate/20131212111049_add_is_example_to_suggested_answers.rb
@@ -1,5 +1,5 @@
-class AddIsExampleToSuggestedAnswers < ActiveRecord::Migration
- def change
- add_column :suggested_answers, :is_example, :boolean
- end
-end
+class AddIsExampleToSuggestedAnswers < ActiveRecord::Migration
+ def change
+ add_column :suggested_answers, :is_example, :boolean
+ end
+end
diff --git a/db/migrate/20140210121753_add_is_text_field_to_questions.rb b/db/migrate/20140210121753_add_is_text_field_to_questions.rb
index 00d41a9..e20cb3f 100644
--- a/db/migrate/20140210121753_add_is_text_field_to_questions.rb
+++ b/db/migrate/20140210121753_add_is_text_field_to_questions.rb
@@ -1,5 +1,5 @@
-class AddIsTextFieldToQuestions < ActiveRecord::Migration
- def change
- add_column :questions, :is_text_field, :boolean
- end
-end
+class AddIsTextFieldToQuestions < ActiveRecord::Migration
+ def change
+ add_column :questions, :is_text_field, :boolean
+ end
+end
diff --git a/db/migrate/20140214120652_add_question_id_to_guidances.rb b/db/migrate/20140214120652_add_question_id_to_guidances.rb
index f298fa0..b16f757 100644
--- a/db/migrate/20140214120652_add_question_id_to_guidances.rb
+++ b/db/migrate/20140214120652_add_question_id_to_guidances.rb
@@ -1,5 +1,5 @@
-class AddQuestionIdToGuidances < ActiveRecord::Migration
- def change
- add_column :guidances, :question_id, :integer
- end
-end
+class AddQuestionIdToGuidances < ActiveRecord::Migration
+ def change
+ add_column :guidances, :question_id, :integer
+ end
+end
diff --git a/db/migrate/20140214155629_dmptemplates_guidance_groups.rb b/db/migrate/20140214155629_dmptemplates_guidance_groups.rb
index f2d23c6..b34bd97 100644
--- a/db/migrate/20140214155629_dmptemplates_guidance_groups.rb
+++ b/db/migrate/20140214155629_dmptemplates_guidance_groups.rb
@@ -1,8 +1,8 @@
-class DmptemplatesGuidanceGroups < ActiveRecord::Migration
- def change
- create_table :dmptemplates_guidance_groups, :id => false do |t|
- t.integer :dmptemplate_id
- t.integer :guidance_group_id
- end
- end
+class DmptemplatesGuidanceGroups < ActiveRecord::Migration
+ def change
+ create_table :dmptemplates_guidance_groups, :id => false do |t|
+ t.integer :dmptemplate_id
+ t.integer :guidance_group_id
+ end
+ end
end
\ No newline at end of file
diff --git a/db/migrate/20140218113637_themes_in_guidance.rb b/db/migrate/20140218113637_themes_in_guidance.rb
index e098865..b3beff0 100644
--- a/db/migrate/20140218113637_themes_in_guidance.rb
+++ b/db/migrate/20140218113637_themes_in_guidance.rb
@@ -1,8 +1,8 @@
-class ThemesInGuidance < ActiveRecord::Migration
- def change
- create_table :themes_in_guidance, :id => false do |t|
- t.integer :theme_id
- t.integer :guidance_id
- end
- end
-end
+class ThemesInGuidance < ActiveRecord::Migration
+ def change
+ create_table :themes_in_guidance, :id => false do |t|
+ t.integer :theme_id
+ t.integer :guidance_id
+ end
+ end
+end
diff --git a/db/migrate/20140331160554_question_formats.rb b/db/migrate/20140331160554_question_formats.rb
index 2b73542..75010c1 100644
--- a/db/migrate/20140331160554_question_formats.rb
+++ b/db/migrate/20140331160554_question_formats.rb
@@ -1,10 +1,10 @@
-class QuestionFormats < ActiveRecord::Migration
- def change
- create_table :question_formats do |t|
- t.string :title
- t.text :description
-
- t.timestamps
- end
- end
-end
+class QuestionFormats < ActiveRecord::Migration
+ def change
+ create_table :question_formats do |t|
+ t.string :title
+ t.text :description
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140331162130_add_question_format_id_to_questions.rb b/db/migrate/20140331162130_add_question_format_id_to_questions.rb
index b94c81c..1b813bb 100644
--- a/db/migrate/20140331162130_add_question_format_id_to_questions.rb
+++ b/db/migrate/20140331162130_add_question_format_id_to_questions.rb
@@ -1,5 +1,5 @@
-class AddQuestionFormatIdToQuestions < ActiveRecord::Migration
- def change
- add_column :questions, :question_format_id, :integer
- end
-end
+class AddQuestionFormatIdToQuestions < ActiveRecord::Migration
+ def change
+ add_column :questions, :question_format_id, :integer
+ end
+end
diff --git a/db/migrate/20140407105254_add_optional_subset_to_guidance_groups.rb b/db/migrate/20140407105254_add_optional_subset_to_guidance_groups.rb
index 129a74e..5d64eec 100644
--- a/db/migrate/20140407105254_add_optional_subset_to_guidance_groups.rb
+++ b/db/migrate/20140407105254_add_optional_subset_to_guidance_groups.rb
@@ -1,5 +1,5 @@
-class AddOptionalSubsetToGuidanceGroups < ActiveRecord::Migration
- def change
- add_column :guidance_groups, :optional_subset, :boolean
- end
-end
+class AddOptionalSubsetToGuidanceGroups < ActiveRecord::Migration
+ def change
+ add_column :guidance_groups, :optional_subset, :boolean
+ end
+end
diff --git a/db/migrate/20140407153318_add_published_to_sections.rb b/db/migrate/20140407153318_add_published_to_sections.rb
index 5bfa152..71ba50c 100644
--- a/db/migrate/20140407153318_add_published_to_sections.rb
+++ b/db/migrate/20140407153318_add_published_to_sections.rb
@@ -1,5 +1,5 @@
-class AddPublishedToSections < ActiveRecord::Migration
- def change
- add_column :sections, :published, :boolean
- end
-end
+class AddPublishedToSections < ActiveRecord::Migration
+ def change
+ add_column :sections, :published, :boolean
+ end
+end
diff --git a/db/migrate/20140423200913_remove_suggested_answer_from_questions.rb b/db/migrate/20140423200913_remove_suggested_answer_from_questions.rb
index c1c7910..2e36341 100644
--- a/db/migrate/20140423200913_remove_suggested_answer_from_questions.rb
+++ b/db/migrate/20140423200913_remove_suggested_answer_from_questions.rb
@@ -1,9 +1,9 @@
-class RemoveSuggestedAnswerFromQuestions < ActiveRecord::Migration
- def up
- remove_column :questions, :suggested_answer
- end
-
- def down
- add_column :questions, :suggested_answer, :text
- end
-end
+class RemoveSuggestedAnswerFromQuestions < ActiveRecord::Migration
+ def up
+ remove_column :questions, :suggested_answer
+ end
+
+ def down
+ add_column :questions, :suggested_answer, :text
+ end
+end
diff --git a/db/migrate/20140429114226_change_published_in_version_to_boolean.rb b/db/migrate/20140429114226_change_published_in_version_to_boolean.rb
index 784cb0d..724b08b 100644
--- a/db/migrate/20140429114226_change_published_in_version_to_boolean.rb
+++ b/db/migrate/20140429114226_change_published_in_version_to_boolean.rb
@@ -1,5 +1,5 @@
-class ChangePublishedInVersionToBoolean < ActiveRecord::Migration
- def change
- change_column :versions, :published, :boolean
- end
-end
+class ChangePublishedInVersionToBoolean < ActiveRecord::Migration
+ def change
+ change_column :versions, :published, :boolean
+ end
+end
diff --git a/db/migrate/20140604092907_rails_settings_migration.rb b/db/migrate/20140604092907_rails_settings_migration.rb
index 98856cf..6a41dd2 100644
--- a/db/migrate/20140604092907_rails_settings_migration.rb
+++ b/db/migrate/20140604092907_rails_settings_migration.rb
@@ -6,7 +6,7 @@
t.references :target, :null => false, :polymorphic => true
t.timestamps
end
- add_index :settings, [ :target_type, :target_id, :var ], :unique => true, :length => {:var => 191}
+ add_index :settings, [ :target_type, :target_id, :var ], :unique => true
end
def self.down
diff --git a/db/migrate/20140707143840_add_funder_name_to_project.rb b/db/migrate/20140707143840_add_funder_name_to_project.rb
index 9020f84..40130bc 100644
--- a/db/migrate/20140707143840_add_funder_name_to_project.rb
+++ b/db/migrate/20140707143840_add_funder_name_to_project.rb
@@ -1,5 +1,5 @@
-class AddFunderNameToProject < ActiveRecord::Migration
- def change
- add_column :projects, :funder_name, :string
- end
-end
+class AddFunderNameToProject < ActiveRecord::Migration
+ def change
+ add_column :projects, :funder_name, :string
+ end
+end
diff --git a/db/migrate/20150415150436_remove_fields_from_questions.rb b/db/migrate/20150415150436_remove_fields_from_questions.rb
index dd841f6..1279167 100644
--- a/db/migrate/20150415150436_remove_fields_from_questions.rb
+++ b/db/migrate/20150415150436_remove_fields_from_questions.rb
@@ -1,10 +1,10 @@
-class RemoveFieldsFromQuestions < ActiveRecord::Migration
- def change
- remove_column :questions, :question_type
- remove_column :questions, :multiple_choice
- remove_column :questions, :multiple_permitted
- remove_column :questions, :is_expanded
- remove_column :questions, :is_text_field
- end
-
-end
+class RemoveFieldsFromQuestions < ActiveRecord::Migration
+ def change
+ remove_column :questions, :question_type
+ remove_column :questions, :multiple_choice
+ remove_column :questions, :multiple_permitted
+ remove_column :questions, :is_expanded
+ remove_column :questions, :is_text_field
+ end
+
+end
diff --git a/db/migrate/20150416092404_remove_field_from_phases.rb b/db/migrate/20150416092404_remove_field_from_phases.rb
index 28f151d..f468c2d 100644
--- a/db/migrate/20150416092404_remove_field_from_phases.rb
+++ b/db/migrate/20150416092404_remove_field_from_phases.rb
@@ -1,6 +1,6 @@
-class RemoveFieldFromPhases < ActiveRecord::Migration
- def change
- remove_column :phases, :external_guidance_url
- end
-
-end
+class RemoveFieldFromPhases < ActiveRecord::Migration
+ def change
+ remove_column :phases, :external_guidance_url
+ end
+
+end
diff --git a/db/migrate/20150416101954_remove_field_from_guidances.rb b/db/migrate/20150416101954_remove_field_from_guidances.rb
index be4d70c..b66e543 100644
--- a/db/migrate/20150416101954_remove_field_from_guidances.rb
+++ b/db/migrate/20150416101954_remove_field_from_guidances.rb
@@ -1,7 +1,7 @@
-class RemoveFieldFromGuidances < ActiveRecord::Migration
- def change
- remove_column :guidances, :file_id
- remove_column :guidances, :theme_id
- remove_column :guidances, :dmptemplate_id
- end
-end
+class RemoveFieldFromGuidances < ActiveRecord::Migration
+ def change
+ remove_column :guidances, :file_id
+ remove_column :guidances, :theme_id
+ remove_column :guidances, :dmptemplate_id
+ end
+end
diff --git a/db/migrate/20150416103652_remove_field_from_projects.rb b/db/migrate/20150416103652_remove_field_from_projects.rb
index cf8516f..c87f598 100644
--- a/db/migrate/20150416103652_remove_field_from_projects.rb
+++ b/db/migrate/20150416103652_remove_field_from_projects.rb
@@ -1,6 +1,6 @@
-class RemoveFieldFromProjects < ActiveRecord::Migration
- def change
- remove_column :projects, :note
- remove_column :projects, :locked
- end
-end
+class RemoveFieldFromProjects < ActiveRecord::Migration
+ def change
+ remove_column :projects, :note
+ remove_column :projects, :locked
+ end
+end
diff --git a/db/migrate/20150416105712_change_field_type_from_projects.rb b/db/migrate/20150416105712_change_field_type_from_projects.rb
index d004ff6..bb74fec 100644
--- a/db/migrate/20150416105712_change_field_type_from_projects.rb
+++ b/db/migrate/20150416105712_change_field_type_from_projects.rb
@@ -1,6 +1,6 @@
-class ChangeFieldTypeFromProjects < ActiveRecord::Migration
- def change
- change_column :projects, :description, :text
- end
-
-end
+class ChangeFieldTypeFromProjects < ActiveRecord::Migration
+ def change
+ change_column :projects, :description, :text
+ end
+
+end
diff --git a/db/migrate/20150416112327_add_field_to_guidance_groups.rb b/db/migrate/20150416112327_add_field_to_guidance_groups.rb
index 7f96771..ae8cd9b 100644
--- a/db/migrate/20150416112327_add_field_to_guidance_groups.rb
+++ b/db/migrate/20150416112327_add_field_to_guidance_groups.rb
@@ -1,5 +1,5 @@
-class AddFieldToGuidanceGroups < ActiveRecord::Migration
- def change
- add_column :guidance_groups, :published, :boolean
- end
-end
+class AddFieldToGuidanceGroups < ActiveRecord::Migration
+ def change
+ add_column :guidance_groups, :published, :boolean
+ end
+end
diff --git a/db/migrate/20150416113232_remove_fields_from_roles.rb b/db/migrate/20150416113232_remove_fields_from_roles.rb
index bc86d17..29de15e 100644
--- a/db/migrate/20150416113232_remove_fields_from_roles.rb
+++ b/db/migrate/20150416113232_remove_fields_from_roles.rb
@@ -1,6 +1,6 @@
-class RemoveFieldsFromRoles < ActiveRecord::Migration
- def change
- remove_column :roles, :resource_id
- remove_column :roles, :resource_type
- end
-end
+class RemoveFieldsFromRoles < ActiveRecord::Migration
+ def change
+ remove_column :roles, :resource_id
+ remove_column :roles, :resource_type
+ end
+end
diff --git a/db/migrate/20150416113625_add_field_to_roles.rb b/db/migrate/20150416113625_add_field_to_roles.rb
index fbfe9d1..48447be 100644
--- a/db/migrate/20150416113625_add_field_to_roles.rb
+++ b/db/migrate/20150416113625_add_field_to_roles.rb
@@ -1,5 +1,5 @@
-class AddFieldToRoles < ActiveRecord::Migration
- def change
- add_column :roles, :role_in_plans, :boolean
- end
-end
+class AddFieldToRoles < ActiveRecord::Migration
+ def change
+ add_column :roles, :role_in_plans, :boolean
+ end
+end
diff --git a/db/migrate/20150416114743_remove_fields_from_users.rb b/db/migrate/20150416114743_remove_fields_from_users.rb
index dc7845e..d6ae756 100644
--- a/db/migrate/20150416114743_remove_fields_from_users.rb
+++ b/db/migrate/20150416114743_remove_fields_from_users.rb
@@ -1,10 +1,10 @@
-class RemoveFieldsFromUsers < ActiveRecord::Migration
- def change
- remove_column :users, :password
- remove_column :users, :login_count
- remove_column :users, :last_login
- remove_column :users, :invitation_limit
- remove_column :users, :invited_by_id
- remove_column :users, :invited_by_type
- end
-end
+class RemoveFieldsFromUsers < ActiveRecord::Migration
+ def change
+ remove_column :users, :password
+ remove_column :users, :login_count
+ remove_column :users, :last_login
+ remove_column :users, :invitation_limit
+ remove_column :users, :invited_by_id
+ remove_column :users, :invited_by_type
+ end
+end
diff --git a/db/migrate/20150416120233_add_field_to_users.rb b/db/migrate/20150416120233_add_field_to_users.rb
index 5b2a35f..e6bc0e2 100644
--- a/db/migrate/20150416120233_add_field_to_users.rb
+++ b/db/migrate/20150416120233_add_field_to_users.rb
@@ -1,5 +1,5 @@
-class AddFieldToUsers < ActiveRecord::Migration
- def change
- add_column :users, :organisation_id, :integer
- end
-end
+class AddFieldToUsers < ActiveRecord::Migration
+ def change
+ add_column :users, :organisation_id, :integer
+ end
+end
diff --git a/db/migrate/20150416131657_remove_pages_table.rb b/db/migrate/20150416131657_remove_pages_table.rb
index 0a5972b..009bf44 100644
--- a/db/migrate/20150416131657_remove_pages_table.rb
+++ b/db/migrate/20150416131657_remove_pages_table.rb
@@ -1,9 +1,9 @@
-class RemovePagesTable < ActiveRecord::Migration
- def up
- drop_table :pages
- end
-
- def down
- raise ActiveRecord::IrreversibleMigration
- end
-end
+class RemovePagesTable < ActiveRecord::Migration
+ def up
+ drop_table :pages
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20150416133602_remove_admin_users_table.rb b/db/migrate/20150416133602_remove_admin_users_table.rb
index be091e3..1a647e0 100644
--- a/db/migrate/20150416133602_remove_admin_users_table.rb
+++ b/db/migrate/20150416133602_remove_admin_users_table.rb
@@ -1,9 +1,9 @@
-class RemoveAdminUsersTable < ActiveRecord::Migration
- def up
- drop_table :admin_users
- end
-
- def down
- raise ActiveRecord::IrreversibleMigration
- end
-end
+class RemoveAdminUsersTable < ActiveRecord::Migration
+ def up
+ drop_table :admin_users
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20150416134611_remove_active_admin_comments_table.rb b/db/migrate/20150416134611_remove_active_admin_comments_table.rb
deleted file mode 100644
index d91808b..0000000
--- a/db/migrate/20150416134611_remove_active_admin_comments_table.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveActiveAdminCommentsTable < ActiveRecord::Migration
- def up
- drop_table :active_admin_comments
- end
-
- def down
- raise ActiveRecord::IrreversibleMigration
- end
-end
diff --git a/db/migrate/20150427110644_create_comments.rb b/db/migrate/20150427110644_create_comments.rb
index 0213646..e5fc0df 100644
--- a/db/migrate/20150427110644_create_comments.rb
+++ b/db/migrate/20150427110644_create_comments.rb
@@ -1,13 +1,13 @@
-class CreateComments < ActiveRecord::Migration
- def change
- create_table :comments do |t|
- t.integer :user_id
- t.integer :question_id
- t.text :text
-
- t.timestamps
- end
-
-
- end
-end
+class CreateComments < ActiveRecord::Migration
+ def change
+ create_table :comments do |t|
+ t.integer :user_id
+ t.integer :question_id
+ t.text :text
+
+ t.timestamps
+ end
+
+
+ end
+end
diff --git a/db/migrate/20150427145433_add_field_column_to_comments.rb b/db/migrate/20150427145433_add_field_column_to_comments.rb
index a3b2994..7464c81 100644
--- a/db/migrate/20150427145433_add_field_column_to_comments.rb
+++ b/db/migrate/20150427145433_add_field_column_to_comments.rb
@@ -1,5 +1,5 @@
-class AddFieldColumnToComments < ActiveRecord::Migration
- def change
- add_column :comments, :archived, :boolean
- end
-end
+class AddFieldColumnToComments < ActiveRecord::Migration
+ def change
+ add_column :comments, :archived, :boolean
+ end
+end
diff --git a/db/migrate/20150430135839_add_plan_id_to_comments.rb b/db/migrate/20150430135839_add_plan_id_to_comments.rb
index 7423e32..d877fa7 100644
--- a/db/migrate/20150430135839_add_plan_id_to_comments.rb
+++ b/db/migrate/20150430135839_add_plan_id_to_comments.rb
@@ -1,5 +1,5 @@
-class AddPlanIdToComments < ActiveRecord::Migration
- def change
- add_column :comments, :plan_id, :integer
- end
-end
+class AddPlanIdToComments < ActiveRecord::Migration
+ def change
+ add_column :comments, :plan_id, :integer
+ end
+end
diff --git a/db/migrate/20150501150321_add_archived_by_to_comments.rb b/db/migrate/20150501150321_add_archived_by_to_comments.rb
index 68afb3e..6285c0e 100644
--- a/db/migrate/20150501150321_add_archived_by_to_comments.rb
+++ b/db/migrate/20150501150321_add_archived_by_to_comments.rb
@@ -1,5 +1,5 @@
-class AddArchivedByToComments < ActiveRecord::Migration
- def change
- add_column :comments, :archived_by, :integer
- end
-end
+class AddArchivedByToComments < ActiveRecord::Migration
+ def change
+ add_column :comments, :archived_by, :integer
+ end
+end
diff --git a/db/migrate/20150518153927_add_fields_to_roles.rb b/db/migrate/20150518153927_add_fields_to_roles.rb
index 3f0e15a..7cdeef8 100644
--- a/db/migrate/20150518153927_add_fields_to_roles.rb
+++ b/db/migrate/20150518153927_add_fields_to_roles.rb
@@ -1,6 +1,6 @@
-class AddFieldsToRoles < ActiveRecord::Migration
- def change
- add_column :roles, :resource_id, :integer
- add_column :roles, :resource_type, :string
- end
-end
+class AddFieldsToRoles < ActiveRecord::Migration
+ def change
+ add_column :roles, :resource_id, :integer
+ add_column :roles, :resource_type, :string
+ end
+end
diff --git a/db/migrate/20150805105542_add_institution_logo_text_banner_to.rb b/db/migrate/20150805105542_add_institution_logo_text_banner_to.rb
index f56ca34..57c91e7 100644
--- a/db/migrate/20150805105542_add_institution_logo_text_banner_to.rb
+++ b/db/migrate/20150805105542_add_institution_logo_text_banner_to.rb
@@ -1,8 +1,8 @@
-class AddInstitutionLogoTextBannerTo < ActiveRecord::Migration
- def change
- add_column :organisations, :banner_text, :text
- add_column :organisations, :logo_file_name, :string
- remove_column :organisations, :logo_file_id
- remove_column :organisations, :banner_file_id
- end
-end
+class AddInstitutionLogoTextBannerTo < ActiveRecord::Migration
+ def change
+ add_column :organisations, :banner_text, :text
+ add_column :organisations, :logo_file_name, :string
+ remove_column :organisations, :logo_file_id
+ remove_column :organisations, :banner_file_id
+ end
+end
diff --git a/db/migrate/20150809210811_add_field_to_questions.rb b/db/migrate/20150809210811_add_field_to_questions.rb
index 4fefd62..a4cc424 100644
--- a/db/migrate/20150809210811_add_field_to_questions.rb
+++ b/db/migrate/20150809210811_add_field_to_questions.rb
@@ -1,9 +1,9 @@
-class AddFieldToQuestions < ActiveRecord::Migration
- def change
- add_column :questions, :option_comment_display, :boolean, :default => true
- Question.find_each do |question|
- question.option_comment_display = true
- question.save!
- end
- end
-end
+class AddFieldToQuestions < ActiveRecord::Migration
+ def change
+ add_column :questions, :option_comment_display, :boolean, :default => true
+ Question.find_each do |question|
+ question.option_comment_display = true
+ question.save!
+ end
+ end
+end
diff --git a/db/migrate/20151208142029_add_field_to_guidances.rb b/db/migrate/20151208142029_add_field_to_guidances.rb
index 997c12d..e2c792f 100644
--- a/db/migrate/20151208142029_add_field_to_guidances.rb
+++ b/db/migrate/20151208142029_add_field_to_guidances.rb
@@ -1,9 +1,9 @@
-class AddFieldToGuidances < ActiveRecord::Migration
- def change
- add_column :guidances, :published, :boolean
- Guidance.find_each do |guidance|
- guidance.published = true
- guidance.save!
- end
- end
-end
+class AddFieldToGuidances < ActiveRecord::Migration
+ def change
+ add_column :guidances, :published, :boolean
+ Guidance.find_each do |guidance|
+ guidance.published = true
+ guidance.save!
+ end
+ end
+end
diff --git a/db/migrate/20151208142836_update_field_in_guidance_groups.rb b/db/migrate/20151208142836_update_field_in_guidance_groups.rb
index 9dd03f6..f77f8ed 100644
--- a/db/migrate/20151208142836_update_field_in_guidance_groups.rb
+++ b/db/migrate/20151208142836_update_field_in_guidance_groups.rb
@@ -1,8 +1,8 @@
-class UpdateFieldInGuidanceGroups < ActiveRecord::Migration
- def change
- GuidanceGroup.find_each do |guidance_group|
- guidance_group.published = true
- guidance_group.save!
- end
- end
-end
+class UpdateFieldInGuidanceGroups < ActiveRecord::Migration
+ def change
+ GuidanceGroup.find_each do |guidance_group|
+ guidance_group.published = true
+ guidance_group.save!
+ end
+ end
+end
diff --git a/db/migrate/20160105114044_change_wayfless_entity_format_in_organisations.rb b/db/migrate/20160105114044_change_wayfless_entity_format_in_organisations.rb
index eb7236f..697f26a 100644
--- a/db/migrate/20160105114044_change_wayfless_entity_format_in_organisations.rb
+++ b/db/migrate/20160105114044_change_wayfless_entity_format_in_organisations.rb
@@ -1,7 +1,7 @@
-class ChangeWayflessEntityFormatInOrganisations < ActiveRecord::Migration
-
- def change
- change_column :organisations, :wayfless_entity, :string
- end
-
-end
+class ChangeWayflessEntityFormatInOrganisations < ActiveRecord::Migration
+
+ def change
+ change_column :organisations, :wayfless_entity, :string
+ end
+
+end
diff --git a/db/migrate/20160603124621_create_structure_for_api_authentication.rb b/db/migrate/20160603124621_create_structure_for_api_authentication.rb
index 16e847a..6624b16 100644
--- a/db/migrate/20160603124621_create_structure_for_api_authentication.rb
+++ b/db/migrate/20160603124621_create_structure_for_api_authentication.rb
@@ -1,26 +1,26 @@
-class CreateStructureForApiAuthentication < ActiveRecord::Migration
- def change
- create_table :token_permissions do |t|
- t.string :api_token
- t.integer :token_type
- t.timestamps
- end
-
- create_table :token_permission_types do |t|
- t.string :token_type
- t.text :text_desription
- t.timestamps
- end
-
- create_table :org_token_permissions do |t|
- t.integer :organisation_id
- t.integer :token_type
- t.timestamps
- end
-
- change_table :users do |t|
- t.string :api_token
- end
-
- end
-end
+class CreateStructureForApiAuthentication < ActiveRecord::Migration
+ def change
+ create_table :token_permissions do |t|
+ t.string :api_token
+ t.integer :token_type
+ t.timestamps
+ end
+
+ create_table :token_permission_types do |t|
+ t.string :token_type
+ t.text :text_desription
+ t.timestamps
+ end
+
+ create_table :org_token_permissions do |t|
+ t.integer :organisation_id
+ t.integer :token_type
+ t.timestamps
+ end
+
+ change_table :users do |t|
+ t.string :api_token
+ end
+
+ end
+end
diff --git a/db/migrate/20160609081745_extend_structure_for_api_authentication.rb b/db/migrate/20160609081745_extend_structure_for_api_authentication.rb
index 17aaf3a..bab5f33 100644
--- a/db/migrate/20160609081745_extend_structure_for_api_authentication.rb
+++ b/db/migrate/20160609081745_extend_structure_for_api_authentication.rb
@@ -1,11 +1,11 @@
-class ExtendStructureForApiAuthentication < ActiveRecord::Migration
- def change
-
- add_column :token_permissions, :user_id, :integer
- add_column :token_permissions, :token_permission_type_id, :integer
- remove_column :token_permissions, :token_type, :integer
-
- rename_column :org_token_permissions, :token_type, :token_permission_type_id
-
- end
-end
+class ExtendStructureForApiAuthentication < ActiveRecord::Migration
+ def change
+
+ add_column :token_permissions, :user_id, :integer
+ add_column :token_permissions, :token_permission_type_id, :integer
+ remove_column :token_permissions, :token_type, :integer
+
+ rename_column :org_token_permissions, :token_type, :token_permission_type_id
+
+ end
+end
diff --git a/db/migrate/20160615095101_add_field_to_user.rb b/db/migrate/20160615095101_add_field_to_user.rb
index 6084a5b..49cede6 100644
--- a/db/migrate/20160615095101_add_field_to_user.rb
+++ b/db/migrate/20160615095101_add_field_to_user.rb
@@ -1,6 +1,6 @@
-class AddFieldToUser < ActiveRecord::Migration
- def change
- add_column :users, :invited_by_id, :integer
- add_column :users, :invited_by_type, :string
- end
-end
+class AddFieldToUser < ActiveRecord::Migration
+ def change
+ add_column :users, :invited_by_id, :integer
+ add_column :users, :invited_by_type, :string
+ end
+end
diff --git a/db/migrate/20160719102542_remove_depricated_api_structure.rb b/db/migrate/20160719102542_remove_depricated_api_structure.rb
index d19cfb9..b201a82 100644
--- a/db/migrate/20160719102542_remove_depricated_api_structure.rb
+++ b/db/migrate/20160719102542_remove_depricated_api_structure.rb
@@ -1,9 +1,9 @@
-class RemoveDepricatedApiStructure < ActiveRecord::Migration
- def up
- drop_table :token_permissions
- end
-
- def down
- raise ActiveRecord::IrreversibleMigration
- end
-end
+class RemoveDepricatedApiStructure < ActiveRecord::Migration
+ def up
+ drop_table :token_permissions
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20160719140055_create_languages.rb b/db/migrate/20160719140055_create_languages.rb
index 81376d2..4517688 100644
--- a/db/migrate/20160719140055_create_languages.rb
+++ b/db/migrate/20160719140055_create_languages.rb
@@ -1,9 +1,9 @@
-class CreateLanguages < ActiveRecord::Migration
- def change
- create_table :languages do |t|
- t.string :abbreviation
- t.string :description
- t.string :name
- end
- end
-end
+class CreateLanguages < ActiveRecord::Migration
+ def change
+ create_table :languages do |t|
+ t.string :abbreviation
+ t.string :description
+ t.string :name
+ end
+ end
+end
diff --git a/db/migrate/20160729091510_add_language_to_user.rb b/db/migrate/20160729091510_add_language_to_user.rb
new file mode 100644
index 0000000..e130972
--- /dev/null
+++ b/db/migrate/20160729091510_add_language_to_user.rb
@@ -0,0 +1,5 @@
+class AddLanguageToUser < ActiveRecord::Migration
+ def change
+ add_reference :users, :language
+ end
+end
diff --git a/db/migrate/20160805101216_create_regions.rb b/db/migrate/20160805101216_create_regions.rb
new file mode 100644
index 0000000..3ac7bf9
--- /dev/null
+++ b/db/migrate/20160805101216_create_regions.rb
@@ -0,0 +1,9 @@
+class CreateRegions < ActiveRecord::Migration
+ def change
+ create_table :regions do |t|
+ t.string :abbreviation
+ t.string :description
+ t.string :name
+ end
+ end
+end
diff --git a/db/migrate/20160805103704_create_region_groups.rb b/db/migrate/20160805103704_create_region_groups.rb
new file mode 100644
index 0000000..91892d3
--- /dev/null
+++ b/db/migrate/20160805103704_create_region_groups.rb
@@ -0,0 +1,8 @@
+class CreateRegionGroups < ActiveRecord::Migration
+ def change
+ create_table :region_groups do |t|
+ t.integer :super_region_id
+ t.integer :region_id
+ end
+ end
+end
diff --git a/db/migrate/20160805103912_add_default_language_to_language.rb b/db/migrate/20160805103912_add_default_language_to_language.rb
new file mode 100644
index 0000000..481d428
--- /dev/null
+++ b/db/migrate/20160805103912_add_default_language_to_language.rb
@@ -0,0 +1,5 @@
+class AddDefaultLanguageToLanguage < ActiveRecord::Migration
+ def change
+ add_column :languages, :default_language, :boolean
+ end
+end
diff --git a/db/migrate/20160805105928_add_region_ref_to_organisation.rb b/db/migrate/20160805105928_add_region_ref_to_organisation.rb
new file mode 100644
index 0000000..389cc7f
--- /dev/null
+++ b/db/migrate/20160805105928_add_region_ref_to_organisation.rb
@@ -0,0 +1,5 @@
+class AddRegionRefToOrganisation < ActiveRecord::Migration
+ def change
+ add_reference :organisations, :region
+ end
+end
diff --git a/db/migrate/20160805105941_add_language_ref_to_organisation.rb b/db/migrate/20160805105941_add_language_ref_to_organisation.rb
new file mode 100644
index 0000000..be50599
--- /dev/null
+++ b/db/migrate/20160805105941_add_language_ref_to_organisation.rb
@@ -0,0 +1,5 @@
+class AddLanguageRefToOrganisation < ActiveRecord::Migration
+ def change
+ add_reference :organisations, :language
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a7e5f15..2939cab 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,15 +11,15 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160719140055) do
+ActiveRecord::Schema.define(version: 20160805105941) do
create_table "answers", force: :cascade do |t|
t.text "text", limit: 65535
t.integer "plan_id", limit: 4
t.integer "user_id", limit: 4
t.integer "question_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "answers_options", id: false, force: :cascade do |t|
@@ -33,9 +33,9 @@
t.integer "user_id", limit: 4
t.integer "question_id", limit: 4
t.text "text", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "archived", limit: 1
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "archived"
t.integer "plan_id", limit: 4
t.integer "archived_by", limit: 4
end
@@ -43,13 +43,13 @@
create_table "dmptemplates", force: :cascade do |t|
t.string "title", limit: 255
t.text "description", limit: 65535
- t.boolean "published", limit: 1
+ t.boolean "published"
t.integer "user_id", limit: 4
t.integer "organisation_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "locale", limit: 255
- t.boolean "is_default", limit: 1
+ t.boolean "is_default"
end
create_table "dmptemplates_guidance_groups", id: false, force: :cascade do |t|
@@ -61,8 +61,8 @@
t.integer "plan_id", limit: 4
t.integer "user_id", limit: 4
t.string "format", limit: 255
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "file_types", force: :cascade do |t|
@@ -70,8 +70,8 @@
t.string "icon_name", limit: 255
t.integer "icon_size", limit: 4
t.string "icon_location", limit: 255
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "file_uploads", force: :cascade do |t|
@@ -79,15 +79,15 @@
t.string "title", limit: 255
t.text "description", limit: 65535
t.integer "size", limit: 4
- t.boolean "published", limit: 1
+ t.boolean "published"
t.string "location", limit: 255
t.integer "file_type_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "friendly_id_slugs", force: :cascade do |t|
- t.string "slug", limit: 255, null: false
+ t.string "slug", limit: 191, null: false
t.integer "sluggable_id", limit: 4, null: false
t.string "sluggable_type", limit: 40
t.datetime "created_at"
@@ -100,10 +100,10 @@
create_table "guidance_groups", force: :cascade do |t|
t.string "name", limit: 255
t.integer "organisation_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "optional_subset", limit: 1
- t.boolean "published", limit: 1
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "optional_subset"
+ t.boolean "published"
end
create_table "guidance_in_group", id: false, force: :cascade do |t|
@@ -116,33 +116,34 @@
create_table "guidances", force: :cascade do |t|
t.text "text", limit: 65535
t.integer "guidance_group_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.integer "question_id", limit: 4
- t.boolean "published", limit: 1
+ t.boolean "published"
end
create_table "languages", force: :cascade do |t|
- t.string "abbreviation", limit: 255
- t.string "description", limit: 255
- t.string "name", limit: 255
+ t.string "abbreviation", limit: 255
+ t.string "description", limit: 255
+ t.string "name", limit: 255
+ t.boolean "default_language"
end
create_table "option_warnings", force: :cascade do |t|
t.integer "organisation_id", limit: 4
t.integer "option_id", limit: 4
t.text "text", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "options", force: :cascade do |t|
t.integer "question_id", limit: 4
t.string "text", limit: 255
t.integer "number", limit: 4
- t.boolean "is_default", limit: 1
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.boolean "is_default"
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "org_token_permissions", force: :cascade do |t|
@@ -155,8 +156,8 @@
create_table "organisation_types", force: :cascade do |t|
t.string "name", limit: 255
t.text "description", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "organisations", force: :cascade do |t|
@@ -168,13 +169,15 @@
t.string "domain", limit: 255
t.string "wayfless_entity", limit: 255
t.integer "stylesheet_file_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.integer "parent_id", limit: 4
- t.boolean "is_other", limit: 1
+ t.boolean "is_other"
t.string "sort_name", limit: 255
t.text "banner_text", limit: 65535
t.string "logo_file_name", limit: 255
+ t.integer "region_id", limit: 4
+ t.integer "language_id", limit: 4
end
create_table "phases", force: :cascade do |t|
@@ -182,9 +185,9 @@
t.text "description", limit: 65535
t.integer "number", limit: 4
t.integer "dmptemplate_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.string "slug", limit: 255
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "slug", limit: 191
end
add_index "phases", ["dmptemplate_id"], name: "index_phases_on_dmptemplate_id", using: :btree
@@ -194,27 +197,27 @@
t.integer "user_id", limit: 4
t.integer "section_id", limit: 4
t.integer "plan_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.datetime "release_time"
end
create_table "plans", force: :cascade do |t|
- t.boolean "locked", limit: 1
+ t.boolean "locked"
t.integer "project_id", limit: 4
t.integer "version_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "project_groups", force: :cascade do |t|
- t.boolean "project_creator", limit: 1
- t.boolean "project_editor", limit: 1
+ t.boolean "project_creator"
+ t.boolean "project_editor"
t.integer "user_id", limit: 4
t.integer "project_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "project_administrator", limit: 1
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "project_administrator"
end
create_table "project_guidance", id: false, force: :cascade do |t|
@@ -227,9 +230,9 @@
create_table "projects", force: :cascade do |t|
t.string "title", limit: 255
t.integer "dmptemplate_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.string "slug", limit: 255
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "slug", limit: 191
t.integer "organisation_id", limit: 4
t.string "grant_number", limit: 255
t.string "identifier", limit: 255
@@ -245,8 +248,8 @@
create_table "question_formats", force: :cascade do |t|
t.string "title", limit: 255
t.text "description", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "questions", force: :cascade do |t|
@@ -258,10 +261,10 @@
t.integer "dependency_id", limit: 4
t.text "dependency_text", limit: 65535
t.integer "section_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.integer "question_format_id", limit: 4
- t.boolean "option_comment_display", limit: 1, default: true
+ t.boolean "option_comment_display", default: true
end
create_table "questions_themes", id: false, force: :cascade do |t|
@@ -271,11 +274,22 @@
add_index "questions_themes", ["question_id", "theme_id"], name: "index_questions_themes_on_question_id_and_theme_id", using: :btree
+ create_table "region_groups", force: :cascade do |t|
+ t.integer "super_region_id", limit: 4
+ t.integer "region_id", limit: 4
+ end
+
+ create_table "regions", force: :cascade do |t|
+ t.string "abbreviation", limit: 255
+ t.string "description", limit: 255
+ t.string "name", limit: 255
+ end
+
create_table "roles", force: :cascade do |t|
- t.string "name", limit: 255
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "role_in_plans", limit: 1
+ t.string "name", limit: 191
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "role_in_plans"
t.integer "resource_id", limit: 4
t.string "resource_type", limit: 255
end
@@ -289,42 +303,42 @@
t.integer "number", limit: 4
t.integer "version_id", limit: 4
t.integer "organisation_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "published", limit: 1
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "published"
end
create_table "settings", force: :cascade do |t|
- t.string "var", limit: 255, null: false
+ t.string "var", limit: 191, null: false
t.text "value", limit: 65535
t.integer "target_id", limit: 4, null: false
- t.string "target_type", limit: 255, null: false
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.string "target_type", limit: 191, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
add_index "settings", ["target_type", "target_id", "var"], name: "index_settings_on_target_type_and_target_id_and_var", unique: true, using: :btree
create_table "splash_logs", force: :cascade do |t|
t.string "destination", limit: 255
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "suggested_answers", force: :cascade do |t|
t.integer "question_id", limit: 4
t.integer "organisation_id", limit: 4
t.text "text", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "is_example", limit: 1
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "is_example"
end
create_table "themes", force: :cascade do |t|
t.string "title", limit: 255
t.text "description", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "locale", limit: 255
end
@@ -344,43 +358,43 @@
t.integer "user_id", limit: 4
t.integer "organisation_id", limit: 4
t.integer "user_role_type_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "user_role_types", force: :cascade do |t|
t.string "name", limit: 255
t.text "description", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "user_statuses", force: :cascade do |t|
t.string "name", limit: 255
t.text "description", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "user_types", force: :cascade do |t|
t.string "name", limit: 255
t.text "description", limit: 65535
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
create_table "users", force: :cascade do |t|
t.string "firstname", limit: 255
t.string "surname", limit: 255
- t.string "email", limit: 255, default: "", null: false
+ t.string "email", limit: 191, default: "", null: false
t.string "orcid_id", limit: 255
t.string "shibboleth_id", limit: 255
t.integer "user_type_id", limit: 4
t.integer "user_status_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "encrypted_password", limit: 255, default: ""
- t.string "reset_password_token", limit: 255
+ t.string "reset_password_token", limit: 191
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", limit: 4, default: 0
@@ -388,19 +402,21 @@
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip", limit: 255
t.string "last_sign_in_ip", limit: 255
- t.string "confirmation_token", limit: 255
+ t.string "confirmation_token", limit: 191
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
- t.string "invitation_token", limit: 255
+ t.string "invitation_token", limit: 191
t.datetime "invitation_created_at"
t.datetime "invitation_sent_at"
t.datetime "invitation_accepted_at"
t.string "other_organisation", limit: 255
- t.boolean "accept_terms", limit: 1
+ t.boolean "dmponline3"
+ t.boolean "accept_terms"
t.integer "organisation_id", limit: 4
t.string "api_token", limit: 255
t.integer "invited_by_id", limit: 4
t.string "invited_by_type", limit: 255
+ t.integer "language_id", limit: 4
end
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
@@ -418,11 +434,11 @@
create_table "versions", force: :cascade do |t|
t.string "title", limit: 255
t.text "description", limit: 65535
- t.boolean "published", limit: 1
+ t.boolean "published"
t.integer "number", limit: 4
t.integer "phase_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
add_index "versions", ["phase_id"], name: "index_versions_on_phase_id", using: :btree
diff --git a/db/seeds.rb b/db/seeds.rb
index 96cb7b4..6109e2a 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -6,6 +6,80 @@
d1 = DateTime.new(2015, 6, 22)
+languages = {
+ 'English(UK)' => {
+ abbreviation: 'en-UK',
+ description: 'UK English language used as default',
+ name: 'English(UK)',
+ default_language: true
+ },
+ 'FR' => {
+ abbreviation: 'fr',
+ description: '',
+ name: 'fr',
+ default_language: false
+ },
+ 'DE' => {
+ abbreviation: 'de',
+ description: '',
+ name: 'de',
+ default_language: false
+ }
+}
+
+languages.each do |l, details|
+ language = Language.new
+ language.abbreviation = details[:abbreviation]
+ language.description = details[:description]
+ language.name = details[:name]
+ language.default_language = details[:default_language]
+ language.save!
+end
+
+regions = {
+ 'UK' => {
+ abbreviation: 'uk',
+ description: 'default region',
+ name: 'UK',
+ },
+ 'DE' => {
+ abbreviation: 'de',
+ description: '',
+ name: 'DE',
+ },
+ 'Horizon2020' => {
+ abbreviation: 'horizon',
+ description: 'European super region',
+ name: 'Horizon2020',
+ }
+}
+
+regions.each do |l, details|
+ region = Region.new
+ region.abbreviation = details[:abbreviation]
+ region.description = details[:description]
+ region.name = details[:name]
+ region.save!
+end
+
+region_groups = {
+ 'UK' => {
+ super_region_name: 'Horizon2020',
+ region_name: 'UK',
+ },
+ 'DE' => {
+ super_region_name: 'Horizon2020',
+ region_name: 'DE',
+ }
+}
+
+region_groups.each do |l, details|
+ region_group = RegionGroup.new
+ region_group.super_region_id = Region.find_by_name(details[:super_region_name]).id
+ region_group.region_id = Region.find_by_name(details[:region_name]).id
+ region_group.save!
+end
+
organisation_types = {
'Organisation' => {
name: "Organisation"
@@ -40,7 +114,9 @@
organisation_type: "Organisation",
description: "An example: Regional Curation Center concerned with research data management (typically the organization hosting this website)",
banner_text: "Example: Your Regional Curation Center",
- domain: "example.regionalcurationcenter.org"
+ domain: "example.regionalcurationcenter.org",
+ region: 'UK',
+ language: 'English(UK)'
},
'Global Funding Organization' => {
name: "Global Research Center",
@@ -49,7 +125,9 @@
organisation_type: "Funder",
description: "An example: Research funding agency",
banner_text: "Example: Global Research Center",
- domain: "example.globalresearchcenter.org"
+ domain: "example.globalresearchcenter.org",
+ region: 'UK',
+ language: 'English(UK)'
},
'Regional Funding Organization' => {
name: "Regional Science Federation",
@@ -58,7 +136,9 @@
organisation_type: "Funder",
description: "An example: Regional funding agency for scientific research",
banner_text: "Example: Regional Science Federation",
- domain: "example.regionalsciencefederation.org"
+ domain: "example.regionalsciencefederation.org",
+ region: 'UK',
+ language: 'English(UK)'
},
'Example Institution'=> {
name: "Capital City College",
@@ -67,7 +147,9 @@
sort_name: "CapitalCityCollege",
organisation_type: "Institution",
description: "An example: Academic institution",
- banner_text: "Example: Capital City College ... go mascots!!"
+ banner_text: "Example: Capital City College ... go mascots!!",
+ region: 'UK',
+ language: 'English(UK)'
}
}
@@ -79,6 +161,8 @@
organisation.domain = details[:domain]
organisation.sort_name = details[:sort_name]
organisation.organisation_type = OrganisationType.find_by_name(details[:organisation_type])
+ organisation.region_id = Region.find_by_name(details[:region]).id
+ organisation.language_id = Language.find_by_name(details[:language]).id
organisation.save!
end
end
@@ -129,6 +213,7 @@
surname: "Admin",
password_confirmation: "password123",
organisation: "RCC",
+ language: 'English(UK)',
roles: ['admin','org_admin'],
accept_terms: true,
confirmed_at: Time.zone.now
@@ -140,6 +225,7 @@
firstname: "Funder",
surname: "Admin",
organisation: "RegSciFed",
+ language: 'English(UK)',
roles: ['org_admin'],
accept_terms: true,
confirmed_at: Time.zone.now
@@ -151,6 +237,7 @@
firstname: "Organization",
surname: "Admin",
organisation: "CapColl",
+ language: 'English(UK)',
roles: ['org_admin'],
accept_terms: true,
confirmed_at: Time.zone.now
@@ -162,6 +249,7 @@
firstname: "Jane",
surname: "Researcher",
organisation: "CapColl",
+ language: 'English(UK)',
roles: ['user'],
accept_terms: true,
confirmed_at: Time.zone.now
@@ -178,6 +266,7 @@
usr.organisation_id = Organisation.find_by_abbreviation(details[:organisation]).id
# usr.user_org_roles << UserOrgRole.create(organisation: Organisation.find_by_abbreviation(details[:organisation]),
# user_role_type: UserRoleType.find_by_name('admin'))
+ usr.language_id = Language.find_by_name(details[:language]).id
details[:roles].each do |role|
usr.roles << Role.find_by_name(role)
end
@@ -525,7 +614,7 @@
section: "Data Collection",
number: 1,
guidance: " What type, format and volume of data? Do your chosen formats and software enable sharing and long-term access to the data? Are there any existing data that you can reuse? Give a brief description of the data, including any existing data or third-party sources that will be used, in each case noting its content, type and coverage. Outline and justify your choice of format and consider the implications of data format and data volumes in terms of storage, backup and access.
",
- themes: ["Theme 1", "Theme 2"]
+ themes: ["Theme 2"]
},
"How will the data be collected or created?" => {
text: "How will the data be collected or created?",
@@ -539,7 +628,7 @@
section: "Documentation and Metadata",
number: 1,
guidance: " What information is needed for the data to be to be read and interpreted in the future? How will you capture / create this documentation and metadata? What metadata standards will you use and why? Describe the types of documentation that will accompany the data to help secondary users to understand and reuse it. This should at least include basic details that will help people to find the data, including who created or contributed to the data, its title, date of creation and under what conditions it can be accessed.
Documentation may also include details on the methodology used, analytical and procedural information, definitions of variables, vocabularies, units of measurement, any assumptions made, and the format and file type of the data. Consider how you will capture this information and where it will be recorded. Wherever possible you should identify and use existing community standards.
",
- themes: ["Theme 1", "Theme 4"]
+ themes: ["Theme 1"]
},
"Data Overview" => {
text: "Overview of the Data",
@@ -613,9 +702,9 @@
}
formatting.each do |org, settings|
- template = Dmptemplate.find_by_title("#{org} Template")
- template.settings(:export).formatting = settings
- template.save!
+ #template = Dmptemplate.find_by_title("#{org} Template") # this is bugged, there is no Funder Template nor DCC template
+ #template.settings(:export).formatting = settings
+ #template.save!
end
token_permission_types = {
@@ -624,6 +713,12 @@
},
'plans' => {
description: "allows a user access to the plans api endpoint"
+ },
+ 'templates' => {
+ description: "allows a user access to the templates api endpoint"
+ },
+ 'statistics' => {
+ description: "allows a user access to the statistics api endpoint"
}
}
@@ -635,29 +730,20 @@
end
languages = {
- 'EN-UK' => {
- abbreviation: "en-UK",
- description: "",
- name: "en-UK"
- },
- 'FR' => {
- abbreviation: "fr",
- description: "",
- name: "fr"
- },
- 'DE' => {
- abbreviation: "de",
- description: "",
- name: "de"
- }
+ 'en-UK': {
+ abbreviation: 'en-UK', name: 'en-UK', description: 'English - UK', default_language: 0
+ },
+ 'en-US': {
+ abbreviation: 'en-US', name: 'en-US', description: 'English - US', default_language: 1
+ },
+ 'fr': {
+ abbreviation: 'fr', name: 'fr', description: 'French', default_language: 0
+ },
+ 'de': {
+ abbreviation: 'de', name: 'de', description: 'German', default_language: 0
+ }
}
-languages.each do |l, details|
- language = Language.new
- language.abbreviation = details[:abbreviation]
- language.description = details[:description]
- language.name = details[:name]
- language.save!
+languages.each do |title,settings|
+ Language.new(settings).save!
end
-
-
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP
index fe41f5c..ab562a4 100644
--- a/doc/README_FOR_APP
+++ b/doc/README_FOR_APP
@@ -1,2 +1,2 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
diff --git a/html/ActiveAdmin.html b/html/ActiveAdmin.html
index 86caeab..03afd0f 100644
--- a/html/ActiveAdmin.html
+++ b/html/ActiveAdmin.html
@@ -1,272 +1,272 @@
-
-
-
-
-
-
-module ActiveAdmin - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module ActiveAdmin
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module ActiveAdmin - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module ActiveAdmin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ActiveAdmin/Views.html b/html/ActiveAdmin/Views.html
index e214511..c44200e 100644
--- a/html/ActiveAdmin/Views.html
+++ b/html/ActiveAdmin/Views.html
@@ -1,272 +1,272 @@
-
-
-
-
-
-
-module ActiveAdmin::Views - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module ActiveAdmin::Views
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module ActiveAdmin::Views - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module ActiveAdmin::Views
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ActiveAdmin/Views/Pages.html b/html/ActiveAdmin/Views/Pages.html
index be96e55..2b52a94 100644
--- a/html/ActiveAdmin/Views/Pages.html
+++ b/html/ActiveAdmin/Views/Pages.html
@@ -1,272 +1,272 @@
-
-
-
-
-
-
-module ActiveAdmin::Views::Pages - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module ActiveAdmin::Views::Pages
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module ActiveAdmin::Views::Pages - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module ActiveAdmin::Views::Pages
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/AdminUser.html b/html/AdminUser.html
index e1415a5..842707c 100644
--- a/html/AdminUser.html
+++ b/html/AdminUser.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class AdminUser - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class AdminUser
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class AdminUser - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class AdminUser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Answer.html b/html/Answer.html
index 6385ea5..d180dc9 100644
--- a/html/Answer.html
+++ b/html/Answer.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class Answer - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Answer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Answer - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Answer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/AnswersController.html b/html/AnswersController.html
index cd7837a..e97eb8f 100644
--- a/html/AnswersController.html
+++ b/html/AnswersController.html
@@ -1,360 +1,360 @@
-
-
-
-
-
-
-class AnswersController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class AnswersController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- create ()
- click to toggle source
-
-
-
-
-
-
POST /answers POST /answers.json
-
-
-
-
-
-def create
- @answer = Answer .new (params [:answer ])
- if (user_signed_in? ) && @answer .plan .editable_by (current_user .id ) then
- old_answer = @answer .plan .answer (@answer .question_id , false )
- proceed = false
- @answer .text = params ["answer-text-#{@answer.question_id}" .to_sym ]
- if (old_answer .nil? && @answer .text != "" ) || ((! old_answer .nil? ) && (old_answer .text != @answer .text )) then
- proceed = true
- end
-
- if (@answer .question .question_format .title == I18n .t ("helpers.checkbox" ) ||
- @answer .question .question_format .title == I18n .t ("helpers.multi_select_box" ) ||
- @answer .question .question_format .title == I18n .t ("helpers.radio_buttons" ) ||
- @answer .question .question_format .title == I18n .t ("helpers.dropdown" )) then
- if (old_answer .nil? && @answer .option_ids .count > 0 ) || ((! old_answer .nil? ) && (old_answer .option_ids - @answer .option_ids ).count != 0 && (@answer .option_ids - old_answer .option_ids ).count != 0 ) then
- proceed = true
- end
- end
- if proceed
- respond_to do | format |
- if @answer .save
- format .html { redirect_to :back , status : :found , notice : 'Answer was successfully recorded.' }
- format .json { render json : @answer , status : :created , location : @answer }
- else
- format .html { redirect_to :back , notice : 'There was an error saving the answer.' }
- format .json { render json : @answer .errors , status : :unprocessable_entity }
- end
- end
- else
- respond_to do | format |
- format .html { redirect_to :back , notice : 'No change in answer content - not saved.' }
- format .json { render json : @answer .errors , status : :unprocessable_entity }
- end
- end
- else
- render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class AnswersController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class AnswersController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create ()
+ click to toggle source
+
+
+
+
+
+
POST /answers POST /answers.json
+
+
+
+
+
+def create
+ @answer = Answer .new (params [:answer ])
+ if (user_signed_in? ) && @answer .plan .editable_by (current_user .id ) then
+ old_answer = @answer .plan .answer (@answer .question_id , false )
+ proceed = false
+ @answer .text = params ["answer-text-#{@answer.question_id}" .to_sym ]
+ if (old_answer .nil? && @answer .text != "" ) || ((! old_answer .nil? ) && (old_answer .text != @answer .text )) then
+ proceed = true
+ end
+
+ if (@answer .question .question_format .title == I18n .t ("helpers.checkbox" ) ||
+ @answer .question .question_format .title == I18n .t ("helpers.multi_select_box" ) ||
+ @answer .question .question_format .title == I18n .t ("helpers.radio_buttons" ) ||
+ @answer .question .question_format .title == I18n .t ("helpers.dropdown" )) then
+ if (old_answer .nil? && @answer .option_ids .count > 0 ) || ((! old_answer .nil? ) && (old_answer .option_ids - @answer .option_ids ).count != 0 && (@answer .option_ids - old_answer .option_ids ).count != 0 ) then
+ proceed = true
+ end
+ end
+ if proceed
+ respond_to do | format |
+ if @answer .save
+ format .html { redirect_to :back , status : :found , notice : 'Answer was successfully recorded.' }
+ format .json { render json : @answer , status : :created , location : @answer }
+ else
+ format .html { redirect_to :back , notice : 'There was an error saving the answer.' }
+ format .json { render json : @answer .errors , status : :unprocessable_entity }
+ end
+ end
+ else
+ respond_to do | format |
+ format .html { redirect_to :back , notice : 'No change in answer content - not saved.' }
+ format .json { render json : @answer .errors , status : :unprocessable_entity }
+ end
+ end
+ else
+ render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ApplicationHelper.html b/html/ApplicationHelper.html
index 0f5b940..9c7890b 100644
--- a/html/ApplicationHelper.html
+++ b/html/ApplicationHelper.html
@@ -1,453 +1,453 @@
-
-
-
-
-
-
-module ApplicationHelper - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module ApplicationHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- devise_mapping ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def devise_mapping
- @devise_mapping ||= Devise .mappings [:user ]
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- javascript (*files)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def javascript (*files )
- content_for (:head ) { javascript_include_tag (*files ) }
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- link_to_add_object (name, f, association, css_class, i)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
- def link_to_add_object (name , f , association , css_class , i )
- new_object = f .object .class .reflect_on_association (association ).klass .new
- fields = f .fields_for (association , new_object , :child_index => "new_#{association}" ) do | builder |
- j = i + 1
- new_object .number = j
- render (association .to_s .singularize + "_fields" , :f => builder )
- end
- link_to_function (name , "add_object(this, \"#{association}\", \"#{escape_javascript(fields)}\")" , :class => css_class )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- resource ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def resource
- @resource ||= User .new
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- resource_name ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def resource_name
- :user
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module ApplicationHelper - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module ApplicationHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ devise_mapping ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def devise_mapping
+ @devise_mapping ||= Devise .mappings [:user ]
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ javascript (*files)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def javascript (*files )
+ content_for (:head ) { javascript_include_tag (*files ) }
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ link_to_add_object (name, f, association, css_class, i)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+ def link_to_add_object (name , f , association , css_class , i )
+ new_object = f .object .class .reflect_on_association (association ).klass .new
+ fields = f .fields_for (association , new_object , :child_index => "new_#{association}" ) do | builder |
+ j = i + 1
+ new_object .number = j
+ render (association .to_s .singularize + "_fields" , :f => builder )
+ end
+ link_to_function (name , "add_object(this, \"#{association}\", \"#{escape_javascript(fields)}\")" , :class => css_class )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resource ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def resource
+ @resource ||= User .new
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resource_name ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def resource_name
+ :user
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Comment.html b/html/Comment.html
index 27a1246..aec80f8 100644
--- a/html/Comment.html
+++ b/html/Comment.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class Comment - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Comment
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{text}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Comment - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Comment
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{text}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ConfirmationsController.html b/html/ConfirmationsController.html
index 0b254d4..b4c7297 100644
--- a/html/ConfirmationsController.html
+++ b/html/ConfirmationsController.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class ConfirmationsController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ConfirmationsController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- after_confirmation_path_for (resource_name, resource)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def after_confirmation_path_for (resource_name , resource )
- root_path
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ConfirmationsController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ConfirmationsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ after_confirmation_path_for (resource_name, resource)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def after_confirmation_path_for (resource_name , resource )
+ root_path
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ContactsController.html b/html/ContactsController.html
index 116d651..96d5d5e 100644
--- a/html/ContactsController.html
+++ b/html/ContactsController.html
@@ -1,350 +1,350 @@
-
-
-
-
-
-
-class ContactsController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ContactsController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- create ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def create
- @contact = ContactUs :: Contact .new (params [:contact_us_contact ])
- if (! user_signed_in? )
- if verify_recaptcha (:message => "You have not added the validation words correctly" ) && @contact .save
- flash [:notice ] = t ('contact_us.notices.success' )
- if user_signed_in? then
- redirect_to :controller => 'projects' , :action => 'index'
- else
- redirect_to (root_path )
- end
- else
- flash [:alert ] = t ('contact_us.notices.error' )
- render_new_page
- end
- else
- if @contact .save
- flash [:notice ] = t ('contact_us.notices.success' )
- if user_signed_in? then
- redirect_to :controller => 'projects' , :action => 'index'
- else
- redirect_to (root_path )
- end
- else
- flash [:alert ] = t ('contact_us.notices.error' )
- render_new_page
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ContactsController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ContactsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def create
+ @contact = ContactUs :: Contact .new (params [:contact_us_contact ])
+ if (! user_signed_in? )
+ if verify_recaptcha (:message => "You have not added the validation words correctly" ) && @contact .save
+ flash [:notice ] = t ('contact_us.notices.success' )
+ if user_signed_in? then
+ redirect_to :controller => 'projects' , :action => 'index'
+ else
+ redirect_to (root_path )
+ end
+ else
+ flash [:alert ] = t ('contact_us.notices.error' )
+ render_new_page
+ end
+ else
+ if @contact .save
+ flash [:notice ] = t ('contact_us.notices.success' )
+ if user_signed_in? then
+ redirect_to :controller => 'projects' , :action => 'index'
+ else
+ redirect_to (root_path )
+ end
+ else
+ flash [:alert ] = t ('contact_us.notices.error' )
+ render_new_page
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/CustomFailure.html b/html/CustomFailure.html
index 0092c76..3a6aca8 100644
--- a/html/CustomFailure.html
+++ b/html/CustomFailure.html
@@ -1,361 +1,361 @@
-
-
-
-
-
-
-class CustomFailure - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class CustomFailure
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- redirect_url ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def redirect_url
- root_path
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- respond ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def respond
- if http_auth?
- http_auth
- else
- redirect
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class CustomFailure - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class CustomFailure
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ redirect_url ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def redirect_url
+ root_path
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ respond ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def respond
+ if http_auth?
+ http_auth
+ else
+ redirect
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/DMPonline4.html b/html/DMPonline4.html
index 945f7f8..dfdcbc5 100644
--- a/html/DMPonline4.html
+++ b/html/DMPonline4.html
@@ -1,274 +1,274 @@
-
-
-
-
-
-
-module DMPonline4 - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module DMPonline4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module DMPonline4 - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module DMPonline4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/DMPonline4/Application.html b/html/DMPonline4/Application.html
index ca87eb0..8777970 100644
--- a/html/DMPonline4/Application.html
+++ b/html/DMPonline4/Application.html
@@ -1,280 +1,280 @@
-
-
-
-
-
-
-class DMPonline4::Application - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class DMPonline4::Application
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class DMPonline4::Application - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class DMPonline4::Application
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ExistingUsersController.html b/html/ExistingUsersController.html
index 63894ff..207ddd3 100644
--- a/html/ExistingUsersController.html
+++ b/html/ExistingUsersController.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class ExistingUsersController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ExistingUsersController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- index ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def index
- @email = params [:email ]
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ExistingUsersController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ExistingUsersController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ index ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def index
+ @email = params [:email ]
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ExportedPlan.html b/html/ExportedPlan.html
index 2699dd2..1c12381 100644
--- a/html/ExportedPlan.html
+++ b/html/ExportedPlan.html
@@ -1,846 +1,846 @@
-
-
-
-
-
-
-class ExportedPlan - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ExportedPlan
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VALID_FORMATS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- admin_details ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def admin_details
- @admin_details ||= self .settings (:export ).fields [:admin ]
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- as_csv ()
- click to toggle source
-
-
-
-
-
-
Export formats
-
-
-
-
-
-def as_csv
- CSV .generate do | csv |
- csv << ["Section" ,"Question" ,"Answer" ,"Selected option(s)" ,"Answered by" ,"Answered at" ]
- self .sections .each do | section |
- self .questions_for_section (section ).each do | question |
- answer = self .plan .answer (question .id )
- options_string = answer .options .collect {| o | o .text }.join ('; ' )
-
- csv << [section .title , question .text , sanitize_text (answer .text ), options_string , answer .try (:user ).try (:name ), answer .created_at ]
- end
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- as_txt ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def as_txt
- output = "#{self.plan.project.title}\n\n#{self.plan.version.phase.title}\n"
-
- self .sections .each do | section |
- output += "\n#{section.title}\n"
-
- self .questions_for_section (section ).each do | question |
- output += "\n#{question.text}\n"
- answer = self .plan .answer (question .id , false )
-
- if answer .nil? || answer .text .nil? then
- output += "Question not answered.\n"
- else
- output += answer .options .collect {| o | o .text }.join ("\n" )
- if question .option_comment_display == true then
- output += "\n#{sanitize_text(answer.text)}\n"
- else
- output += "\n"
- end
- end
- end
- end
-
- output
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- funder ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def funder
- org = self .plan .project .dmptemplate .try (:organisation )
- org .name if org .present? && org .organisation_type .try (:name ) == I18n .t ('helpers.org_type.funder' )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- grant_title ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def grant_title
- self .plan .project .grant_number
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- institution ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def institution
- plan .project .organisation .try (:name )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- principal_investigator ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def principal_investigator
- self .plan .project .principal_investigator
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- project_description ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def project_description
- self .plan .project .description
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- project_identifier ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def project_identifier
- self .plan .project .identifier
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- project_name ()
- click to toggle source
-
-
-
-
-
-
Getters to match Settings::Dmptemplate::VALID_ADMIN_FIELDS
-
-
-
-
-
-def project_name
- name = self .plan .project .title
- name += " - #{self.plan.title}" if self .plan .project .dmptemplate .phases .count > 1
- name
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- questions_for_section (section_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def questions_for_section (section_id )
- questions .where (section_id : section_id )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- sections ()
- click to toggle source
-
-
-
-
-
-
sections taken from fields settings
-
-
-
-
-
-def sections
- sections = self .plan .sections
-
- return [] if questions .empty?
-
- section_ids = questions .pluck (:section_id ).uniq
- sections = sections .select {| section | section_ids .member? (section .id ) }
-
- sections .sort_by (&:number )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- questions ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def questions
- @questions ||= begin
- question_settings = self .settings (:export ).fields [:questions ]
-
- return [] if question_settings .is_a? (Array ) && question_settings .empty?
-
- questions = if question_settings .present? && question_settings != :all
- Question .where (id : question_settings )
- else
- Question .where (section_id : self .plan .sections .collect {| s | s .id })
- end
-
- questions .order (:number )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- sanitize_text (text)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def sanitize_text (text )
- if (! text .nil? ) then ActionView :: Base .full_sanitizer .sanitize (text .gsub (/ / ,"" )) end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ExportedPlan - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ExportedPlan
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VALID_FORMATS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ admin_details ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def admin_details
+ @admin_details ||= self .settings (:export ).fields [:admin ]
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ as_csv ()
+ click to toggle source
+
+
+
+
+
+
Export formats
+
+
+
+
+
+def as_csv
+ CSV .generate do | csv |
+ csv << ["Section" ,"Question" ,"Answer" ,"Selected option(s)" ,"Answered by" ,"Answered at" ]
+ self .sections .each do | section |
+ self .questions_for_section (section ).each do | question |
+ answer = self .plan .answer (question .id )
+ options_string = answer .options .collect {| o | o .text }.join ('; ' )
+
+ csv << [section .title , question .text , sanitize_text (answer .text ), options_string , answer .try (:user ).try (:name ), answer .created_at ]
+ end
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ as_txt ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def as_txt
+ output = "#{self.plan.project.title}\n\n#{self.plan.version.phase.title}\n"
+
+ self .sections .each do | section |
+ output += "\n#{section.title}\n"
+
+ self .questions_for_section (section ).each do | question |
+ output += "\n#{question.text}\n"
+ answer = self .plan .answer (question .id , false )
+
+ if answer .nil? || answer .text .nil? then
+ output += "Question not answered.\n"
+ else
+ output += answer .options .collect {| o | o .text }.join ("\n" )
+ if question .option_comment_display == true then
+ output += "\n#{sanitize_text(answer.text)}\n"
+ else
+ output += "\n"
+ end
+ end
+ end
+ end
+
+ output
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ funder ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def funder
+ org = self .plan .project .dmptemplate .try (:organisation )
+ org .name if org .present? && org .organisation_type .try (:name ) == I18n .t ('helpers.org_type.funder' )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ grant_title ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def grant_title
+ self .plan .project .grant_number
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ institution ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def institution
+ plan .project .organisation .try (:name )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ principal_investigator ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def principal_investigator
+ self .plan .project .principal_investigator
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_description ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def project_description
+ self .plan .project .description
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_identifier ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def project_identifier
+ self .plan .project .identifier
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_name ()
+ click to toggle source
+
+
+
+
+
+
Getters to match Settings::Dmptemplate::VALID_ADMIN_FIELDS
+
+
+
+
+
+def project_name
+ name = self .plan .project .title
+ name += " - #{self.plan.title}" if self .plan .project .dmptemplate .phases .count > 1
+ name
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ questions_for_section (section_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def questions_for_section (section_id )
+ questions .where (section_id : section_id )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sections ()
+ click to toggle source
+
+
+
+
+
+
sections taken from fields settings
+
+
+
+
+
+def sections
+ sections = self .plan .sections
+
+ return [] if questions .empty?
+
+ section_ids = questions .pluck (:section_id ).uniq
+ sections = sections .select {| section | section_ids .member? (section .id ) }
+
+ sections .sort_by (&:number )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ questions ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def questions
+ @questions ||= begin
+ question_settings = self .settings (:export ).fields [:questions ]
+
+ return [] if question_settings .is_a? (Array ) && question_settings .empty?
+
+ questions = if question_settings .present? && question_settings != :all
+ Question .where (id : question_settings )
+ else
+ Question .where (section_id : self .plan .sections .collect {| s | s .id })
+ end
+
+ questions .order (:number )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sanitize_text (text)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def sanitize_text (text )
+ if (! text .nil? ) then ActionView :: Base .full_sanitizer .sanitize (text .gsub (/ / ,"" )) end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/FileType.html b/html/FileType.html
index 6ae2447..ab97dc6 100644
--- a/html/FileType.html
+++ b/html/FileType.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class FileType - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class FileType
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class FileType - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class FileType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/FileUpload.html b/html/FileUpload.html
index 65bdbc5..14c28de 100644
--- a/html/FileUpload.html
+++ b/html/FileUpload.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class FileUpload - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class FileUpload
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class FileUpload - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class FileUpload
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Guidance.html b/html/Guidance.html
index 11f8459..2700bfe 100644
--- a/html/Guidance.html
+++ b/html/Guidance.html
@@ -1,426 +1,426 @@
-
-
-
-
-
-
-class Guidance - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Guidance
-
-
-
Project:
-
-DMPonline v4
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- by_organisation (org_id)
- click to toggle source
-
-
-
-
-
-
all guidance that belong to an organisation
-
-
-
-
-
-def self .by_organisation (org_id )
- all_guidance = Guidance .all
- org_guidance = Array .new
-
- all_guidance .each do | guidance |
- if guidance .in_group_belonging_to? (org_id ) then
- org_guidance << guidance
- end
- end
-
- return org_guidance
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- get_guidance_group_templates? (guidance_group)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def get_guidance_group_templates? (guidance_group )
- templates = guidancegroups .where ("guidance_group_id (?)" , guidance_group .id ).template
- return templates
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
- in_group_belonging_to? (organisation_id)
- click to toggle source
-
-
-
-
-
-
verifies if one guidance belongs to a org
-
-
-
-
-
-def in_group_belonging_to? (organisation_id )
- guidance_groups .each do | guidance_group |
- if guidance_group .organisation_id == organisation_id then
- return true
- end
- end
- return false
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Guidance - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Guidance
+
+
+
Project:
+
+DMPonline v4
+ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ by_organisation (org_id)
+ click to toggle source
+
+
+
+
+
+
all guidance that belong to an organisation
+
+
+
+
+
+def self .by_organisation (org_id )
+ all_guidance = Guidance .all
+ org_guidance = Array .new
+
+ all_guidance .each do | guidance |
+ if guidance .in_group_belonging_to? (org_id ) then
+ org_guidance << guidance
+ end
+ end
+
+ return org_guidance
+
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ get_guidance_group_templates? (guidance_group)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def get_guidance_group_templates? (guidance_group )
+ templates = guidancegroups .where ("guidance_group_id (?)" , guidance_group .id ).template
+ return templates
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ in_group_belonging_to? (organisation_id)
+ click to toggle source
+
+
+
+
+
+
verifies if one guidance belongs to a org
+
+
+
+
+
+def in_group_belonging_to? (organisation_id )
+ guidance_groups .each do | guidance_group |
+ if guidance_group .organisation_id == organisation_id then
+ return true
+ end
+ end
+ return false
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/GuidanceGroup.html b/html/GuidanceGroup.html
index 65fe5e3..b9de7cb 100644
--- a/html/GuidanceGroup.html
+++ b/html/GuidanceGroup.html
@@ -1,404 +1,404 @@
-
-
-
-
-
-
-class GuidanceGroup - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class GuidanceGroup
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- guidance_groups_excluding (excluded_orgs)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def self .guidance_groups_excluding (excluded_orgs )
- excluded_org_ids = Array .new
- excluded_orgs .each do | org |
- excluded_org_ids << org .id
- end
- return_orgs = GuidanceGroup .where ("organisation_id NOT IN (?)" , excluded_org_ids )
- return return_orgs
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- display_name ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def display_name
- if organisation .guidance_groups .count > 1
- return "#{organisation.name}: #{name}"
- else
- return organisation .name
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{display_name}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class GuidanceGroup - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class GuidanceGroup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ guidance_groups_excluding (excluded_orgs)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def self .guidance_groups_excluding (excluded_orgs )
+ excluded_org_ids = Array .new
+ excluded_orgs .each do | org |
+ excluded_org_ids << org .id
+ end
+ return_orgs = GuidanceGroup .where ("organisation_id NOT IN (?)" , excluded_org_ids )
+ return return_orgs
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ display_name ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def display_name
+ if organisation .guidance_groups .count > 1
+ return "#{organisation.name}: #{name}"
+ else
+ return organisation .name
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{display_name}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/HomeController.html b/html/HomeController.html
index adac0c9..de06c21 100644
--- a/html/HomeController.html
+++ b/html/HomeController.html
@@ -1,363 +1,363 @@
-
-
-
-
-
-
-class HomeController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class HomeController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- about_us ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- index ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def index
- if user_signed_in?
- name = current_user .name (false )
- if name .nil? || name == "" then
- redirect_to edit_user_registration_path
- else
- redirect_to projects_url
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class HomeController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class HomeController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ about_us ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ index ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def index
+ if user_signed_in?
+ name = current_user .name (false )
+ if name .nil? || name == "" then
+ redirect_to edit_user_registration_path
+ else
+ redirect_to projects_url
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Option.html b/html/Option.html
index 583ffdb..84cec1e 100644
--- a/html/Option.html
+++ b/html/Option.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class Option - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Option
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{text}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Option - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Option
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{text}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/OptionWarning.html b/html/OptionWarning.html
index 5a765d1..89da768 100644
--- a/html/OptionWarning.html
+++ b/html/OptionWarning.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class OptionWarning - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class OptionWarning
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{text}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class OptionWarning - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class OptionWarning
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{text}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Organisation.html b/html/Organisation.html
index 2687750..359bcb0 100644
--- a/html/Organisation.html
+++ b/html/Organisation.html
@@ -1,626 +1,626 @@
-
-
-
-
-
-
-class Organisation - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Organisation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- orgs_with_parent_of_type (org_type)
- click to toggle source
-
-
-
-
-
-
retrieves info off a child org
-
-
-
-
-
-def self .orgs_with_parent_of_type (org_type )
- parents = OrganisationType .find_by_name (org_type ).organisations
- children = Array .new
- parents .each do | parent |
- children += parent .children
- end
- return children
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- other_organisations ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def self .other_organisations
- org_types = [I18n .t ('helpers.org_type.organisation' )]
- organisations_list = []
- org_types .each do | ot |
- new_org_obejct = OrganisationType .find_by_name (ot )
-
- org_with_guidance = GuidanceGroup .joins (new_org_obejct .organisations )
-
- organisations_list = organisations_list + org_with_guidance
- end
- return organisations_list
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- all_guidance_groups ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def all_guidance_groups
- ggs = guidance_groups
- children .each do | c |
- ggs = ggs + c .all_guidance_groups
- end
- return ggs
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- all_sections (version_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def all_sections (version_id )
- if parent .nil?
- secs = sections .where ("version_id = ?" , version_id )
- if secs .nil? then
- secs = Array .new
- end
- return secs
- else
- return sections .find_all_by_version_id (version_id ) + parent .all_sections (version_id )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- published_templates ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def published_templates
- return dmptemplates .find_all_by_published (1 )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- root ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def root
- if parent .nil?
- return self
- else
- return parent .root
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- short_name ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def short_name
- if abbreviation .nil? then
- return name
- else
- return abbreviation
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- name
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- warning (option_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def warning (option_id )
- warning = option_warnings .find_by_option_id (option_id )
- if warning .nil? && ! parent .nil? then
- return parent .warning (option_id )
- else
- return warning
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Organisation - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Organisation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ orgs_with_parent_of_type (org_type)
+ click to toggle source
+
+
+
+
+
+
retrieves info off a child org
+
+
+
+
+
+def self .orgs_with_parent_of_type (org_type )
+ parents = OrganisationType .find_by_name (org_type ).organisations
+ children = Array .new
+ parents .each do | parent |
+ children += parent .children
+ end
+ return children
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ other_organisations ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def self .other_organisations
+ org_types = [I18n .t ('helpers.org_type.organisation' )]
+ organisations_list = []
+ org_types .each do | ot |
+ new_org_obejct = OrganisationType .find_by_name (ot )
+
+ org_with_guidance = GuidanceGroup .joins (new_org_obejct .organisations )
+
+ organisations_list = organisations_list + org_with_guidance
+ end
+ return organisations_list
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all_guidance_groups ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def all_guidance_groups
+ ggs = guidance_groups
+ children .each do | c |
+ ggs = ggs + c .all_guidance_groups
+ end
+ return ggs
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all_sections (version_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def all_sections (version_id )
+ if parent .nil?
+ secs = sections .where ("version_id = ?" , version_id )
+ if secs .nil? then
+ secs = Array .new
+ end
+ return secs
+ else
+ return sections .find_all_by_version_id (version_id ) + parent .all_sections (version_id )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ published_templates ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def published_templates
+ return dmptemplates .find_all_by_published (1 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ root ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def root
+ if parent .nil?
+ return self
+ else
+ return parent .root
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ short_name ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def short_name
+ if abbreviation .nil? then
+ return name
+ else
+ return abbreviation
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ name
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ warning (option_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def warning (option_id )
+ warning = option_warnings .find_by_option_id (option_id )
+ if warning .nil? && ! parent .nil? then
+ return parent .warning (option_id )
+ else
+ return warning
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/OrganisationType.html b/html/OrganisationType.html
index 8125a7e..ace8b80 100644
--- a/html/OrganisationType.html
+++ b/html/OrganisationType.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class OrganisationType - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class OrganisationType
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class OrganisationType - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class OrganisationType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Page.html b/html/Page.html
index b00f265..013ca0c 100644
--- a/html/Page.html
+++ b/html/Page.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class Page - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Page
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Page - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/PasswordsController.html b/html/PasswordsController.html
index de0bba5..082953f 100644
--- a/html/PasswordsController.html
+++ b/html/PasswordsController.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class PasswordsController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class PasswordsController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- after_resetting_password_path_for (resource)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
- def after_resetting_password_path_for (resource )
- root_path
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class PasswordsController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class PasswordsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ after_resetting_password_path_for (resource)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+ def after_resetting_password_path_for (resource )
+ root_path
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Phase.html b/html/Phase.html
index 6e12044..5a67745 100644
--- a/html/Phase.html
+++ b/html/Phase.html
@@ -1,457 +1,457 @@
-
-
-
-
-
-
-class Phase - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Phase
-
-
-
Project:
-
-DMPonline v4
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- has_sections ()
- click to toggle source
-
-
-
-
-
-
verify if a phase has a published version or a version with one or more
-sections
-
-
-
-
-
-def has_sections
- versions = self .versions .where ('published = ?' , true ).order ('updated_at DESC' )
- if versions .any? then
- version = versions .first
- if ! version .sections .empty? then
- has_section = true
- else
- has_section = false
- end
- else
- version = self .versions .order ('updated_at DESC' ).first
- if ! version .sections .empty? then
- has_section = true
- else
- has_section = false
- end
- end
- return has_section
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- latest_published_version ()
- click to toggle source
-
-
-
-
-
-
Verify if this phase has any published versions
-
-
-
-
-
-def latest_published_version
- versions .order ("number DESC" ).each do | version |
- if version .published then
- return version
- end
- end
- return nil
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- latest_version ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def latest_version
- return versions .order ("number DESC" ).last
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{title}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Phase - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Phase
+
+
+
Project:
+
+DMPonline v4
+ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ has_sections ()
+ click to toggle source
+
+
+
+
+
+
verify if a phase has a published version or a version with one or more
+sections
+
+
+
+
+
+def has_sections
+ versions = self .versions .where ('published = ?' , true ).order ('updated_at DESC' )
+ if versions .any? then
+ version = versions .first
+ if ! version .sections .empty? then
+ has_section = true
+ else
+ has_section = false
+ end
+ else
+ version = self .versions .order ('updated_at DESC' ).first
+ if ! version .sections .empty? then
+ has_section = true
+ else
+ has_section = false
+ end
+ end
+ return has_section
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ latest_published_version ()
+ click to toggle source
+
+
+
+
+
+
Verify if this phase has any published versions
+
+
+
+
+
+def latest_published_version
+ versions .order ("number DESC" ).each do | version |
+ if version .published then
+ return version
+ end
+ end
+ return nil
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ latest_version ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def latest_version
+ return versions .order ("number DESC" ).last
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{title}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/PlanSection.html b/html/PlanSection.html
index c4c80ea..c6ff3ba 100644
--- a/html/PlanSection.html
+++ b/html/PlanSection.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class PlanSection - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class PlanSection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class PlanSection - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class PlanSection
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/PlansHelper.html b/html/PlansHelper.html
index dd9c381..bd647f7 100644
--- a/html/PlansHelper.html
+++ b/html/PlansHelper.html
@@ -1,427 +1,427 @@
-
-
-
-
-
-
-module PlansHelper - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module PlansHelper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- plan_settings_indicator (plan)
- click to toggle source
-
-
-
-
-
-
Shows whether the user has default, template-default or custom settings for
-the given plan.
-
-
-
-
-
-def plan_settings_indicator (plan )
- plan_settings = plan .super_settings (:export )
- template_settings = plan .project .dmptemplate .try (:settings , :export )
-
- key = if plan_settings .try (:value? )
- plan_settings .formatting == template_settings .formatting ? 'template_formatting' : 'custom_formatting'
- elsif template_settings .try (:value? )
- 'template_formatting'
- else
- 'default_formatting'
- end
-
- content_tag (:small , t ("helpers.settings.plans.#{key}" ))
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- project_list_body (column, project)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def project_list_body (column , project )
- klass , content = case column
- when :name
- [ 'dmp_td_big' , link_to (project .title , project_path (project ), class : 'dmp_table_link' ) ]
- when :owner
- user = project .owner
- text = if user .nil?
- 'Unknown'
- elsif user == current_user
- t ('helpers.me' )
- else
- user .name
- end
-
- [ 'tmp_td_small' , text ]
- when :shared
- shared_num = project .project_groups .count - 1
- text = shared_num > 0 ? (t ('helpers.yes' ) + " (with #{shared_num} people) " ) : t ('helpers.no' )
- [ 'dmp_td_small' , text ]
- when :last_edited
- [ 'dmp_td_small' , l (project .latest_update .to_date , formats : :short ) ]
- when :description
- [ 'dmp_td_medium' , (project .try (column ) || 'Unknown' ) ]
- else
- [ 'dmp_td_small' , (project .try (column ) || 'Unknown' ) ]
- end
-
- content_tag (:td , content , class : klass )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- project_list_head (column)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def project_list_head (column )
- klass = case column
- when :name then :dmp_th_big
- when :description then :dmp_th_big
- else :dmp_th_small
- end
-
- content_tag (:th , t ("helpers.project.columns.#{column}" ), class : klass )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module PlansHelper - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module PlansHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ plan_settings_indicator (plan)
+ click to toggle source
+
+
+
+
+
+
Shows whether the user has default, template-default or custom settings for
+the given plan.
+
+
+
+
+
+def plan_settings_indicator (plan )
+ plan_settings = plan .super_settings (:export )
+ template_settings = plan .project .dmptemplate .try (:settings , :export )
+
+ key = if plan_settings .try (:value? )
+ plan_settings .formatting == template_settings .formatting ? 'template_formatting' : 'custom_formatting'
+ elsif template_settings .try (:value? )
+ 'template_formatting'
+ else
+ 'default_formatting'
+ end
+
+ content_tag (:small , t ("helpers.settings.plans.#{key}" ))
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_list_body (column, project)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def project_list_body (column , project )
+ klass , content = case column
+ when :name
+ [ 'dmp_td_big' , link_to (project .title , project_path (project ), class : 'dmp_table_link' ) ]
+ when :owner
+ user = project .owner
+ text = if user .nil?
+ 'Unknown'
+ elsif user == current_user
+ t ('helpers.me' )
+ else
+ user .name
+ end
+
+ [ 'tmp_td_small' , text ]
+ when :shared
+ shared_num = project .project_groups .count - 1
+ text = shared_num > 0 ? (t ('helpers.yes' ) + " (with #{shared_num} people) " ) : t ('helpers.no' )
+ [ 'dmp_td_small' , text ]
+ when :last_edited
+ [ 'dmp_td_small' , l (project .latest_update .to_date , formats : :short ) ]
+ when :description
+ [ 'dmp_td_medium' , (project .try (column ) || 'Unknown' ) ]
+ else
+ [ 'dmp_td_small' , (project .try (column ) || 'Unknown' ) ]
+ end
+
+ content_tag (:td , content , class : klass )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_list_head (column)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def project_list_head (column )
+ klass = case column
+ when :name then :dmp_th_big
+ when :description then :dmp_th_big
+ else :dmp_th_small
+ end
+
+ content_tag (:th , t ("helpers.project.columns.#{column}" ), class : klass )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Project.html b/html/Project.html
index eedf021..0e46ebb 100644
--- a/html/Project.html
+++ b/html/Project.html
@@ -1,1262 +1,1262 @@
-
-
-
-
-
-
-class Project - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Project
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- projects_for_user (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def self .projects_for_user (user_id )
- projects = Array .new
- groups = ProjectGroup .where ("user_id = ?" , user_id )
- unless groups .nil? then
- groups .each do | group |
- unless group .project .nil? then
- projects << group .project
- end
- end
- end
- return projects
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- administerable_by (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def administerable_by (user_id )
- user = project_groups .find_by_user_id (user_id )
- if (! user .nil? ) && user .project_administrator then
- return true
- else
- return false
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- assign_administrator (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def assign_administrator (user_id )
- add_user (user_id , true , true )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- assign_creator (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def assign_creator (user_id )
- add_user (user_id , true , true , true )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- assign_editor (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def assign_editor (user_id )
- add_user (user_id , true )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- assign_reader (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def assign_reader (user_id )
- add_user (user_id )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- created_by (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def created_by (user_id )
- user = project_groups .find_by_user_id (user_id )
- if (! user .nil? ) && user .project_creator then
- return true
- else
- return false
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- editable_by (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def editable_by (user_id )
- user = project_groups .find_by_user_id (user_id )
- if (! user .nil? ) && user .project_editor then
- return true
- else
- return false
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- funder ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def funder
- if dmptemplate .nil? then
- return nil
- end
- template_org = dmptemplate .organisation
- if template_org .organisation_type .name == I18n .t ('helpers.org_type.funder' ).downcase
- return template_org
- else
- return nil
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- funder_id ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def funder_id
- if dmptemplate .nil? then
- return nil
- end
- template_org = dmptemplate .organisation
- if template_org .organisation_type .name == I18n .t ('helpers.org_type.funder' ).downcase
- return template_org .id
- else
- return nil
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- funder_id= (new_funder_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def funder_id= (new_funder_id )
- if new_funder_id != "" then
- new_funder = Organisation .find (new_funder_id );
- if new_funder .dmptemplates .count == 1 then
- dmptemplate = new_funder .dmptemplates .first
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- funder_name ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def funder_name
- if self .funder .nil?
- return read_attribute (:funder_name )
- else
- return self .funder .name
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- funder_name= (new_funder_name)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def funder_name= (new_funder_name )
- write_attribute (:funder_name , new_funder_name )
- org_table = Organisation .arel_table
- existing_org = Organisation .where (org_table [:name ].matches (new_funder_name ))
- if existing_org .nil?
- existing_org = Organisation .where (org_table [:abbreviation ].matches (new_funder_name ))
- end
- unless existing_org .empty?
- self .funder_id =existing_org .id
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- institution_id ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def institution_id
- if organisation .nil?
- return nil
- else
- return organisation .root .id
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- institution_id= (new_institution_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def institution_id= (new_institution_id )
- if organisation .nil? then
- self .organisation_id = new_institution_id
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- last_edited ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def last_edited
- self .latest_update .to_date
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- latest_update ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def latest_update
- latest_update = updated_at
- plans .each do | plan |
- if plan .latest_update > latest_update then
- latest_update = plan .latest_update
- end
- end
- return latest_update
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- name ()
- click to toggle source
-
-
-
-
-
-
Getters to match 'My plans' columns
-
-
-
-
-
-def name
- self .title
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- owner ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def owner
- self .project_groups .find_by_project_creator (true ).try (:user )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- readable_by (user_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def readable_by (user_id )
- user = project_groups .find_by_user_id (user_id )
- if (! user .nil? ) then
- return true
- else
- return false
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- shared ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- shared? ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def shared?
- self .project_groups .count > 1
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- template_owner ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def template_owner
- self .dmptemplate .try (:organisation ).try (:abbreviation )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- unit_id ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def unit_id
- if organisation .nil? || organisation .parent_id .nil?
- return nil
- else
- return organisation_id
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- unit_id= (new_unit_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def unit_id= (new_unit_id )
- unless new_unit_id .nil? || new_unit_id == ""
- self .organisation_id = new_unit_id
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- add_user (user_id, is_editor = false, is_administrator = false, is_creator = false)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def add_user (user_id , is_editor = false , is_administrator = false , is_creator = false )
- group = ProjectGroup .new
- group .user_id = user_id
- group .project_creator = is_creator
- group .project_editor = is_editor
- group .project_administrator = is_administrator
- project_groups << group
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- create_plans ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def create_plans
- dmptemplate .phases .each do | phase |
- latest_published_version = phase .latest_published_version
- unless latest_published_version .nil?
- new_plan = Plan .new
- new_plan .version = latest_published_version
- plans << new_plan
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Project - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ projects_for_user (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def self .projects_for_user (user_id )
+ projects = Array .new
+ groups = ProjectGroup .where ("user_id = ?" , user_id )
+ unless groups .nil? then
+ groups .each do | group |
+ unless group .project .nil? then
+ projects << group .project
+ end
+ end
+ end
+ return projects
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ administerable_by (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def administerable_by (user_id )
+ user = project_groups .find_by_user_id (user_id )
+ if (! user .nil? ) && user .project_administrator then
+ return true
+ else
+ return false
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ assign_administrator (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def assign_administrator (user_id )
+ add_user (user_id , true , true )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ assign_creator (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def assign_creator (user_id )
+ add_user (user_id , true , true , true )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ assign_editor (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def assign_editor (user_id )
+ add_user (user_id , true )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ assign_reader (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def assign_reader (user_id )
+ add_user (user_id )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ created_by (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def created_by (user_id )
+ user = project_groups .find_by_user_id (user_id )
+ if (! user .nil? ) && user .project_creator then
+ return true
+ else
+ return false
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ editable_by (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def editable_by (user_id )
+ user = project_groups .find_by_user_id (user_id )
+ if (! user .nil? ) && user .project_editor then
+ return true
+ else
+ return false
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ funder ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def funder
+ if dmptemplate .nil? then
+ return nil
+ end
+ template_org = dmptemplate .organisation
+ if template_org .organisation_type .name == I18n .t ('helpers.org_type.funder' ).downcase
+ return template_org
+ else
+ return nil
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ funder_id ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def funder_id
+ if dmptemplate .nil? then
+ return nil
+ end
+ template_org = dmptemplate .organisation
+ if template_org .organisation_type .name == I18n .t ('helpers.org_type.funder' ).downcase
+ return template_org .id
+ else
+ return nil
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ funder_id= (new_funder_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def funder_id= (new_funder_id )
+ if new_funder_id != "" then
+ new_funder = Organisation .find (new_funder_id );
+ if new_funder .dmptemplates .count == 1 then
+ dmptemplate = new_funder .dmptemplates .first
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ funder_name ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def funder_name
+ if self .funder .nil?
+ return read_attribute (:funder_name )
+ else
+ return self .funder .name
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ funder_name= (new_funder_name)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def funder_name= (new_funder_name )
+ write_attribute (:funder_name , new_funder_name )
+ org_table = Organisation .arel_table
+ existing_org = Organisation .where (org_table [:name ].matches (new_funder_name ))
+ if existing_org .nil?
+ existing_org = Organisation .where (org_table [:abbreviation ].matches (new_funder_name ))
+ end
+ unless existing_org .empty?
+ self .funder_id =existing_org .id
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ institution_id ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def institution_id
+ if organisation .nil?
+ return nil
+ else
+ return organisation .root .id
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ institution_id= (new_institution_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def institution_id= (new_institution_id )
+ if organisation .nil? then
+ self .organisation_id = new_institution_id
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ last_edited ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def last_edited
+ self .latest_update .to_date
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ latest_update ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def latest_update
+ latest_update = updated_at
+ plans .each do | plan |
+ if plan .latest_update > latest_update then
+ latest_update = plan .latest_update
+ end
+ end
+ return latest_update
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name ()
+ click to toggle source
+
+
+
+
+
+
Getters to match 'My plans' columns
+
+
+
+
+
+def name
+ self .title
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ owner ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def owner
+ self .project_groups .find_by_project_creator (true ).try (:user )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ readable_by (user_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def readable_by (user_id )
+ user = project_groups .find_by_user_id (user_id )
+ if (! user .nil? ) then
+ return true
+ else
+ return false
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ shared ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ shared? ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def shared?
+ self .project_groups .count > 1
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ template_owner ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def template_owner
+ self .dmptemplate .try (:organisation ).try (:abbreviation )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ unit_id ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def unit_id
+ if organisation .nil? || organisation .parent_id .nil?
+ return nil
+ else
+ return organisation_id
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ unit_id= (new_unit_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def unit_id= (new_unit_id )
+ unless new_unit_id .nil? || new_unit_id == ""
+ self .organisation_id = new_unit_id
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ add_user (user_id, is_editor = false, is_administrator = false, is_creator = false)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def add_user (user_id , is_editor = false , is_administrator = false , is_creator = false )
+ group = ProjectGroup .new
+ group .user_id = user_id
+ group .project_creator = is_creator
+ group .project_editor = is_editor
+ group .project_administrator = is_administrator
+ project_groups << group
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create_plans ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def create_plans
+ dmptemplate .phases .each do | phase |
+ latest_published_version = phase .latest_published_version
+ unless latest_published_version .nil?
+ new_plan = Plan .new
+ new_plan .version = latest_published_version
+ plans << new_plan
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ProjectGroup.html b/html/ProjectGroup.html
index a3d628a..140de14 100644
--- a/html/ProjectGroup.html
+++ b/html/ProjectGroup.html
@@ -1,441 +1,441 @@
-
-
-
-
-
-
-class ProjectGroup - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ProjectGroup
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- access_level ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def access_level
- if project_administrator then
- return 3
- elsif project_editor then
- return 2
- else
- return 1
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- access_level= (new_access_level)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def access_level= (new_access_level )
- new_access_level = new_access_level .to_i
- if new_access_level >= 3 then
- project_administrator = true
- else
- project_administrator = false
- end
- if new_access_level >= 2 then
- project_editor = true
- else
- project_editor = false
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- email ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def email
- unless user .nil?
- return user .email
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- email= (new_email)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def email= (new_email )
- unless User .find_by_email (email ).nil? then
- user = User .find_by_email (email )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ProjectGroup - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ProjectGroup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ access_level ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def access_level
+ if project_administrator then
+ return 3
+ elsif project_editor then
+ return 2
+ else
+ return 1
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ access_level= (new_access_level)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def access_level= (new_access_level )
+ new_access_level = new_access_level .to_i
+ if new_access_level >= 3 then
+ project_administrator = true
+ else
+ project_administrator = false
+ end
+ if new_access_level >= 2 then
+ project_editor = true
+ else
+ project_editor = false
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ email ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def email
+ unless user .nil?
+ return user .email
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ email= (new_email)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def email= (new_email )
+ unless User .find_by_email (email ).nil? then
+ user = User .find_by_email (email )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ProjectGroupsController.html b/html/ProjectGroupsController.html
index 73d7b3b..b7c5415 100644
--- a/html/ProjectGroupsController.html
+++ b/html/ProjectGroupsController.html
@@ -1,473 +1,473 @@
-
-
-
-
-
-
-class ProjectGroupsController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ProjectGroupsController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- create ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def create
- @project_group = ProjectGroup .new (params [:project_group ])
- access_level = params [:project_group ][:access_level ].to_i
- if access_level >= 3 then
- @project_group .project_administrator = true
- end
- if access_level >= 2 then
- @project_group .project_editor = true
- end
- if (user_signed_in? ) && @project_group .project .administerable_by (current_user .id ) then
- respond_to do | format |
- if params [:project_group ][:email ].present? && params [:project_group ][:email ].length > 0 then
- message = 'User added to project'
- if @project_group .save
- if @project_group .user .nil? then
- if User .find_by_email (params [:project_group ][:email ]).nil? then
- User .invite! (:email => params [:project_group ][:email ])
- message = 'Invitation issued successfully.'
- @project_group .user = User .find_by_email (params [:project_group ][:email ])
- @project_group .save
- else
- @project_group .user = User .find_by_email (params [:project_group ][:email ])
- @project_group .save
- UserMailer .sharing_notification (@project_group ).deliver
- logger .debug ("Email sent from here?" )
- end
- else
- UserMailer .sharing_notification (@project_group ).deliver
- logger .debug ("Email sent from there?" )
- end
- flash [:notice ] = message
- format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
- format .json { render json : @project_group , status : :created , location : @project_group }
- else
- format .html { render action : "new" }
- format .json { render json : @project_group .errors , status : :unprocessable_entity }
- end
- else
- flash [:notice ] = "Please enter an email address"
- format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
- format .json { render json : @project_group , status : :created , location : @project_group }
- end
- end
- else
- render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
- end
-
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- destroy ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def destroy
- @project_group = ProjectGroup .find (params [:id ])
- if (user_signed_in? ) && @project_group .project .administerable_by (current_user .id ) then
- user = @project_group .user
- project = @project_group .project
- @project_group .destroy
- respond_to do | format |
- flash [:notice ] = 'Access removed'
- UserMailer .project_access_removed_notification (user , project ).deliver
- format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
- format .json { head :no_content }
- end
- else
- render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- update ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def update
-@project_group = ProjectGroup .find (params [:id ])
-access_level = params [:project_group ][:access_level ].to_i
- if access_level >= 3 then
- @project_group .project_administrator = true
- else
- @project_group .project_administrator = false
- end
- if access_level >= 2 then
- @project_group .project_editor = true
- else
- @project_group .project_editor = false
- end
-if (user_signed_in? ) && @project_group .project .administerable_by (current_user .id ) then
- respond_to do | format |
- if @project_group .update_attributes (params [:project_group ])
- flash [:notice ] = 'Sharing details successfully updated.'
- UserMailer .permissions_change_notification (@project_group ).deliver
- format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
- format .json { head :no_content }
- else
- format .html { render action : "edit" }
- format .json { render json : @project_group .errors , status : :unprocessable_entity }
- end
- end
-else
- render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ProjectGroupsController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ProjectGroupsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def create
+ @project_group = ProjectGroup .new (params [:project_group ])
+ access_level = params [:project_group ][:access_level ].to_i
+ if access_level >= 3 then
+ @project_group .project_administrator = true
+ end
+ if access_level >= 2 then
+ @project_group .project_editor = true
+ end
+ if (user_signed_in? ) && @project_group .project .administerable_by (current_user .id ) then
+ respond_to do | format |
+ if params [:project_group ][:email ].present? && params [:project_group ][:email ].length > 0 then
+ message = 'User added to project'
+ if @project_group .save
+ if @project_group .user .nil? then
+ if User .find_by_email (params [:project_group ][:email ]).nil? then
+ User .invite! (:email => params [:project_group ][:email ])
+ message = 'Invitation issued successfully.'
+ @project_group .user = User .find_by_email (params [:project_group ][:email ])
+ @project_group .save
+ else
+ @project_group .user = User .find_by_email (params [:project_group ][:email ])
+ @project_group .save
+ UserMailer .sharing_notification (@project_group ).deliver
+ logger .debug ("Email sent from here?" )
+ end
+ else
+ UserMailer .sharing_notification (@project_group ).deliver
+ logger .debug ("Email sent from there?" )
+ end
+ flash [:notice ] = message
+ format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
+ format .json { render json : @project_group , status : :created , location : @project_group }
+ else
+ format .html { render action : "new" }
+ format .json { render json : @project_group .errors , status : :unprocessable_entity }
+ end
+ else
+ flash [:notice ] = "Please enter an email address"
+ format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
+ format .json { render json : @project_group , status : :created , location : @project_group }
+ end
+ end
+ else
+ render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
+ end
+
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ destroy ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def destroy
+ @project_group = ProjectGroup .find (params [:id ])
+ if (user_signed_in? ) && @project_group .project .administerable_by (current_user .id ) then
+ user = @project_group .user
+ project = @project_group .project
+ @project_group .destroy
+ respond_to do | format |
+ flash [:notice ] = 'Access removed'
+ UserMailer .project_access_removed_notification (user , project ).deliver
+ format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
+ format .json { head :no_content }
+ end
+ else
+ render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ update ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def update
+@project_group = ProjectGroup .find (params [:id ])
+access_level = params [:project_group ][:access_level ].to_i
+ if access_level >= 3 then
+ @project_group .project_administrator = true
+ else
+ @project_group .project_administrator = false
+ end
+ if access_level >= 2 then
+ @project_group .project_editor = true
+ else
+ @project_group .project_editor = false
+ end
+if (user_signed_in? ) && @project_group .project .administerable_by (current_user .id ) then
+ respond_to do | format |
+ if @project_group .update_attributes (params [:project_group ])
+ flash [:notice ] = 'Sharing details successfully updated.'
+ UserMailer .permissions_change_notification (@project_group ).deliver
+ format .html { redirect_to :controller => 'projects' , :action => 'share' , :id => @project_group .project .slug }
+ format .json { head :no_content }
+ else
+ format .html { render action : "edit" }
+ format .json { render json : @project_group .errors , status : :unprocessable_entity }
+ end
+ end
+else
+ render (:file => File .join (Rails .root , 'public/403.html' ), :status => 403 , :layout => false )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/ProjectPartner.html b/html/ProjectPartner.html
index 6fe5efd..ed1b6aa 100644
--- a/html/ProjectPartner.html
+++ b/html/ProjectPartner.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class ProjectPartner - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class ProjectPartner
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class ProjectPartner - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class ProjectPartner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/QuestionFormat.html b/html/QuestionFormat.html
index b66090c..965e64b 100644
--- a/html/QuestionFormat.html
+++ b/html/QuestionFormat.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class QuestionFormat - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class QuestionFormat
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
- def to_s
- "#{title}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class QuestionFormat - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class QuestionFormat
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+ def to_s
+ "#{title}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/README_rdoc.html b/html/README_rdoc.html
index 0e10f54..935fa33 100644
--- a/html/README_rdoc.html
+++ b/html/README_rdoc.html
@@ -1,311 +1,311 @@
-
-
-
-
-
-
-README - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DMPonline v4
-
-
DMPonline is the DCC's data management planning tool, available at dmponline.dcc.ac.uk
-
-
Development of the DMPonline by the Digital Curation Centre has been funded
-by JISC. JISC inspires UK colleges and universities in the innovative use
-of digital technologies, helping to maintain the UK's position as a
-global leader in education. www.jisc.ac.uk
-
-
This is just the application code, the accompanying question data available
-at dmponline.dcc.ac.uk is not
-included.
-
-
The tool has four main functions
-
-To help create and maintain different versions of Data Management Plans;
-
-To provide useful guidance on data management issues and how to meet
-research funders' requirements;
-
-To export attractive and useful plans in a variety of formats;
-
-To allow collaborative work when creating Data Management Plans.
-
-
-
Documentation & Support
-
-
-
Bugs & Feature Requests
-
-
-
Prerequisites
-
-
DMPonline is a Ruby on Rails application and you will need to have Ruby
-2.0.0p247 or greater installed on your server and a MySQL server v5.0 or
-greater.
-
-
Further details on how to install Ruby on Rails applications are available
-from the Ruby on Rails site, rubyonrails.org
-
-
You may also find the following resources handy:
-
-
-
Copyright
-
-
Copyright © 2013 Digital Curation Centre, University of Edinburgh.
-
-
This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or (at your
-option) any later version.
-
-
This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
-for more details.
-
-
You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see www.gnu.org/licenses.
-
-
-
-
-
-
-
+
+
+
+
+
+
+README - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DMPonline v4
+
+
DMPonline is the DCC's data management planning tool, available at dmponline.dcc.ac.uk
+
+
Development of the DMPonline by the Digital Curation Centre has been funded
+by JISC. JISC inspires UK colleges and universities in the innovative use
+of digital technologies, helping to maintain the UK's position as a
+global leader in education. www.jisc.ac.uk
+
+
This is just the application code, the accompanying question data available
+at dmponline.dcc.ac.uk is not
+included.
+
+
The tool has four main functions
+
+To help create and maintain different versions of Data Management Plans;
+
+To provide useful guidance on data management issues and how to meet
+research funders' requirements;
+
+To export attractive and useful plans in a variety of formats;
+
+To allow collaborative work when creating Data Management Plans.
+
+
+
Documentation & Support
+
+
+
Bugs & Feature Requests
+
+
+
Prerequisites
+
+
DMPonline is a Ruby on Rails application and you will need to have Ruby
+2.0.0p247 or greater installed on your server and a MySQL server v5.0 or
+greater.
+
+
Further details on how to install Ruby on Rails applications are available
+from the Ruby on Rails site, rubyonrails.org
+
+
You may also find the following resources handy:
+
+
+
Copyright
+
+
Copyright © 2013 Digital Curation Centre, University of Edinburgh.
+
+
This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+
This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
+for more details.
+
+
You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see www.gnu.org/licenses.
+
+
+
+
+
+
+
diff --git a/html/Role.html b/html/Role.html
index 9800dfe..47d8af5 100644
--- a/html/Role.html
+++ b/html/Role.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class Role - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Role
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Role - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Role
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Section.html b/html/Section.html
index 45c50c9..67f7f05 100644
--- a/html/Section.html
+++ b/html/Section.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class Section - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Section
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{title}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Section - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Section
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{title}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Settings.html b/html/Settings.html
index 50c8e01..73b839b 100644
--- a/html/Settings.html
+++ b/html/Settings.html
@@ -1,277 +1,277 @@
-
-
-
-
-
-
-module Settings - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module Settings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module Settings - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module Settings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Settings/Dmptemplate.html b/html/Settings/Dmptemplate.html
index 11d7865..358d114 100644
--- a/html/Settings/Dmptemplate.html
+++ b/html/Settings/Dmptemplate.html
@@ -1,312 +1,312 @@
-
-
-
-
-
-
-class Settings::Dmptemplate - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Settings::Dmptemplate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT_SETTINGS
-
-
-
-
- VALID_ADMIN_FIELDS
-
-
-
-
- VALID_FONT_FACES
-
-
-
-
- VALID_FONT_SIZE_RANGE
-
-
-
-
- VALID_MARGIN_RANGE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Settings::Dmptemplate - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Settings::Dmptemplate
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DEFAULT_SETTINGS
+
+
+
+
+ VALID_ADMIN_FIELDS
+
+
+
+
+ VALID_FONT_FACES
+
+
+
+
+ VALID_FONT_SIZE_RANGE
+
+
+
+
+ VALID_MARGIN_RANGE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Settings/PlanList.html b/html/Settings/PlanList.html
index da1097e..2b95366 100644
--- a/html/Settings/PlanList.html
+++ b/html/Settings/PlanList.html
@@ -1,297 +1,297 @@
-
-
-
-
-
-
-class Settings::PlanList - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Settings::PlanList
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ALL_COLUMNS
-
-
-
-
- DEFAULT_COLUMNS
-
- TODO: can these be taken from somewhere else rather than hard-coded here?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Settings::PlanList - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Settings::PlanList
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ALL_COLUMNS
+
+
+
+
+ DEFAULT_COLUMNS
+
+ TODO: can these be taken from somewhere else rather than hard-coded here?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Settings/PlansController.html b/html/Settings/PlansController.html
index 634f881..326528c 100644
--- a/html/Settings/PlansController.html
+++ b/html/Settings/PlansController.html
@@ -1,486 +1,486 @@
-
-
-
-
-
-
-class Settings::PlansController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Settings::PlansController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- show ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def show
- respond_to do | format |
- format .html
- format .partial
- format .json { render json : settings_json }
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- update ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def update
-
- export_params = params [:export ].try (:deep_symbolize_keys )
-
- settings = plan .super_settings (:export ).tap do | s |
- if params [:commit ] == 'Reset'
- s .formatting = nil
- s .fields = nil
- else
- s .formatting = export_params [:formatting ]
- s .fields = export_params [:fields ]
- s .title = export_params [:title ]
- end
- end
-
- if settings .save
- respond_to do | format |
- format .html { redirect_to (export_project_path (plan .project )) }
- format .json { render json : settings_json }
- end
- else
- settings .formatting = nil
- @export_settings = settings
- render (action : :show )
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- get_settings ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def get_settings
- @export_settings = plan .settings (:export )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- plan ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def plan
- @plan ||= Plan .find (params [:id ])
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- settings_json ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def settings_json
- @settings_json ||= { export : @export_settings }.to_json
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Settings::PlansController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Settings::PlansController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ show ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def show
+ respond_to do | format |
+ format .html
+ format .partial
+ format .json { render json : settings_json }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ update ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def update
+
+ export_params = params [:export ].try (:deep_symbolize_keys )
+
+ settings = plan .super_settings (:export ).tap do | s |
+ if params [:commit ] == 'Reset'
+ s .formatting = nil
+ s .fields = nil
+ else
+ s .formatting = export_params [:formatting ]
+ s .fields = export_params [:fields ]
+ s .title = export_params [:title ]
+ end
+ end
+
+ if settings .save
+ respond_to do | format |
+ format .html { redirect_to (export_project_path (plan .project )) }
+ format .json { render json : settings_json }
+ end
+ else
+ settings .formatting = nil
+ @export_settings = settings
+ render (action : :show )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ get_settings ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def get_settings
+ @export_settings = plan .settings (:export )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ plan ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def plan
+ @plan ||= Plan .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ settings_json ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def settings_json
+ @settings_json ||= { export : @export_settings }.to_json
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Settings/SettingsController.html b/html/Settings/SettingsController.html
index 048715c..5b699d3 100644
--- a/html/Settings/SettingsController.html
+++ b/html/Settings/SettingsController.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class Settings::SettingsController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Settings::SettingsController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Settings::SettingsController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Settings::SettingsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/SplashLog.html b/html/SplashLog.html
index 387c27a..fd75513 100644
--- a/html/SplashLog.html
+++ b/html/SplashLog.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class SplashLog - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class SplashLog
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class SplashLog - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class SplashLog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/SplashLogsController.html b/html/SplashLogsController.html
index ba4fae2..4f88d08 100644
--- a/html/SplashLogsController.html
+++ b/html/SplashLogsController.html
@@ -1,337 +1,337 @@
-
-
-
-
-
-
-class SplashLogsController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class SplashLogsController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- create ()
- click to toggle source
-
-
-
-
-
-
POST /answers POST /answers.json
-
-
-
-
-
-def create
- @splash_log = SplashLog .new ()
- @splash_log .destination = params [:destination ]
- respond_to do | format |
- if @splash_log .save
- cookies [:dmp_splash_seen ] = {
- value : 'splash_dialog_seen' ,
- expires : 3 .hours .from_now ,
- }
- format .html { redirect_to params [:destination ] }
- else
- format .html { redirect_to home_url }
- end
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class SplashLogsController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class SplashLogsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create ()
+ click to toggle source
+
+
+
+
+
+
POST /answers POST /answers.json
+
+
+
+
+
+def create
+ @splash_log = SplashLog .new ()
+ @splash_log .destination = params [:destination ]
+ respond_to do | format |
+ if @splash_log .save
+ cookies [:dmp_splash_seen ] = {
+ value : 'splash_dialog_seen' ,
+ expires : 3 .hours .from_now ,
+ }
+ format .html { redirect_to params [:destination ] }
+ else
+ format .html { redirect_to home_url }
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/StaticPagesController.html b/html/StaticPagesController.html
index 30cd16f..72e20e2 100644
--- a/html/StaticPagesController.html
+++ b/html/StaticPagesController.html
@@ -1,392 +1,392 @@
-
-
-
-
-
-
-class StaticPagesController - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class StaticPagesController
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- about_us ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def about_us
- dcc_news_feed_url = "http://www.dcc.ac.uk/news/dmponline-0/feed"
- @dcc_news_feed = Feedzirra :: Feed .fetch_and_parse (dcc_news_feed_url )
- respond_to do | format |
- format .rss { redirect_to dcc_news_feed_url }
- format .html
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- roadmap ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class StaticPagesController - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class StaticPagesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ about_us ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def about_us
+ dcc_news_feed_url = "http://www.dcc.ac.uk/news/dmponline-0/feed"
+ @dcc_news_feed = Feedzirra :: Feed .fetch_and_parse (dcc_news_feed_url )
+ respond_to do | format |
+ format .rss { redirect_to dcc_news_feed_url }
+ format .html
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ roadmap ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/SuggestedAnswer.html b/html/SuggestedAnswer.html
index 02aa18e..20f6149 100644
--- a/html/SuggestedAnswer.html
+++ b/html/SuggestedAnswer.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class SuggestedAnswer - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class SuggestedAnswer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
- def to_s
- "#{text}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class SuggestedAnswer - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class SuggestedAnswer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+ def to_s
+ "#{text}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Theme.html b/html/Theme.html
index f1d200f..0e8ebee 100644
--- a/html/Theme.html
+++ b/html/Theme.html
@@ -1,325 +1,325 @@
-
-
-
-
-
-
-class Theme - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Theme
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- title
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Theme - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Theme
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ title
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/User.html b/html/User.html
index c7eea5d..bfedcf0 100644
--- a/html/User.html
+++ b/html/User.html
@@ -1,661 +1,661 @@
-
-
-
-
-
-
-class User - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class User
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- current_organisation ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def current_organisation
- if self .organisations .count > 0 then
- return self .organisations .last
- else
- return nil
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- filter (query)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def filter (query )
- return self unless query .present?
-
- t = self .arel_table
- q = "%#{query}%"
-
- conditions = t [:title ].matches (q )
-
- columns = % (
- grant_number identifier description principal_investigator data_contact
- )
-
- columns .each {| col | conditions = conditions .or (t [col ].matches (q )) }
-
- self .where (conditions )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- is_admin? ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def is_admin?
- admin = roles .find_by_name ("admin" )
- return ! admin .nil?
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- is_org_admin? ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def is_org_admin?
- org_admin = roles .find_by_name ("org_admin" )
- return ! org_admin .nil?
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- name (use_email = true)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def name (use_email = true )
- if ((firstname .nil? && surname .nil? ) || (firstname .strip == "" && surname .strip == "" )) && use_email then
- return email
- else
- name = "#{firstname} #{surname}"
- return name .strip
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- org_type ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def org_type
- org_type = organisation .organisation_type .name
- return org_type
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- organisation ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def organisation
- if self .organisations .count > 0 then
- return self .organisations .first
- else
- return nil
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- organisation= (new_organisation)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def organisation= (new_organisation )
- organisation_id = organisation .id
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- organisation_id ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def organisation_id
- if self .organisations .count > 0 then
- return self .organisations .first .id
- else
- return nil
- end
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- organisation_id= (new_organisation_id)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
- def organisation_id= (new_organisation_id )
-if ! self .user_org_roles .pluck (:organisation_id ).include? (new_organisation_id .to_i ) then
- if self .user_org_roles .count != 1 then
- new_user_org_role = UserOrgRole .new
- new_user_org_role .organisation_id = new_organisation_id
- new_user_org_role .user_role_type = UserRoleType .find_by_name ("user" );
- self .user_org_roles << new_user_org_role
- else
- user_org_role = self .user_org_roles .first
- user_org_role .organisation_id = new_organisation_id
- user_org_role .save
- org_admin_role = roles .find_by_name ("org_admin" )
- unless org_admin_role .nil? then
- roles .delete (org_admin_role )
- end
- end
-end
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class User - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class User
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ current_organisation ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def current_organisation
+ if self .organisations .count > 0 then
+ return self .organisations .last
+ else
+ return nil
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ filter (query)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def filter (query )
+ return self unless query .present?
+
+ t = self .arel_table
+ q = "%#{query}%"
+
+ conditions = t [:title ].matches (q )
+
+ columns = % (
+ grant_number identifier description principal_investigator data_contact
+ )
+
+ columns .each {| col | conditions = conditions .or (t [col ].matches (q )) }
+
+ self .where (conditions )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ is_admin? ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def is_admin?
+ admin = roles .find_by_name ("admin" )
+ return ! admin .nil?
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ is_org_admin? ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def is_org_admin?
+ org_admin = roles .find_by_name ("org_admin" )
+ return ! org_admin .nil?
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name (use_email = true)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def name (use_email = true )
+ if ((firstname .nil? && surname .nil? ) || (firstname .strip == "" && surname .strip == "" )) && use_email then
+ return email
+ else
+ name = "#{firstname} #{surname}"
+ return name .strip
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org_type ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def org_type
+ org_type = organisation .organisation_type .name
+ return org_type
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ organisation ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def organisation
+ if self .organisations .count > 0 then
+ return self .organisations .first
+ else
+ return nil
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ organisation= (new_organisation)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def organisation= (new_organisation )
+ organisation_id = organisation .id
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ organisation_id ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def organisation_id
+ if self .organisations .count > 0 then
+ return self .organisations .first .id
+ else
+ return nil
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ organisation_id= (new_organisation_id)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+ def organisation_id= (new_organisation_id )
+if ! self .user_org_roles .pluck (:organisation_id ).include? (new_organisation_id .to_i ) then
+ if self .user_org_roles .count != 1 then
+ new_user_org_role = UserOrgRole .new
+ new_user_org_role .organisation_id = new_organisation_id
+ new_user_org_role .user_role_type = UserRoleType .find_by_name ("user" );
+ self .user_org_roles << new_user_org_role
+ else
+ user_org_role = self .user_org_roles .first
+ user_org_role .organisation_id = new_organisation_id
+ user_org_role .save
+ org_admin_role = roles .find_by_name ("org_admin" )
+ unless org_admin_role .nil? then
+ roles .delete (org_admin_role )
+ end
+ end
+end
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/UserMailer.html b/html/UserMailer.html
index 1206381..f7a5a5e 100644
--- a/html/UserMailer.html
+++ b/html/UserMailer.html
@@ -1,393 +1,393 @@
-
-
-
-
-
-
-class UserMailer - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class UserMailer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- permissions_change_notification (project_group)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def permissions_change_notification (project_group )
- @project_group = project_group
- mail (to : @project_group .user .email , subject : "DMP permissions changed" )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- project_access_removed_notification (user, project)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def project_access_removed_notification (user , project )
- @user = user
- @project = project
- mail (to : @user .email , subject : "DMP access removed" )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- sharing_notification (project_group)
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def sharing_notification (project_group )
- @project_group = project_group
- mail (to : @project_group .user .email , subject : "You have been given access to a Data Management Plan" )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class UserMailer - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class UserMailer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ permissions_change_notification (project_group)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def permissions_change_notification (project_group )
+ @project_group = project_group
+ mail (to : @project_group .user .email , subject : "DMP permissions changed" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_access_removed_notification (user, project)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def project_access_removed_notification (user , project )
+ @user = user
+ @project = project
+ mail (to : @user .email , subject : "DMP access removed" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sharing_notification (project_group)
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def sharing_notification (project_group )
+ @project_group = project_group
+ mail (to : @project_group .user .email , subject : "You have been given access to a Data Management Plan" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/UserOrgRole.html b/html/UserOrgRole.html
index 8630fb4..f88be25 100644
--- a/html/UserOrgRole.html
+++ b/html/UserOrgRole.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class UserOrgRole - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class UserOrgRole
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class UserOrgRole - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class UserOrgRole
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/UserRoleType.html b/html/UserRoleType.html
index f030eb0..257e635 100644
--- a/html/UserRoleType.html
+++ b/html/UserRoleType.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class UserRoleType - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class UserRoleType
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class UserRoleType - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class UserRoleType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/UserStatus.html b/html/UserStatus.html
index b04077c..f7ad248 100644
--- a/html/UserStatus.html
+++ b/html/UserStatus.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class UserStatus - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class UserStatus
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class UserStatus - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class UserStatus
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/UserType.html b/html/UserType.html
index b1ec7bc..7056a5e 100644
--- a/html/UserType.html
+++ b/html/UserType.html
@@ -1,279 +1,279 @@
-
-
-
-
-
-
-class UserType - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class UserType
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class UserType - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class UserType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Users.html b/html/Users.html
index a39f431..2861177 100644
--- a/html/Users.html
+++ b/html/Users.html
@@ -1,272 +1,272 @@
-
-
-
-
-
-
-module Users - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
module Users
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+module Users - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
module Users
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/Version.html b/html/Version.html
index 54b01e8..75a633e 100644
--- a/html/Version.html
+++ b/html/Version.html
@@ -1,357 +1,357 @@
-
-
-
-
-
-
-class Version - DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class Version
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- global_sections ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def global_sections
- sections .find_all_by_organisation_id (phase .dmptemplate .organisation_id )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
- to_s ()
- click to toggle source
-
-
-
-
-
-
-
-
-
-
-
-def to_s
- "#{title}"
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+class Version - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
class Version
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ global_sections ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def global_sections
+ sections .find_all_by_organisation_id (phase .dmptemplate .organisation_id )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to_s ()
+ click to toggle source
+
+
+
+
+
+
+
+
+
+
+
+def to_s
+ "#{title}"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/created.rid b/html/created.rid
index a3b01ba..1ff390d 100644
--- a/html/created.rid
+++ b/html/created.rid
@@ -1,115 +1,115 @@
-Mon, 09 Nov 2015 14:55:18 +0000
-README.rdoc Tue, 28 Jul 2015 13:51:53 +0100
-app/admin/dashboard.rb Wed, 18 Mar 2015 14:45:56 +0000
-app/admin/dmptemplate.rb Wed, 18 Mar 2015 11:10:34 +0000
-app/admin/guidance.rb Fri, 02 Oct 2015 10:07:14 +0100
-app/admin/guidance_group.rb Mon, 09 Nov 2015 14:30:03 +0000
-app/admin/option.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/organisation.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/organisation_type.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/phase.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/project.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/project_group.rb Wed, 11 Mar 2015 16:23:43 +0000
-app/admin/question.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/question_format.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/role.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/section.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/suggested_answer.rb Wed, 11 Mar 2015 16:23:43 +0000
-app/admin/theme.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/user.rb Wed, 28 Oct 2015 11:08:46 +0000
-app/admin/user_org_role.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/user_role_type.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/user_status.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/user_type.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/admin/version.rb Fri, 02 Oct 2015 10:09:28 +0100
-app/controllers/answers_controller.rb Thu, 16 Apr 2015 10:05:23 +0100
-app/controllers/application_controller.rb Fri, 09 Oct 2015 16:05:22 +0100
-app/controllers/comments_controller.rb Tue, 19 May 2015 16:11:58 +0100
-app/controllers/confirmations_controller.rb Wed, 09 Oct 2013 11:00:51 +0100
-app/controllers/contacts_controller.rb Mon, 27 Jul 2015 16:51:02 +0100
-app/controllers/dmptemplates_controller.rb Mon, 10 Aug 2015 12:44:35 +0100
-app/controllers/existing_users_controller.rb Tue, 26 Nov 2013 17:15:46 +0000
-app/controllers/guidance_groups_controller.rb Sun, 09 Aug 2015 14:54:18 +0100
-app/controllers/guidances_controller.rb Sun, 05 Jul 2015 22:48:47 +0100
-app/controllers/home_controller.rb Thu, 26 Sep 2013 17:04:25 +0100
-app/controllers/organisation_users_controller.rb Mon, 27 Jan 2014 15:09:50 +0000
-app/controllers/organisations_controller.rb Sun, 09 Aug 2015 14:52:46 +0100
-app/controllers/passwords_controller.rb Wed, 09 Oct 2013 11:00:51 +0100
-app/controllers/plans_controller.rb Mon, 26 Oct 2015 18:34:42 +0000
-app/controllers/project_groups_controller.rb Mon, 09 Dec 2013 10:57:33 +0000
-app/controllers/projects_controller.rb Sun, 05 Jul 2015 19:32:06 +0100
-app/controllers/registrations_controller.rb Wed, 23 Jul 2014 11:56:43 +0100
-app/controllers/sessions_controller.rb Mon, 24 Aug 2015 13:24:15 +0100
-app/controllers/settings.rb Fri, 02 Oct 2015 12:12:20 +0100
-app/controllers/settings/plans_controller.rb Wed, 09 Jul 2014 16:26:32 +0100
-app/controllers/settings/projects_controller.rb Mon, 07 Jul 2014 11:30:19 +0100
-app/controllers/splash_logs_controller.rb Wed, 27 Nov 2013 15:15:11 +0000
-app/controllers/static_pages_controller.rb Thu, 21 May 2015 16:13:16 +0100
-app/controllers/themes_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
-app/controllers/user_org_roles_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
-app/controllers/user_role_types_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
-app/controllers/user_statuses_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
-app/controllers/user_types_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
-app/controllers/users/omniauth_callback_controller.rb Mon, 27 Jul 2015 12:31:00 +0100
-app/controllers/users/omniauth_shibboleth_request_controller.rb Tue, 15 Apr 2014 13:55:12 +0100
-app/controllers/users_controller.rb Tue, 12 May 2015 18:45:56 +0100
-app/helpers/application_helper.rb Mon, 10 Aug 2015 02:17:40 +0100
-app/helpers/plans_helper.rb Mon, 07 Jul 2014 11:30:19 +0100
-app/mailers/user_mailer.rb Tue, 26 Nov 2013 14:18:11 +0000
-app/models/ability.rb Tue, 06 Oct 2015 19:51:17 +0100
-app/models/answer.rb Tue, 06 Oct 2015 19:49:57 +0100
-app/models/comment.rb Tue, 06 Oct 2015 19:49:53 +0100
-app/models/dmptemplate.rb Tue, 06 Oct 2015 19:49:56 +0100
-app/models/exported_plan.rb Wed, 21 Oct 2015 14:41:40 +0100
-app/models/file_type.rb Tue, 06 Oct 2015 19:51:17 +0100
-app/models/file_upload.rb Tue, 06 Oct 2015 19:51:18 +0100
-app/models/guidance.rb Tue, 06 Oct 2015 19:49:51 +0100
-app/models/guidance_group.rb Tue, 06 Oct 2015 19:49:52 +0100
-app/models/option.rb Tue, 06 Oct 2015 19:49:56 +0100
-app/models/option_warning.rb Tue, 06 Oct 2015 19:49:57 +0100
-app/models/organisation.rb Tue, 06 Oct 2015 19:49:55 +0100
-app/models/organisation_type.rb Tue, 06 Oct 2015 19:51:18 +0100
-app/models/phase.rb Tue, 06 Oct 2015 19:49:51 +0100
-app/models/plan.rb Tue, 06 Oct 2015 19:49:56 +0100
-app/models/plan_section.rb Tue, 06 Oct 2015 19:51:19 +0100
-app/models/project.rb Tue, 06 Oct 2015 19:49:52 +0100
-app/models/project_group.rb Tue, 06 Oct 2015 19:51:19 +0100
-app/models/project_partner.rb Tue, 06 Oct 2015 19:51:16 +0100
-app/models/question.rb Tue, 06 Oct 2015 19:49:55 +0100
-app/models/question_format.rb Tue, 06 Oct 2015 19:51:20 +0100
-app/models/role.rb Tue, 06 Oct 2015 19:49:53 +0100
-app/models/section.rb Tue, 06 Oct 2015 19:51:20 +0100
-app/models/settings/dmptemplate.rb Tue, 06 Oct 2015 19:51:24 +0100
-app/models/settings/plan_list.rb Tue, 06 Oct 2015 19:51:25 +0100
-app/models/splash_log.rb Tue, 06 Oct 2015 19:51:20 +0100
-app/models/suggested_answer.rb Tue, 06 Oct 2015 19:51:21 +0100
-app/models/theme.rb Tue, 06 Oct 2015 19:51:21 +0100
-app/models/user.rb Tue, 06 Oct 2015 19:49:54 +0100
-app/models/user_org_role.rb Tue, 06 Oct 2015 19:51:22 +0100
-app/models/user_role_type.rb Tue, 06 Oct 2015 19:51:22 +0100
-app/models/user_status.rb Tue, 06 Oct 2015 19:51:23 +0100
-app/models/user_type.rb Tue, 06 Oct 2015 19:51:23 +0100
-app/models/version.rb Tue, 06 Oct 2015 19:51:24 +0100
-lib/active_admin_views_pages_base.rb Wed, 20 Nov 2013 16:27:04 +0000
-lib/custom_failure.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/application.rb Tue, 06 Oct 2015 15:02:51 +0100
-config/boot.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/environment.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/environments/development.rb Mon, 14 Jul 2014 15:43:22 +0100
-config/environments/production.rb Mon, 14 Jul 2014 15:43:22 +0100
-config/environments/test.rb Tue, 28 Jan 2014 12:43:49 +0000
-config/initializers/active_admin.rb Mon, 12 Oct 2015 16:20:30 +0100
-config/initializers/backtrace_silencers.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/initializers/contact_us.rb Mon, 14 Jul 2014 15:43:22 +0100
-config/initializers/devise.rb Fri, 02 Oct 2015 10:16:28 +0100
-config/initializers/formtastic.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/initializers/inflections.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/initializers/locale.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/initializers/mime_types.rb Mon, 14 Jul 2014 15:43:22 +0100
-config/initializers/omniauth.rb Mon, 07 Jul 2014 11:30:12 +0100
-config/initializers/recaptcha.rb Wed, 16 Jul 2014 16:29:56 +0100
-config/initializers/rolify.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/initializers/secret_token.rb Mon, 14 Jul 2014 15:43:22 +0100
-config/initializers/session_store.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/initializers/wrap_parameters.rb Tue, 24 Sep 2013 15:31:14 +0100
-config/routes.rb Thu, 21 May 2015 15:42:52 +0100
+Mon, 09 Nov 2015 14:55:18 +0000
+README.rdoc Tue, 28 Jul 2015 13:51:53 +0100
+app/admin/dashboard.rb Wed, 18 Mar 2015 14:45:56 +0000
+app/admin/dmptemplate.rb Wed, 18 Mar 2015 11:10:34 +0000
+app/admin/guidance.rb Fri, 02 Oct 2015 10:07:14 +0100
+app/admin/guidance_group.rb Mon, 09 Nov 2015 14:30:03 +0000
+app/admin/option.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/organisation.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/organisation_type.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/phase.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/project.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/project_group.rb Wed, 11 Mar 2015 16:23:43 +0000
+app/admin/question.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/question_format.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/role.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/section.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/suggested_answer.rb Wed, 11 Mar 2015 16:23:43 +0000
+app/admin/theme.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/user.rb Wed, 28 Oct 2015 11:08:46 +0000
+app/admin/user_org_role.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/user_role_type.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/user_status.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/user_type.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/admin/version.rb Fri, 02 Oct 2015 10:09:28 +0100
+app/controllers/answers_controller.rb Thu, 16 Apr 2015 10:05:23 +0100
+app/controllers/application_controller.rb Fri, 09 Oct 2015 16:05:22 +0100
+app/controllers/comments_controller.rb Tue, 19 May 2015 16:11:58 +0100
+app/controllers/confirmations_controller.rb Wed, 09 Oct 2013 11:00:51 +0100
+app/controllers/contacts_controller.rb Mon, 27 Jul 2015 16:51:02 +0100
+app/controllers/dmptemplates_controller.rb Mon, 10 Aug 2015 12:44:35 +0100
+app/controllers/existing_users_controller.rb Tue, 26 Nov 2013 17:15:46 +0000
+app/controllers/guidance_groups_controller.rb Sun, 09 Aug 2015 14:54:18 +0100
+app/controllers/guidances_controller.rb Sun, 05 Jul 2015 22:48:47 +0100
+app/controllers/home_controller.rb Thu, 26 Sep 2013 17:04:25 +0100
+app/controllers/organisation_users_controller.rb Mon, 27 Jan 2014 15:09:50 +0000
+app/controllers/organisations_controller.rb Sun, 09 Aug 2015 14:52:46 +0100
+app/controllers/passwords_controller.rb Wed, 09 Oct 2013 11:00:51 +0100
+app/controllers/plans_controller.rb Mon, 26 Oct 2015 18:34:42 +0000
+app/controllers/project_groups_controller.rb Mon, 09 Dec 2013 10:57:33 +0000
+app/controllers/projects_controller.rb Sun, 05 Jul 2015 19:32:06 +0100
+app/controllers/registrations_controller.rb Wed, 23 Jul 2014 11:56:43 +0100
+app/controllers/sessions_controller.rb Mon, 24 Aug 2015 13:24:15 +0100
+app/controllers/settings.rb Fri, 02 Oct 2015 12:12:20 +0100
+app/controllers/settings/plans_controller.rb Wed, 09 Jul 2014 16:26:32 +0100
+app/controllers/settings/projects_controller.rb Mon, 07 Jul 2014 11:30:19 +0100
+app/controllers/splash_logs_controller.rb Wed, 27 Nov 2013 15:15:11 +0000
+app/controllers/static_pages_controller.rb Thu, 21 May 2015 16:13:16 +0100
+app/controllers/themes_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
+app/controllers/user_org_roles_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
+app/controllers/user_role_types_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
+app/controllers/user_statuses_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
+app/controllers/user_types_controller.rb Tue, 24 Sep 2013 15:31:14 +0100
+app/controllers/users/omniauth_callback_controller.rb Mon, 27 Jul 2015 12:31:00 +0100
+app/controllers/users/omniauth_shibboleth_request_controller.rb Tue, 15 Apr 2014 13:55:12 +0100
+app/controllers/users_controller.rb Tue, 12 May 2015 18:45:56 +0100
+app/helpers/application_helper.rb Mon, 10 Aug 2015 02:17:40 +0100
+app/helpers/plans_helper.rb Mon, 07 Jul 2014 11:30:19 +0100
+app/mailers/user_mailer.rb Tue, 26 Nov 2013 14:18:11 +0000
+app/models/ability.rb Tue, 06 Oct 2015 19:51:17 +0100
+app/models/answer.rb Tue, 06 Oct 2015 19:49:57 +0100
+app/models/comment.rb Tue, 06 Oct 2015 19:49:53 +0100
+app/models/dmptemplate.rb Tue, 06 Oct 2015 19:49:56 +0100
+app/models/exported_plan.rb Wed, 21 Oct 2015 14:41:40 +0100
+app/models/file_type.rb Tue, 06 Oct 2015 19:51:17 +0100
+app/models/file_upload.rb Tue, 06 Oct 2015 19:51:18 +0100
+app/models/guidance.rb Tue, 06 Oct 2015 19:49:51 +0100
+app/models/guidance_group.rb Tue, 06 Oct 2015 19:49:52 +0100
+app/models/option.rb Tue, 06 Oct 2015 19:49:56 +0100
+app/models/option_warning.rb Tue, 06 Oct 2015 19:49:57 +0100
+app/models/organisation.rb Tue, 06 Oct 2015 19:49:55 +0100
+app/models/organisation_type.rb Tue, 06 Oct 2015 19:51:18 +0100
+app/models/phase.rb Tue, 06 Oct 2015 19:49:51 +0100
+app/models/plan.rb Tue, 06 Oct 2015 19:49:56 +0100
+app/models/plan_section.rb Tue, 06 Oct 2015 19:51:19 +0100
+app/models/project.rb Tue, 06 Oct 2015 19:49:52 +0100
+app/models/project_group.rb Tue, 06 Oct 2015 19:51:19 +0100
+app/models/project_partner.rb Tue, 06 Oct 2015 19:51:16 +0100
+app/models/question.rb Tue, 06 Oct 2015 19:49:55 +0100
+app/models/question_format.rb Tue, 06 Oct 2015 19:51:20 +0100
+app/models/role.rb Tue, 06 Oct 2015 19:49:53 +0100
+app/models/section.rb Tue, 06 Oct 2015 19:51:20 +0100
+app/models/settings/dmptemplate.rb Tue, 06 Oct 2015 19:51:24 +0100
+app/models/settings/plan_list.rb Tue, 06 Oct 2015 19:51:25 +0100
+app/models/splash_log.rb Tue, 06 Oct 2015 19:51:20 +0100
+app/models/suggested_answer.rb Tue, 06 Oct 2015 19:51:21 +0100
+app/models/theme.rb Tue, 06 Oct 2015 19:51:21 +0100
+app/models/user.rb Tue, 06 Oct 2015 19:49:54 +0100
+app/models/user_org_role.rb Tue, 06 Oct 2015 19:51:22 +0100
+app/models/user_role_type.rb Tue, 06 Oct 2015 19:51:22 +0100
+app/models/user_status.rb Tue, 06 Oct 2015 19:51:23 +0100
+app/models/user_type.rb Tue, 06 Oct 2015 19:51:23 +0100
+app/models/version.rb Tue, 06 Oct 2015 19:51:24 +0100
+lib/active_admin_views_pages_base.rb Wed, 20 Nov 2013 16:27:04 +0000
+lib/custom_failure.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/application.rb Tue, 06 Oct 2015 15:02:51 +0100
+config/boot.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/environment.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/environments/development.rb Mon, 14 Jul 2014 15:43:22 +0100
+config/environments/production.rb Mon, 14 Jul 2014 15:43:22 +0100
+config/environments/test.rb Tue, 28 Jan 2014 12:43:49 +0000
+config/initializers/active_admin.rb Mon, 12 Oct 2015 16:20:30 +0100
+config/initializers/backtrace_silencers.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/initializers/contact_us.rb Mon, 14 Jul 2014 15:43:22 +0100
+config/initializers/devise.rb Fri, 02 Oct 2015 10:16:28 +0100
+config/initializers/formtastic.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/initializers/inflections.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/initializers/locale.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/initializers/mime_types.rb Mon, 14 Jul 2014 15:43:22 +0100
+config/initializers/omniauth.rb Mon, 07 Jul 2014 11:30:12 +0100
+config/initializers/recaptcha.rb Wed, 16 Jul 2014 16:29:56 +0100
+config/initializers/rolify.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/initializers/secret_token.rb Mon, 14 Jul 2014 15:43:22 +0100
+config/initializers/session_store.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/initializers/wrap_parameters.rb Tue, 24 Sep 2013 15:31:14 +0100
+config/routes.rb Thu, 21 May 2015 15:42:52 +0100
diff --git a/html/index.html b/html/index.html
index 1b99cf6..3d7730a 100644
--- a/html/index.html
+++ b/html/index.html
@@ -1,310 +1,310 @@
-
-
-
-
-
-
-DMPonline4 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
DMPonline v4
-
-
DMPonline is the DCC's data management planning tool, available at dmponline.dcc.ac.uk
-
-
Development of the DMPonline by the Digital Curation Centre has been funded
-by JISC. JISC inspires UK colleges and universities in the innovative use
-of digital technologies, helping to maintain the UK's position as a
-global leader in education. www.jisc.ac.uk
-
-
This is just the application code, the accompanying question data available
-at dmponline.dcc.ac.uk is not
-included.
-
-
The tool has four main functions
-
-To help create and maintain different versions of Data Management Plans;
-
-To provide useful guidance on data management issues and how to meet
-research funders' requirements;
-
-To export attractive and useful plans in a variety of formats;
-
-To allow collaborative work when creating Data Management Plans.
-
-
-
Documentation & Support
-
-
-
Bugs & Feature Requests
-
-
-
Prerequisites
-
-
DMPonline is a Ruby on Rails application and you will need to have Ruby
-2.0.0p247 or greater installed on your server and a MySQL server v5.0 or
-greater.
-
-
Further details on how to install Ruby on Rails applications are available
-from the Ruby on Rails site, rubyonrails.org
-
-
You may also find the following resources handy:
-
-
-
Copyright
-
-
Copyright © 2013 Digital Curation Centre, University of Edinburgh.
-
-
This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or (at your
-option) any later version.
-
-
This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
-for more details.
-
-
You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see www.gnu.org/licenses.
-
-
-
-
-
-
+
+
+
+
+
+
+DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
DMPonline v4
+
+
DMPonline is the DCC's data management planning tool, available at dmponline.dcc.ac.uk
+
+
Development of the DMPonline by the Digital Curation Centre has been funded
+by JISC. JISC inspires UK colleges and universities in the innovative use
+of digital technologies, helping to maintain the UK's position as a
+global leader in education. www.jisc.ac.uk
+
+
This is just the application code, the accompanying question data available
+at dmponline.dcc.ac.uk is not
+included.
+
+
The tool has four main functions
+
+To help create and maintain different versions of Data Management Plans;
+
+To provide useful guidance on data management issues and how to meet
+research funders' requirements;
+
+To export attractive and useful plans in a variety of formats;
+
+To allow collaborative work when creating Data Management Plans.
+
+
+
Documentation & Support
+
+
+
Bugs & Feature Requests
+
+
+
Prerequisites
+
+
DMPonline is a Ruby on Rails application and you will need to have Ruby
+2.0.0p247 or greater installed on your server and a MySQL server v5.0 or
+greater.
+
+
Further details on how to install Ruby on Rails applications are available
+from the Ruby on Rails site, rubyonrails.org
+
+
You may also find the following resources handy:
+
+
+
Copyright
+
+
Copyright © 2013 Digital Curation Centre, University of Edinburgh.
+
+
This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+
This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
+for more details.
+
+
You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see www.gnu.org/licenses.
+
+
+
+
+
+
diff --git a/html/js/darkfish.js b/html/js/darkfish.js
index f26fd45..92d8280 100644
--- a/html/js/darkfish.js
+++ b/html/js/darkfish.js
@@ -1,155 +1,155 @@
-/**
- *
- * Darkfish Page Functions
- * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
- *
- * Author: Michael Granger
- *
- */
-
-/* Provide console simulation for firebug-less environments */
-if (!("console" in window) || !("firebug" in console)) {
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
- "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-
- window.console = {};
- for (var i = 0; i < names.length; ++i)
- window.console[names[i]] = function() {};
-};
-
-
-/**
- * Unwrap the first element that matches the given @expr@ from the targets and return them.
- */
-$.fn.unwrap = function( expr ) {
- return this.each( function() {
- $(this).parents( expr ).eq( 0 ).after( this ).remove();
- });
-};
-
-
-function showSource( e ) {
- var target = e.target;
- var codeSections = $(target).
- parents('.method-detail').
- find('.method-source-code');
-
- $(target).
- parents('.method-detail').
- find('.method-source-code').
- slideToggle();
-};
-
-function hookSourceViews() {
- $('.method-heading').click( showSource );
-};
-
-function toggleDebuggingSection() {
- $('.debugging-section').slideToggle();
-};
-
-function hookDebuggingToggle() {
- $('#debugging-toggle img').click( toggleDebuggingSection );
-};
-
-function hookTableOfContentsToggle() {
- $('.indexpage li .toc-toggle').each( function() {
- $(this).click( function() {
- $(this).toggleClass('open');
- });
-
- var section = $(this).next();
-
- $(this).click( function() {
- section.slideToggle();
- });
- });
-}
-
-function hookSearch() {
- var input = $('#search-field').eq(0);
- var result = $('#search-results').eq(0);
- $(result).show();
-
- var search_section = $('#search-section').get(0);
- $(search_section).show();
-
- var search = new Search(search_data, input, result);
-
- search.renderItem = function(result) {
- var li = document.createElement('li');
- var html = '';
-
- // TODO add relative path to
-
-
-
-
-
-
-
-
-
-
-Table of Contents - DMPonline4 Documentation
-
-Pages
-
-
-Classes/Modules
-
-
-Methods
-
-
-
-
-
+
+
+
+
+
+
+Table of Contents - DMPonline4 Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Table of Contents - DMPonline4 Documentation
+
+Pages
+
+
+Classes/Modules
+
+
+Methods
+
+
+
+
+
diff --git a/lib/active_admin_views_pages_base.rb b/lib/active_admin_views_pages_base.rb
index ef42e8c..0776e48 100644
--- a/lib/active_admin_views_pages_base.rb
+++ b/lib/active_admin_views_pages_base.rb
@@ -1,15 +1,15 @@
-# lib/active_admin_views_pages_base.rb
-
-class ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document
-
- private
-
- # Renders the content for the footer
- def build_footer
- div :id => "footer" do
- para "Copyright © #{Date.today.year.to_s}".html_safe
- #{link_to('Example.com', 'http://example.com')}.
- end
- end
-
+# lib/active_admin_views_pages_base.rb
+
+class ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document
+
+ private
+
+ # Renders the content for the footer
+ def build_footer
+ div :id => "footer" do
+ para "Copyright © #{Date.today.year.to_s}".html_safe
+ #{link_to('Example.com', 'http://example.com')}.
+ end
+ end
+
end
\ No newline at end of file
diff --git a/lib/custom_failure.rb b/lib/custom_failure.rb
index c817088..fe28aa9 100644
--- a/lib/custom_failure.rb
+++ b/lib/custom_failure.rb
@@ -1,13 +1,13 @@
-class CustomFailure < Devise::FailureApp
- def redirect_url
- root_path
- end
-
- def respond
- if http_auth?
- http_auth
- else
- redirect
- end
- end
+class CustomFailure < Devise::FailureApp
+ def redirect_url
+ root_path
+ end
+
+ def respond
+ if http_auth?
+ http_auth
+ else
+ redirect
+ end
+ end
end
\ No newline at end of file
diff --git a/lib/global_helpers.rb b/lib/global_helpers.rb
new file mode 100644
index 0000000..ae096ae
--- /dev/null
+++ b/lib/global_helpers.rb
@@ -0,0 +1,20 @@
+module GlobalHelpers
+
+ ##
+ # takes in a string which is meant to be constant, and looks it up in the default
+ # (en-UK) locale. This should ensure that the back-end remains constant and consistantly called
+ #
+ # @param [String] str the string which will be looked up in the localisation
+ # @return [String] the constant which the string defines
+ def constant(str)
+ I18n.t("magic_strings.#{str}", locale: I18n.default_locale)
+ end
+ # overloading the method
+ # came across a wierd issue where the function would refused to be called from
+ # class functions of other classes... but it will work if this is a class function
+ # easiest way to give this functionality is to overload the function
+ # if you have a better solution, please impliment it as this is ugly
+ def self.constant(str)
+ I18n.t("magic_strings.#{str}", locale: I18n.default_locale)
+ end
+end
\ No newline at end of file
diff --git a/lib/tasks/user_data.rake b/lib/tasks/user_data.rake
index 9b268c3..19518c3 100644
--- a/lib/tasks/user_data.rake
+++ b/lib/tasks/user_data.rake
@@ -1,9 +1,9 @@
-namespace :db do
- desc "Fill database with sample data"
- task populate: :environment do
- admin = User.create!(email: "test@test.com",
- password: "password",
- password_confirmation: "password")
- admin.add_role(:admin)
- end
+namespace :db do
+ desc "Fill database with sample data"
+ task populate: :environments do
+ admin = User.create!(email: "test@test.com",
+ password: "password",
+ password_confirmation: "password")
+ admin.add_role(:admin)
+ end
end
\ No newline at end of file
diff --git a/lib/templates/erb/scaffold/_form.html.erb b/lib/templates/erb/scaffold/_form.html.erb
index d2b8b1e..a8c28c4 100644
--- a/lib/templates/erb/scaffold/_form.html.erb
+++ b/lib/templates/erb/scaffold/_form.html.erb
@@ -1,11 +1,11 @@
-<%%= semantic_form_for @<%= singular_name %> do |f| %>
- <%%= f.inputs do %>
- <%- attributes.each do |attribute| -%>
- <%%= f.input :<%= attribute.name %> %>
- <%- end -%>
- <%% end %>
-
- <%%= f.actions do %>
- <%%= f.action :submit, :as => :input %>
- <%% end %>
-<%% end %>
+<%%= semantic_form_for @<%= singular_name %> do |f| %>
+ <%%= f.inputs do %>
+ <%- attributes.each do |attribute| -%>
+ <%%= f.input :<%= attribute.name %> %>
+ <%- end -%>
+ <%% end %>
+
+ <%%= f.actions do %>
+ <%%= f.action :submit, :as => :input %>
+ <%% end %>
+<%% end %>
diff --git a/public/403.html b/public/403.html
index fd18a0d..88188d7 100644
--- a/public/403.html
+++ b/public/403.html
@@ -1,122 +1,122 @@
-
-
-
-
-DMPonline
-
-
-
-
-
-
-
-Welcome to DMPonline version 4
-
-
-
Something has gone wrong.
-
To report this error please contact us on dmponline@dcc.ac.uk
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+DMPonline
+
+
+
+
+
+
+
+Welcome to DMPonline version 4
+
+
+
Something has gone wrong.
+
To report this error please contact us on dmponline@dcc.ac.uk
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/404.html b/public/404.html
index 9a48320..a58079f 100644
--- a/public/404.html
+++ b/public/404.html
@@ -1,26 +1,26 @@
-
-
-
- The page you were looking for doesn't exist (404)
-
-
-
-
-
-
-
The page you were looking for doesn't exist.
-
You may have mistyped the address or the page may have moved.
-
-
-
+
+
+
+ The page you were looking for doesn't exist (404)
+
+
+
+
+
+
+
The page you were looking for doesn't exist.
+
You may have mistyped the address or the page may have moved.
+
+
+
diff --git a/public/422.html b/public/422.html
index 83660ab..cb106c4 100644
--- a/public/422.html
+++ b/public/422.html
@@ -1,26 +1,26 @@
-
-
-
- The change you wanted was rejected (422)
-
-
-
-
-
-
-
The change you wanted was rejected.
-
Maybe you tried to change something you didn't have access to.
-
-
-
+
+
+
+ The change you wanted was rejected (422)
+
+
+
+
+
+
+
The change you wanted was rejected.
+
Maybe you tried to change something you didn't have access to.
+
+
+
diff --git a/public/500.html b/public/500.html
index f3648a0..7029a89 100644
--- a/public/500.html
+++ b/public/500.html
@@ -1,25 +1,25 @@
-
-
-
- We're sorry, but something went wrong (500)
-
-
-
-
-
-
-
We're sorry, but something went wrong.
-
-
-
+
+
+
+ We're sorry, but something went wrong (500)
+
+
+
+
+
+
+
We're sorry, but something went wrong.
+
+
+
diff --git a/public/_index.html b/public/_index.html
index a9ec89b..81a6113 100644
--- a/public/_index.html
+++ b/public/_index.html
@@ -1,121 +1,121 @@
-
-
-
-
-DMPonline
-
-
-
-
-
-
-
-Welcome to DMPonline version 4
-
-
-
DMPonline is down. Please try again soon.
-
If this is problematic, then please contact us on dmponline@dcc.ac.uk
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+DMPonline
+
+
+
+
+
+
+
+Welcome to DMPonline version 4
+
+
+
DMPonline is down. Please try again soon.
+
If this is problematic, then please contact us on dmponline@dcc.ac.uk
+
+
+
+
+
+
+
+
+
+
diff --git a/public/javascripts/i18n.js b/public/javascripts/i18n.js
index 9a97af0..9797f5b 100644
--- a/public/javascripts/i18n.js
+++ b/public/javascripts/i18n.js
@@ -1,934 +1,934 @@
-// I18n.js
-// =======
-//
-// This small library provides the Rails I18n API on the Javascript.
-// You don't actually have to use Rails (or even Ruby) to use I18n.js.
-// Just make sure you export all translations in an object like this:
-//
-// I18n.translations.en = {
-// hello: "Hello World"
-// };
-//
-// See tests for specific formatting like numbers and dates.
-//
-
-;(function(factory) {
- if (typeof module !== 'undefined' && module.exports) {
- // Node/CommonJS
- module.exports = factory(this);
- } else if (typeof define === 'function' && define.amd) {
- // AMD
- var global=this;
- define('i18n', function(){ return factory(global);});
- } else {
- // Browser globals
- this.I18n = factory(this);
- }
-}(function(global) {
- "use strict";
-
- // Use previously defined object if exists in current scope
- var I18n = global && global.I18n || {};
-
- // Just cache the Array#slice function.
- var slice = Array.prototype.slice;
-
- // Apply number padding.
- var padding = function(number) {
- return ("0" + number.toString()).substr(-2);
- };
-
- // Improved toFixed number rounding function with support for unprecise floating points
- // JavaScript's standard toFixed function does not round certain numbers correctly (for example 0.105 with precision 2).
- var toFixed = function(number, precision) {
- return decimalAdjust('round', number, -precision).toFixed(precision);
- };
-
- // Is a given variable an object?
- // Borrowed from Underscore.js
- var isObject = function(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- };
-
- // Is a given value an array?
- // Borrowed from Underscore.js
- var isArray = function(obj) {
- if (Array.isArray) {
- return Array.isArray(obj);
- };
- return Object.prototype.toString.call(obj) === '[object Array]';
- };
-
- var decimalAdjust = function(type, value, exp) {
- // If the exp is undefined or zero...
- if (typeof exp === 'undefined' || +exp === 0) {
- return Math[type](value);
- }
- value = +value;
- exp = +exp;
- // If the value is not a number or the exp is not an integer...
- if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
- return NaN;
- }
- // Shift
- value = value.toString().split('e');
- value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
- // Shift back
- value = value.toString().split('e');
- return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
- }
-
- // Set default days/months translations.
- var DATE = {
- day_names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
- , abbr_day_names: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
- , month_names: [null, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
- , abbr_month_names: [null, "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
- , meridian: ["AM", "PM"]
- };
-
- // Set default number format.
- var NUMBER_FORMAT = {
- precision: 3
- , separator: "."
- , delimiter: ","
- , strip_insignificant_zeros: false
- };
-
- // Set default currency format.
- var CURRENCY_FORMAT = {
- unit: "$"
- , precision: 2
- , format: "%u%n"
- , sign_first: true
- , delimiter: ","
- , separator: "."
- };
-
- // Set default percentage format.
- var PERCENTAGE_FORMAT = {
- unit: "%"
- , precision: 3
- , format: "%n%u"
- , separator: "."
- , delimiter: ""
- };
-
- // Set default size units.
- var SIZE_UNITS = [null, "kb", "mb", "gb", "tb"];
-
- // Other default options
- var DEFAULT_OPTIONS = {
- // Set default locale. This locale will be used when fallback is enabled and
- // the translation doesn't exist in a particular locale.
- defaultLocale: "en"
- // Set the current locale to `en`.
- , locale: "en"
- // Set the translation key separator.
- , defaultSeparator: "."
- // Set the placeholder format. Accepts `{{placeholder}}` and `%{placeholder}`.
- , placeholder: /(?:\{\{|%\{)(.*?)(?:\}\}?)/gm
- // Set if engine should fallback to the default locale when a translation
- // is missing.
- , fallbacks: false
- // Set the default translation object.
- , translations: {}
- // Set missing translation behavior. 'message' will display a message
- // that the translation is missing, 'guess' will try to guess the string
- , missingBehaviour: 'message'
- // if you use missingBehaviour with 'message', but want to know that the
- // string is actually missing for testing purposes, you can prefix the
- // guessed string by setting the value here. By default, no prefix!
- , missingTranslationPrefix: ''
- };
-
- I18n.reset = function() {
- // Set default locale. This locale will be used when fallback is enabled and
- // the translation doesn't exist in a particular locale.
- this.defaultLocale = DEFAULT_OPTIONS.defaultLocale;
-
- // Set the current locale to `en`.
- this.locale = DEFAULT_OPTIONS.locale;
-
- // Set the translation key separator.
- this.defaultSeparator = DEFAULT_OPTIONS.defaultSeparator;
-
- // Set the placeholder format. Accepts `{{placeholder}}` and `%{placeholder}`.
- this.placeholder = DEFAULT_OPTIONS.placeholder;
-
- // Set if engine should fallback to the default locale when a translation
- // is missing.
- this.fallbacks = DEFAULT_OPTIONS.fallbacks;
-
- // Set the default translation object.
- this.translations = DEFAULT_OPTIONS.translations;
-
- // Set the default missing behaviour
- this.missingBehaviour = DEFAULT_OPTIONS.missingBehaviour;
-
- // Set the default missing string prefix for guess behaviour
- this.missingTranslationPrefix = DEFAULT_OPTIONS.missingTranslationPrefix;
-
- };
-
- // Much like `reset`, but only assign options if not already assigned
- I18n.initializeOptions = function() {
- if (typeof(this.defaultLocale) === "undefined" && this.defaultLocale !== null)
- this.defaultLocale = DEFAULT_OPTIONS.defaultLocale;
-
- if (typeof(this.locale) === "undefined" && this.locale !== null)
- this.locale = DEFAULT_OPTIONS.locale;
-
- if (typeof(this.defaultSeparator) === "undefined" && this.defaultSeparator !== null)
- this.defaultSeparator = DEFAULT_OPTIONS.defaultSeparator;
-
- if (typeof(this.placeholder) === "undefined" && this.placeholder !== null)
- this.placeholder = DEFAULT_OPTIONS.placeholder;
-
- if (typeof(this.fallbacks) === "undefined" && this.fallbacks !== null)
- this.fallbacks = DEFAULT_OPTIONS.fallbacks;
-
- if (typeof(this.translations) === "undefined" && this.translations !== null)
- this.translations = DEFAULT_OPTIONS.translations;
- };
- I18n.initializeOptions();
-
- // Return a list of all locales that must be tried before returning the
- // missing translation message. By default, this will consider the inline option,
- // current locale and fallback locale.
- //
- // I18n.locales.get("de-DE");
- // // ["de-DE", "de", "en"]
- //
- // You can define custom rules for any locale. Just make sure you return a array
- // containing all locales.
- //
- // // Default the Wookie locale to English.
- // I18n.locales["wk"] = function(locale) {
- // return ["en"];
- // };
- //
- I18n.locales = {};
-
- // Retrieve locales based on inline locale, current locale or default to
- // I18n's detection.
- I18n.locales.get = function(locale) {
- var result = this[locale] || this[I18n.locale] || this["default"];
-
- if (typeof(result) === "function") {
- result = result(locale);
- }
-
- if (isArray(result) === false) {
- result = [result];
- }
-
- return result;
- };
-
- // The default locale list.
- I18n.locales["default"] = function(locale) {
- var locales = []
- , list = []
- , countryCode
- , count
- ;
-
- // Handle the inline locale option that can be provided to
- // the `I18n.t` options.
- if (locale) {
- locales.push(locale);
- }
-
- // Add the current locale to the list.
- if (!locale && I18n.locale) {
- locales.push(I18n.locale);
- }
-
- // Add the default locale if fallback strategy is enabled.
- if (I18n.fallbacks && I18n.defaultLocale) {
- locales.push(I18n.defaultLocale);
- }
-
- // Compute each locale with its country code.
- // So this will return an array containing both
- // `de-DE` and `de` locales.
- locales.forEach(function(locale){
- countryCode = locale.split("-")[0];
-
- if (!~list.indexOf(locale)) {
- list.push(locale);
- }
-
- if (I18n.fallbacks && countryCode && countryCode !== locale && !~list.indexOf(countryCode)) {
- list.push(countryCode);
- }
- });
-
- // No locales set? English it is.
- if (!locales.length) {
- locales.push("en");
- }
-
- return list;
- };
-
- // Hold pluralization rules.
- I18n.pluralization = {};
-
- // Return the pluralizer for a specific locale.
- // If no specify locale is found, then I18n's default will be used.
- I18n.pluralization.get = function(locale) {
- return this[locale] || this[I18n.locale] || this["default"];
- };
-
- // The default pluralizer rule.
- // It detects the `zero`, `one`, and `other` scopes.
- I18n.pluralization["default"] = function(count) {
- switch (count) {
- case 0: return ["zero", "other"];
- case 1: return ["one"];
- default: return ["other"];
- }
- };
-
- // Return current locale. If no locale has been set, then
- // the current locale will be the default locale.
- I18n.currentLocale = function() {
- return this.locale || this.defaultLocale;
- };
-
- // Check if value is different than undefined and null;
- I18n.isSet = function(value) {
- return value !== undefined && value !== null;
- };
-
- // Find and process the translation using the provided scope and options.
- // This is used internally by some functions and should not be used as an
- // public API.
- I18n.lookup = function(scope, options) {
- options = this.prepareOptions(options);
-
- var locales = this.locales.get(options.locale).slice()
- , requestedLocale = locales[0]
- , locale
- , scopes
- , translations
- ;
-
- scope = this.getFullScope(scope, options);
-
- while (locales.length) {
- locale = locales.shift();
- scopes = scope.split(this.defaultSeparator);
- translations = this.translations[locale];
-
- if (!translations) {
- continue;
- }
-
- while (scopes.length) {
- translations = translations[scopes.shift()];
-
- if (translations === undefined || translations === null) {
- break;
- }
- }
-
- if (translations !== undefined && translations !== null) {
- return translations;
- }
- }
-
- if (this.isSet(options.defaultValue)) {
- return options.defaultValue;
- }
- };
-
- // Rails changed the way the meridian is stored.
- // It started with `date.meridian` returning an array,
- // then it switched to `time.am` and `time.pm`.
- // This function abstracts this difference and returns
- // the correct meridian or the default value when none is provided.
- I18n.meridian = function() {
- var time = this.lookup("time");
- var date = this.lookup("date");
-
- if (time && time.am && time.pm) {
- return [time.am, time.pm];
- } else if (date && date.meridian) {
- return date.meridian;
- } else {
- return DATE.meridian;
- }
- };
-
- // Merge serveral hash options, checking if value is set before
- // overwriting any value. The precedence is from left to right.
- //
- // I18n.prepareOptions({name: "John Doe"}, {name: "Mary Doe", role: "user"});
- // #=> {name: "John Doe", role: "user"}
- //
- I18n.prepareOptions = function() {
- var args = slice.call(arguments)
- , options = {}
- , subject
- ;
-
- while (args.length) {
- subject = args.shift();
-
- if (typeof(subject) != "object") {
- continue;
- }
-
- for (var attr in subject) {
- if (!subject.hasOwnProperty(attr)) {
- continue;
- }
-
- if (this.isSet(options[attr])) {
- continue;
- }
-
- options[attr] = subject[attr];
- }
- }
-
- return options;
- };
-
- // Generate a list of translation options for default fallbacks.
- // `defaultValue` is also deleted from options as it is returned as part of
- // the translationOptions array.
- I18n.createTranslationOptions = function(scope, options) {
- var translationOptions = [{scope: scope}];
-
- // Defaults should be an array of hashes containing either
- // fallback scopes or messages
- if (this.isSet(options.defaults)) {
- translationOptions = translationOptions.concat(options.defaults);
- }
-
- // Maintain support for defaultValue. Since it is always a message
- // insert it in to the translation options as such.
- if (this.isSet(options.defaultValue)) {
- translationOptions.push({ message: options.defaultValue });
- delete options.defaultValue;
- }
-
- return translationOptions;
- };
-
- // Translate the given scope with the provided options.
- I18n.translate = function(scope, options) {
- options = this.prepareOptions(options);
-
- var translationOptions = this.createTranslationOptions(scope, options);
-
- var translation;
- // Iterate through the translation options until a translation
- // or message is found.
- var translationFound =
- translationOptions.some(function(translationOption) {
- if (this.isSet(translationOption.scope)) {
- translation = this.lookup(translationOption.scope, options);
- } else if (this.isSet(translationOption.message)) {
- translation = translationOption.message;
- }
-
- if (translation !== undefined && translation !== null) {
- return true;
- }
- }, this);
-
- if (!translationFound) {
- return this.missingTranslation(scope, options);
- }
-
- if (typeof(translation) === "string") {
- translation = this.interpolate(translation, options);
- } else if (isObject(translation) && this.isSet(options.count)) {
- translation = this.pluralize(options.count, translation, options);
- }
-
- return translation;
- };
-
- // This function interpolates the all variables in the given message.
- I18n.interpolate = function(message, options) {
- options = this.prepareOptions(options);
- var matches = message.match(this.placeholder)
- , placeholder
- , value
- , name
- , regex
- ;
-
- if (!matches) {
- return message;
- }
-
- var value;
-
- while (matches.length) {
- placeholder = matches.shift();
- name = placeholder.replace(this.placeholder, "$1");
-
- if (this.isSet(options[name])) {
- value = options[name].toString().replace(/\$/gm, "_#$#_");
- } else if (name in options) {
- value = this.nullPlaceholder(placeholder, message, options);
- } else {
- value = this.missingPlaceholder(placeholder, message, options);
- }
-
- regex = new RegExp(placeholder.replace(/\{/gm, "\\{").replace(/\}/gm, "\\}"));
- message = message.replace(regex, value);
- }
-
- return message.replace(/_#\$#_/g, "$");
- };
-
- // Pluralize the given scope using the `count` value.
- // The pluralized translation may have other placeholders,
- // which will be retrieved from `options`.
- I18n.pluralize = function(count, scope, options) {
- options = this.prepareOptions(options);
- var translations, pluralizer, keys, key, message;
-
- if (isObject(scope)) {
- translations = scope;
- } else {
- translations = this.lookup(scope, options);
- }
-
- if (!translations) {
- return this.missingTranslation(scope, options);
- }
-
- pluralizer = this.pluralization.get(options.locale);
- keys = pluralizer(count);
-
- while (keys.length) {
- key = keys.shift();
-
- if (this.isSet(translations[key])) {
- message = translations[key];
- break;
- }
- }
-
- options.count = String(count);
- return this.interpolate(message, options);
- };
-
- // Return a missing translation message for the given parameters.
- I18n.missingTranslation = function(scope, options) {
- //guess intended string
- if(this.missingBehaviour == 'guess'){
- //get only the last portion of the scope
- var s = scope.split('.').slice(-1)[0];
- //replace underscore with space && camelcase with space and lowercase letter
- return (this.missingTranslationPrefix.length > 0 ? this.missingTranslationPrefix : '') +
- s.replace('_',' ').replace(/([a-z])([A-Z])/g,
- function(match, p1, p2) {return p1 + ' ' + p2.toLowerCase()} );
- }
-
- var fullScope = this.getFullScope(scope, options);
- var fullScopeWithLocale = [this.currentLocale(), fullScope].join(this.defaultSeparator);
-
- return '[missing "' + fullScopeWithLocale + '" translation]';
- };
-
- // Return a missing placeholder message for given parameters
- I18n.missingPlaceholder = function(placeholder, message, options) {
- return "[missing " + placeholder + " value]";
- };
-
- I18n.nullPlaceholder = function() {
- return I18n.missingPlaceholder.apply(I18n, arguments);
- };
-
- // Format number using localization rules.
- // The options will be retrieved from the `number.format` scope.
- // If this isn't present, then the following options will be used:
- //
- // - `precision`: `3`
- // - `separator`: `"."`
- // - `delimiter`: `","`
- // - `strip_insignificant_zeros`: `false`
- //
- // You can also override these options by providing the `options` argument.
- //
- I18n.toNumber = function(number, options) {
- options = this.prepareOptions(
- options
- , this.lookup("number.format")
- , NUMBER_FORMAT
- );
-
- var negative = number < 0
- , string = toFixed(Math.abs(number), options.precision).toString()
- , parts = string.split(".")
- , precision
- , buffer = []
- , formattedNumber
- , format = options.format || "%n"
- , sign = negative ? "-" : ""
- ;
-
- number = parts[0];
- precision = parts[1];
-
- while (number.length > 0) {
- buffer.unshift(number.substr(Math.max(0, number.length - 3), 3));
- number = number.substr(0, number.length -3);
- }
-
- formattedNumber = buffer.join(options.delimiter);
-
- if (options.strip_insignificant_zeros && precision) {
- precision = precision.replace(/0+$/, "");
- }
-
- if (options.precision > 0 && precision) {
- formattedNumber += options.separator + precision;
- }
-
- if (options.sign_first) {
- format = "%s" + format;
- }
- else {
- format = format.replace("%n", "%s%n");
- }
-
- formattedNumber = format
- .replace("%u", options.unit)
- .replace("%n", formattedNumber)
- .replace("%s", sign)
- ;
-
- return formattedNumber;
- };
-
- // Format currency with localization rules.
- // The options will be retrieved from the `number.currency.format` and
- // `number.format` scopes, in that order.
- //
- // Any missing option will be retrieved from the `I18n.toNumber` defaults and
- // the following options:
- //
- // - `unit`: `"$"`
- // - `precision`: `2`
- // - `format`: `"%u%n"`
- // - `delimiter`: `","`
- // - `separator`: `"."`
- //
- // You can also override these options by providing the `options` argument.
- //
- I18n.toCurrency = function(number, options) {
- options = this.prepareOptions(
- options
- , this.lookup("number.currency.format")
- , this.lookup("number.format")
- , CURRENCY_FORMAT
- );
-
- return this.toNumber(number, options);
- };
-
- // Localize several values.
- // You can provide the following scopes: `currency`, `number`, or `percentage`.
- // If you provide a scope that matches the `/^(date|time)/` regular expression
- // then the `value` will be converted by using the `I18n.toTime` function.
- //
- // It will default to the value's `toString` function.
- //
- I18n.localize = function(scope, value, options) {
- options || (options = {});
-
- switch (scope) {
- case "currency":
- return this.toCurrency(value);
- case "number":
- scope = this.lookup("number.format");
- return this.toNumber(value, scope);
- case "percentage":
- return this.toPercentage(value);
- default:
- var localizedValue;
-
- if (scope.match(/^(date|time)/)) {
- localizedValue = this.toTime(scope, value);
- } else {
- localizedValue = value.toString();
- }
-
- return this.interpolate(localizedValue, options);
- }
- };
-
- // Parse a given `date` string into a JavaScript Date object.
- // This function is time zone aware.
- //
- // The following string formats are recognized:
- //
- // yyyy-mm-dd
- // yyyy-mm-dd[ T]hh:mm::ss
- // yyyy-mm-dd[ T]hh:mm::ss
- // yyyy-mm-dd[ T]hh:mm::ssZ
- // yyyy-mm-dd[ T]hh:mm::ss+0000
- // yyyy-mm-dd[ T]hh:mm::ss+00:00
- // yyyy-mm-dd[ T]hh:mm::ss.123Z
- //
- I18n.parseDate = function(date) {
- var matches, convertedDate, fraction;
- // we have a date, so just return it.
- if (typeof(date) == "object") {
- return date;
- };
-
- matches = date.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/);
-
- if (matches) {
- for (var i = 1; i <= 6; i++) {
- matches[i] = parseInt(matches[i], 10) || 0;
- }
-
- // month starts on 0
- matches[2] -= 1;
-
- fraction = matches[7] ? 1000 * ("0" + matches[7]) : null;
-
- if (matches[8]) {
- convertedDate = new Date(Date.UTC(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction));
- } else {
- convertedDate = new Date(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction);
- }
- } else if (typeof(date) == "number") {
- // UNIX timestamp
- convertedDate = new Date();
- convertedDate.setTime(date);
- } else if (date.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)) {
- // This format `Wed Jul 20 13:03:39 +0000 2011` is parsed by
- // webkit/firefox, but not by IE, so we must parse it manually.
- convertedDate = new Date();
- convertedDate.setTime(Date.parse([
- RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5
- ].join(" ")));
- } else if (date.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/)) {
- // a valid javascript format with timezone info
- convertedDate = new Date();
- convertedDate.setTime(Date.parse(date));
- } else {
- // an arbitrary javascript string
- convertedDate = new Date();
- convertedDate.setTime(Date.parse(date));
- }
-
- return convertedDate;
- };
-
- // Formats time according to the directives in the given format string.
- // The directives begins with a percent (%) character. Any text not listed as a
- // directive will be passed through to the output string.
- //
- // The accepted formats are:
- //
- // %a - The abbreviated weekday name (Sun)
- // %A - The full weekday name (Sunday)
- // %b - The abbreviated month name (Jan)
- // %B - The full month name (January)
- // %c - The preferred local date and time representation
- // %d - Day of the month (01..31)
- // %-d - Day of the month (1..31)
- // %H - Hour of the day, 24-hour clock (00..23)
- // %-H - Hour of the day, 24-hour clock (0..23)
- // %I - Hour of the day, 12-hour clock (01..12)
- // %-I - Hour of the day, 12-hour clock (1..12)
- // %m - Month of the year (01..12)
- // %-m - Month of the year (1..12)
- // %M - Minute of the hour (00..59)
- // %-M - Minute of the hour (0..59)
- // %p - Meridian indicator (AM or PM)
- // %S - Second of the minute (00..60)
- // %-S - Second of the minute (0..60)
- // %w - Day of the week (Sunday is 0, 0..6)
- // %y - Year without a century (00..99)
- // %-y - Year without a century (0..99)
- // %Y - Year with century
- // %z - Timezone offset (+0545)
- //
- I18n.strftime = function(date, format) {
- var options = this.lookup("date")
- , meridianOptions = I18n.meridian()
- ;
-
- if (!options) {
- options = {};
- }
-
- options = this.prepareOptions(options, DATE);
-
- var weekDay = date.getDay()
- , day = date.getDate()
- , year = date.getFullYear()
- , month = date.getMonth() + 1
- , hour = date.getHours()
- , hour12 = hour
- , meridian = hour > 11 ? 1 : 0
- , secs = date.getSeconds()
- , mins = date.getMinutes()
- , offset = date.getTimezoneOffset()
- , absOffsetHours = Math.floor(Math.abs(offset / 60))
- , absOffsetMinutes = Math.abs(offset) - (absOffsetHours * 60)
- , timezoneoffset = (offset > 0 ? "-" : "+") +
- (absOffsetHours.toString().length < 2 ? "0" + absOffsetHours : absOffsetHours) +
- (absOffsetMinutes.toString().length < 2 ? "0" + absOffsetMinutes : absOffsetMinutes)
- ;
-
- if (hour12 > 12) {
- hour12 = hour12 - 12;
- } else if (hour12 === 0) {
- hour12 = 12;
- }
-
- format = format.replace("%a", options.abbr_day_names[weekDay]);
- format = format.replace("%A", options.day_names[weekDay]);
- format = format.replace("%b", options.abbr_month_names[month]);
- format = format.replace("%B", options.month_names[month]);
- format = format.replace("%d", padding(day));
- format = format.replace("%e", day);
- format = format.replace("%-d", day);
- format = format.replace("%H", padding(hour));
- format = format.replace("%-H", hour);
- format = format.replace("%I", padding(hour12));
- format = format.replace("%-I", hour12);
- format = format.replace("%m", padding(month));
- format = format.replace("%-m", month);
- format = format.replace("%M", padding(mins));
- format = format.replace("%-M", mins);
- format = format.replace("%p", meridianOptions[meridian]);
- format = format.replace("%S", padding(secs));
- format = format.replace("%-S", secs);
- format = format.replace("%w", weekDay);
- format = format.replace("%y", padding(year));
- format = format.replace("%-y", padding(year).replace(/^0+/, ""));
- format = format.replace("%Y", year);
- format = format.replace("%z", timezoneoffset);
-
- return format;
- };
-
- // Convert the given dateString into a formatted date.
- I18n.toTime = function(scope, dateString) {
- var date = this.parseDate(dateString)
- , format = this.lookup(scope)
- ;
-
- if (date.toString().match(/invalid/i)) {
- return date.toString();
- }
-
- if (!format) {
- return date.toString();
- }
-
- return this.strftime(date, format);
- };
-
- // Convert a number into a formatted percentage value.
- I18n.toPercentage = function(number, options) {
- options = this.prepareOptions(
- options
- , this.lookup("number.percentage.format")
- , this.lookup("number.format")
- , PERCENTAGE_FORMAT
- );
-
- return this.toNumber(number, options);
- };
-
- // Convert a number into a readable size representation.
- I18n.toHumanSize = function(number, options) {
- var kb = 1024
- , size = number
- , iterations = 0
- , unit
- , precision
- ;
-
- while (size >= kb && iterations < 4) {
- size = size / kb;
- iterations += 1;
- }
-
- if (iterations === 0) {
- unit = this.t("number.human.storage_units.units.byte", {count: size});
- precision = 0;
- } else {
- unit = this.t("number.human.storage_units.units." + SIZE_UNITS[iterations]);
- precision = (size - Math.floor(size) === 0) ? 0 : 1;
- }
-
- options = this.prepareOptions(
- options
- , {unit: unit, precision: precision, format: "%n%u", delimiter: ""}
- );
-
- return this.toNumber(size, options);
- };
-
- I18n.getFullScope = function(scope, options) {
- options = this.prepareOptions(options);
-
- // Deal with the scope as an array.
- if (scope.constructor === Array) {
- scope = scope.join(this.defaultSeparator);
- }
-
- // Deal with the scope option provided through the second argument.
- //
- // I18n.t('hello', {scope: 'greetings'});
- //
- if (options.scope) {
- scope = [options.scope, scope].join(this.defaultSeparator);
- }
-
- return scope;
- };
- /**
- * Merge obj1 with obj2 (shallow merge), without modifying inputs
- * @param {Object} obj1
- * @param {Object} obj2
- * @returns {Object} Merged values of obj1 and obj2
- *
- * In order to support ES3, `Object.prototype.hasOwnProperty.call` is used
- * Idea is from:
- * https://stackoverflow.com/questions/8157700/object-has-no-hasownproperty-method-i-e-its-undefined-ie8
- */
- I18n.extend = function ( obj1, obj2 ) {
- var extended = {};
- var prop;
- for (prop in obj1) {
- if (Object.prototype.hasOwnProperty.call(obj1, prop)) {
- extended[prop] = obj1[prop];
- }
- }
- for (prop in obj2) {
- if (Object.prototype.hasOwnProperty.call(obj2, prop)) {
- extended[prop] = obj2[prop];
- }
- }
- return extended;
- };
-
- // Set aliases, so we can save some typing.
- I18n.t = I18n.translate;
- I18n.l = I18n.localize;
- I18n.p = I18n.pluralize;
-
- return I18n;
-}));
+// I18n.js
+// =======
+//
+// This small library provides the Rails I18n API on the Javascript.
+// You don't actually have to use Rails (or even Ruby) to use I18n.js.
+// Just make sure you export all translations in an object like this:
+//
+// I18n.translations.en = {
+// hello: "Hello World"
+// };
+//
+// See tests for specific formatting like numbers and dates.
+//
+
+;(function(factory) {
+ if (typeof module !== 'undefined' && module.exports) {
+ // Node/CommonJS
+ module.exports = factory(this);
+ } else if (typeof define === 'function' && define.amd) {
+ // AMD
+ var global=this;
+ define('i18n', function(){ return factory(global);});
+ } else {
+ // Browser globals
+ this.I18n = factory(this);
+ }
+}(function(global) {
+ "use strict";
+
+ // Use previously defined object if exists in current scope
+ var I18n = global && global.I18n || {};
+
+ // Just cache the Array#slice function.
+ var slice = Array.prototype.slice;
+
+ // Apply number padding.
+ var padding = function(number) {
+ return ("0" + number.toString()).substr(-2);
+ };
+
+ // Improved toFixed number rounding function with support for unprecise floating points
+ // JavaScript's standard toFixed function does not round certain numbers correctly (for example 0.105 with precision 2).
+ var toFixed = function(number, precision) {
+ return decimalAdjust('round', number, -precision).toFixed(precision);
+ };
+
+ // Is a given variable an object?
+ // Borrowed from Underscore.js
+ var isObject = function(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ };
+
+ // Is a given value an array?
+ // Borrowed from Underscore.js
+ var isArray = function(obj) {
+ if (Array.isArray) {
+ return Array.isArray(obj);
+ };
+ return Object.prototype.toString.call(obj) === '[object Array]';
+ };
+
+ var decimalAdjust = function(type, value, exp) {
+ // If the exp is undefined or zero...
+ if (typeof exp === 'undefined' || +exp === 0) {
+ return Math[type](value);
+ }
+ value = +value;
+ exp = +exp;
+ // If the value is not a number or the exp is not an integer...
+ if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
+ return NaN;
+ }
+ // Shift
+ value = value.toString().split('e');
+ value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
+ // Shift back
+ value = value.toString().split('e');
+ return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
+ }
+
+ // Set default days/months translations.
+ var DATE = {
+ day_names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ , abbr_day_names: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+ , month_names: [null, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
+ , abbr_month_names: [null, "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+ , meridian: ["AM", "PM"]
+ };
+
+ // Set default number format.
+ var NUMBER_FORMAT = {
+ precision: 3
+ , separator: "."
+ , delimiter: ","
+ , strip_insignificant_zeros: false
+ };
+
+ // Set default currency format.
+ var CURRENCY_FORMAT = {
+ unit: "$"
+ , precision: 2
+ , format: "%u%n"
+ , sign_first: true
+ , delimiter: ","
+ , separator: "."
+ };
+
+ // Set default percentage format.
+ var PERCENTAGE_FORMAT = {
+ unit: "%"
+ , precision: 3
+ , format: "%n%u"
+ , separator: "."
+ , delimiter: ""
+ };
+
+ // Set default size units.
+ var SIZE_UNITS = [null, "kb", "mb", "gb", "tb"];
+
+ // Other default options
+ var DEFAULT_OPTIONS = {
+ // Set default locale. This locale will be used when fallback is enabled and
+ // the translation doesn't exist in a particular locale.
+ defaultLocale: "en"
+ // Set the current locale to `en`.
+ , locale: "en"
+ // Set the translation key separator.
+ , defaultSeparator: "."
+ // Set the placeholder format. Accepts `{{placeholder}}` and `%{placeholder}`.
+ , placeholder: /(?:\{\{|%\{)(.*?)(?:\}\}?)/gm
+ // Set if engine should fallback to the default locale when a translation
+ // is missing.
+ , fallbacks: false
+ // Set the default translation object.
+ , translations: {}
+ // Set missing translation behavior. 'message' will display a message
+ // that the translation is missing, 'guess' will try to guess the string
+ , missingBehaviour: 'message'
+ // if you use missingBehaviour with 'message', but want to know that the
+ // string is actually missing for testing purposes, you can prefix the
+ // guessed string by setting the value here. By default, no prefix!
+ , missingTranslationPrefix: ''
+ };
+
+ I18n.reset = function() {
+ // Set default locale. This locale will be used when fallback is enabled and
+ // the translation doesn't exist in a particular locale.
+ this.defaultLocale = DEFAULT_OPTIONS.defaultLocale;
+
+ // Set the current locale to `en`.
+ this.locale = DEFAULT_OPTIONS.locale;
+
+ // Set the translation key separator.
+ this.defaultSeparator = DEFAULT_OPTIONS.defaultSeparator;
+
+ // Set the placeholder format. Accepts `{{placeholder}}` and `%{placeholder}`.
+ this.placeholder = DEFAULT_OPTIONS.placeholder;
+
+ // Set if engine should fallback to the default locale when a translation
+ // is missing.
+ this.fallbacks = DEFAULT_OPTIONS.fallbacks;
+
+ // Set the default translation object.
+ this.translations = DEFAULT_OPTIONS.translations;
+
+ // Set the default missing behaviour
+ this.missingBehaviour = DEFAULT_OPTIONS.missingBehaviour;
+
+ // Set the default missing string prefix for guess behaviour
+ this.missingTranslationPrefix = DEFAULT_OPTIONS.missingTranslationPrefix;
+
+ };
+
+ // Much like `reset`, but only assign options if not already assigned
+ I18n.initializeOptions = function() {
+ if (typeof(this.defaultLocale) === "undefined" && this.defaultLocale !== null)
+ this.defaultLocale = DEFAULT_OPTIONS.defaultLocale;
+
+ if (typeof(this.locale) === "undefined" && this.locale !== null)
+ this.locale = DEFAULT_OPTIONS.locale;
+
+ if (typeof(this.defaultSeparator) === "undefined" && this.defaultSeparator !== null)
+ this.defaultSeparator = DEFAULT_OPTIONS.defaultSeparator;
+
+ if (typeof(this.placeholder) === "undefined" && this.placeholder !== null)
+ this.placeholder = DEFAULT_OPTIONS.placeholder;
+
+ if (typeof(this.fallbacks) === "undefined" && this.fallbacks !== null)
+ this.fallbacks = DEFAULT_OPTIONS.fallbacks;
+
+ if (typeof(this.translations) === "undefined" && this.translations !== null)
+ this.translations = DEFAULT_OPTIONS.translations;
+ };
+ I18n.initializeOptions();
+
+ // Return a list of all locales that must be tried before returning the
+ // missing translation message. By default, this will consider the inline option,
+ // current locale and fallback locale.
+ //
+ // I18n.locales.get("de-DE");
+ // // ["de-DE", "de", "en"]
+ //
+ // You can define custom rules for any locale. Just make sure you return a array
+ // containing all locales.
+ //
+ // // Default the Wookie locale to English.
+ // I18n.locales["wk"] = function(locale) {
+ // return ["en"];
+ // };
+ //
+ I18n.locales = {};
+
+ // Retrieve locales based on inline locale, current locale or default to
+ // I18n's detection.
+ I18n.locales.get = function(locale) {
+ var result = this[locale] || this[I18n.locale] || this["default"];
+
+ if (typeof(result) === "function") {
+ result = result(locale);
+ }
+
+ if (isArray(result) === false) {
+ result = [result];
+ }
+
+ return result;
+ };
+
+ // The default locale list.
+ I18n.locales["default"] = function(locale) {
+ var locales = []
+ , list = []
+ , countryCode
+ , count
+ ;
+
+ // Handle the inline locale option that can be provided to
+ // the `I18n.t` options.
+ if (locale) {
+ locales.push(locale);
+ }
+
+ // Add the current locale to the list.
+ if (!locale && I18n.locale) {
+ locales.push(I18n.locale);
+ }
+
+ // Add the default locale if fallback strategy is enabled.
+ if (I18n.fallbacks && I18n.defaultLocale) {
+ locales.push(I18n.defaultLocale);
+ }
+
+ // Compute each locale with its country code.
+ // So this will return an array containing both
+ // `de-DE` and `de` locales.
+ locales.forEach(function(locale){
+ countryCode = locale.split("-")[0];
+
+ if (!~list.indexOf(locale)) {
+ list.push(locale);
+ }
+
+ if (I18n.fallbacks && countryCode && countryCode !== locale && !~list.indexOf(countryCode)) {
+ list.push(countryCode);
+ }
+ });
+
+ // No locales set? English it is.
+ if (!locales.length) {
+ locales.push("en");
+ }
+
+ return list;
+ };
+
+ // Hold pluralization rules.
+ I18n.pluralization = {};
+
+ // Return the pluralizer for a specific locale.
+ // If no specify locale is found, then I18n's default will be used.
+ I18n.pluralization.get = function(locale) {
+ return this[locale] || this[I18n.locale] || this["default"];
+ };
+
+ // The default pluralizer rule.
+ // It detects the `zero`, `one`, and `other` scopes.
+ I18n.pluralization["default"] = function(count) {
+ switch (count) {
+ case 0: return ["zero", "other"];
+ case 1: return ["one"];
+ default: return ["other"];
+ }
+ };
+
+ // Return current locale. If no locale has been set, then
+ // the current locale will be the default locale.
+ I18n.currentLocale = function() {
+ return this.locale || this.defaultLocale;
+ };
+
+ // Check if value is different than undefined and null;
+ I18n.isSet = function(value) {
+ return value !== undefined && value !== null;
+ };
+
+ // Find and process the translation using the provided scope and options.
+ // This is used internally by some functions and should not be used as an
+ // public API.
+ I18n.lookup = function(scope, options) {
+ options = this.prepareOptions(options);
+
+ var locales = this.locales.get(options.locale).slice()
+ , requestedLocale = locales[0]
+ , locale
+ , scopes
+ , translations
+ ;
+
+ scope = this.getFullScope(scope, options);
+
+ while (locales.length) {
+ locale = locales.shift();
+ scopes = scope.split(this.defaultSeparator);
+ translations = this.translations[locale];
+
+ if (!translations) {
+ continue;
+ }
+
+ while (scopes.length) {
+ translations = translations[scopes.shift()];
+
+ if (translations === undefined || translations === null) {
+ break;
+ }
+ }
+
+ if (translations !== undefined && translations !== null) {
+ return translations;
+ }
+ }
+
+ if (this.isSet(options.defaultValue)) {
+ return options.defaultValue;
+ }
+ };
+
+ // Rails changed the way the meridian is stored.
+ // It started with `date.meridian` returning an array,
+ // then it switched to `time.am` and `time.pm`.
+ // This function abstracts this difference and returns
+ // the correct meridian or the default value when none is provided.
+ I18n.meridian = function() {
+ var time = this.lookup("time");
+ var date = this.lookup("date");
+
+ if (time && time.am && time.pm) {
+ return [time.am, time.pm];
+ } else if (date && date.meridian) {
+ return date.meridian;
+ } else {
+ return DATE.meridian;
+ }
+ };
+
+ // Merge serveral hash options, checking if value is set before
+ // overwriting any value. The precedence is from left to right.
+ //
+ // I18n.prepareOptions({name: "John Doe"}, {name: "Mary Doe", role: "user"});
+ // #=> {name: "John Doe", role: "user"}
+ //
+ I18n.prepareOptions = function() {
+ var args = slice.call(arguments)
+ , options = {}
+ , subject
+ ;
+
+ while (args.length) {
+ subject = args.shift();
+
+ if (typeof(subject) != "object") {
+ continue;
+ }
+
+ for (var attr in subject) {
+ if (!subject.hasOwnProperty(attr)) {
+ continue;
+ }
+
+ if (this.isSet(options[attr])) {
+ continue;
+ }
+
+ options[attr] = subject[attr];
+ }
+ }
+
+ return options;
+ };
+
+ // Generate a list of translation options for default fallbacks.
+ // `defaultValue` is also deleted from options as it is returned as part of
+ // the translationOptions array.
+ I18n.createTranslationOptions = function(scope, options) {
+ var translationOptions = [{scope: scope}];
+
+ // Defaults should be an array of hashes containing either
+ // fallback scopes or messages
+ if (this.isSet(options.defaults)) {
+ translationOptions = translationOptions.concat(options.defaults);
+ }
+
+ // Maintain support for defaultValue. Since it is always a message
+ // insert it in to the translation options as such.
+ if (this.isSet(options.defaultValue)) {
+ translationOptions.push({ message: options.defaultValue });
+ delete options.defaultValue;
+ }
+
+ return translationOptions;
+ };
+
+ // Translate the given scope with the provided options.
+ I18n.translate = function(scope, options) {
+ options = this.prepareOptions(options);
+
+ var translationOptions = this.createTranslationOptions(scope, options);
+
+ var translation;
+ // Iterate through the translation options until a translation
+ // or message is found.
+ var translationFound =
+ translationOptions.some(function(translationOption) {
+ if (this.isSet(translationOption.scope)) {
+ translation = this.lookup(translationOption.scope, options);
+ } else if (this.isSet(translationOption.message)) {
+ translation = translationOption.message;
+ }
+
+ if (translation !== undefined && translation !== null) {
+ return true;
+ }
+ }, this);
+
+ if (!translationFound) {
+ return this.missingTranslation(scope, options);
+ }
+
+ if (typeof(translation) === "string") {
+ translation = this.interpolate(translation, options);
+ } else if (isObject(translation) && this.isSet(options.count)) {
+ translation = this.pluralize(options.count, translation, options);
+ }
+
+ return translation;
+ };
+
+ // This function interpolates the all variables in the given message.
+ I18n.interpolate = function(message, options) {
+ options = this.prepareOptions(options);
+ var matches = message.match(this.placeholder)
+ , placeholder
+ , value
+ , name
+ , regex
+ ;
+
+ if (!matches) {
+ return message;
+ }
+
+ var value;
+
+ while (matches.length) {
+ placeholder = matches.shift();
+ name = placeholder.replace(this.placeholder, "$1");
+
+ if (this.isSet(options[name])) {
+ value = options[name].toString().replace(/\$/gm, "_#$#_");
+ } else if (name in options) {
+ value = this.nullPlaceholder(placeholder, message, options);
+ } else {
+ value = this.missingPlaceholder(placeholder, message, options);
+ }
+
+ regex = new RegExp(placeholder.replace(/\{/gm, "\\{").replace(/\}/gm, "\\}"));
+ message = message.replace(regex, value);
+ }
+
+ return message.replace(/_#\$#_/g, "$");
+ };
+
+ // Pluralize the given scope using the `count` value.
+ // The pluralized translation may have other placeholders,
+ // which will be retrieved from `options`.
+ I18n.pluralize = function(count, scope, options) {
+ options = this.prepareOptions(options);
+ var translations, pluralizer, keys, key, message;
+
+ if (isObject(scope)) {
+ translations = scope;
+ } else {
+ translations = this.lookup(scope, options);
+ }
+
+ if (!translations) {
+ return this.missingTranslation(scope, options);
+ }
+
+ pluralizer = this.pluralization.get(options.locale);
+ keys = pluralizer(count);
+
+ while (keys.length) {
+ key = keys.shift();
+
+ if (this.isSet(translations[key])) {
+ message = translations[key];
+ break;
+ }
+ }
+
+ options.count = String(count);
+ return this.interpolate(message, options);
+ };
+
+ // Return a missing translation message for the given parameters.
+ I18n.missingTranslation = function(scope, options) {
+ //guess intended string
+ if(this.missingBehaviour == 'guess'){
+ //get only the last portion of the scope
+ var s = scope.split('.').slice(-1)[0];
+ //replace underscore with space && camelcase with space and lowercase letter
+ return (this.missingTranslationPrefix.length > 0 ? this.missingTranslationPrefix : '') +
+ s.replace('_',' ').replace(/([a-z])([A-Z])/g,
+ function(match, p1, p2) {return p1 + ' ' + p2.toLowerCase()} );
+ }
+
+ var fullScope = this.getFullScope(scope, options);
+ var fullScopeWithLocale = [this.currentLocale(), fullScope].join(this.defaultSeparator);
+
+ return '[missing "' + fullScopeWithLocale + '" translation]';
+ };
+
+ // Return a missing placeholder message for given parameters
+ I18n.missingPlaceholder = function(placeholder, message, options) {
+ return "[missing " + placeholder + " value]";
+ };
+
+ I18n.nullPlaceholder = function() {
+ return I18n.missingPlaceholder.apply(I18n, arguments);
+ };
+
+ // Format number using localization rules.
+ // The options will be retrieved from the `number.format` scope.
+ // If this isn't present, then the following options will be used:
+ //
+ // - `precision`: `3`
+ // - `separator`: `"."`
+ // - `delimiter`: `","`
+ // - `strip_insignificant_zeros`: `false`
+ //
+ // You can also override these options by providing the `options` argument.
+ //
+ I18n.toNumber = function(number, options) {
+ options = this.prepareOptions(
+ options
+ , this.lookup("number.format")
+ , NUMBER_FORMAT
+ );
+
+ var negative = number < 0
+ , string = toFixed(Math.abs(number), options.precision).toString()
+ , parts = string.split(".")
+ , precision
+ , buffer = []
+ , formattedNumber
+ , format = options.format || "%n"
+ , sign = negative ? "-" : ""
+ ;
+
+ number = parts[0];
+ precision = parts[1];
+
+ while (number.length > 0) {
+ buffer.unshift(number.substr(Math.max(0, number.length - 3), 3));
+ number = number.substr(0, number.length -3);
+ }
+
+ formattedNumber = buffer.join(options.delimiter);
+
+ if (options.strip_insignificant_zeros && precision) {
+ precision = precision.replace(/0+$/, "");
+ }
+
+ if (options.precision > 0 && precision) {
+ formattedNumber += options.separator + precision;
+ }
+
+ if (options.sign_first) {
+ format = "%s" + format;
+ }
+ else {
+ format = format.replace("%n", "%s%n");
+ }
+
+ formattedNumber = format
+ .replace("%u", options.unit)
+ .replace("%n", formattedNumber)
+ .replace("%s", sign)
+ ;
+
+ return formattedNumber;
+ };
+
+ // Format currency with localization rules.
+ // The options will be retrieved from the `number.currency.format` and
+ // `number.format` scopes, in that order.
+ //
+ // Any missing option will be retrieved from the `I18n.toNumber` defaults and
+ // the following options:
+ //
+ // - `unit`: `"$"`
+ // - `precision`: `2`
+ // - `format`: `"%u%n"`
+ // - `delimiter`: `","`
+ // - `separator`: `"."`
+ //
+ // You can also override these options by providing the `options` argument.
+ //
+ I18n.toCurrency = function(number, options) {
+ options = this.prepareOptions(
+ options
+ , this.lookup("number.currency.format")
+ , this.lookup("number.format")
+ , CURRENCY_FORMAT
+ );
+
+ return this.toNumber(number, options);
+ };
+
+ // Localize several values.
+ // You can provide the following scopes: `currency`, `number`, or `percentage`.
+ // If you provide a scope that matches the `/^(date|time)/` regular expression
+ // then the `value` will be converted by using the `I18n.toTime` function.
+ //
+ // It will default to the value's `toString` function.
+ //
+ I18n.localize = function(scope, value, options) {
+ options || (options = {});
+
+ switch (scope) {
+ case "currency":
+ return this.toCurrency(value);
+ case "number":
+ scope = this.lookup("number.format");
+ return this.toNumber(value, scope);
+ case "percentage":
+ return this.toPercentage(value);
+ default:
+ var localizedValue;
+
+ if (scope.match(/^(date|time)/)) {
+ localizedValue = this.toTime(scope, value);
+ } else {
+ localizedValue = value.toString();
+ }
+
+ return this.interpolate(localizedValue, options);
+ }
+ };
+
+ // Parse a given `date` string into a JavaScript Date object.
+ // This function is time zone aware.
+ //
+ // The following string formats are recognized:
+ //
+ // yyyy-mm-dd
+ // yyyy-mm-dd[ T]hh:mm::ss
+ // yyyy-mm-dd[ T]hh:mm::ss
+ // yyyy-mm-dd[ T]hh:mm::ssZ
+ // yyyy-mm-dd[ T]hh:mm::ss+0000
+ // yyyy-mm-dd[ T]hh:mm::ss+00:00
+ // yyyy-mm-dd[ T]hh:mm::ss.123Z
+ //
+ I18n.parseDate = function(date) {
+ var matches, convertedDate, fraction;
+ // we have a date, so just return it.
+ if (typeof(date) == "object") {
+ return date;
+ };
+
+ matches = date.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/);
+
+ if (matches) {
+ for (var i = 1; i <= 6; i++) {
+ matches[i] = parseInt(matches[i], 10) || 0;
+ }
+
+ // month starts on 0
+ matches[2] -= 1;
+
+ fraction = matches[7] ? 1000 * ("0" + matches[7]) : null;
+
+ if (matches[8]) {
+ convertedDate = new Date(Date.UTC(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction));
+ } else {
+ convertedDate = new Date(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction);
+ }
+ } else if (typeof(date) == "number") {
+ // UNIX timestamp
+ convertedDate = new Date();
+ convertedDate.setTime(date);
+ } else if (date.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)) {
+ // This format `Wed Jul 20 13:03:39 +0000 2011` is parsed by
+ // webkit/firefox, but not by IE, so we must parse it manually.
+ convertedDate = new Date();
+ convertedDate.setTime(Date.parse([
+ RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5
+ ].join(" ")));
+ } else if (date.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/)) {
+ // a valid javascript format with timezone info
+ convertedDate = new Date();
+ convertedDate.setTime(Date.parse(date));
+ } else {
+ // an arbitrary javascript string
+ convertedDate = new Date();
+ convertedDate.setTime(Date.parse(date));
+ }
+
+ return convertedDate;
+ };
+
+ // Formats time according to the directives in the given format string.
+ // The directives begins with a percent (%) character. Any text not listed as a
+ // directive will be passed through to the output string.
+ //
+ // The accepted formats are:
+ //
+ // %a - The abbreviated weekday name (Sun)
+ // %A - The full weekday name (Sunday)
+ // %b - The abbreviated month name (Jan)
+ // %B - The full month name (January)
+ // %c - The preferred local date and time representation
+ // %d - Day of the month (01..31)
+ // %-d - Day of the month (1..31)
+ // %H - Hour of the day, 24-hour clock (00..23)
+ // %-H - Hour of the day, 24-hour clock (0..23)
+ // %I - Hour of the day, 12-hour clock (01..12)
+ // %-I - Hour of the day, 12-hour clock (1..12)
+ // %m - Month of the year (01..12)
+ // %-m - Month of the year (1..12)
+ // %M - Minute of the hour (00..59)
+ // %-M - Minute of the hour (0..59)
+ // %p - Meridian indicator (AM or PM)
+ // %S - Second of the minute (00..60)
+ // %-S - Second of the minute (0..60)
+ // %w - Day of the week (Sunday is 0, 0..6)
+ // %y - Year without a century (00..99)
+ // %-y - Year without a century (0..99)
+ // %Y - Year with century
+ // %z - Timezone offset (+0545)
+ //
+ I18n.strftime = function(date, format) {
+ var options = this.lookup("date")
+ , meridianOptions = I18n.meridian()
+ ;
+
+ if (!options) {
+ options = {};
+ }
+
+ options = this.prepareOptions(options, DATE);
+
+ var weekDay = date.getDay()
+ , day = date.getDate()
+ , year = date.getFullYear()
+ , month = date.getMonth() + 1
+ , hour = date.getHours()
+ , hour12 = hour
+ , meridian = hour > 11 ? 1 : 0
+ , secs = date.getSeconds()
+ , mins = date.getMinutes()
+ , offset = date.getTimezoneOffset()
+ , absOffsetHours = Math.floor(Math.abs(offset / 60))
+ , absOffsetMinutes = Math.abs(offset) - (absOffsetHours * 60)
+ , timezoneoffset = (offset > 0 ? "-" : "+") +
+ (absOffsetHours.toString().length < 2 ? "0" + absOffsetHours : absOffsetHours) +
+ (absOffsetMinutes.toString().length < 2 ? "0" + absOffsetMinutes : absOffsetMinutes)
+ ;
+
+ if (hour12 > 12) {
+ hour12 = hour12 - 12;
+ } else if (hour12 === 0) {
+ hour12 = 12;
+ }
+
+ format = format.replace("%a", options.abbr_day_names[weekDay]);
+ format = format.replace("%A", options.day_names[weekDay]);
+ format = format.replace("%b", options.abbr_month_names[month]);
+ format = format.replace("%B", options.month_names[month]);
+ format = format.replace("%d", padding(day));
+ format = format.replace("%e", day);
+ format = format.replace("%-d", day);
+ format = format.replace("%H", padding(hour));
+ format = format.replace("%-H", hour);
+ format = format.replace("%I", padding(hour12));
+ format = format.replace("%-I", hour12);
+ format = format.replace("%m", padding(month));
+ format = format.replace("%-m", month);
+ format = format.replace("%M", padding(mins));
+ format = format.replace("%-M", mins);
+ format = format.replace("%p", meridianOptions[meridian]);
+ format = format.replace("%S", padding(secs));
+ format = format.replace("%-S", secs);
+ format = format.replace("%w", weekDay);
+ format = format.replace("%y", padding(year));
+ format = format.replace("%-y", padding(year).replace(/^0+/, ""));
+ format = format.replace("%Y", year);
+ format = format.replace("%z", timezoneoffset);
+
+ return format;
+ };
+
+ // Convert the given dateString into a formatted date.
+ I18n.toTime = function(scope, dateString) {
+ var date = this.parseDate(dateString)
+ , format = this.lookup(scope)
+ ;
+
+ if (date.toString().match(/invalid/i)) {
+ return date.toString();
+ }
+
+ if (!format) {
+ return date.toString();
+ }
+
+ return this.strftime(date, format);
+ };
+
+ // Convert a number into a formatted percentage value.
+ I18n.toPercentage = function(number, options) {
+ options = this.prepareOptions(
+ options
+ , this.lookup("number.percentage.format")
+ , this.lookup("number.format")
+ , PERCENTAGE_FORMAT
+ );
+
+ return this.toNumber(number, options);
+ };
+
+ // Convert a number into a readable size representation.
+ I18n.toHumanSize = function(number, options) {
+ var kb = 1024
+ , size = number
+ , iterations = 0
+ , unit
+ , precision
+ ;
+
+ while (size >= kb && iterations < 4) {
+ size = size / kb;
+ iterations += 1;
+ }
+
+ if (iterations === 0) {
+ unit = this.t("number.human.storage_units.units.byte", {count: size});
+ precision = 0;
+ } else {
+ unit = this.t("number.human.storage_units.units." + SIZE_UNITS[iterations]);
+ precision = (size - Math.floor(size) === 0) ? 0 : 1;
+ }
+
+ options = this.prepareOptions(
+ options
+ , {unit: unit, precision: precision, format: "%n%u", delimiter: ""}
+ );
+
+ return this.toNumber(size, options);
+ };
+
+ I18n.getFullScope = function(scope, options) {
+ options = this.prepareOptions(options);
+
+ // Deal with the scope as an array.
+ if (scope.constructor === Array) {
+ scope = scope.join(this.defaultSeparator);
+ }
+
+ // Deal with the scope option provided through the second argument.
+ //
+ // I18n.t('hello', {scope: 'greetings'});
+ //
+ if (options.scope) {
+ scope = [options.scope, scope].join(this.defaultSeparator);
+ }
+
+ return scope;
+ };
+ /**
+ * Merge obj1 with obj2 (shallow merge), without modifying inputs
+ * @param {Object} obj1
+ * @param {Object} obj2
+ * @returns {Object} Merged values of obj1 and obj2
+ *
+ * In order to support ES3, `Object.prototype.hasOwnProperty.call` is used
+ * Idea is from:
+ * https://stackoverflow.com/questions/8157700/object-has-no-hasownproperty-method-i-e-its-undefined-ie8
+ */
+ I18n.extend = function ( obj1, obj2 ) {
+ var extended = {};
+ var prop;
+ for (prop in obj1) {
+ if (Object.prototype.hasOwnProperty.call(obj1, prop)) {
+ extended[prop] = obj1[prop];
+ }
+ }
+ for (prop in obj2) {
+ if (Object.prototype.hasOwnProperty.call(obj2, prop)) {
+ extended[prop] = obj2[prop];
+ }
+ }
+ return extended;
+ };
+
+ // Set aliases, so we can save some typing.
+ I18n.t = I18n.translate;
+ I18n.l = I18n.localize;
+ I18n.p = I18n.pluralize;
+
+ return I18n;
+}));
diff --git a/public/javascripts/translations.js b/public/javascripts/translations.js
index 692ec34..0ed87ac 100644
--- a/public/javascripts/translations.js
+++ b/public/javascripts/translations.js
@@ -1,41 +1,41 @@
-I18n.translations || (I18n.translations = {});
-I18n.translations["en"] = I18n.extend((I18n.translations["en"] || {}), {"about_page":{"body_text_tab_1_html":"\u003Cp\u003EFunding 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.\u003C/p\u003E \u003Cp\u003EThe \u003Ca href='http://www.dcc.ac.uk/' target='_blank'\u003EDCC\u003C/a\u003E 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EHow the tool works\u003C/h3\u003E \u003Cp\u003EThere 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EGetting Started\u003C/h3\u003E \u003Cp\u003EIf you have an account please sign in and start creating or editing your DMP.\u003C/p\u003E \u003Cp\u003EIf you do not have a DMPonline account, click on \u003Ca href='/'\u003E'Sign up'\u003C/a\u003E on the homepage.\u003C/p\u003E \u003Cp\u003EPlease visit the \u003Ca href='/help'\u003E'Help'\u003C/a\u003E page for guidance.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EAdditional Information\u003C/h3\u003E \u003Cp\u003EWe are constantly improving the user interface and functionality of DMPonline. If you would like to contribute with feedback and suggestions, please contact us by emailing \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20inquiry' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E. You can also report bugs and request new features directly on \u003Ca href='https://github.com/DigitalCurationCentre/DMPonline_v4' target='_top'\u003EGitHub\u003C/a\u003E\u003C/p\u003E \u003Cp\u003EIf you need to access plans from the earlier version of the tool please visit \u003Ca href='https://dmponline3.dcc.ac.uk' target='_top'\u003EDMPonline v3\u003C/a\u003E.\u003C/p\u003E","body_text_tab_2_html":"\u003Cp\u003EDMPonline stories from the DCC website\u003C/p\u003E\u003C/br\u003E","tab_1":"Background","tab_2":"Latest news","title":"About DMPonline"},"active_admin":{"access_denied":{"message":"You are not authorized to perform this action."},"any":"Any","batch_actions":{"action_label":"%{title} Selected","button_label":"Batch Actions","default_confirmation":"Are you sure you want to do this?","delete_confirmation":"Are you sure you want to delete these %{plural_model}?","labels":{"destroy":"Delete"},"link":"Create one","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Successfully destroyed 1 %{model}","other":"Successfully destroyed %{count} %{plural_model}"}},"blank_slate":{"content":"There are no %{resource_name} yet.","link":"Create one"},"cancel":"Cancel","comments":{"add":"Add Comment","author":"Author","author_missing":"Anonymous","author_type":"Author Type","body":"Body","created_at":"Created","delete":"Delete Comment","delete_confirmation":"Are you sure you want to delete these comment?","errors":{"empty_text":"Comment wasn't saved, text was empty."},"no_comments_yet":"No comments yet.","resource":"Resource","resource_type":"Resource Type","title":"Comment","title_content":"Comments (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"To add dashboard sections, checkout 'app/admin/dashboard.rb'","welcome":"Welcome to Active Admin. This is the default dashboard page."},"delete":"Delete","delete_confirmation":"Are you sure you want to delete this?","delete_model":"Delete %{model}","details":"%{model} Details","devise":{"change_password":{"submit":"Change my password","title":"Change your password"},"email":{"title":"Email"},"links":{"forgot_your_password":"Forgot your password?","resend_confirmation_instructions":"Resend confirmation instructions","resend_unlock_instructions":"Resend unlock instructions","sign_in":"Sign in","sign_in_with_omniauth_provider":"Sign in with %{provider}","sign_up":"Sign up"},"login":{"remember_me":"Remember me","submit":"Login","title":"Login"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Resend confirmation instructions","title":"Resend confirmation instructions"},"reset_password":{"submit":"Reset My Password","title":"Forgot your password?"},"sign_up":{"submit":"Sign up","title":"Sign up"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Resend unlock instructions","title":"Resend unlock instructions"},"username":{"title":"Username"}},"download":"Download:","dropdown_actions":{"button_label":"Actions"},"edit":"Edit","edit_model":"Edit %{model}","empty":"Empty","filters":{"buttons":{"clear":"Clear Filters","filter":"Filter"},"predicates":{"contains":"Contains","ends_with":"Ends with","equals":"Equals","greater_than":"Greater than","less_than":"Less than","starts_with":"Starts with"}},"has_many_delete":"Delete","has_many_new":"Add New %{model}","has_many_remove":"Remove","index_list":{"block":"List","blog":"Blog","grid":"Grid","table":"Table"},"logout":"Logout","main_content":"Please implement %{model}#main_content to display content.","new_model":"New %{model}","next":"Next","pagination":{"empty":"No %{model} found","entry":{"one":"entry","other":"entries"},"multiple":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E in total","multiple_without_total":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Displaying \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Displaying \u003Cb\u003Eall %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Previous","search_status":{"current_filters":"Current filters:","current_scope":"Scope:","headline":"Search status:","no_current_filters":"None"},"sidebars":{"filters":"Filters","search_status":"Search Status"},"status_tag":{"no":"No","yes":"Yes"},"unsupported_browser":{"headline":"Please note that ActiveAdmin no longer supports Internet Explorer versions 8 or less.","recommendation":"We recommend upgrading to the latest \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, or \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"If you are using IE 9 or later, make sure you \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eturn off \"Compatibility View\"\u003C/a\u003E."},"view":"View"},"activerecord":{"errors":{"messages":{"record_invalid":"Validation failed: %{errors}","restrict_dependent_destroy":{"many":"Cannot delete record because dependent %{record} exist","one":"Cannot delete record because a dependent %{record} exists"}}}},"admin":{"abbrev":"Abbreviation","desc":"Description","details":"Details","firstname":"First name","guidance":"Guidance","guidance_group":"Guidance group","last_logged_in":"Last logged in","multi_options":"Multiple question options","name":"Name","no_guidance_group":"No guidance group","old_temp_field":"old template field","old_theme_field":"old theme field","org":"Organisation","org_created_message":"Organisation was successfully created.","org_parent":"Parent organisation","org_title":"Organisation name","org_type":"Organisation type","org_updated_message":"Organisation was successfully updated.","orgs":"Organisations","phase":"Phase","phase_title":"Phase title","phases":"Phases","plans":"Plans","question":"Question","question_format":"Question Format","questions":"Questions","role":"Role","section":"Section","section_title":"Section title","sections":"Sections","sug_answer":"Suggested answer","sug_answers":"Suggested answers","surname":"Surname","template":"Template","template_title":"Template title","templates":"Templates","theme":"Theme","themes":"Themes","title":"Title","user":"User","user_name":"Username","user_org_role":"User role on an Organisation","user_role":"User role","user_role_type":"User role type","user_status":"User status","user_type":"User type","version":"Version","version_numb":"Version number","version_title":"Version title","versions":"Versions"},"contact_page":{"address_text_html":"\u003Cul\u003E \u003Cli\u003EDigital Curation Centre\u003C/li\u003E \u003Cli\u003ELevel 7, Appleton Tower\u003C/li\u003E \u003Cli\u003ECrichton Street\u003C/li\u003E \u003Cli\u003EEdinburgh\u003C/li\u003E \u003Cli\u003EEH8 9LE\u003C/li\u003E \u003Cli\u003EUK\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003ETel. +44 (0) 131 651 1239\u003C/p\u003E \u003Cp\u003EEmail \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20inquiry' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E\u003C/p\u003E","github_text_html":"\u003Cp\u003EIf you have a feature request or think you have found a bug, please check out the \u003Ca href='https://github.com/DigitalCurationCentre/DMPonline_v4/issues?state=open'\u003Elist of issues on GitHub\u003C/a\u003E. 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.\u003C/p\u003E","intro_text_html":"\u003Cp\u003EDMPonline is provided by the Digital Curation Centre. You can find out more about us on our \u003Ca href='http://www.dcc.ac.uk/' target='_blank'\u003Ewebsite\u003C/a\u003E. If you would like to contact us about DMPonline, please enter your query in the form below or email \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20inquiry' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E.\u003C/p\u003E","title":"Contact 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":{"contact_us":"Contact Us","email":"Email","message":"Message","name":"Name","subject":"Subject","submit":"Submit"},"new_formtastic":{"contact_us":"Contact Us","email":"Email","message":"Message","name":"Name","subject":"Subject","submit":"Submit"},"new_simple_form":{"contact_us":"Contact Us","email":"Email","message":"Message","name":"Name","subject":"Subject","submit":"Submit"}},"notices":{"error":"You must enter both fields.","success":"Contact email was successfully sent."}},"date":{"abbr_day_names":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"abbr_month_names":[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"day_names":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"formats":{"default":"%d-%m-%Y","long":"%d %B, %Y","short":"%d/%m/%Y"},"month_names":[null,"January","February","March","April","May","June","July","August","September","October","November","December"],"order":["day","month","year"]},"datetime":{"distance_in_words":{"about_x_hours":{"one":"about 1 hour","other":"about %{count} hours"},"about_x_months":{"one":"about 1 month","other":"about %{count} months"},"about_x_years":{"one":"about 1 year","other":"about %{count} years"},"almost_x_years":{"one":"almost 1 year","other":"almost %{count} years"},"half_a_minute":"half a minute","less_than_x_minutes":{"one":"less than a minute","other":"less than %{count} minutes"},"less_than_x_seconds":{"one":"less than 1 second","other":"less than %{count} seconds"},"over_x_years":{"one":"over 1 year","other":"over %{count} years"},"x_days":{"one":"1 day","other":"%{count} days"},"x_minutes":{"one":"1 minute","other":"%{count} minutes"},"x_months":{"one":"1 month","other":"%{count} months"},"x_seconds":{"one":"1 second","other":"%{count} seconds"}},"prompts":{"day":"Day","hour":"Hour","minute":"Minute","month":"Month","second":"Seconds","year":"Year"}},"dcc_name":"Digital Curation Centre","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.","invited":"You have a pending invitation, accept it to finish creating your account.","last_attempt":"You have one more attempt before your account is locked.","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."},"invitations":{"edit":{"header":"Set your password","submit_button":"Set my password"},"invitation_removed":"Your invitation was removed.","invitation_token_invalid":"The invitation token provided is not valid!","new":{"header":"Send invitation","submit_button":"Send an invitation"},"no_invitations_remaining":"No invitations remaining","send_instructions":"An invitation email has been sent to %{email}.","updated":"Your password was set successfully. You are now signed in.","updated_not_active":"Your password was set successfully."},"mailer":{"confirmation_instructions":{"subject":"Confirm your DMPonline account"},"invitation_instructions":{"accept":"Accept invitation","accept_until":"This invitation will be due in %{due_date}.","hello":"Hello %{email}","ignore":"If you don't want to accept the invitation, please ignore this email.\u003Cbr /\u003E\nYour account won't be created until you access the link above and set your password.","someone_invited_you":"Someone has invited you to %{url}, you can accept it through the link below.","subject":"Invitation instructions"},"password_change":{"subject":"Password Changed"},"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":{"already_signed_out":"Signed out successfully.","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."}},"dmponline3_text":"DMPonline previous version","errors":{"connection_refused":"Oops! Failed to connect to the Web Console middleware.\nPlease make sure a rails development server is running.\n","format":"%{attribute} %{message}","messages":{"accepted":"must be accepted","already_confirmed":"was already confirmed, please try signing in","blank":"can't be blank","confirmation":"doesn't match %{attribute}","confirmation_period_expired":"needs to be confirmed within %{period}, please request a new one","empty":"can't be empty","equal_to":"must be equal to %{count}","even":"must be even","exclusion":"is reserved","expired":"has expired, please request a new one","greater_than":"must be greater than %{count}","greater_than_or_equal_to":"must be greater than or equal to %{count}","inclusion":"is not included in the list","invalid":"is invalid","less_than":"must be less than %{count}","less_than_or_equal_to":"must be less than or equal to %{count}","not_a_number":"is not a number","not_an_integer":"must be an integer","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:"},"odd":"must be odd","other_than":"must be other than %{count}","present":"must be blank","taken":"has already been taken","too_long":"is too long (maximum is %{count} characters)","too_short":"is too short (minimum is %{count} characters)","url":"is not a valid URL","wrong_length":"is the wrong length (should be %{count} characters)"},"unacceptable_request":"A supported version is expected in the Accept header.\n","unavailable_session":"Session %{id} is is no longer available in memory.\n\nIf you happen to run on a multi-process server (like Unicorn or Puma) the process\nthis request hit doesn't store %{id} in memory. Consider turning the number of\nprocesses/workers to one (1) or using a different server in development.\n"},"flash":{"actions":{"create":{"notice":"%{resource_name} was successfully created."},"destroy":{"alert":"%{resource_name} could not be destroyed.","notice":"%{resource_name} was successfully destroyed."},"update":{"notice":"%{resource_name} was successfully updated."}}},"help_page":{"body_text_tab_1_html":"\u003Cp\u003EWhen 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.\u003C/p\u003E \u003Ch3\u003ECreate a plan\u003C/h3\u003E \u003Cp\u003ETo 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'\u003C/p\u003E \u003Ch3\u003EWrite your plan\u003C/h3\u003E \u003Cp\u003EThe tabbed interface allows you to navigate through different functions when editing your plan.\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.\u003C/li\u003E \u003Cli\u003E- The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.\u003C/li\u003E \u003Cli\u003E- The 'Share' tab allows you to invite others to read or contribute to your plan.\u003C/li\u003E \u003Cli\u003E- The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003EWhen 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.\u003C/p\u003E \u003Cp\u003EGuidance is displayed in the right-hand panel. Click the '+' symbol to view this.\u003C/p\u003E \u003Cp\u003ERemember to 'save' your responses before moving on.\u003C/p\u003E \u003Ch3\u003EShare plans\u003C/h3\u003E \u003Cp\u003EInsert 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'\u003C/p\u003E \u003Ch3\u003EExport plans\u003C/h3\u003E \u003Cp\u003EFrom 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.\u003C/p\u003E \u003Ch3\u003ELegacy data\u003C/h3\u003E \u003Cp\u003EIf you need to access plans from the earlier version of the tool please visit \u003Ca href='https://dmponline3.dcc.ac.uk' target='_top'\u003EDMPonline v3\u003C/a\u003E.\u003C/p\u003E","body_text_tab_2_html":"\u003Ch3\u003EUseful resources on Data Management Planning\u003C/h3\u003E \u003Cul class='help_ul'\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/resources/data-management-plans/funders-requirements'\u003EUK funder requirements for Data Management Plans\u003C/a\u003E [webpage]\u003Cbr /\u003E A summary of requirements from UK Research Councils and other charitable or health funders. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='https://dmp.cdlib.org/pages/funder_requirement'\u003EUS funder requirements for Data Management Plans\u003C/a\u003E [webpage]\u003Cbr /\u003E A summary of requirements from the NSF, NIH and other key funders in the USA. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/resource/DMP_Checklist_2013.pdf'\u003EDCC Checklist for a Data Management Plan\u003C/a\u003E [PDF, 3 pages]\u003Cbr /\u003E A list of 13 questions and associated guidance, that represent the main issues to come up in Data Management and Sharing Plans. The Checklist is used as a generic template in DMPonline, and is presented when no funder or organsiational requirements are applicable for the user. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/publications/reports/guides/How%20to%20Develop.pdf'\u003EHow to develop a Data Management and Sharing Plan\u003C/a\u003E [PDF, 8 pages]\u003Cbr /\u003EA guide by the Digital Curation Centre that outlines typical funder requirements for DMPs and the types of considerations to make when responding. \u003C/li\u003E \u003C/ul\u003E \u003Ch3\u003EExample Data Management Plans\u003C/h3\u003E \u003Cul class='help_ul'\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://data.bris.ac.uk/research/planning/files/2013/08/data.bris-AHRC-example-Technical-Plan-v2.pdf'\u003ETechnical plan submitted to the AHRC\u003C/a\u003E [PDF, 7 pages]\u003Cbr /\u003E A DMP submitted by a researcher from the University of Bristol, also including comments from the reviewers \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/adocs/Leeds-RoaDMaP-DMPs.pdf'\u003ETwo social science DMPs\u003C/a\u003E [PDF, 7 pages]\u003Cbr /\u003E Example plans from researchers at the University of Leeds, shared as part of the Leeds RoaDMaP training materials \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.northumbria.ac.uk/static/5007/ceispdf/dmpfull.pdf'\u003EHealth sciences DMP\u003C/a\u003E [PDF, 11 pages]\u003Cbr /\u003E Example DMP produced by the DATUM for Health RDM training project \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/adocs/DMTpsych-example-DMP.pdf'\u003EPsychology DMP\u003C/a\u003E [PDF, 11 pages]\u003Cbr /\u003E A very detailed, fictional psychology DMP produced by the DMTpsych RDM training project, based on a seminal psychology experiment \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://rci.ucsd.edu/data-curation/examples.html'\u003EUCSD Example Data Management Plans\u003C/a\u003E [webpage]\u003Cbr /\u003E Over 20 example plans submitted to the National Science Foundation (NSF) in the United States by academics at UC San Diego \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://inside.mines.edu/RDS-example-plans'\u003EColorado School of Mines examples\u003C/a\u003E [webpage]\u003Cbr /\u003E A variety of US example DMPs from Mines and elsewhere \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='https://www.dataone.org/data-management-planning'\u003ENSF data management plans\u003C/a\u003E [webpage]\u003Cbr /\u003E 5 DMPs submitted to the NSF, shared by the DataOne initiative \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://library.umassmed.edu/necdmc/dmp'\u003EBiology and chemistry DMPs\u003C/a\u003E [webpage]\u003Cbr /\u003E Three example DMPs from the USA shared by NECDMC, an instructional tool for teaching RDM to undergraduates, graduate students, and researchers in the health sciences, sciences and engineering. \u003C/li\u003E \u003C/ul\u003E \u003Ch3\u003EUseful guides on Research Data Management in general\u003C/h3\u003E \u003Cul class='help_ul'\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.data-archive.ac.uk/media/2894/managingsharing.pdf'\u003EManaging and Sharing Data: best practice for researchers\u003C/a\u003E [PDF, 36 pages]\u003Cbr /\u003E A guide by the UK Data Service covering a range of topics including data formats, documentaion, ethics, copyright and data sharing. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/publications/reports/guides/How_to_Cite_Link.pdf'\u003EHow to Cite Datasets and Link to Publications\u003C/a\u003E [PDF, 12 pages]\u003Cbr /\u003E 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. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/publications/reports/guides/How_To_License_Research_Data.pdf'\u003EHow to License Research Data\u003C/a\u003E [PDF, 16 pages]\u003Cbr /\u003E 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. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/How%20to%20Appraise%20and%20Select%20Research%20Data.pdf'\u003EHow to Appraise and Select Research Data for Curation\u003C/a\u003E [PDF, 8 pages]\u003Cbr /\u003E 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. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://datalib.edina.ac.uk/mantra'\u003EResearch Data MANTRA\u003C/a\u003E [online resource]\u003Cbr /\u003E 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. \u003C/li\u003E \u003C/ul\u003E","tab_1":"On DMPonline","tab_2":"On data management planning","title":"Help"},"helpers":{"about_us_label":"About","accept_terms_html":" I accept the \u003Ca href='/terms'\u003Eterms and conditions\u003C/a\u003E *","actions":"Actions","add_comment_accordion_label":"Share note","admin_area":"Super admin area","answer_questions":"Answer questions","answered_by":"Answered ","answered_by_part2":" by ","answers_label":"Answers","change_password":"Change your password","checkbox":"Check box","comment":"Comment","comment_accordion_label":"Notes","comments":{"add_comment_label":"Add note","add_comment_text":"Share note with collaborators","archive_comment_button_label":"Remove","archive_comment_question":"Are you sure you would like to remove this note?","archive_own_comment_button_label":"Remove","archive_own_comment_question":"Are you sure you would like to remove this note?","clear_by":"Note removed by","clear_label":"Remove","comment_label":"Note","commented_by":"Noted by:","comments_label":"Notes","edit_label":"Edit","retract_label":"Remove","retracted":"Note removed by you","view_label":"View"},"contact_label":"Contact","create_plan_label":"Create plan","current_password":"Current password","desc":"Description","dropdown":"Dropdown","edit_password_info":"If you would like to change your password please complete the following fields.","edit_profile":"Edit profile","email":"Email","error":"Error!","export":"Export","false_lowercase":"false","first_name":"First name","first_name_help_text":"Please enter your first name.","forgot_password":"Forgot your password?","guidance":"Guidance","guidance_accordion_label":"Guidance","help_label":"Help","home":"Home","institution_sign_in":" (UK users only)","institution_sign_in_link":"Or, sign in with your institutional credentials","jisc":"The DCC is funded by","last_edit":"Last edited","last_name":"Last name","links":{"back":"Back","cancel":"Cancel","confirm":"Are you sure?","destroy":"Delete","edit":"Edit","new":"New"},"loading":"Loading...","me":"Me","multi_select_box":"Multi select box","name":"Name","new_password":"New password","no_label":"No","no_pass_instructions":"Didn't receive confirmation instructions?","no_unlock_instructions":"Didn't receive unlock instructions?","none":"None","noquestionanswered":"No questions have been answered","notanswered":"Not answered yet","note":"Note","orcid_html":"ORCID number is a persistent digital identifier that distinguishes each researcher, \u003Ca href='http://orcid.org/content/initiative' target='_blank' rel='external' class='a_orange'\u003Emore info\u003C/a\u003E.","orcid_id":"ORCID number","org_not_listed":"My organisation isn't listed.","org_type":{"child":"Unit","funder":"Funder","institution":"Institution","org_name":"Organisation name","organisation":"Organisation","other_guidance":"Other guidance","other_org_help_text":"Please enter the name of your organisation.","project":"Project","publisher":"Publisher","school":"School","template":"Template","templates":"Templates"},"owner":"Owner","page_entries_info":{"more_pages":{"display_entries":"Displaying %{entry_name} \u003Cb\u003E%{first}\u0026nbsp;-\u0026nbsp;%{last}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E in total"},"one_page":{"display_entries":{"one":"Displaying \u003Cb\u003E1\u003C/b\u003E %{entry_name}","other":"Displaying \u003Cb\u003Eall %{count}\u003C/b\u003E %{entry_name}","zero":"No %{entry_name} found"}}},"password":"Password","password_conf":"Password confirmation","password_no_match":"This must match what you entered in the previous field.","password_too_small":"Your password must contain at least 8 characters.","plan":{"export":{"funder":"Funder","grant_title":"Grant Title","institution":"Institution","pdf":{"generated_by":"This document was generated by DMPonline (http://dmponline.dcc.ac.uk)","question_not_answered":"Question not answered."},"principal_investigator":"Principal Investigator / Researcher","project_data_contact":"Project Data Contact","project_description":"Description","project_identifier":"Project Identifier","project_name":"Project Name","space_used":"approx. %{space_used}% of available space used (max %{num_pages} pages)"}},"policy_expectations":"Policy Expectations","preview":"Preview","project":{"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'","columns":{"data_contact":"Plan data contact","description":"Description","grant_number":"Grant number","identifier":"Identifier","last_edited":"Last edited","name":"Name","owner":"Owner","principal_investigator":"Principal Investigator / Researcher","shared":"Shared?","template_owner":"Template Owner"},"configure":"Configure","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_button_text":"Yes, create plan","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: \u003Ca href='http://www.dcc.ac.uk/sites/default/files/documents/resource/DMP_Checklist_2013.pdf' target='_blank'\u003EDMP checklist 2013\u003C/a\u003E.","create":"Create plan","create_page":{"default_template":"Default DMP","desc_html":"\u003Cp\u003EPlease select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.\u003C/p\u003E \u003Cp\u003EIf you aren't responding to specific requirements from a funder or an institution, \u003Ca id='create-default-plan-button' data-toggle='modal' href='#default-template-confirmation-dialog'\u003Eselect here to write a generic DMP\u003C/a\u003E based on the most common themes.\u003C/p\u003E","funders_question":"If applying for funding, select your research funder.","funders_question_description":"Otherwise leave blank.","institution_question":"To see institutional questions and/or guidance, select your organisation.","institution_question_description":"You may leave blank or select a different organisation to your own.","other_funder_name_label":"Name of funder, if applicable.","other_guidance_question":"Tick to select any other sources of guidance you wish to see.","title":"Create a new plan"},"default_confirmation_button_text":"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: \u003Ca href='http://www.dcc.ac.uk/sites/default/files/documents/resource/DMP_Checklist_2013.pdf' target='_blank'\u003EDMP checklist 2013\u003C/a\u003E.","edit":"Edit plan details","export_text_html":"\u003Cp\u003EFrom 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.\u003C/br\u003E Select what format you wish to use and click to 'Export'.\u003C/p\u003E","filter":{"cancel":"Cancel","no_matches":"No plans match '%{filter}'","placeholder":"Filter plans","submit":"Filter"},"funder_help_text":"Research funder if relevant","funder_name":"Funder name","grant_help_text":"Grant reference number if applicable [POST-AWARD DMPs ONLY]","grant_title":"Grant number","multi_templates":"There are a number of possible templates you could use. Please choose one.","my_project_name":"My plan","not_applicable":"Not applicable/not listed.","not_saved_answers_confirmation_alert":"Would you like to save them now?","not_saved_answers_header":"Unsaved answers","not_saved_answers_text_alert":"You have altered answers but have not saved them:","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/.","project_data_contact":"Plan data contact","project_data_contact_help_text":"Name (if different to above), telephone and email contact details","project_desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003E\u003Ch4\u003EQuestions to consider:\u003C/h4\u003E\u003Cul\u003E\u003Cli\u003E- What is the nature of your research project?\u003C/li\u003E\u003Cli\u003E- What research questions are you addressing? \u003C/li\u003E\u003Cli\u003E- For what purpose are the data being collected or created? \u003C/li\u003E\u003C/ul\u003E\u003Ch4\u003EGuidance:\u003C/h4\u003E\u003Cp\u003EBriefly summarise the type of study (or studies) to help others understand the purposes for which the data are being collected or created.\u003C/p\u003E\u003C/div\u003E","project_details_editing_text_html":"Please fill in the basic project details below and click 'Update' to save","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_identifier":"ID","project_identifier_help_text":"A pertinent ID as determined by the founder and/or institution.","project_name":"Plan name","project_name_help_text":"If applying for funding, state the name exactly as in the grant proposal.","project_question_desc_label":"Summary about the questions","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_static_info":"This plan is based on:","project_text_when_no_project":"\u003Cp\u003E\u003Cstrong\u003EWelcome.\u003C/strong\u003E\u003C/br\u003E You are now ready to create your first DMP.\u003C/br\u003EClick the 'Create plan' button below to begin.\u003C/p\u003E","project_text_when_project":"\u003Cp\u003EThe table below lists the plans that you have created, and any that have been shared with you by others.\u003C/br\u003EThese can be edited, shared, exported or deleted at anytime.\u003C/p\u003E","projects_title":"My plans","questions_answered":"questions answered","share":{"add":"Add","add_collaborator":"Add collaborator","co_owner":"Co-owner","collaborators":"Collaborators","confirmation_question":"Are you sure?","edit":"Edit","locked_section_text":"This section is locked for editing by ","owner":"Owner","permissions":"Permissions","permissions_desc":"Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.","read_only":"Read only","remove":"Remove user access","share_text_html":"\u003Cp\u003EYou can give other people access to your plan here. There are three permission levels.\u003Cul\u003E\u003Cli\u003EUsers with \"read only\" access can only read the plan.\u003C/li\u003E\u003Cli\u003EEditors can contribute to the plan.\u003C/li\u003E\u003Cli\u003ECo-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.\u003C/li\u003E\u003C/ul\u003E\u003C/p\u003E\u003Cp\u003EAdd each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".\u003C/p\u003E\u003Cp\u003EThose 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.\u003C/p\u003E","shared_label":"Shared?","tab_share":"Share"},"success":"Plan was successfully created.","tab_export":"Export","tab_plan":"Plan details"},"questions_label":"Questions","radio_buttons":"Radio buttons","remember_me":"Remember me","removing":"Removing...","return_home":"Return to the home page","roadmap_label":"Roadmap","save":"Save","saving":"Saving...","section_label":"Section","sections_label":"Sections","select":{"prompt":"Please select"},"select_action":"Select an action","send":"Send","send_password_info":"Reset password instructions","settings":{"plans":{"custom_formatting":"(Using custom PDF formatting values)","default_formatting":"(Using default PDF formatting values)","errors":{"invalid_font_face":"Invalid font face","invalid_font_size":"Invalid font size","invalid_margin":"Margin value is invalid","invalid_max_pages":"Invalid maximum pages","missing_key":"A required setting has not been provided","negative_margin":"Margin cannot be negative","unknown_key":"Unknown formatting setting","unknown_margin":"Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'"},"font_face":"Face","font_size":"Size","included_elements":"Included Elements","margin":"Margin","margins":{"bottom":"Bottom","left":"Left","right":"Right","top":"Top"},"max_pages":"Maximum number of pages","pdf_formatting":"PDF Formatting","reset":"Reset","template_formatting":"(Using template PDF formatting values)","title":"Plan title"},"projects":{"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":{"duplicate":"Duplicate column name. Please only include each column once.","no_name":"'name' must be included in column list.","unknown":"Unknown column name."},"title":"Settings - My plans"},"title":"Settings"},"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_unlink_alert":"Unlink institutional credentials alert","shibboleth_unlink_dialog_text":"\u003Cp\u003EYou are about to unlink DMPonline of your institutional credentials, would you like to continue?\u003C/p\u003E","shibboleth_unlink_label":"Unlink your institutional credentials","sign_in":"Sign in","sign_out":"Sign out","sign_up":"Sign up","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. \u003C/br\u003E --\u003E If you \u003Cstrong\u003Edo not have\u003C/strong\u003E an account with DMPonline, please complete the form below.\u003C/br\u003E --\u003E If you \u003Cstrong\u003Ehave\u003C/strong\u003E an account with DMPonline, please \u003Ca href='#header-login-form' data-toggle='modal' class='a_orange'\u003ESign in\u003C/a\u003E so we can link your account to your institutional credentials.\u003C/br\u003E Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly.","sign_up_text":"New to DMPonline? Sign up today.","signed_in":"Signed in as ","submit":{"back":"Back","cancel":"Cancel","create":"Create","delete":"Delete","discard":"Discard","edit":"Edit","save":"Save","submit":"Save %{model}","update":"Update"},"suggested_answer":"Suggested answer","suggested_example":"Example answer","surname_help_text":"Please enter your surname or family name.","text_area":"Text area","text_field":"Text field","title":"Title","titles":{"delete":"Delete","edit":"Edit","new":"New","save":"Save"},"unlink_account":"Unlink account","unsaved":"Unsaved changes","user_details_paragraph_html":"You can edit any of the details below.","user_details_text_html":"\u003Cp\u003EPlease note that your email address is used as your username. If you change this, remember to use your new email address on sign in.\u003C/p\u003E","user_name":"Email address","valid_email":"You must enter a valid email address.","view":"View","view_plans_label":"View plans","yes_label":"Yes"},"number":{"currency":{"format":{"delimiter":",","format":"%u%n","precision":2,"separator":".","significant":false,"strip_insignificant_zeros":false,"unit":"$"}},"format":{"delimiter":",","precision":3,"separator":".","significant":false,"strip_insignificant_zeros":false},"human":{"decimal_units":{"format":"%n %u","units":{"billion":"Billion","million":"Million","quadrillion":"Quadrillion","thousand":"Thousand","trillion":"Trillion","unit":""}},"format":{"delimiter":"","precision":3,"significant":true,"strip_insignificant_zeros":true},"storage_units":{"format":"%n %u","units":{"byte":{"one":"Byte","other":"Bytes"},"gb":"GB","kb":"KB","mb":"MB","tb":"TB"}}},"percentage":{"format":{"delimiter":"","format":"%n%"}},"precision":{"format":{"delimiter":""}}},"org_admin":{"abbre_help_text":"Please enter an abbreviation to your organisation's name.","add_option_label":"Add option","add_question_label":"Add question","add_section_label":"Add section","admin_area":"Admin area","desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter information describing your organisation.\u003C/div\u003E","guidance":{"actions":"Actions","add_guidance":"Add guidance","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_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.","by_question_label":"by question","by_theme_or_by_question":"Should this guidance apply:","by_themes_help_text_html":"Select which theme(s) this guidance relates to.","by_themes_label":"by themes","created":"Created","created_message":"Guidance was successfully created.","delete_message_html":"You are about to delete '%{guidance_summary}'. Are you sure?","guidance_group_label":"Guidance group","guidance_group_select_help_text_html":"Select which group this guidance relates to.","guidance_list":"Guidance list","guidance_text_html":"\u003Cp\u003EYou 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.\u003C/p\u003E \u003Cp\u003EYou 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.\u003C/p\u003E","help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter guidance text for this theme.\u003C/div\u003E","last_updated":"Last updated","new_label":"New guidance","published":"Published","question_label":"Question","template":"Template","templates":"Templates","text_help_text_html":"Enter your guidance here. You can include links where needed.","text_label":"Text","themes_label":"Themes","updated_message":"Guidance was successfully updated.","view_all_guidance":"View all guidance"},"guidance_group":{"add_guidance_group":"Add guidance group","all_temp":"All templates","created_message":"Guidance group was successfully created.","delete_message":"You are about to delete '%{guidance_group_name}'. This will affect guidance. Are you sure?","destroyed_message":"Guidance group was successfully deleted.","guidance_group_list":"Guidance group list","guidance_group_text_html":"\u003Cp\u003EFirst 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.\u003C/p\u003E","help_text_add":"Please enter the group title","name_label":"Name","subset":"Optional subset","subset_eg":"e.g. School/ Department","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'","updated_message":"Guidance group was successfully updated."},"guidance_label":"Guidance","how_many_plans":"How many plans?","last_logged_in":"Last logged in","last_updated":"Last updated","name_help_text":"Please enter your organisation's name.","option_default_label":"Default","option_order_label":"Order","option_text_label":"Text","org_abbr":"Abbreviation","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.","org_banner_text":"Top banner text","org_desc":"Description","org_details_label":"Organisation details","org_name":"Name","org_target_url":"Website","org_text":"These are the basic details for your organisation.","org_type":"Organisation type","parent_org":"Main organisation","questions":{"answer_format_label":"Answer format","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.","default_answer_label":"Default answer","default_value_label":"Default value","delete_message":"You are about to delete '%{question_text}'. Are you sure?","delete_suggested_answer_message":"You are about to delete a suggested answer/ example for '%{question_text}'. Are you sure?","edit_suggested_answer_button":"Edit suggested answer/ example","example_answer_label":"Example of answer","guidance_label":"Guidance","number_help_text":"This allows you to order questions within a section.","option_comment_display":"Additional comment area will be displayed.","option_comment_display_checkbox":"Display additional comment area.","option_comment_hide":"No additional comment area will be displayed.","question_delete_button":"Delete question","question_edit_button":"Edit question","question_format_help_text_html":"You can choose from:\u003Cul\u003E\u003Cli\u003E- text area (large box for paragraphs);\u003C/li\u003E \u003Cli\u003E- text field (for a short answer);\u003C/li\u003E \u003Cli\u003E- checkboxes where options are presented in a list and multiple values can be selected;\u003C/li\u003E \u003Cli\u003E- radio buttons where options are presented in a list but only one can be selected;\u003C/li\u003E \u003Cli\u003E- dropdown like this box - only one option can be selected;\u003C/li\u003E \u003Cli\u003E- multiple select box allows users to select several options from a scrollable list, using the CTRL key;\u003C/li\u003E\u003C/ul\u003E","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.","question_number_label":"Question number","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.","question_text_label":"Question text","question_themes_help_text_html":"\u003Cp\u003ESelect themes that are relevant to this question.\u003C/p\u003E \u003Cp\u003EThis 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. \u003C/p\u003E \u003Cp\u003EYou can select multiple themes by using the CTRL button.\u003C/p\u003E","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_answer_label":"Suggested answer","suggested_or_example_answer_button":"Add suggested answer/ example","suggested_or_example_answer_label":"Suggested answer/ Example","themes_label":"Themes"},"remove_option_label":"Remove","target_url_help_text":"Please enter a web address valid.","template_desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003EEnter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.\u003C/div\u003E","template_label":"Templates","templates":{"actions":"Actions","add_phase_label":"Add new phase +","add_question":"Add question","add_section":"Add section","back_to_edit_phase_label":"Back to edit view","cannot_publish":"Please ensure you have created at least one phase with a published version.","create_new_template_text_html":"\u003Cp\u003ETo 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. \u003C/p\u003E","create_own_template_text_html":"\u003Cp\u003EIf 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.\u003C/p\u003E \u003Cp\u003EYour template will be presented to users within your institution when no founder templates apply. If you want to add questions to funder templates use the 'customise template' options below.\u003C/p\u003E","create_template":"Create a template","created":"Created at","created_message":"Information was successfully created.","customise":"Customise","desc_help_text_html":"Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences","desc_label":"Description","destroyed_message":"Information was successfully deleted.","edit_customisation":"Edit customisation","edit_details":"Edit template details","edit_phase_details_label":"Edit phase details","edit_phase_label":"Edit phase","funders_temp":"Funders templates","help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter template description for this theme.\u003C/div\u003E","last_updated":"Last updated","new_label":"New template","new_section":"New section title","own_temp":"Own templates","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_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_details_label":"Phase details","phase_details_text_html":"\u003Cp\u003EHere 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.\u003Cp/\u003E","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.","phase_number_help_text":"This allows you to order the phases of your template.","phase_order_label":"Order of display","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","published_label":"Published","section_delete_message":"You are about to delete '%{section_title}'. This will affect questions linked to this section. Are you sure?","section_desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003EEnter 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.\u003C/div\u003E","section_number_help_text":"This allows you to order sections.","section_title_help_text":"Please enter section title","section_title_placeholder":"New section title","template_details":"Template details","title_help_text":"Please enter a title for your template.","title_label":"Title","updated_message":"Information was successfully updated.","version_details_label":"Version details","versions_label":"Versions","view_all_templates":"View all templates","view_phase_label":"View phase"},"templates_label":"Templates","top_banner_help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter information you would like your users to see while sign in. Do not enter more than 165 characteres.\u003C/div\u003E","user_full_name":"Name","user_list_label":"Users","user_name":"Email address","user_text_html":"Below is a list of users registered for your organisation. You can sort the data by each field.","users_list":"List of users","versions":{"clone_versions_label":"Make big changes","delete_message":"You are about to delete '%{version_title}'. This will affect sections and questions linked to this version. Are you sure?","desc_help_text_html":"Enter a basic description as an internal reference to describe the difference between versions","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","edit_label":"Edit","edit_versions_label":"Make small changes","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."}},"ransack":{"all":"all","and":"and","any":"any","asc":"ascending","attribute":"attribute","combinator":"combinator","condition":"condition","desc":"descending","or":"or","predicate":"predicate","predicates":{"blank":"is blank","cont":"contains","cont_all":"contains all","cont_any":"contains any","does_not_match":"doesn't match","does_not_match_all":"doesn't match all","does_not_match_any":"doesn't match any","end":"ends with","end_all":"ends with all","end_any":"ends with any","eq":"equals","eq_all":"equals all","eq_any":"equals any","false":"is false","gt":"greater than","gt_all":"greater than all","gt_any":"greater than any","gteq":"greater than or equal to","gteq_all":"greater than or equal to all","gteq_any":"greater than or equal to any","in":"in","in_all":"in all","in_any":"in any","lt":"less than","lt_all":"less than all","lt_any":"less than any","lteq":"less than or equal to","lteq_all":"less than or equal to all","lteq_any":"less than or equal to any","matches":"matches","matches_all":"matches all","matches_any":"matches any","not_cont":"doesn't contain","not_cont_all":"doesn't contain all","not_cont_any":"doesn't contain any","not_end":"doesn't end with","not_end_all":"doesn't end with all","not_end_any":"doesn't end with any","not_eq":"not equal to","not_eq_all":"not equal to all","not_eq_any":"not equal to any","not_in":"not in","not_in_all":"not in all","not_in_any":"not in any","not_null":"is not null","not_start":"doesn't start with","not_start_all":"doesn't start with all","not_start_any":"doesn't start with any","null":"is null","present":"is present","start":"starts with","start_all":"starts with all","start_any":"starts with any","true":"is true"},"search":"search","sort":"sort","value":"value"},"roadmap_page":{"body_text_tab_1_html":"\u003Cp\u003EDMPonline has an active and growing user base, and we are grateful to the members who suggest ideas for new and improved features. We regularly take stock of how we can expand our service to meet these evolving needs.\u003C/p\u003E \u003Cp\u003EA number of enhancements and new features are planned. These include:\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- APIs to create plans, extract guidance and generate statistics from DMPonline\u003C/li\u003E \u003Cli\u003E- Multi-lingual support so foreign language versions can be presented\u003C/li\u003E \u003Cli\u003E- Locale-aware support to provide tailored instances for particular countries or other contexts\u003C/li\u003E \u003Cli\u003E- A lifecycle to indicate the status of DMPs and allow institutional access to plans\u003C/li\u003E \u003Cli\u003E- Support for reviewing Data Management Plans\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003EWe are currently revising the timeframes for our roadmap due to staff changes and pending recruitment. We expect to have a new version online by early 2016.\u003C/p\u003E \u003Cp\u003ETo make sure we’re on the right track, we work to develop our roadmap in conjunction with our DMPonline user group. If you would like to help shape our future plans, please join the group. More information on how you can engage with us is available under the 'Get involved' tab.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003ECurrent release\u003C/h3\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-ReleaseNote-August2015.pdf' target='_blank'\u003ERelease Note\u003C/a\u003E\u003C/li\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-v4-InstitutionalBranding.pdf' target='_blank'\u003ECustomise DMPonline tool with institutional branding\u003C/a\u003E\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003EThe code is available on \u003Ca target='_blank' href='https://github.com/DigitalCurationCentre/DMPonline_v4'\u003EGitHub\u003C/a\u003E\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EPrevious release\u003C/h3\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-DeliveryNote-May2015.pdf' target='_blank'\u003ERelease Note\u003C/a\u003E\u003C/li\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-v4-InstitutionalLogin.pdf' target='_blank'\u003ESigning into DMPonline version 4 with UK Institutional Credentials\u003C/a\u003E\u003C/li\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-v4-LocaleSupport.pdf' target='_blank'\u003EDeveloping Locale-Aware Support for DMPonline version 4\u003C/a\u003E\u003C/li\u003E \u003C/ul\u003E \u003C/br\u003E","body_text_tab_2_html":"\u003Cp\u003EDMPonline 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:\u003C/p\u003E \u003Ch3\u003EJoin the user group\u003C/h3\u003E \u003Cp\u003EWe want to engage with our users more actively so invite you to join the user group. We run a \u003Ca target='_blank' href='https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=DMPONLINE-USER-GROUP'\u003Elistserv\u003C/a\u003E for the group that you can request to join. We also host periodic meetings to consult on our plans\u003C/p\u003E \u003Cp\u003EOur 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 also helpful for us to know what type of user you are –researcher, institutional administrator, librarian, developer, funder etc.\u003C/p\u003E \u003Cp\u003EPlease 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003ECustomise DMPonline\u003C/h3\u003E \u003Cp\u003EDMPonline 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 \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20Admin%20access' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E.\u003C/p\u003E \u003Cp\u003EFuther guidance on customising DMPonline is available on the \u003Ca href='http://www.dcc.ac.uk/dmponline' target='_blank'\u003EDCC website\u003C/a\u003E.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EContribute to the code\u003C/h3\u003E \u003Cp\u003EDMPonline 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.\u003C/p\u003E \u003Cp\u003EIf 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.\u003C/p\u003E \u003Cp\u003EWe 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003ESupport our work\u003C/h3\u003E \u003Cp\u003EWe 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.\u003C/p\u003E \u003Cp\u003EWe 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.\u003C/p\u003E ","tab_1":"Future plans","tab_2":"Get involved","title":"Roadmap"},"screencast_error_text":"Your browser does not support the video tag.","screencast_text":"Screencast on how to use DMPonline","support":{"array":{"last_word_connector":", and ","two_words_connector":" and ","words_connector":", "}},"terms_page":{"body_text_html":"\u003Cdiv class='white_background'\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EDMPonline\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EDMPonline ('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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EYour personal details\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EIn 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EPrivacy policy\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EFreedom of Information\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EPasswords\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EYour password is stored in encrypted form and cannot be retrieved. If forgotten it has to be reset.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003ECookies\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EPlease note that DMPonline uses Cookies. Further information about Cookies and how we use them is available on the \u003Ca target='_blank' href='http://www.dcc.ac.uk/about-us/about-site/website-terms-use/cookies'\u003Emain DCC website\u003C/a\u003E.\u003C/p\u003E \u003C/div\u003E \u003Cbr /\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EUse of the tool indicates that you understand and agree to these terms and conditions.\u003C/p\u003E\u003C/div\u003E","title":"Terms of use"},"time":{"am":"am","formats":{"custom":"%d/%m/%Y %H:%M","default":"%a, %d %b %Y %H:%M:%S %z","devise":{"mailer":{"invitation_instructions":{"accept_until_format":"%B %d, %Y %I:%M %p"}}},"long":"%B %d, %Y %H:%M","short":"%d %b %H:%M"},"pm":"pm"},"tool_title":"DMPonline","views":{"pagination":{"first":"\u0026laquo; First","last":"Last \u0026raquo;","next":"Next \u0026rsaquo;","previous":"\u0026lsaquo; Prev","truncate":"\u0026hellip;"}},"welcome_text":"\u003Cp\u003EDMPonline has been developed by the \u003Ca href='http://dcc.ac.uk' target='_blank'\u003EDigital Curation Centre\u003C/a\u003E to help you write data management plans.\u003C/p\u003E","welcome_title":"Welcome."});
-I18n.translations["tr"] = I18n.extend((I18n.translations["tr"] || {}), {"active_admin":{"access_denied":{"message":"Bu işlemi gerçekleştirmek için yetkiniz yok."},"any":"Herhangi biri","batch_actions":{"action_label":"Seçilenleri %{title}","button_label":"Toplu İşlemler","default_confirmation":"Bunu yapmak istediğinizden emin misiniz?","delete_confirmation":"Bu %{plural_model} kayıtlarını silmek istediğinizden emin misiniz?","labels":{"destroy":"Sil"},"link":"Yeni oluştur","selection_toggle_explanation":"(Seçimi Değiştir)","succesfully_destroyed":{"one":"1 %{model} başarıyla silindi","other":"Toplam %{count} %{plural_model} başarıyla silindi"}},"blank_slate":{"content":"Henüz %{resource_name} yok.","link":"Bir tane oluşturun"},"cancel":"İptal","comments":{"add":"Yorum Ekle","author":"Yazar","author_missing":"Anonim","author_type":"Yazar Tipi","body":"Ayrıntı","created_at":"Oluşturma Tarihi","delete":"Yorumu Sil","delete_confirmation":"Bu yorumları silmek istediğinizden emin misiniz?","errors":{"empty_text":"Yorum boş olarak kaydedilemez."},"no_comments_yet":"Henüz yorum yok.","resource":"Kayıt","resource_type":"Kayıt Tipi","title":"Yorum","title_content":"Yorumlar (%{count})"},"dashboard":"Gösterge Paneli","dashboard_welcome":{"call_to_action":"Buraya bölümler eklemek için 'app/admin/dashboard.rb' dosyasına bakabilirsiniz.","welcome":"Active Admin'e hoş geldiniz. Burası varsayılan gösterge paneli sayfasıdır."},"delete":"Sil","delete_confirmation":"Bu kaydı silmek istediğinizden emin misiniz?","delete_model":"%{model} Kaydını Sil","details":"%{model} Ayrıntıları","devise":{"change_password":{"submit":"Şifremi değiştir","title":"Şifrenizi değiştirin"},"email":{"title":"E-posta adresi"},"links":{"forgot_your_password":"Şifrenizi mi unuttunuz?","resend_confirmation_instructions":"Onaylama talimatlarını tekrar gönder","resend_unlock_instructions":"Hesap geri açma talimatlarını tekrar gönder","sign_in":"Giriş yap","sign_in_with_omniauth_provider":"%{provider} ile giriş yapın","sign_up":"Kaydol"},"login":{"remember_me":"Beni hatırla","submit":"Giriş yap","title":"Giriş yap"},"password":{"title":"Şifre"},"resend_confirmation_instructions":{"submit":"Onaylama talimatlarını tekrar gönder","title":"Onaylama talimatlarını tekrar gönder"},"reset_password":{"submit":"Şifremi sıfırla","title":"Şifrenizi mi unuttunuz?"},"sign_up":{"submit":"Kaydol","title":"Kaydol"},"subdomain":{"title":"Alt alan adı"},"unlock":{"submit":"Hesap geri açma talimatlarını tekrar gönder","title":"Hesap geri açma talimatlarını tekrar gönder"},"username":{"title":"Kullanıcı adı"}},"download":"İndir:","dropdown_actions":{"button_label":"İşlemler"},"edit":"Düzenle","edit_model":"%{model} Kaydını Düzenle","empty":"Boş","filters":{"buttons":{"clear":"Filtreleri Temizle","filter":"Filtrele"},"predicates":{"contains":"İçerir","ends_with":"İle biter","equals":"Eşittir","greater_than":"Büyüktür","less_than":"Küçüktür","starts_with":"İle başlar"}},"has_many_delete":"Sil","has_many_new":"Yeni %{model} Ekle","has_many_remove":"Çıkar","index_list":{"block":"Liste","blog":"Blog","grid":"Izgara","table":"Tablo"},"logout":"Çıkış Yap","main_content":"İçeriği görüntülemek için lütfen %{model}#main_content metodunu ekleyin.","new_model":"Yeni %{model}","next":"Sonraki","pagination":{"empty":"Hiç %{model} yok","entry":{"one":"kayıt","other":"kayıtlar"},"multiple":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E arası %{model} görüntüleniyor (toplam %{total} kayıt)","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E arası %{model} görüntüleniyor","one":"\u003Cb\u003E1\u003C/b\u003E %{model} görüntüleniyor","one_page":"\u003Cb\u003E%{n}\u003C/b\u003E %{model} kaydının tamamı görüntüleniyor"},"powered_by":"%{active_admin} %{version} tarafından desteklenmektedir.","previous":"Önceki","search_status":{"current_filters":"Seçili filtreler:","current_scope":"Kapsam:","headline":"Arama","no_current_filters":"Yok"},"sidebars":{"filters":"Filtreler","search_status":"Arama Durumu"},"status_tag":{"no":"Hayır","yes":"Evet"},"unsupported_browser":{"headline":"ActiveAdmin Internet Explorer 8 ve altı artık desteklememektedir.","recommendation":"Son sürüm \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, ya da \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E tarayıcılarından birine geçmenizi tavsiye ederiz.","turn_off_compatibility_view":"IE 9 ya da üstünü kullanıyorsanız, \u003Ca href=\"http://windows.microsoft.com/tr-tr/internet-explorer/use-compatibility-view\"\u003E\"Uyumluluk Görünümü\"\u003C/a\u003Enü kapatmayı unutmayın."},"view":"Görüntüle"},"errors":{"messages":{"url":"Geçerli bir URL değil"}},"formtastic":{"cancel":"İptal","create":"%{model} oluştur","no":"Hayır","required":"Zorunlu","reset":"%{model} sıfırla","submit":"Gönder","update":"%{model} güncelle","yes":"Evet"}});
-I18n.translations["ja"] = I18n.extend((I18n.translations["ja"] || {}), {"active_admin":{"access_denied":{"message":"アクションを実行する権限がありません"},"any":"任意","batch_actions":{"action_label":"選択した行を%{title}","button_label":"一括操作","default_confirmation":"本当によろしいですか?","delete_confirmation":"%{plural_model} を削除してもよろしいですか?","labels":{"destroy":"削除する"},"link":"作成する","selection_toggle_explanation":"(選択)","succesfully_destroyed":{"one":"1件の %{model} を削除しました","other":"%{count}件の %{plural_model} を削除しました"}},"blank_slate":{"content":"%{resource_name} はまだありません。","link":"作成する"},"cancel":"取り消す","comments":{"add":"コメントを追加","author":"作成者","author_missing":"匿名ユーザ","author_type":"作成者種別","body":"本文","created_at":"作成日","delete":"コメントを削除","delete_confirmation":"本当にコメントを削除しますか?","errors":{"empty_text":"テキストが空のため、コメントは保存されませんでした。"},"no_comments_yet":"コメントはまだありません。","resource":"リソース","resource_type":"リソース種別","title":"コメント","title_content":"コメント (%{count})"},"dashboard":"ダッシュボード","dashboard_welcome":{"call_to_action":"ダッシュボードに項目を追加するために 'app/admin/dashboard.rb' を編集してください。","welcome":"Active Admin へようこそ。ダッシュボードの初期ページを表示しています。"},"delete":"削除","delete_confirmation":"本当に削除しますか?","delete_model":"%{model} を削除する","details":"%{model} の詳細","devise":{"change_password":{"submit":"パスワードを変更する","title":"パスワードを変更する"},"email":{"title":"メールアドレス"},"links":{"forgot_your_password":"パスワードをお忘れですか?","resend_confirmation_instructions":"ユーザ確認手順を再送する","resend_unlock_instructions":"ロックの解除方法を再送する","sign_in":"サインイン","sign_in_with_omniauth_provider":"%{provider}のアカウントを使ってログイン","sign_up":"ユーザ登録"},"login":{"remember_me":"次回から自動的にログイン","submit":"ログイン","title":"ログイン"},"password":{"title":"パスワード"},"resend_confirmation_instructions":{"submit":"確認方法を再送信する","title":"確認方法を再送信する"},"reset_password":{"submit":"パスワードをリセットする","title":"パスワードをお忘れですか?"},"sign_up":{"submit":"登録","title":"登録"},"subdomain":{"title":"サブドメイン"},"unlock":{"submit":"ロックの解除方法を送る","title":"ロックの解除方法を送る"},"username":{"title":"ユーザ名"}},"download":"ダウンロード:","dropdown_actions":{"button_label":"操作"},"edit":"編集","edit_model":"%{model} を編集する","empty":"空","filters":{"buttons":{"clear":"条件を削除する","filter":"絞り込む"},"predicates":{"contains":"含まれています","ends_with":"で終わる","equals":"等しい","greater_than":"より大きい","less_than":"より小さい","starts_with":"で始まる"}},"has_many_delete":"削除する","has_many_new":"新規に %{model} を追加する","has_many_remove":"削除する","index_list":{"block":"リスト","blog":"ブログ","grid":"グリッド","table":"テーブル"},"logout":"ログアウト","main_content":"内容を表示するために %{model}#main_content を実装してください。","new_model":"%{model} を作成する","next":"次","pagination":{"empty":"%{model} は見つかりませんでした","entry":{"one":"レコード","other":"レコード"},"multiple":"全 \u003Cb\u003E%{total}\u003C/b\u003E 件中 \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 件の %{model} を表示しています","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 件の %{model} を表示しています","one":"\u003Cb\u003E1\u003C/b\u003E 件の %{model} を表示しています","one_page":"\u003Cb\u003E全 %{n}\u003C/b\u003E 件の %{model} を表示しています"},"powered_by":"Powered by %{active_admin} %{version}","previous":"前","search_status":{"current_filters":"現在の絞り込み:","current_scope":"範囲:","headline":"検索条件:","no_current_filters":"なし"},"sidebars":{"filters":"検索条件","search_status":"検索状態"},"status_tag":{"no":"いいえ","yes":"はい"},"unsupported_browser":{"headline":"ActiveAdminは、Internet Explorer 8以下はサポートはしていません。","recommendation":"最新版の\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E、\u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E、もしくは\u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003Eを使うことを推奨します。","turn_off_compatibility_view":"Internet Explorer 9以降を使っている場合、\u003Ca href=\"http://windows.microsoft.com/ja-JP/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E互換表示をオフ\u003C/a\u003Eにしてください。"},"view":"閲覧"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"お問い合せメールを送信しました : %{email}","sent_by_name":"%{name} さんがお問い合せメールを送信しました : %{email}","subject":"お問い合わせメール : %{email}"}},"contacts":{"new":{"contact_us":"お問い合わせ","email":"メールアドレス","message":"お問い合せ内容","name":"お名前","subject":"件名","submit":"送信する"},"new_formtastic":{"contact_us":"お問い合わせ","email":"メールアドレス","message":"お問い合せ内容","name":"お名前","subject":"件名","submit":"送信する"},"new_simple_form":{"contact_us":"お問い合わせ","email":"メールアドレス","message":"お問い合せ内容","name":"お名前","subject":"件名","submit":"送信する"}},"notices":{"error":"すべての項目を入力してください。","success":"お問い合わせを送信しました。"}},"errors":{"messages":{"url":"は不正なURLです。"}},"formtastic":{"cancel":"中止","create":"%{model}を作成","no":"いいえ","required":"必須","reset":"リセット","submit":"送信","update":"%{model}を更新","yes":"はい"}});
-I18n.translations["cs"] = I18n.extend((I18n.translations["cs"] || {}), {"active_admin":{"access_denied":{"message":"Nemáte oprávnění k provedení této akce."},"any":"Kterákoliv","batch_actions":{"action_label":"%{title}","button_label":"Hromadné akce","default_confirmation":"Jste si jisti, že chcete provést?","delete_confirmation":"Jste si jisti, že chcete smazat tyto %{plural_model}?","labels":{"destroy":"Vymazat"},"link":"Vytvořit","selection_toggle_explanation":"(Změnit výběr)","succesfully_destroyed":{"few":"Úspěšně smazány %{count} %{plural_model}","one":"Úspěšně smazán %{model}","other":"Úspěšně smazáno %{count} %{plural_model}","zero":"Nebyl smazán žádný %{model}"}},"blank_slate":{"content":"Zatím zde není žádný obsah.","link":"Vytvořit"},"cancel":"Zrušit","comments":{"add":"Přidat komentář","author":"Autor","author_missing":"Anonymní","author_type":"Typ autora","body":"Tělo","errors":{"empty_text":"Komentář nebyl uložen, je prázdný."},"no_comments_yet":"Žádný komentář","resource":"Zdroj","resource_type":"Typ zdroje","title":"Komentář","title_content":"Komentáře administrátorů (%{count})"},"dashboard":"Úvod","dashboard_welcome":{"call_to_action":"Pro přidání sekcí na nástěnku se podívejte do souboru 'app/admin/dashboard.rb'","welcome":"Vítejte v Active Admin. Toto je nástěnka."},"delete":"Smazat","delete_confirmation":"Jste si jistí, že chcete tuto položku smazat?","delete_model":"Smazat","details":"Detaily","devise":{"change_password":{"submit":"Změnit své heslo","title":"Změnit heslo"},"links":{"forgot_your_password":"Zapomněli jste heslo?","sign_in":"Přihlásit se","sign_in_with_omniauth_provider":"Přihlásit se přes %{provider}","sign_up":"Registrovat se"},"login":{"remember_me":"Zapamatovat si mě","submit":"Přihlásit","title":"Přihlášení"},"reset_password":{"submit":"Obnovit heslo","title":"Zapomněli jste heslo?"},"unlock":{"submit":"Zaslat instrukce k odemčení účtu","title":"Zaslání instrukcí k odemčení účtu"}},"download":"Stáhnout:","dropdown_actions":{"button_label":"Akce"},"edit":"Upravit","edit_model":"Upravit","empty":"Prázdné","filters":{"buttons":{"clear":"Vyčistit filtry","filter":"Filtrovat"},"predicates":{"contains":"Obsahuje","ends_with":"Končí na","equals":"Odpovídá","greater_than":"Větší než","less_than":"Menší než","starts_with":"Začíná na"}},"has_many_delete":"Smazat","has_many_new":"Přidat nový","has_many_remove":"Odstranit","index_list":{"block":"Seznam","blog":"Blog","grid":"Tabulka","table":"Tabulka"},"logout":"Odhlásit","main_content":"Implementujte prosím %{model}#main_content pro zobrazení obsahu.","new_model":"Vytvořit","next":"Následující","pagination":{"empty":"Nenalezen.","entry":{"few":"položky","one":"položka","other":"položky"},"multiple":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E z \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Zobrazena \u003Cb\u003E1\u003C/b\u003E položka","one_page":"Počet zobrazených položek %{n}"},"powered_by":"%{active_admin} %{version}","previous":"Předchozí","sidebars":{"filters":"Filtry"},"status_tag":{"no":"Ne","yes":"Ano"},"view":"Zobrazit"},"ransack":{"all":"každou","and":"a","any":"kteroukoliv","asc":"vzestupné","attribute":"atribut","combinator":"kombinátor","condition":"podmínka","desc":"sestupné","or":"nebo","predicate":"predikát","predicates":{"blank":"je prázdné","cont":"obsahuje","cont_all":"obsahuje všechny","cont_any":"obsahuje kterékoliv","does_not_match":"neodpovídá","does_not_match_all":"neodpovídá všem","does_not_match_any":"neodpovídá kterékoliv","end":"končí s","end_all":"končí se všemi","end_any":"končí s kteroukoliv","eq":"rovno","eq_all":"rovno všem","eq_any":"rovno kterékoliv","false":"není pravdivé","gt":"větší než","gt_all":"větší než všechny","gt_any":"větší než kterákoliv","gteq":"větší nebo rovno než","gteq_all":"větší nebo rovno než všechny","gteq_any":"větší nebo rovno než kterákoliv","in":"v","in_all":"ve všech","in_any":"v kterékoliv","lt":"menší než","lt_all":"menší než všechny","lt_any":"menší než kterákoliv","lteq":"menší nebo rovno než","lteq_all":"menší nebo rovno než všechny","lteq_any":"menší nebo rovno než kterákoliv","matches":"odpovídá","matches_all":"odpovídá všem","matches_any":"odpovídá kterékoliv","not_cont":"neobsahuje","not_cont_all":"neobsahuje všechny","not_cont_any":"neobsahuje kteroukoliv","not_end":"nekončí s","not_end_all":"nekončí se všemi","not_end_any":"nekončí s kteroukoliv","not_eq":"nerovno","not_eq_all":"nerovno všem","not_eq_any":"nerovno kterékoliv","not_in":"není v","not_in_all":"není ve všech","not_in_any":"není v kterékoliv","not_null":"není null","not_start":"nezačíná s","not_start_all":"nezačíná se všemi","not_start_any":"nezačíná s kteroukoliv","null":"je null","present":"je vyplněné","start":"začíná s","start_all":"začíná se všemi","start_any":"začíná s kteroukoliv","true":"je pravdivé"},"search":"vyhledávání","sort":"řazení","value":"hodnota"}});
-I18n.translations["ro"] = I18n.extend((I18n.translations["ro"] || {}), {"active_admin":{"any":"Oricare","batch_actions":{"action_label":"%{title} Selectat","button_label":"Grupare Actiuni","default_confirmation":"Sunteţi sigur că doriţi să faceţi acest lucru?","delete_confirmation":"Sunteţi sigur că doriţi să stergeţi aceste %{plural_model}?","labels":{"destroy":"Sterge"},"link":"Creati unul","selection_toggle_explanation":"(Modifica Selectia)","succesfully_destroyed":{"few":"%{count} %{plural_model} sterse","one":"1 %{model} sters","other":"%{count} %{plural_model} sterse"}},"blank_slate":{"content":"Momentan nu exista %{resource_name}.","link":"Creati un"},"cancel":"Renuntati","comments":{"add":"Adaugati comentariu","author":"Autor","body":"Text","errors":{"empty_text":"Comentariul nu a fost salvat, textul lipseste."},"no_comments_yet":"Nu exista comentarii.","resource":"Resursa","title":"Comentariu","title_content":"Comentarii (%{count})"},"dashboard":"Pagina Principala","dashboard_welcome":{"call_to_action":"Pentru a adauga sectiuni, vedeti 'app/admin/dashboard.rb'","welcome":"Bine ati venit pe Active Admin. Aceasta este pagina principala."},"delete":"Stergeti","delete_confirmation":"Sigur vreti sa stergeti?","delete_model":"Stergeti %{model}","details":"Detalii %{model}","devise":{"change_password":{"submit":"Schimbă parola","title":"Schimbați parola"},"links":{"forgot_your_password":"Ați uitat parola?","sign_in":"Autentificare","sign_in_with_omniauth_provider":"Conectați-vă cu %{provider}"},"login":{"remember_me":"Tine-ma minte","submit":"Autentificare","title":"Autentificare"},"reset_password":{"submit":"Reseta parola","title":"Ați uitat parola?"},"unlock":{"submit":"Retrimite instrucțiunile de deblocare","title":"Retrimite instrucțiunile de deblocare"}},"download":"Descarcati:","dropdown_actions":{"button_label":"Actiuni"},"edit":"Modificati","edit_model":"Modificati %{model}","empty":"Gol","filters":{"buttons":{"clear":"Stergeti filtrele","filter":"Cautati"},"predicates":{"contains":"Conține","ends_with":"se termină cu","equals":"Egal Cu","greater_than":"Mai Mare Decat","less_than":"Mai Mic Decat","starts_with":"începe cu"}},"has_many_delete":"Stergeti","has_many_new":"Adaugati un nou %{model}","has_many_remove":"Scoate","logout":"Iesire","main_content":"Va rugam sa implementati %{model}#main_content pentru a afisa continut.","new_model":"Un nou %{model}","next":"Inainte","pagination":{"empty":"Nu am gasit nici un %{model}","entry":{"one":"inregistrare","other":"inregistrari"},"multiple":"Sunt afisate \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E din \u003Cb\u003E%{total}\u003C/b\u003E inregistrari","multiple_without_total":"Sunt afisate \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Afisare \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Sunt afisate \u003Cb\u003Etoate %{n}\u003C/b\u003E inregistrarile"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Inapoi","sidebars":{"filters":"Filtre"},"status_tag":{"no":"Nu","yes":"Da"},"view":"Vizualizati"},"ransack":{"all":"toate","and":"și","any":"oricare","asc":"crescător","attribute":"atribut","combinator":"combinator","condition":"condiție","desc":"descrescător","or":"sau","predicate":"predicat","predicates":{"blank":"este gol","cont":"conține","cont_all":"conține toate","cont_any":"conține unul din","does_not_match":"nu corespunde","does_not_match_all":"nu corespunde cu toate","does_not_match_any":"nu corespunde cu nici un","end":"se termină cu","end_all":"se termină cu toate","end_any":"se termină cu unul din","eq":"egal cu","eq_all":"egal cu toate","eq_any":"egal cu unul din","false":"este fals","gt":"mai mare de","gt_all":"mai mare decât toate","gt_any":"mai mare decât cel puțin unul din","gteq":"mai mare sau egal decât","gteq_all":"mai mare sau egal decât toate","gteq_any":"mai mare sau egal decât cel puțin unul din","in":"inclus în","in_all":"inclus în toate","in_any":"inclus într-unul din","lt":"mai mic de","lt_all":"mai mic decât toate","lt_any":"mai mic decât cel puțin unul din","lteq":"mai mic sau egal decât","lteq_all":"mai mic sau egal decât toate","lteq_any":"mai mic sau egal decât cel puțin unul din","matches":"corespunde","matches_all":"corespunde cu toate","matches_any":"corespunde cu unul din","not_cont":"nu conține","not_cont_all":"nu conține toate","not_cont_any":"nu conține unul din","not_end":"nu se termină cu","not_end_all":"nu se termină cu toate","not_end_any":"nu se termină cu unul din","not_eq":"diferit de","not_eq_all":"nu este egal cu toate","not_eq_any":"diferit de toate","not_in":"nu este inclus în","not_in_all":"nu este inclus în toate","not_in_any":"nu este inclus într-unul din","not_null":"nu este nul","not_start":"nu începe","not_start_all":"nu începe cu toate","not_start_any":"nu începe cu unul din","null":"este nul","present":"este prezent","start":"începe cu","start_all":"începe cu toate","start_any":"începe cu unul din","true":"este adevărat"},"search":"caută","sort":"sortează","value":"valoare"}});
-I18n.translations["nl"] = I18n.extend((I18n.translations["nl"] || {}), {"active_admin":{"access_denied":{"message":"U bent niet gemachtigd voor deze actie."},"any":"Alle","batch_actions":{"action_label":"%{title} geselecteerde","button_label":"Batch acties","default_confirmation":"Weet u zeker dat u dit wilt doen?","delete_confirmation":"Weet u zeker dat u deze %{plural_model} wilt verwijderen?","labels":{"destroy":"Verwijder"},"link":"Maak aan","selection_toggle_explanation":"(Toggle selectie)","succesfully_destroyed":{"one":"1 %{model} verwijderd.","other":"%{count} %{plural_model} verwijderd."}},"blank_slate":{"content":"Er zijn geen %{resource_name} gevonden.","link":"Maak aan"},"cancel":"Annuleren","comments":{"add":"Voeg commentaar toe","author":"Auteur","author_missing":"Anoniem","author_type":"Auteur Type","body":"Tekst","created_at":"Aangemaakt op","delete":"Verwijder commentaar","delete_confirmation":"Weet u zeker dat u dit commentaar wilt verwijderen?","errors":{"empty_text":"De reactie is niet opgeslagen, de tekst was leeg."},"no_comments_yet":"Nog geen reacties.","resource":"Resource","resource_type":"Resource Type","title":"Reactie","title_content":"Reacties (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Pas uw eigen dashboard aan in het bestand 'app/admin/dashboard.rb'","welcome":"Welkom bij Active Admin. Dit is de standaard dashboard pagina"},"delete":"Verwijder","delete_confirmation":"Weet u zeker dat je dit item wilt verwijderen?","delete_model":"Verwijder %{model}","details":"%{model} details","devise":{"change_password":{"submit":"Mijn wachtwoord wijzigen","title":"Wijzig uw wachtwoord"},"email":{"title":"Email"},"links":{"forgot_your_password":"Wachtwoord vergeten?","resend_confirmation_instructions":"Bevestigingsinstructies opnieuw versturen","resend_unlock_instructions":"Ontgrendelinstructies opnieuw versturen","sign_in":"Meld u aan","sign_in_with_omniauth_provider":"Log in met %{provider}","sign_up":"Registreren"},"login":{"remember_me":"Onthoud mij","submit":"inloggen","title":"inloggen"},"password":{"title":"Wachtwoord"},"resend_confirmation_instructions":{"submit":"Verstuur bevestigingsinstructies opnieuw","title":"Verstuur bevestigingsinstructies opnieuw"},"reset_password":{"submit":"Reset mijn wachtwoord vergeten","title":"Wachtwoord vergeten?"},"sign_up":{"submit":"Registreren","title":"Registreren"},"subdomain":{"title":"Subdomein"},"unlock":{"submit":"Verstuur ontgrendelinstructies opnieuw","title":"Verstuur ontgrendelinstructies opnieuw"},"username":{"title":"Gebruikersnaam"}},"download":"Download","dropdown_actions":{"button_label":"Acties"},"edit":"Wijzig","edit_model":"Wijzig %{model}","empty":"Leeg","filters":{"buttons":{"clear":"Maak Filters Ongedaan","filter":"Filter"},"predicates":{"contains":"Bevat","ends_with":"Eindigt op","equals":"Gelijk aan","greater_than":"Groter dan","less_than":"Kleiner dan","starts_with":"Begint met"}},"has_many_delete":"Verwijderen","has_many_new":"Voeg nieuwe %{model} toe","has_many_remove":"Verwijderen","index_list":{"block":"Lijst","blog":"Blog","grid":"Rooster","table":"Tabel"},"logout":"Uitloggen","main_content":"Implementeer %{model}#main_content om de content weer te geven.","new_model":"Nieuwe %{model}","next":"Volgende","pagination":{"empty":"Geen %{model} gevonden","entry":{"one":"entry","other":"entries"},"multiple":"Geeft %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E van de \u003Cb\u003E%{total}\u003C/b\u003E weer","multiple_without_total":"Geeft %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Geeft \u003Cb\u003E1\u003C/b\u003E %{model} weer","one_page":"Geeft \u003Cb\u003E%{n}\u003C/b\u003E %{model} weer"},"powered_by":"Mogelijk gemaakt door %{active_admin} %{version}","previous":"Vorige","search_status":{"current_filters":"Huidige filters:","current_scope":"Scope:","no_current_filters":"Geen"},"sidebars":{"filters":"Filters"},"status_tag":{"no":"Geen","yes":"Ja"},"unsupported_browser":{"headline":"Opgelet, ActiveAdmin bied geen support meer voor Internet Explorer 8 of lager","recommendation":"Wij raden aan om te upgraden naar de nieuwste \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, of \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Als u IE 9 of nieuwer gebruikt, zorg ervoor dat u \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E \"Compatibility View\" uit zet\u003C/a\u003E."},"view":"Bekijk"},"ransack":{"all":"alle","and":"en","any":"enig","asc":"oplopend","attribute":"attribuut","combinator":"combinator","condition":"conditie","desc":"aflopend","or":"of","predicate":"eigenschap","predicates":{"blank":"is afwezig","cont":"bevat","cont_all":"bevat alle","cont_any":"bevat enig","does_not_match":"evenaart niet","does_not_match_all":"evenaart niet voor alle","does_not_match_any":"evenaart niet voor enig","end":"eindigt met","end_all":"eindigt met alle","end_any":"eindigt met enig","eq":"gelijk","eq_all":"gelijk alle","eq_any":"gelijk enig","false":"is niet waar","gt":"groter dan","gt_all":"groter dan alle","gt_any":"groter dan enig","gteq":"groter dan or equal to","gteq_all":"groter dan or equal to alle","gteq_any":"groter dan or equal to enig","in":"in","in_all":"in alle","in_any":"in enig","lt":"kleiner dan","lt_all":"kleiner dan alle","lt_any":"kleiner dan enig","lteq":"kleiner dan of gelijk aan","lteq_all":"kleiner dan of gelijk aan alle","lteq_any":"kleiner dan of gelijk aan enig","matches":"evenaart","matches_all":"evenaart alle","matches_any":"evenaart enig","not_cont":"bevat niet","not_cont_all":"bevat niet alle","not_cont_any":"bevat niet enig","not_end":"eindigt niet met","not_end_all":"eindigt niet met alle","not_end_any":"eindigt niet met enig","not_eq":"niet gelijk aan","not_eq_all":"niet gelijk aan alle","not_eq_any":"niet gelijk aan enig","not_in":"niet in","not_in_all":"niet in alle","not_in_any":"niet in enig","not_null":"is niet null","not_start":"start niet met","not_start_all":"start niet met alle","not_start_any":"start niet met enig","null":"is null","present":"is present","start":"start met","start_all":"start met alle","start_any":"start met enig","true":"is waar"},"search":"zoeken","sort":"sorteren","value":"waarde"}});
-I18n.translations["es"] = I18n.extend((I18n.translations["es"] || {}), {"active_admin":{"access_denied":{"message":"No está autorizado/a a realizar esta acción."},"any":"Cualquiera","batch_actions":{"action_label":"%{title} seleccionado","button_label":"Acciones en masa","default_confirmation":"¿Seguro que quieres hacer esto?","delete_confirmation":"Eliminar %{plural_model}: ¿Está seguro?","labels":{"destroy":"Borrar"},"link":"Añadir","selection_toggle_explanation":"(Cambiar selección)","succesfully_destroyed":{"one":"Se ha destruido 1 %{model} con éxito","other":"Se han destruido %{count} %{plural_model} con éxito"}},"blank_slate":{"content":"No hay %{resource_name} aún.","link":"Añadir"},"cancel":"Cancelar","comments":{"add":"Comentar","author":"Autor","author_missing":"Anónimo","author_type":"Tipo de autor","body":"Cuerpo","created_at":"Fecha de creación","delete":"Borrar Comentario","delete_confirmation":"¿Está seguro que desea borrar este comentario?","errors":{"empty_text":"El comentario no fue guardado, el texto estaba vacío."},"no_comments_yet":"No hay comentarios aún.","resource":"Recurso","resource_type":"Tipo de recurso","title":"Comentario","title_content":"Comentarios (%{count})"},"dashboard":"Inicio","dashboard_welcome":{"call_to_action":"Para agregar secciones edite 'app/admin/dashboard.rb'","welcome":"Bienvenido a Active Admin. Esta es la página de inicio predeterminada."},"delete":"Eliminar","delete_confirmation":"¿Está seguro de que quiere eliminar esto?","delete_model":"Eliminar %{model}","details":"Detalles de %{model}","devise":{"change_password":{"submit":"Cambiar mi contraseña","title":"Cambie su contraseña"},"email":{"title":"Email"},"links":{"forgot_your_password":"¿Olvidó su contraseña?","resend_confirmation_instructions":"Reenviar instrucciones de confirmación","resend_unlock_instructions":"Reenviar instrucciones de desbloqueo","sign_in":"Registrarse","sign_in_with_omniauth_provider":"Conéctate con %{provider}","sign_up":"Ingresar"},"login":{"remember_me":"Recordarme","submit":"Iniciar Sesión","title":"Iniciar Sesión"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Reenviar instrucciones de confirmación","title":"Reenviar instrucciones de confirmación"},"reset_password":{"submit":"Restablecer mi contraseña","title":"¿Olvidó su contraseña?"},"sign_up":{"submit":"Registrarse","title":"Registrarse"},"subdomain":{"title":"Subdominio"},"unlock":{"submit":"Reenviar instrucciones de desbloqueo","title":"Reenviar instrucciones de desbloqueo"},"username":{"title":"Nombre de usuario"}},"download":"Descargar:","dropdown_actions":{"button_label":"Acciones"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vacío","filters":{"buttons":{"clear":"Quitar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contiene","ends_with":"Termina con","equals":"Igual a","greater_than":"Mayor que","less_than":"Menor que","starts_with":"Empieza con"}},"has_many_delete":"Eliminar","has_many_new":"Añadir %{model}","has_many_remove":"Quitar","index_list":{"block":"Lista","blog":"Blog","grid":"Grilla","table":"Tabla"},"logout":"Salir","main_content":"Por favor implemente %{model}#main_content para mostrar contenido.","new_model":"Añadir %{model}","next":"Siguiente","pagination":{"empty":"No se han encontrado %{model}","entry":{"one":"registro","other":"registros"},"multiple":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de un total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Mostrando \u003Cb\u003Eun total de %{n}\u003C/b\u003E %{model}"},"powered_by":"Funciona con %{active_admin} %{version}","previous":"Anterior","search_status":{"current_filters":"Filtros actuales:","current_scope":"Alcance:","headline":"Estado de la búsqueda:","no_current_filters":"Ninguno"},"sidebars":{"filters":"Filtros","search_status":"Estado de la búsqueda"},"status_tag":{"no":"No","yes":"Sí"},"unsupported_browser":{"headline":"Por favor tenga en cuenta que Active Admin no soporta versiones de Internet Explorer menores a 8.","recommendation":"Recomendamos que actualice a la última versión de \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, o \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Si está usando IE 9 o superior, asegúrese de \u003Ca href=\"http://windows.microsoft.com/es-es/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eapagar la \"Vista de compatibilidad\"\u003C/a\u003E."},"view":"Ver"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"Enviado por el formulario de contacto. %{email}","sent_by_name":"Sent by %{name} from %{email}","subject":"Contact Us message from %{email}"}},"contacts":{"new":{"contact_us":"Contactanos","email":"Email","message":"Mensaje","name":"Name","subject":"Subject","submit":"Enviar"},"new_formtastic":{"contact_us":"Contactanos","email":"Email","message":"Mensaje","name":"Name","subject":"Subject","submit":"Enviar"},"new_simple_form":{"contact_us":"Contactanos","email":"Email","message":"Mensaje","name":"Name","subject":"Subject","submit":"Enviar"}},"notices":{"error":"Debes de ingresar ambos campos.","success":"El correo electrónico de contacto fue enviado con éxito."}},"formtastic":{"cancel":"Cancelar","create":"Guardar %{model}","no":"No","required":"requerido","reset":"Restablecer %{model}","submit":"Aceptar","update":"Guardar %{model}","yes":"Sí"},"ransack":{"all":"todos","and":"y","any":"cualquier","asc":"ascendente","attribute":"atributo","combinator":"combinado","condition":"condición","desc":"descendente","or":"o","predicate":"predicado","predicates":{"blank":"está en blanco","cont":"contiene","cont_all":"contiene todos","cont_any":"contiene cualquier","does_not_match":"no coincide","does_not_match_all":"no coincide con todos","does_not_match_any":"no coincide con ninguna","end":"termina con","end_all":"termina con todo","end_any":"termina con cualquier","eq":"es igual a","eq_all":"es igual a todos","eq_any":"es igual a cualquier","false":"es falso","gt":"mayor que","gt_all":"mayor que todos","gt_any":"mayor que cualquier","gteq":"mayor que o igual a","gteq_all":"mayor que o igual a todos","gteq_any":"mayor que o igual a cualquier","in":"en","in_all":"en todos","in_any":"en cualquier","lt":"menor que","lt_all":"menor o igual a","lt_any":"menor que cualquier","lteq":"menor que o igual a","lteq_all":"menor o igual a todos","lteq_any":"menor o igual a cualquier","matches":"coincidir","matches_all":"coincidir a todos","matches_any":"coincidir a cualquier","not_cont":"no contiene","not_cont_all":"no contiene toda","not_cont_any":"no contiene ninguna","not_end":"no termina con","not_end_all":"no termina con todo","not_end_any":"no termina con cualquier","not_eq":"no es igual a","not_eq_all":"no es iguala todos","not_eq_any":"no es igual a cualquier","not_in":"no en","not_in_all":"no en todos","not_in_any":"no en cualquier","not_null":"no es nula","not_start":"no inicia con","not_start_all":"no inicia con toda","not_start_any":"no comienza con cualquier","null":"es nula","present":"es presente","start":"comienza con","start_all":"comienza con toda","start_any":"comienza con cualquier","true":"es verdadero"},"search":"buscar","sort":"ordernar","value":"valor"}});
-I18n.translations["zh"] = I18n.extend((I18n.translations["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":{"contact_us":"联系我们","email":"邮箱","message":"消息","name":"Name","subject":"Subject","submit":"发送"},"new_formtastic":{"contact_us":"联系我们","email":"邮箱","message":"消息","name":"Name","subject":"Subject","submit":"发送"},"new_simple_form":{"contact_us":"联系我们","email":"邮箱","message":"消息","name":"Name","subject":"Subject","submit":"发送"}},"notices":{"error":"请正确输入邮箱与信息。","success":"邮件已成功发送。"}},"ransack":{"all":"所有","and":"并且","any":"任意","asc":"升序","attribute":"属性","combinator":"条件组合(combinator)","condition":"条件","desc":"降序","or":"或者","predicate":"基于(predicate)","predicates":{"blank":"为空","cont":"包含","cont_all":"包含所有值","cont_any":"包含任意一个值","does_not_match":"不符合","does_not_match_all":"不符合所有条件","does_not_match_any":"符合任意条件","end":"以改值结尾","end_all":"以所有值结尾","end_any":"以任意一个值结尾","eq":"等于","eq_all":"等于所有值","eq_any":"等于任意值","false":"等于false","gt":"大于","gt_all":"大于所有值","gt_any":"大于任意一个值","gteq":"大于等于","gteq_all":"大于等于所有值","gteq_any":"大于等于任意一个值","in":"被包含","in_all":"被所有值包含","in_any":"被任意值包含","lt":"小于","lt_all":"小于所有值","lt_any":"小于任意一个值","lteq":"小于等于","lteq_all":"小于等于所有值","lteq_any":"小于等于任意一个值","matches":"符合","matches_all":"符合所有条件","matches_any":"符合任意条件","not_cont":"不包含","not_cont_all":"不包含所有值","not_cont_any":"不包含任意一个值","not_end":"不以改值结尾","not_end_all":"不以所有值结尾","not_end_any":"不以任意一个值结尾","not_eq":"不等于","not_eq_all":"不等于所有值","not_eq_any":"不等于任意值","not_in":"不被包含","not_in_all":"不被所有值包含","not_in_any":"不被任意值包含","not_null":"不是null","not_start":"不以改值开始","not_start_all":"不以所有值开始","not_start_any":"不以任意一个值开始","null":"是null","present":"有值","start":"以改值开始","start_all":"以所有值开始","start_any":"以任意一个值开始","true":"等于true"},"search":"搜索","sort":"排序","value":"数值"}});
-I18n.translations["hu"] = I18n.extend((I18n.translations["hu"] || {}), {"active_admin":{"any":"Összes","batch_actions":{"action_label":"%{title} kiválasztva","button_label":"Tömeges műveletek","default_confirmation":"Biztos vagy benne, hogy a ön akar-hoz csinál ez?","delete_confirmation":"Biztosan törli ezeket a %{plural_model}?","labels":{"destroy":"Törlés"},"link":"Létrehozás","selection_toggle_explanation":"(Kijelölés megfordítása)","succesfully_destroyed":{"one":"1 %{model} sikeresen törölve","other":"%{count} %{plural_model} sikeresen törölve"}},"blank_slate":{"content":"Még nincs létrehozva %{resource_name}.","link":"Létrehozás most"},"cancel":"Mégsem","comments":{"add":"Új hozzászólás","author":"Szerző","body":"Törzs","errors":{"empty_text":"A hozzászólás nem lett mentve, a törzs nem lehet üres."},"no_comments_yet":"Nincsenek hozzászólások.","resource":"Erőforrás","title":"Hozzászólás","title_content":"%{count} hozzászólás"},"dashboard":"Vezérlőpult","dashboard_welcome":{"call_to_action":"Elemek hozzáadásához nézze meg a 'app/admin/dashboard.rb' fájlt","welcome":"Üdvözöljük az Active Admin felületén. Ez a vezérlőpult kezdőlapja"},"delete":"Törlés","delete_confirmation":"Biztosan törli ezt az elemet?","delete_model":"%{model} törlése","details":"%{model} részletei","devise":{"change_password":{"submit":"Jelszó módosítása","title":"A jelszó módosítása"},"links":{"forgot_your_password":"Elfelejtette a jelszavát?","sign_in":"Bejelentkezés","sign_in_with_omniauth_provider":"Jelentkezzen be a %{provider}"},"login":{"remember_me":"Emlékezz rám","submit":"Belépés","title":"Bejelentkezés"},"resend_confirmation_instructions":{"submit":"Megerősítő levél újraküldése","title":"Megerősítő levél újraküldése"},"reset_password":{"submit":"Jelszó visszaállítása","title":"Elfelejtette a jelszavát?"},"unlock":{"submit":"Újraküldés unlock utasítások","title":"Újraküldés unlock utasítások"}},"download":"Letöltés:","dropdown_actions":{"button_label":"Műveletek"},"edit":"Szerkesztés","edit_model":"%{model} módosítása","empty":"Üres","filters":{"buttons":{"clear":"Feltételek törlése","filter":"Szűrés"},"predicates":{"contains":"Tartalmazza","ends_with":"végződik","equals":"Pontosan","greater_than":"Nagyobb, mint","less_than":"Kisebb, mint","starts_with":"kezdődik"}},"has_many_delete":"Törlés","has_many_new":"Új %{model} hozzáadása","has_many_remove":"Eltávolít","logout":"Kilépés","main_content":"Kérem, implementálja a %{model}#main_content metódust a tartalom megjelenítéséhez.","new_model":"Új %{model}","next":"Következő","pagination":{"empty":"Nincs több %{model}","entry":{"one":"elem","other":"elem"},"multiple":"%{model} listájának megjelenítése, \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E/\u003Cb\u003E%{total}\u003C/b\u003E ","multiple_without_total":"%{model} listájának megjelenítése, \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E ","one":"\u003Cb\u003EEgy\u003C/b\u003E %{model} megjelenítése","one_page":"\u003Cb\u003EAz összes (%{n} db)\u003C/b\u003E %{model} megjelenítése"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Előző","sidebars":{"filters":"Szűrők"},"status_tag":{"no":"Nem","yes":"Igen"},"view":"Megtekintés"},"ransack":{"all":"mindegyik","and":"és","any":"bármely","asc":"növekvő","attribute":"attribute","combinator":"combinator","condition":"feltétel","desc":"csökkenő","or":"vagy","predicate":"állítás","predicates":{"blank":"üres","cont":"tartalmazza","cont_all":"mindet tartalmazza","cont_any":"bármelyiket tartalmazza","does_not_match":"nem egyezik","does_not_match_all":"nem egyezik az összessel","does_not_match_any":"nem egyezik semelyikkel","end":"így végződik","end_all":"ezekkel végződik","end_any":"bármelyikkel végződik","eq":"egyenlő","eq_all":"minddel egyenlő","eq_any":"bármelyikkel egyenlő","false":"hamis","gt":"nagyobb, mint","gt_all":"mindegyiknél nagyobb","gt_any":"bármelyiknél nagyobb","gteq":"nagyobb vagy egyenlő, mint","gteq_all":"mindegyiknél nagyobb vagy egyenlő","gteq_any":"bármelyiknél nagyobb vagy egyenlő","in":"értéke","in_all":"értéke mindegyik","in_any":"értéke bármelyik","lt":"kisebb, mint","lt_all":"mindegyiknél kisebb","lt_any":"bármelyiknél kisebb","lteq":"kisebb vagy egyenlő, mint","lteq_all":"mindegyiknél kisebb vagy egyenlő","lteq_any":"bármelyiknél kisebb vagy egyenlő","matches":"egyezik","matches_all":"minddel egyezik","matches_any":"bármelyikkel egyezik","not_cont":"nem tartalmazza","not_cont_all":"nem tartalmazza mindet","not_cont_any":"egyiket sem tartalmazza","not_end":"nem úgy végződik","not_end_all":"nem ezekkel végződik","not_end_any":"nem ezek egyikével végződik","not_eq":"nem egyenlő","not_eq_all":"nem egyenlő egyikkel sem","not_eq_any":"nem egyenlő bármelyikkel","not_in":"nem ez az értéke","not_in_all":"értéke nem ezek az elemek","not_in_any":"értéke egyik sem","not_null":"nem null","not_start":"nem így kezdődik","not_start_all":"nem ezekkel kezdődik","not_start_any":"nem ezek egyikével kezdődik","null":"null","present":"létezik","start":"így kezdődik","start_all":"ezekkel kezdődik","start_any":"bármelyikkel kezdődik","true":"igaz"},"search":"keresés","sort":"rendezés","value":"érték"}});
-I18n.translations["de"] = I18n.extend((I18n.translations["de"] || {}), {"active_admin":{"access_denied":{"message":"Sie haben nicht die Berechtigung um diese Aktion auszuführen."},"any":"Alle","batch_actions":{"action_label":"%{title} ausgewählte","button_label":"Stapelverarbeitung","default_confirmation":"Bist du sicher, dass Sie dies tun wollen?","delete_confirmation":"Sind Sie sicher dass sie diese %{plural_model} löschen wollen?","labels":{"destroy":"Lösche"},"link":"erstellen","selection_toggle_explanation":"(Auswahl umschalten)","succesfully_destroyed":{"one":"Erfolgreich 1 %{model} gelöscht","other":"Erfolgreich %{count} %{plural_model} gelöscht"}},"blank_slate":{"content":"Es gibt noch keine %{resource_name}.","link":"Erstellen"},"cancel":"Abbrechen","comments":{"add":"Kommentar hinzufügen","author":"Autor","author_missing":"Unbekannt","author_type":"Autor-Typ","body":"Inhalt","delete":"Löschen","delete_confirmation":"Sind Sie sicher dass sie diesen Kommentar löschen wollen?","errors":{"empty_text":"Der Kommentar wurde nicht gespeichert, da der Text fehlt."},"no_comments_yet":"Es gibt noch keine Kommentare.","resource":"Ressource","resource_type":"Ressourcen-Typ","title":"Kommentar","title_content":"Kommentare (%{count})"},"dashboard":"Übersicht","dashboard_welcome":{"call_to_action":"Siehe 'app/admin/dashboard.rb', um Übersichts-Bereiche hinzuzufügen.","welcome":"Willkommen in Active Admin. Dies ist die Standard-Übersichtsseite."},"delete":"Löschen","delete_confirmation":"Wollen Sie dieses Element wirklich löschen?","delete_model":"%{model} löschen","details":"%{model} Details","devise":{"change_password":{"submit":"Mein Passwort ändern","title":"Ändern Sie Ihr Passwort"},"email":{"title":"E-Mail-Adresse"},"links":{"forgot_your_password":"Passwort vergessen?","resend_confirmation_instructions":"Bestätigungsanweisung erneut senden","resend_unlock_instructions":"Entsperrungsanweisung erneut senden","sign_in":"Anmeldung","sign_in_with_omniauth_provider":"Anmeldung mit %{provider}","sign_up":"Registrieren"},"login":{"remember_me":"Angemeldet bleiben","submit":"Login","title":"Login"},"password":{"title":"Passwort"},"resend_confirmation_instructions":{"submit":"Anleitung zur Bestätigung noch mal schicken","title":"Anleitung zur Bestätigung noch mal schicken"},"reset_password":{"submit":"Mein Passwort zurücksetzen","title":"Passwort vergessen?"},"sign_up":{"submit":"Registrieren","title":"Registrieren"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Entsperrungsanweisung erneut senden","title":"Entsperrungsanweisung erneut senden"},"username":{"title":"Benutzername"}},"download":"Herunterladen:","dropdown_actions":{"button_label":"Aktionen"},"edit":"Bearbeiten","edit_model":"%{model} bearbeiten","empty":"Leer","filters":{"buttons":{"clear":"Filter entfernen","filter":"Filtern"},"predicates":{"contains":"Enthält","ends_with":"Endet mit","equals":"Gleich","greater_than":"Größer als","less_than":"Kleiner als","starts_with":"Beginnt mit"}},"has_many_delete":"Löschen","has_many_new":"%{model} hinzufügen","has_many_remove":"Entfernen","index_list":{"block":"Liste","blog":"Blog","grid":"Gitter","table":"Tabelle"},"logout":"Abmelden","main_content":"Bitte implementieren Sie %{model}#main_content, um Inhalte anzuzeigen.","new_model":"%{model} erstellen","next":"Weiter","pagination":{"empty":"Keine %{model} gefunden","entry":{"one":"Eintrag","other":"Einträge"},"multiple":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E von \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E","one":"Zeige \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Zeige \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Zurück","search_status":{"current_filters":"Aktuelle Filter:","current_scope":"Anwendungsbereich:","headline":"Filter","no_current_filters":"Keine"},"sidebars":{"filters":"Filter","search_status":"Suchstatus"},"status_tag":{"no":"Nein","yes":"Ja"},"unsupported_browser":{"headline":"ActiveAdmin unterstützt nicht länger den Internet Explorer in Version 8 oder niedriger.","recommendation":"Wir empfehlen die Nutzung von \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, oder \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Wenn sie IE 9 oder neuer benutzen, stellen sie sicher das sie den \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E\"Kompatibilitätsansicht\" ausgeschaltet\u003C/a\u003E haben."},"view":"Anzeigen"},"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":{"contact_us":"Kontaktiere Uns","email":"E-Mail","message":"Nachricht","name":"Name","subject":"Betreff","submit":"Abschicken"},"new_formtastic":{"contact_us":"Kontaktiere Uns","email":"E-Mail","message":"Nachricht","name":"Name","subject":"Betreff","submit":"Abschicken"},"new_simple_form":{"contact_us":"Kontaktiere Uns","email":"E-Mail","message":"Nachricht","name":"Name","subject":"Betreff","submit":"Abschicken"}},"notices":{"error":"Beide Felder müssen ausgefüllt werden.","success":"Die Nachricht wurde erfolgreich versendet."}},"formtastic":{"cancel":"Abbrechen","create":"%{model} anlegen","no":"Nein","required":"Pflichtfeld","reset":"%{model} zurücksetzen","submit":"Abschicken","update":"%{model} aktualisieren","yes":"Ja"},"ransack":{"all":"alle","and":"und","any":"beliebige","asc":"aufsteigend","attribute":"Attribut","combinator":"Kombinator","condition":"Bedingung","desc":"absteigend","or":"oder","predicate":"Eigenschaft","predicates":{"blank":"ist leer","cont":"enthält","cont_all":"enthält alle","cont_any":"enthält beliebige","does_not_match":"stimmt nicht überein","does_not_match_all":"stimmt nicht mit allen überein","does_not_match_any":"erfüllt ein beliebiger/s nicht","end":"endet mit","end_all":"endet mit allen","end_any":"endet mit beliebigen","eq":"gleicht","eq_all":"gleicht allen","eq_any":"gleicht beliebigen","false":"ist falsch","gt":"größer als","gt_all":"größer als alle","gt_any":"größer als ein beliebiger/s","gteq":"größer oder gleich","gteq_all":"größer oder gleich alle","gteq_any":"größer oder gleich als ein beliebiger/s","in":"in","in_all":"in allen","in_any":"ist nicht in einem beliebigen","lt":"kleiner als","lt_all":"kleiner als alle als alle","lt_any":"kleiner als ein beliebiger/s","lteq":"kleiner oder gleich","lteq_all":"kleiner oder gleich allen","lteq_any":"kleiner oder gleich beliebige","matches":"entspricht","matches_all":"stimmt mit allen überein","matches_any":"stimmt überein mit einem beliebigen","not_cont":"enthält nicht","not_cont_all":"enthält keine/s","not_cont_any":"enthält ein beliebiger/s nicht","not_end":"endet nicht mit","not_end_all":"endet nicht mit allen","not_end_any":"endet nicht mit beliebigen","not_eq":"ungleich","not_eq_all":"ungleich allen","not_eq_any":"ungleich beliebigen","not_in":"nicht in","not_in_all":"nicht in allen","not_in_any":"nicht in beliebige","not_null":"ist nicht null","not_start":"beginnt nicht mit","not_start_all":"beginnt nicht mit allen","not_start_any":"beginnt nicht mit beliebigen","null":"ist null","present":"ist vorhanden","start":"beginnt mit","start_all":"beginnt mit allen","start_any":"beginnt mit beliebigen","true":"ist wahr"},"search":"suchen","sort":"sortieren","value":"Wert"}});
-I18n.translations["fr"] = I18n.extend((I18n.translations["fr"] || {}), {"active_admin":{"access_denied":{"message":"Vous n'êtes pas autorisé à exécuter cette action"},"any":"N'importe lequel","batch_actions":{"action_label":"%{title} les éléments sélectionnés","button_label":"Actions groupées","default_confirmation":"Êtes-vous sûr de vouloir faire cela ?","delete_confirmation":"Êtes-vous sûr de vouloir supprimer ces %{plural_model} ?","labels":{"destroy":"Supprimer"},"link":"Créer un","selection_toggle_explanation":"(Inverser la sélection)","succesfully_destroyed":{"one":"1 %{model} supprimé","other":"%{count} %{plural_model} supprimés"}},"blank_slate":{"content":"Il n'y a pas encore de %{resource_name}.","link":"Créez en un"},"cancel":"Annuler","comments":{"add":"Ajouter un commentaire","author":"Auteur","author_type":"Profil de l'auteur","body":"Corps","errors":{"empty_text":"Le commentaire n'a pas été enregistré puisque le texte était vide."},"no_comments_yet":"Aucun commentaire actuellement","resource":"Ressource","resource_type":"Type de ressource","title":"Commentaire","title_content":"Commentaires (%{count})"},"dashboard":"Tableau de bord","dashboard_welcome":{"call_to_action":"Pour ajouter des sections au tableau de bord, consultez 'app/admin/dashboard.rb'","welcome":"Bienvenue dans Active Admin. Ceci est la page par défaut."},"delete":"Supprimer","delete_confirmation":"Êtes-vous certain de vouloir supprimer ceci ?","delete_model":"Supprimer %{model}","details":"Détails de %{model}","devise":{"change_password":{"submit":"Changer mon mot de passe","title":"Changez votre mot de passe"},"email":{"title":"Email"},"links":{"forgot_your_password":"Vous avez oublié votre mot de passe ?","sign_in":"Connectez-vous","sign_in_with_omniauth_provider":"Connectez-vous avec %{provider}"},"login":{"remember_me":"Garder ma session ouverte","submit":"Se connecter","title":"Connexion"},"password":{"title":"Mot de passe"},"resend_confirmation_instructions":{"submit":"Renvoyer les instructions de confirmation","title":"Renvoyer les instructions de confirmation"},"reset_password":{"submit":"Réinitialiser mon mot de passe","title":"Vous avez oublié votre mot de passe ?"},"subdomain":{"title":"Sous-domaine"},"username":{"title":"Nom d'utilisateur"}},"download":"Télécharger :","dropdown_actions":{"button_label":"Actions"},"edit":"Modifier","edit_model":"Modifier %{model}","empty":"Vide","filters":{"buttons":{"clear":"Supprimer les filtres","filter":"Filtrer"},"predicates":{"contains":"Contient","ends_with":"Se termine par","equals":"Égal à","greater_than":"Plus grand que","less_than":"Plus petit que","starts_with":"Commence par"}},"has_many_delete":"Supprimer","has_many_new":"Ajouter un nouveau %{model}","has_many_remove":"Enlever","index_list":{"block":"Liste","blog":"Blog","grid":"Grille","table":"Tableau"},"logout":"Déconnexion","main_content":"Veuillez implémenter %{model}#main_content pour afficher le contenu.","new_model":"Créer %{model}","next":"Suivant","pagination":{"empty":"Aucun %{model} trouvé","entry":{"one":"entrée","other":"entrées"},"multiple":"Affichage de %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E sur un total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Affichage de %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Affichage de \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Affichage des \u003Cb\u003E%{n}\u003C/b\u003E %{model}"},"powered_by":"Propulsé par %{active_admin} %{version}","previous":"Précédent","search_status":{"current_filters":"Filtres actuels :","current_scope":"Etendu du filtre :","headline":"Statut de la recherche :","no_current_filters":"Aucun filtres"},"sidebars":{"filters":"Filtres","search_status":"Statut de la recherche"},"status_tag":{"no":"Non","yes":"Oui"},"view":"Voir"},"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":{"contact_us":"Contactez Nous","email":"Email","message":"Message","name":"Nom","subject":"Sujet","submit":"Envoyer"},"new_formtastic":{"contact_us":"Contactez Nous","email":"Email","message":"Message","name":"Nom","subject":"Sujet","submit":"Envoyer"},"new_simple_form":{"contact_us":"Contactez Nous","email":"Email","message":"Message","name":"Nom","subject":"Sujet","submit":"Envoyer"}},"notices":{"error":"Merci de saisir les deux champs.","success":"Votre message a bien été envoyé."}},"formtastic":{"cancel":"Annuler","create":"Créer un(e) %{model}","no":"Non","required":"requis(e)","reset":"Réinitialiser ce(tte) %{model}","submit":"Enregistrer ce(tte) %{model}","update":"Modifier ce(tte) %{model}","yes":"Oui"},"ransack":{"all":"tous","and":"et","any":"au moins un","asc":"ascendant","attribute":"attribut","combinator":"combinateur","condition":"condition","desc":"descendant","or":"ou","predicate":"prédicat","predicates":{"blank":"est blanc","cont":"contient","cont_all":"contient tous","cont_any":"contient au moins un","does_not_match":"ne correspond pas à","does_not_match_all":"ne correspond à aucun","does_not_match_any":"ne correspond pas à au moins un","end":"finit par","end_all":"finit par tous","end_any":"finit par au moins un","eq":"égal à","eq_all":"égal à tous","eq_any":"égal à au moins un","false":"est faux","gt":"supérieur à","gt_all":"supérieur à tous","gt_any":"supérieur à au moins un","gteq":"supérieur ou égal à","gteq_all":"supérieur ou égal à tous","gteq_any":"supérieur ou égal à au moins un","in":"inclus dans","in_all":"inclus dans tous","in_any":"inclus dans au moins un","lt":"inférieur à","lt_all":"inférieur à tous","lt_any":"inférieur à au moins un","lteq":"inférieur ou égal à","lteq_all":"inférieur ou égal à tous","lteq_any":"inférieur ou égal à au moins un","matches":"correspond à","matches_all":"correspond à tous","matches_any":"correspond à au moins un","not_cont":"ne contient pas","not_cont_all":"ne contient pas tous","not_cont_any":"ne contient pas au moins un","not_end":"ne finit pas par","not_end_all":"ne finit pas par tous","not_end_any":"ne finit pas par au moins un","not_eq":"différent de","not_eq_all":"différent de tous","not_eq_any":"différent d'au moins un","not_in":"non inclus dans","not_in_all":"non inclus dans tous","not_in_any":"non inclus dans au moins un","not_null":"n'est pas null","not_start":"ne commence pas par","not_start_all":"ne commence pas par tous","not_start_any":"ne commence pas par au moins un","null":"est null","present":"est présent","start":"commence par","start_all":"commence par tous","start_any":"commence par au moins un","true":"est vrai"},"search":"recherche","sort":"tri","value":"valeur"}});
-I18n.translations["el"] = I18n.extend((I18n.translations["el"] || {}), {"active_admin":{"access_denied":{"message":"Δεν έχετε πρόσβαση για αυτή την ενέργεια."},"any":"Όλες οι εγγραφές","batch_actions":{"action_label":"%{title} επιλεγμένων","button_label":"Μαζικές Ενέργειες","default_confirmation":"Είστε σίγουρος πως θέλετε να το κάνετε αυτό;","delete_confirmation":"Είστε σίγουρος πως θέλετε να διαγράψετε αυτά τα %{plural_model}?","labels":{"destroy":"Διαγραφή"},"link":"Δημιουργήστε ένα","selection_toggle_explanation":"(Αντιστροφή επιλογών)","succesfully_destroyed":{"one":"Διαγράφηκε επιτυχώς 1 %{model}","other":"Διαγράφηκαν επιτυχώς %{count} %{plural_model}"}},"blank_slate":{"content":"Δεν υπάρχουν %{resource_name} ακόμα.","link":"Δημιουργήστε μία εγγραφή"},"cancel":"Ακύρωση","comments":{"add":"Προσθήκη Σχολίου","author":"Συγγραφέας","author_missing":"Ανώνυμος","author_type":"Τύπος Συγγραφέα","body":"Κείμενο","errors":{"empty_text":"Το σχόλιο δε σώθηκε, το κείμενο ήταν κενό."},"no_comments_yet":"Δεν υπάρχει κανένα σχόλιο.","resource":"Εγγραφή","resource_type":"Τύπος Εγγραφής","title":"Σχόλιο","title_content":"Σχόλια (%{count})"},"dashboard":"Σελίδα διαχείρισης","dashboard_welcome":{"call_to_action":"Για να προσθέσετε ενότητες, ανατρέξτε στο αρχείο 'app/admin/dashboard.rb'","welcome":"Καλωσορίσατε στο Active Admin. Αυτή είναι η αρχική σελίδα διαχείρισης."},"delete":"Διαγραφή","delete_confirmation":"Είστε σίγουρος πως θέλετε να το διαγράψετε;","delete_model":"Διαγραφή %{model}","details":"Λεπτομέρειες %{model}","devise":{"change_password":{"submit":"Αλλαγή του κωδικού","title":"Αλλάξτε τον κωδικό σας"},"email":{"title":"Email"},"links":{"forgot_your_password":"Ξεχάσατε τον κωδικό σας;","resend_confirmation_instructions":"Αποστολή οδηγιών επιβεβαίωσης","resend_unlock_instructions":"Αποστολή οδηγιών ξεκλειδώματος","sign_in":"Σύνδεση","sign_in_with_omniauth_provider":"Σύνδεση με %{provider}","sign_up":"Εγγραφή"},"login":{"remember_me":"Να με θυμάσαι","submit":"Σύνδεση","title":"Σύνδεση"},"password":{"title":"Κωδικός"},"resend_confirmation_instructions":{"submit":"Αποστολή οδηγιών επιβεβαίωσης","title":"Αποστολή οδηγιών επιβεβαίωσης"},"reset_password":{"submit":"Επαναφορά κωδικού","title":"Ξεχάσατε τον κωδικό σας;"},"sign_up":{"submit":"Εγγραφή","title":"Εγγραφή"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Αποστολή οδηγιών ξεκλειδώματος","title":"Αποστολή οδηγιών ξεκλειδώματος"},"username":{"title":"Όνομα χρήστη"}},"download":"Κατέβασμα:","dropdown_actions":{"button_label":"Ενέργειες"},"edit":"Επεξεργασία","edit_model":"Επεξεργασία %{model}","empty":"Άδειο","filters":{"buttons":{"clear":"Καθαρισμός Φίλτρων","filter":"Φίλτρα"},"predicates":{"contains":"Περιέχει","ends_with":"Καταλήγει σε","equals":"Είναι ίσο με","greater_than":"Μεγαλύτερο από","less_than":"Μικρότερο από","starts_with":"Αρχίζει με"}},"has_many_delete":"Διαγραφή","has_many_new":"Προσθήκη Νέου %{model}","has_many_remove":"Αφαίρεση","index_list":{"block":"Λίστα","blog":"Blog","grid":"Πλέγμα","table":"Πίνακας"},"logout":"Αποσύνδεση","main_content":"Παρακαλώ υλοποιήστε την %{model}#main_content για να εμφανίσετε περιεχόμενο.","new_model":"Δημιουργία %{model}","next":"Επόμενη","pagination":{"empty":"Δε βρέθηκαν %{model}","entry":{"one":"εγγραφή","other":"εγγραφές"},"multiple":"Εμφανίζονται %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E από \u003Cb\u003E%{total}\u003C/b\u003E συνολικά","multiple_without_total":"Εμφανίζονται %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Εμφάνιζεται \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Εμφανίζονται \u003Cb\u003Eόλες οι %{n}\u003C/b\u003E εγγραφές %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Προηγούμενη","sidebars":{"filters":"Φίλτρα"},"status_tag":{"no":"Δεν","yes":"Ναι"},"unsupported_browser":{"headline":"Το ActiveAdmin δεν υποστηρίζει πλεον τον Internet Explorer έκδοση 8 η μικρότερη.","recommendation":"Σας προτείνουμε να αναβαθμίσετε στην τελευταία \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, or \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Αν χρησιμοποιείτε IE 9 ή μεγαλύτερη έκδοση, σιγουρευτείτε ότι \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eturn off \"Compatibility View\"\u003C/a\u003E."},"view":"Προβολή"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"Εστάλη μέσω της φόρμας επικοινωνίας από τον/την %{email}","sent_by_name":"Εστάλη από τον/την %{name} από τη διεύθυνση %{email}","subject":"Μήνυμα φόρμας επικοινωνίας από %{email}"}},"contacts":{"new":{"contact_us":"Επικοινωνία","email":"Διεύθυνση ηλεκτρονικού ταχυδρομείου","message":"Μήνυμα","name":"Όνομα","subject":"Θέμα","submit":"Αποστολή"},"new_formtastic":{"contact_us":"Επικοινωνία","email":"Διεύθυνση ηλεκτρονικού ταχυδρομείου","message":"Μήνυμα","name":"Όνομα","subject":"Θέμα","submit":"Αποστολή"},"new_simple_form":{"contact_us":"Επικοινωνία","email":"Διεύθυνση ηλεκτρονικού ταχυδρομείου","message":"Μήνυμα","name":"Όνομα","subject":"Θέμα","submit":"Αποστολή"}},"notices":{"error":"Πρέπει να συμπληρώσετε και τα δύο πεδία.","success":"Το μήνυμά σας εστάλη επιτυχώς."}}});
-I18n.translations["he"] = I18n.extend((I18n.translations["he"] || {}), {"active_admin":{"any":"Any","batch_actions":{"action_label":"%{title} נבחר","button_label":"פעולות מרובות","default_confirmation":"אתה בטוח שאתה רוצה לעשות את זה?","delete_confirmation":"האם הנך בטוח שאתה רוצה למרוח את %{plural_model}?","labels":{"destroy":"מחק"},"link":"צור","selection_toggle_explanation":"(שינוי בחירה)","succesfully_destroyed":{"few":"%{count} %{plural_model} נמחק בהצלחה","many":"%{count} %{plural_model} נמחק בהצלחה","one":"1 %{model} נמחק בהצלחה","other":"%{count} %{plural_model} נמחק בהצלחה"}},"blank_slate":{"content":"כרגע אין עוד אף %{resource_name}.","link":"צור אחד"},"cancel":"ביטול","comments":{"add":"הוסף תגובה","author":"נוצר ע\"י","body":"תוכן","errors":{"empty_text":"התגובה לא נשמרה, שדה התוכן ריק."},"no_comments_yet":"אין עדיין תגובות.","resource":"Resource","title":"תגובה","title_content":"תגובות (%{count})"},"dashboard":"פנל ניהול","dashboard_welcome":{"call_to_action":"כדי להוסיף אזורים בפנל הניהול, אנא בדוק את, 'app/admin/dashboard.rb'","welcome":"ברוכים הבאים לאקטיב אדמין. זהו פנל הניהול"},"delete":"מחיקה","delete_confirmation":"האם אתה בטוח שאתה רוצה למחוק את זה?","delete_model":"מחיקת %{model}","details":"פרטים על %{model}","devise":{"change_password":{"submit":"שנה את הסיסמא שלי","title":"שנה את הסיסמא שלך"},"links":{"forgot_your_password":"שכחת את הסיסמא שלך?","sign_in":"כניסה","sign_in_with_omniauth_provider":"%{provider} היכנס עם"},"login":{"remember_me":"זכור אותי","submit":"הכנס","title":"כניסה"},"reset_password":{"submit":"אפס את הסיסמא שלי","title":"שכחת סיסמא?"}},"download":"הורד:","dropdown_actions":{"button_label":"פעולו"},"edit":"עריכה","edit_model":"ערוך %{model}","empty":"ריק","filters":{"buttons":{"clear":"איפוס שדות","filter":"סינון"},"predicates":{"contains":"מכיל","ends_with":"מסתיים ב","equals":"שווה ל","greater_than":"גדול מ","less_than":"פחות מ","starts_with":"מתחיל עם"}},"has_many_delete":"מחיקה","has_many_new":"הוספת %{model} חדש","has_many_remove":"להסיר","logout":"התנתקות","main_content":"Please implement %{model}#main_content to display content.","new_model":"%{model} חדש","next":"הבא","pagination":{"empty":"אין %{model} בנמצא","entry":{"one":"רשומה בודדה","other":"רשומות"},"multiple":"מציג %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E מתוך \u003Cb\u003E%{total}\u003C/b\u003E בסך הכל","multiple_without_total":"מציג %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"מציג \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"הצגת \u003Cb\u003Eכל %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"הקודם","sidebars":{"filters":"סינון"},"status_tag":{"no":"לא","yes":"כן"},"view":"צפייה"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"נשלח על ידי קונטקט פורם מאת %{email}","sent_by_name":"נשלח על ידי %{name} מאת %{email}","subject":"צור קשר, הודעה מאת %{email}"}},"contacts":{"new":{"contact_us":"צור קשר","email":"מייל","message":"הודעה","name":"שם","subject":"נושא","submit":"שלח"},"new_formtastic":{"contact_us":"צור קשר","email":"מייל","message":"הודעה","name":"שם","subject":"נושא","submit":"שלח"},"new_simple_form":{"contact_us":"צור קשר","email":"מייל","message":"הודעה","name":"שם","subject":"נושא","submit":"שלח"}},"notices":{"error":"הנך צריך למלא את שתי השדות.","success":"הטופס נשלח בהצלחה."}}});
-I18n.translations["it"] = I18n.extend((I18n.translations["it"] || {}), {"active_admin":{"access_denied":{"message":"Non hai le autorizzazioni necessarie per eseguire questa azione."},"any":"Qualsiasi","batch_actions":{"action_label":"%{title} Selezionati","button_label":"Azioni multiple","default_confirmation":"Sei sicuro di che voler fare questo?","delete_confirmation":"Sei sicuro di volere cancellare %{plural_model}?","labels":{"destroy":"Elimina"},"link":"Crea uno","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Eliminato con successo 1 %{model}","other":"Eliminati con successo %{count} %{plural_model}"}},"blank_slate":{"content":"Non sono presenti %{resource_name}","link":"Crea nuovo/a"},"cancel":"Annulla","comments":{"add":"Aggiungi Commento","author":"Autore","author_missing":"Anonimo","author_type":"Tipo di Autore","body":"Corpo","created_at":"Creato il","delete":"Cancella Commento","delete_confirmation":"Sei sicuro di voler cancellare questo commento?","errors":{"empty_text":"Il commento non può essere salvato, il testo è vuoto."},"no_comments_yet":"Nessun commento.","resource":"Risorsa","resource_type":"Tipo di risorsa","title":"Commento","title_content":"Commenti (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Per aggiungere sezioni alla dashboard controlla il file 'app/admin/dashboard.rb'","welcome":"Benvenuti in Active Admin. Questa è la pagina dashboard di default."},"delete":"Rimuovi","delete_confirmation":"Sei sicuro di volerlo rimuovere?","delete_model":"Rimuovi %{model}","details":"Dettagli %{model}","devise":{"change_password":{"submit":"Cambia la mia password","title":"Cambia la tua password"},"email":{"title":"Email"},"links":{"forgot_your_password":"Dimenticato la password?","resend_confirmation_instructions":"Invia di nuovo le istruzioni per la conferma","resend_unlock_instructions":"Invia di nuovo le istruzioni per lo sblocco","sign_in":"Entra","sign_in_with_omniauth_provider":"Collegati a %{provider}"},"login":{"remember_me":"Ricordami","submit":"Entra","title":"Entra"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Invia di nuovo le istruzioni per la conferma","title":"Invia di nuovo le istruzioni per la conferma"},"reset_password":{"submit":"Reimposta la tua password","title":"Dimenticato la password?"},"sign_up":{"submit":"Iscriviti","title":"Iscriviti"},"subdomain":{"title":"Sottodominio"},"unlock":{"submit":"Invia di nuovo le istruzioni per sbloccare","title":"Invia di nuovo le istruzioni per sbloccare"},"username":{"title":"Nome Utente"}},"download":"Scarica:","dropdown_actions":{"button_label":"Azioni"},"edit":"Modifica","edit_model":"Modifica %{model}","empty":"Vuoto","filters":{"buttons":{"clear":"Rimuovi filtri","filter":"Filtra"},"predicates":{"contains":"Contiene","ends_with":"Finisce con","equals":"Uguale a","greater_than":"Maggiore di","less_than":"Minore di","starts_with":"Inizia con"}},"has_many_delete":"Rimuovi","has_many_new":"Aggiungi nuovo/a %{model}","has_many_remove":"Rimuovi","index_list":{"block":"Lista","blog":"Blog","grid":"Griglia","table":"Tabella"},"logout":"Esci","main_content":"Devi implemetare %{model}#main_content per mostrarne il contenuto.","new_model":"Aggiungi %{model}","next":"Prossimo","pagination":{"empty":"Nessun %{model} trovato","entry":{"one":"voce","other":"voci"},"multiple":"Sto mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E di \u003Cb\u003E%{total}\u003C/b\u003E in totale","multiple_without_total":"Sto mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Sto mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Sto mostrando \u003Cb\u003E%{n}\u003C/b\u003E %{model}. Lista completa."},"powered_by":"Powered by %{active_admin} %{version}","previous":"Precedente","search_status":{"current_filters":"Filtri attivi:","current_scope":"Contesto selezionato:","headline":"Situazione filtri:","no_current_filters":"Nessuno"},"sidebars":{"filters":"Filtri","search_status":"Informazioni sulla ricerca"},"status_tag":{"no":"No","yes":"Sì"},"unsupported_browser":{"headline":"Perfavore, notare che ActiveAdmin non supporta più Internet Explorer 8 o inferiore","recommendation":"Ti raccomandiamo di aggiornare alla versione più recente di \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, o \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Se stai utilizzando Internet Explorer 9 o successivo, assicurati di \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Edisabilitare la \"Modalità Compatibilità\"\u003C/a\u003E."},"view":"Mostra"},"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":{"contact_us":"Contattaci","email":"Email","message":"Messaggio","name":"Name","subject":"Subject","submit":"Inviare"},"new_formtastic":{"contact_us":"Contattaci","email":"Email","message":"Messaggio","name":"Name","subject":"Subject","submit":"Inviare"},"new_simple_form":{"contact_us":"Contattaci","email":"Email","message":"Messaggio","name":"Name","subject":"Subject","submit":"Inviare"}},"notices":{"error":"Devi inserire entrambi i campi.","success":"La mail di contatto è stata inviata."}},"formtastic":{"cancel":"Annulla","create":"Crea %{model}","no":"No","required":"obbligatorio","reset":"Ripristina %{model}","submit":"Invia","update":"Aggiorna %{model}","yes":"Sì"}});
-I18n.translations["pl"] = I18n.extend((I18n.translations["pl"] || {}), {"active_admin":{"any":"Jakikolwiek","batch_actions":{"action_label":"%{title} zaznaczone","button_label":"Akcje na partiach","default_confirmation":"Czy na pewno chcesz to zrobić?","delete_confirmation":"Czy na pewno chcesz usunąć te %{plural_model}?","labels":{"destroy":"Usuń"},"link":"Utwórz jeden","selection_toggle_explanation":"(Przełącz zaznaczenie)","succesfully_destroyed":{"few":"Poprawnie usunięto %{count} %{plural_model}","many":"Poprawnie usunięto %{count} %{plural_model}","one":"Poprawnie usunięto 1 %{model}","other":"Poprawnie usunięto %{count} %{plural_model}"}},"blank_slate":{"content":"Nie ma jeszcze zasobu %{resource_name}.","link":"Utwórz go"},"cancel":"Anuluj","comments":{"add":"Dodaj komentarz","author":"Autor","body":"Treść","errors":{"empty_text":"Komentarz nie został zapisany, zawartość była pusta."},"no_comments_yet":"Nie ma jeszcze komentarzy.","resource":"Zasób","title":"Komentarz","title_content":"Komentarze (%{count})"},"dashboard":"Pulpit","dashboard_welcome":{"call_to_action":"Aby dodać sekcje do pulpitu, sprawdź 'app/admin/dashboard.rb'","welcome":"Witaj w Active Adminie. To jest domyślny pulpit."},"delete":"Usuń","delete_confirmation":"Jesteś pewien, że chcesz to usunąć?","delete_model":"Usuń %{model}","details":"Detale %{model}","devise":{"change_password":{"submit":"Zmień hasło","title":"Zmień hasło"},"links":{"forgot_your_password":"Nie pamiętasz hasła?","sign_in":"Zaloguj się","sign_in_with_omniauth_provider":"Zaloguj się z %{provider}"},"login":{"remember_me":"Zapamiętaj mnie","submit":"Zaloguj się","title":"Logowanie"},"resend_confirmation_instructions":{"submit":"Wyślij ponownie instrukcje aktywacji","title":"Wyślij ponownie instrukcje aktywacji"},"reset_password":{"submit":"Zresetować hasło","title":"Nie pamiętasz hasła?"},"sign_up":{"submit":"Zarejestruj się","title":"Rejestracja"}},"download":"Pobierz:","dropdown_actions":{"button_label":"Akcje"},"edit":"Edytuj","edit_model":"Edytuj %{model}","empty":"Pusty","filters":{"buttons":{"clear":"Wyczyść Filtry","filter":"Filtruj"},"predicates":{"contains":"Zawiera","ends_with":"Kończy się","equals":"Równe","greater_than":"Większe niż","less_than":"Mniejsze niż","starts_with":"Zaczyna się"}},"has_many_delete":"Usuń","has_many_new":"Dodaj nowy %{model}","has_many_remove":"Usuń","logout":"Wyloguj","main_content":"Zaimplementuj %{model}#main_content aby wyświetlić treść.","new_model":"Nowy %{model}","next":"Następna","pagination":{"empty":"Nie znaleziono %{model}","multiple":"Wyświetlanie %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E z \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Wyświetlanie %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Wyświetlanie \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Wyświetlanie \u003Cb\u003Ewszystkich %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Poprzednia","sidebars":{"filters":"Filtry"},"status_tag":{"no":"Nie","yes":"Tak"},"view":"Podgląd"},"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":{"contact_us":"Kontakt z nami","email":"Email","message":"Wiadomość","name":"Imię","subject":"Temat","submit":"Wyślij"},"new_formtastic":{"contact_us":"Kontakt z nami","email":"Email","message":"Wiadomość","name":"Imię","subject":"Temat","submit":"Wyślij"},"new_simple_form":{"contact_us":"Kontakt z nami","email":"Email","message":"Wiadomość","name":"Imię","subject":"Temat","submit":"Wyślij"}},"notices":{"error":"Musisz wypełnić oba pola.","success":"Twój email został wysłany"}},"formtastic":{"create":"Utwórz %{model}","update":"Aktualizuj %{model}"}});
-I18n.translations["pt-BR"] = I18n.extend((I18n.translations["pt-BR"] || {}), {"active_admin":{"access_denied":{"message":"Você não tem permissão para realizar o solicitado"},"any":"Qualquer","batch_actions":{"action_label":"%{title} Selecionado","button_label":"Ações em lote","default_confirmation":"Tem certeza que quer fazer isso?","delete_confirmation":"Tem certeza que deseja excluir estes %{plural_model}?","labels":{"destroy":"Excluir"},"link":"Novo","selection_toggle_explanation":"(Alternar Seleção)","succesfully_destroyed":{"one":"Excluiu com sucesso 1 %{model}","other":"Excluiu com sucesso %{count} %{plural_model}"}},"blank_slate":{"content":"Não existem %{resource_name} ainda.","link":"Novo"},"cancel":"Cancelar","comments":{"add":"Adicionar Comentário","author":"Autor","author_missing":"Anônimo","author_type":"Tipo de Autor","body":"Conteúdo","created_at":"Criado em","delete":"Deletar comentário","delete_confirmation":"Tem certeza que deseja excluir este comentário?","errors":{"empty_text":"O comentário não foi salvo porque o texto estava vazio."},"no_comments_yet":"Nenhum comentário.","resource":"Objeto","resource_type":"Tipo de Objeto","title":"Comentário","title_content":"Comentários: %{count}"},"dashboard":"Painel Administrativo","dashboard_welcome":{"call_to_action":"Para adicionar seções ao painel, verifique 'app/admin/dashboard.rb'","welcome":"Bem vindo ao Active Admin. Esta é a página de painéis padrão."},"delete":"Remover","delete_confirmation":"Você tem certeza que deseja remover este item?","delete_model":"Remover %{model}","details":"Detalhes do(a) %{model}","devise":{"change_password":{"submit":"Troque minha senha","title":"Troque sua senha"},"email":{"title":"E-mail"},"links":{"forgot_your_password":"Esqueceu sua senha?","resend_confirmation_instructions":"Reenviar instruções de confirmação","resend_unlock_instructions":"Reenviar instruções de desbloqueio","sign_in":"Entrar","sign_in_with_omniauth_provider":"Entre com o %{provider}","sign_up":"Criar conta"},"login":{"remember_me":"Lembrar da senha","submit":"Entrar","title":"Conta"},"password":{"title":"Senha"},"resend_confirmation_instructions":{"submit":"Reenviar instruções de confirmação","title":"Reenviar instruções de confirmação"},"reset_password":{"submit":"Reinicie minha senha","title":"Esqueceu sua senha?"},"sign_up":{"submit":"Continuar","title":"Cadastre-se"},"subdomain":{"title":"Subdomínio"},"unlock":{"submit":"Reenviar instruções de desbloqueio","title":"Reenviar instruções de desbloqueio"},"username":{"title":"Nome de Usuário"}},"download":"Baixar:","dropdown_actions":{"button_label":"Ações"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vazio","filters":{"buttons":{"clear":"Limpar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contém","ends_with":"Termina com","equals":"Igual A","greater_than":"Maior Que","less_than":"Menor Que","starts_with":"Começa com"}},"has_many_delete":"Remover","has_many_new":"Adicionar Novo(a) %{model}","has_many_remove":"Remover","index_list":{"block":"Lista","blog":"Blog","grid":"Grid","table":"Tabela"},"logout":"Sair","main_content":"Por favor implemente %{model}#main_content para exibir conteúdo.","new_model":"Novo(a) %{model}","next":"Próximo","pagination":{"empty":"Nenhum(a) %{model} encontrado(a)","entry":{"one":"registro","other":"registros"},"multiple":"Exibindo %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de um total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Exibindo %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Exibindo \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Exibindo \u003Cb\u003Etodos(as) os(as) %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","search_status":{"current_filters":"Filtros escolhidos:","current_scope":"Em:","headline":"Buscou:","no_current_filters":"Nenhum"},"sidebars":{"filters":"Filtros","search_status":"Buscou"},"status_tag":{"no":"Não","yes":"Sim"},"unsupported_browser":{"headline":"O ActiveAdmin não oferece suporte ao Internet Explorer versão 8 ou inferior.","recommendation":"Nós recomendamos atualizar para a última versão do \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, ou \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Se você está usando o IE 9 ou superior, \u003Ca href=\"http://windows.microsoft.com/pt-BR/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Edesligue o \"Modo de Exibição de Compatibilidade\"\u003C/a\u003E."},"view":"Visualizar"},"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":{"contact_us":"Contate-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_formtastic":{"contact_us":"Contate-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_simple_form":{"contact_us":"Contate-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"}},"notices":{"error":"Você tem de preencher ambos os campos.","success":"Email de contato foi enviado com sucesso."}},"formtastic":{"cancel":"Cancelar %{model}","create":"Criar %{model}","no":"Não","required":"obrigatório","reset":"Voltar %{model}","submit":"Salvar %{model}","update":"Atualizar %{model}","yes":"Sim"}});
-I18n.translations["pt-PT"] = I18n.extend((I18n.translations["pt-PT"] || {}), {"active_admin":{"any":"Qualquer","batch_actions":{"action_label":"%{title} Selecionado","button_label":"Ações em quantidade","default_confirmation":"Tem a certeza que quer fazer isso?","delete_confirmation":"Tem a certeza de que deseja excluir estes %{plural_model}?","labels":{"destroy":"Excluir"},"link":"Novo","selection_toggle_explanation":"(Alternar Seleção)","succesfully_destroyed":{"one":"Excluiu com sucesso 1 %{model}","other":"Excluiu com sucesso %{count} %{plural_model}"}},"blank_slate":{"content":"Ainda não existem %{resource_name}.","link":"Novo"},"cancel":"Cancelar","comments":{"add":"Adicionar Comentário","author":"Autor","body":"Conteúdo","errors":{"empty_text":"O comentário não foi guardado porque o texto estava vazio."},"no_comments_yet":"Nenhum comentário.","resource":"Objeto","title":"Comentário","title_content":"Comentários: %{count}"},"dashboard":"Painel de Administração","dashboard_welcome":{"call_to_action":"Se pretende adicionar seções ao painel, consulte 'app/admin/dashboard.rb'","welcome":"Bem-vindo ao Active Admin. Esta é a página padrão."},"delete":"Remover","delete_confirmation":"Não tem a certeza de que deseja remover este ítem?","delete_model":"Remover %{model}","details":"Detalhes do(a) %{model}","devise":{"change_password":{"submit":"Trocar a minha senha","title":"Troque a sua senha"},"links":{"forgot_your_password":"Esqueceu-se da sua senha?","sign_in":"Entrar","sign_in_with_omniauth_provider":"Entre com o %{provider}"},"login":{"remember_me":"Lembrar-me","submit":"Entrar","title":"Conta"},"reset_password":{"submit":"Reiniciar a minha senha","title":"Esqueceu-de da sua senha?"}},"download":"Baixar:","dropdown_actions":{"button_label":"Ações"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vazio","filters":{"buttons":{"clear":"Limpar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contém","ends_with":"Termina com","equals":"Igual A","greater_than":"Maior Que","less_than":"Menor Que","starts_with":"Começa com"}},"has_many_delete":"Remover","has_many_new":"Adicionar Novo(a) %{model}","has_many_remove":"Remover","logout":"Sair","main_content":"Por favor implemente %{model}#main_content para mostrar o conteúdo.","new_model":"Novo(a) %{model}","next":"Próximo","pagination":{"empty":"Nenhum(a) %{model} encontrado(a)","entry":{"one":"registro","other":"registros"},"multiple":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de um total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Mostrando \u003Cb\u003Etodos(as) os(as) %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","sidebars":{"filters":"Filtros"},"status_tag":{"no":"Não","yes":"Sim"},"view":"Visualizar"},"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":{"contact_us":"Contacte-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_formtastic":{"contact_us":"Contacte-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_simple_form":{"contact_us":"Contacte-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"}},"notices":{"error":"Tem de preencher ambos os campos.","success":"Email de contacto foi enviado com sucesso."}}});
-I18n.translations["ru"] = I18n.extend((I18n.translations["ru"] || {}), {"active_admin":{"access_denied":{"message":"Вы не авторизованы для выполнения данного действия."},"any":"Любой","batch_actions":{"action_label":"%{title} выбранное","button_label":"Групповые операции","default_confirmation":"Вы уверены, что вы хотите это сделать?","delete_confirmation":"Вы уверены, что хотите удалить %{plural_model}?","labels":{"destroy":"Удалить"},"link":"Создать","selection_toggle_explanation":"(Отметить всё / Снять выделение)","succesfully_destroyed":{"few":"Успешно удалено: %{count} %{plural_model}","many":"Успешно удалено: %{count} %{plural_model}","one":"Успешно удалено: 1 %{model}","other":"Успешно удалено: %{count} %{plural_model}"}},"blank_slate":{"content":"Пока нет %{resource_name}.","link":"Создать"},"cancel":"Отмена","comments":{"add":"Добавить Комментарий","author":"Автор","author_missing":"Аноним","author_type":"Тип автора","body":"Текст","delete":"Удалить Комментарий","delete_confirmation":"Вы уверены, что хотите удалить этот комментарий?","errors":{"empty_text":"Комментарий не сохранен, текст не должен быть пустым."},"no_comments_yet":"Пока нет комментариев.","resource":"Ресурс","resource_type":"Тип ресурса","title":"Комментарий","title_content":"Комментарии (%{count})"},"dashboard":"Панель управления","dashboard_welcome":{"call_to_action":"Чтобы добавить сюда что-нибудь загляните в 'app/admin/dashboard.rb'","welcome":"Добро пожаловать в Active Admin. Это стандартная страница управления сайтом."},"delete":"Удалить","delete_confirmation":"Вы уверены, что хотите удалить это?","delete_model":"Удалить %{model}","details":"%{model} подробнее","devise":{"change_password":{"submit":"Изменение пароля","title":"Изменение пароля"},"email":{"title":"Эл. почта"},"links":{"forgot_your_password":"Забыли пароль?","resend_confirmation_instructions":"Повторная отправка инструкций подтверждения","resend_unlock_instructions":"Повторная отправка инструкций разблокировки","sign_in":"Войти","sign_in_with_omniauth_provider":"Войти с помощью %{provider}","sign_up":"Зарегистрироваться"},"login":{"remember_me":"Запомнить меня","submit":"Войти","title":"Войти"},"password":{"title":"Пароль"},"resend_confirmation_instructions":{"submit":"Выслать повторно письмо с активацией","title":"Выслать повторно письмо с активацией"},"reset_password":{"submit":"Сбросить пароль","title":"Забыли пароль?"},"sign_up":{"submit":"Зарегистрироваться","title":"Зарегистрироваться"},"subdomain":{"title":"Поддомен"},"unlock":{"submit":"Повторно отправить инструкции по разблокировке","title":"Повторно отправить инструкции по разблокировке"},"username":{"title":"Имя пользователя"}},"download":"Загрузка:","dropdown_actions":{"button_label":"Oперации"},"edit":"Изменить","edit_model":"Изменить %{model}","empty":"Пусто","filters":{"buttons":{"clear":"Очистить","filter":"Фильтровать"},"predicates":{"contains":"Содержит","ends_with":"Заканчивается","equals":"Равно","greater_than":"больше","less_than":"меньше","starts_with":"Начинается с"}},"has_many_delete":"Удалить","has_many_new":"Добавить %{model}","has_many_remove":"Убрать","index_list":{"block":"Список","blog":"Блог","grid":"Сетка","table":"Таблица"},"logout":"Выйти","main_content":"Создайте %{model}#main_content для отображения содержимого.","new_model":"Создать %{model}","next":"След.","pagination":{"empty":"%{model} не найдено","entry":{"few":"записи","many":"записей","one":"запись","other":"записей"},"multiple":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E из \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Результат: \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Результат: \u003Cb\u003E%{n}\u003C/b\u003E %{model}"},"powered_by":"Работает на %{active_admin} %{version}","previous":"Пред.","search_status":{"current_filters":"Текущий фильтр:","current_scope":"Область:","headline":"Статус поиска:","no_current_filters":"Ни один"},"sidebars":{"filters":"Фильтры","search_status":"Статус поиска"},"status_tag":{"no":"Нет","yes":"Да"},"unsupported_browser":{"headline":"Пожалуйста, обратите внимание, что Active Admin больше не поддерживает старые версии Internet Explorer начиная с версии IE 8","recommendation":"Мы рекомендуем обновить версию вашего браузера (\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, или \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E).","turn_off_compatibility_view":"Если вы используете IE 9 или новее, убедитесь, что \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eвы выключили опцию \"Просмотр в режиме совместимости\"\u003C/a\u003E."},"view":"Открыть"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"Отправлено через контактную форму через %{email}","sent_by_name":"Отправлено от %{name} через %{email}","subject":"Контактное сообщение от %{email}"}},"contacts":{"new":{"contact_us":"Свяжитесь с Нами","email":"Электронная Почта","message":"Сообщение","name":"Имя","subject":"Тематика","submit":"Отправить"},"new_formtastic":{"contact_us":"Свяжитесь с Нами","email":"Электронная Почта","message":"Сообщение","name":"Имя","subject":"Тематика","submit":"Отправить"},"new_simple_form":{"contact_us":"Свяжитесь с Нами","email":"Электронная Почта","message":"Сообщение","name":"Имя","subject":"Тематика","submit":"Отправить"}},"notices":{"error":"Вы должны заполнить оба поля.","success":"Контактное сообщение отправлено."}}});
-I18n.translations["ca"] = I18n.extend((I18n.translations["ca"] || {}), {"active_admin":{"access_denied":{"message":"No esta autoritzat a realitzar aquesta acció."},"any":"Qualsevol","batch_actions":{"action_label":"%{title} seleccionat","button_label":"les accions per lots","default_confirmation":"¿Esteu segur que voleu fer-ho?","delete_confirmation":"¿Està segur que desitja eliminar aquests %{plural_model}?","labels":{"destroy":"esborrar"},"link":"crear una","selection_toggle_explanation":"(Selecció de Canviar)","succesfully_destroyed":{"one":"Va destruir amb èxit 1 %{model}","other":"Va destruir amb èxit %{count} %{plural_model}"}},"blank_slate":{"content":"Encara no hi ha cap %{resource_name}.","link":"Crea'n un/a"},"cancel":"Cancel·lar","comments":{"add":"Afegeix comentari","author":"autor","body":"Cos","errors":{"empty_text":"El comentari no es va salvar, el text estava buida."},"no_comments_yet":"No hi ha comentaris","resource":"Recurs","title":"comentari","title_content":"comentaris (%{count})"},"dashboard":"Tauler","dashboard_welcome":{"call_to_action":"Mira l'arxiu 'app/admin/dashboard.rb' per afegir seccions al tauler","welcome":"Benvingut a Active Admin. Aquest és el tauler per defecte."},"delete":"Elimina","delete_confirmation":"Segur que vols eliminar-ho?","delete_model":"eliminar %{model}","details":"Detalls de %{model}","devise":{"change_password":{"submit":"Canviar la contrasenya","title":"Canvieu la contrasenya"},"links":{"forgot_your_password":"Heu perdut la contrasenya?","sign_in":"Registrar","sign_in_with_omniauth_provider":"Connecta't amb %{provider}"},"login":{"remember_me":"Recordar","submit":"iniciar sessió","title":"iniciar sessió"},"resend_confirmation_instructions":{"submit":"Reenviar instruccions de confirmació","title":"Reenviar instruccions de confirmació"},"reset_password":{"submit":"Restablir la contrasenya","title":"Heu perdut la contrasenya?"},"unlock":{"submit":"Reenvia instruccions per a desbloquejar","title":"Reenvia instruccions per a desbloquejar"}},"download":"Descarregar:","dropdown_actions":{"button_label":"accions"},"edit":"Edita","edit_model":"Editar %{model}","empty":"Buit","filters":{"buttons":{"clear":"Treure filtres","filter":"Filtrar"},"predicates":{"contains":"Conté","ends_with":"Acaba amb","equals":"Igual a","greater_than":"Més gran que","less_than":"Més petit que","starts_with":"Comença amb"}},"has_many_delete":"Eliminar","has_many_new":"Afegir %{model}","has_many_remove":"Treure","index_list":{"block":"Llista","blog":"Bloc","grid":"Graella","table":"Taula"},"logout":"Desconnecta't","main_content":"Implementa %{model}#main_content per mostrar contingut.","new_model":"Crear %{model}","next":"Següent","pagination":{"empty":"No hi ha %{model}","entry":{"one":"entrada","other":"entrades"},"multiple":"S'estan mostrant %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de \u003Cb\u003E%{total}\u003C/b\u003E en total","multiple_without_total":"S'estan mostrant %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"S'està mostrant \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"S'estan mostrant \u003Cb\u003Etots %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","sidebars":{"filters":"Filtres"},"status_tag":{"no":"No","yes":"Sí"},"view":"Mostra"},"formtastic":{"cancel":"Cancel·lar","create":"Crear %{model}","no":"No","required":"obligatori","reset":"Restablir %{model}","submit":"Acceptar","update":"Actualitzar %{model}","yes":"Sí"}});
-I18n.translations["pt"] = I18n.extend((I18n.translations["pt"] || {}), {"formtastic":{"cancel":"Cancelar %{model}","create":"Criar %{model}","no":"Não","required":"obrigatório","reset":"Resetar %{model}","submit":"Salvar %{model}","update":"Atualizar %{model}","yes":"Sim"}});
-I18n.translations["zh-CN"] = I18n.extend((I18n.translations["zh-CN"] || {}), {"active_admin":{"access_denied":{"message":"您无权处理此操作"},"any":"任何","batch_actions":{"action_label":"%{title} 被选中","button_label":"批处理","default_confirmation":"你确定你要这样做?","delete_confirmation":"你确定要删除所有%{plural_model}?","labels":{"destroy":"删除"},"link":"新建一个","selection_toggle_explanation":"(切换选择)","succesfully_destroyed":{"one":"成功删除 1 %{model}","other":"成功删除 %{count} %{plural_model}"}},"blank_slate":{"content":"暂时还没有%{resource_name}.","link":"新建一个"},"cancel":"取消","comments":{"add":"添加评论","author":"作者","body":"内容","errors":{"empty_text":"评论保存失败,内空不能为空."},"no_comments_yet":"暂时没有评论","resource":"资源","title":"评论","title_content":"(%{count})条评论"},"dashboard":"控制面板","dashboard_welcome":{"call_to_action":"若要添加新的面板内容, 请修改 'app/admin/dashboard.rb'","welcome":"欢迎使用Active Admin. 这是默认的控制面板页."},"delete":"删除","delete_confirmation":"确定删除?","delete_model":"删除%{model}","details":"%{model}详情","devise":{"email":{"title":"邮箱"},"links":{"forgot_your_password":"忘记了密码?","sign_in":"登录","sign_in_with_omniauth_provider":"登入%{provider}"},"login":{"remember_me":"记住我","submit":"登录","title":"登录"},"password":{"title":"密码"},"resend_confirmation_instructions":{"submit":" 重新发送确认指示","title":" 重新发送确认指示"},"reset_password":{"submit":"重置我的密码","title":"忘记了密码?"},"subdomain":{"title":"子域"},"unlock":{"submit":"重新发送送解锁命令","title":"重新发送送解锁命令"},"username":{"title":"用户名"}},"download":"下载:","dropdown_actions":{"button_label":"行动"},"edit":"编辑","edit_model":"编辑%{model}","empty":"清空","filters":{"buttons":{"clear":"清除条件","filter":"过滤"},"predicates":{"contains":"包含","ends_with":"完与","equals":"等于","greater_than":"大于","less_than":"小于","starts_with":"开头"}},"has_many_delete":"删除","has_many_new":"新建一个%{model}","has_many_remove":"清除","logout":"退出","main_content":"请执行 %{model}#main_content 来显示内容.","new_model":"新建%{model}","next":"下一个","pagination":{"empty":"暂时没有%{model}","entry":{"one":"条目","other":"条目"},"multiple":"显示所有 \u003Cb\u003E%{total}\u003C/b\u003E %{model}中的\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 条","multiple_without_total":"%{model}中的\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 条","one":"显示 \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"显示 \u003Cb\u003E所有 %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"上一个","search_status":{"current_filters":"过滤条件:","current_scope":"搜索范围:","headline":"搜索条件:","no_current_filters":"无"},"sidebars":{"filters":"所有条件","search_status":"搜索条件"},"status_tag":{"no":"无","yes":"是的"},"view":"查看"},"formtastic":{"cancel":"取消","create":"新建%{model}","no":"NO","required":"必须的","reset":"重置%{model}","submit":"确认","update":"更新%{model}","yes":"YES"}});
-I18n.translations["ar"] = I18n.extend((I18n.translations["ar"] || {}), {"active_admin":{"access_denied":{"message":"لم يُصرّح لك بهذا الإجراء."},"any":"أي","batch_actions":{"action_label":"اُختير %{title}","button_label":"إجراءات متعددة","default_confirmation":"هل أنت متأكّد؟","delete_confirmation":"هل أنت متأكّد من حذف هذه %{plural_model}؟","labels":{"destroy":"حذف"},"link":"إنشاء","selection_toggle_explanation":"(تتبيث الخيار)","succesfully_destroyed":{"one":"حُذف بنجاح 1 %{model}","other":"حُذف بنجاح %{count} %{plural_model}"}},"blank_slate":{"content":"لايوجد %{resource_name} بعد.","link":"إنشاء"},"cancel":"إلغاء","comments":{"add":"إضافة تعليق","author":"مؤلّف","author_missing":"مجهول","author_type":"نوع الؤلّف","body":"هيكل","created_at":"أُنشئ","delete":"حذف تعليق","delete_confirmation":"هل أنت متأكّد من حذف هذه التعليقات؟","errors":{"empty_text":"لم يُحفظ التعليق، النص فارغ."},"no_comments_yet":"لا يوجد تعليقات بعد.","resource":"مصدر","resource_type":"نوع المصدر","title":"تعليق","title_content":"تعليقات (%{count})"},"dashboard":"لوحة تحكم","dashboard_welcome":{"call_to_action":"لإضافة أقسام إلى لوحة التحكم, راجع: 'app/admin/dashboard.rb'","welcome":"مرحبًا بك في في صفحة الإدارة، وهذه هي الصفحة الإفتراضيّة."},"delete":"حذف","delete_confirmation":"هل تريد تأكيد الحذف؟","delete_model":"حذف %{model}","details":"تفاصيل %{model}","devise":{"change_password":{"submit":"تغير كلمة المرور خاصتي","title":"تغير كلمة المرور خاصتك"},"email":{"title":"البريد الإلكترونيّ"},"links":{"forgot_your_password":"هل نسيت كلمة المرور؟","resend_confirmation_instructions":"إعادة إرسال تعليمات تأكيد الحساب","resend_unlock_instructions":"إعادة إرسال تعليمات تنشيط الحساب","sign_in":"دخول","sign_in_with_omniauth_provider":"تسجيل الدخول بـ %{provider}","sign_up":"التسجيل"},"login":{"remember_me":"تذكرني","submit":"تسحيل","title":"دخول"},"password":{"title":"كلمة المرور"},"resend_confirmation_instructions":{"submit":"إعادة ارسال تعليمات التأكيد","title":"إعادة ارسال تعليمات التأكيد"},"reset_password":{"submit":"استرجاع كلمة المرور","title":"هل نسيت كلمة المرور؟"},"sign_up":{"submit":"تسجيل الدخول","title":"تسجيل الدخول"},"subdomain":{"title":"مجال فرعي"},"unlock":{"submit":"إعادة إرسال تعليمات فك الحظر","title":"إعادة إرسال تعليمات فك الحظر"},"username":{"title":"اسم المستخدم"}},"download":"تحميل","dropdown_actions":{"button_label":"إجراءات"},"edit":"تعديل","edit_model":"تعديل %{model}","empty":"فارغ","filters":{"buttons":{"clear":"تفريغ التصفية","filter":"تصفية"},"predicates":{"contains":"يحتوي","ends_with":"ينتهي بـ","equals":"متساوي","greater_than":"أكبر من","less_than":"أقل من","starts_with":"يبدأ بـ"}},"has_many_delete":"حذف","has_many_new":"إضافة %{model} جديد","has_many_remove":"إزالة","index_list":{"block":"قائمة","blog":"مدونة","grid":"شبكة","table":"جدول"},"logout":"تسجيل الخروج","main_content":"الرجاء تنفيذ %{model}#main_content لعرض المحتوى.","new_model":"جديد %{model}","next":"التالي","pagination":{"empty":"لا يوجد %{model} ","entry":{"one":"مدخل","other":"مدخلات"},"multiple":"عرض %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E من \u003Cb\u003E%{total}\u003C/b\u003E بالمجمل","multiple_without_total":"عرض %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"عرض \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"عرض \u003Cb\u003Eall %{n}\u003C/b\u003E %{model}"},"powered_by":"تنفيذ %{active_admin} %{version}","previous":"السابق","search_status":{"current_filters":"المُرشحات الحاليّة:","current_scope":"المجال:","headline":"حالات البحث:","no_current_filters":"بدون"},"sidebars":{"filters":"المُرشحات","search_status":"حالات البحث"},"status_tag":{"no":"لا","yes":"نعم"},"unsupported_browser":{"headline":"يُرجى مُلاحظة أن (أكتف أدمن) لم تعد تدعم المُتصفّح إنترنت اكسبلوررالإصدار الثامن وما قبله","recommendation":"ننصح بالتحديث إلى الإصدارات الأخيرة من: \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, أو \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"إن كنت تستخدم الإصدار التاسع وما يليه من إنترنت إكسبلورر تأكّد من \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eتعطيل \"Compatibility View\"\u003C/a\u003E."},"view":"عرض"}});
-I18n.translations["bg"] = I18n.extend((I18n.translations["bg"] || {}), {"active_admin":{"access_denied":{"message":"Нямате права да извършите това действие."},"any":"Без значение","batch_actions":{"action_label":"%{title} избран","button_label":"Масови действия","default_confirmation":"Наистина ли искате да направите това?","delete_confirmation":"Сигурни ли сте, че искате да изтриете тези %{plural_model}?","labels":{"destroy":"Изтриване"},"link":"Създаване","selection_toggle_explanation":"(Инвертиране на маркирането)","succesfully_destroyed":{"one":"Успешно изтриване на 1 %{model}","other":"Успешно изтриване на %{count} %{plural_model}"}},"blank_slate":{"content":"Все още няма добавени %{resource_name}.","link":"Създаване"},"cancel":"Отказ","comments":{"add":"Добавяне на коментар","author":"Автор","author_missing":"Анонимен","author_type":"Тип автор","body":"Текст","errors":{"empty_text":"Коментарът с празен текст не беше запазен."},"no_comments_yet":"Все още няма коментари.","resource":"Ресурс","resource_type":"Тип ресурс","title":"Коментар","title_content":"Коментари (%{count})"},"dashboard":"Табло","dashboard_welcome":{"call_to_action":"За да добавите секции, редактирайте 'app/admin/dashboard.rb'","welcome":"Добре дошли в Active Admin. Това е таблото по подразбиране."},"delete":"Изтриване","delete_confirmation":"Сигурни ли сте, че искате да изтриете това?","delete_model":"Изтриване на %{model}","details":"%{model} детайли","devise":{"change_password":{"submit":"Промяна на паролата","title":"Промяна на паролата"},"email":{"title":"Поща"},"links":{"forgot_your_password":"Забравена парола?","sign_in":"Вход","sign_in_with_omniauth_provider":"Влез с %{provider}"},"login":{"remember_me":"Запомни ме","submit":"Вход","title":"Вход"},"password":{"title":"Парола"},"resend_confirmation_instructions":{"submit":"Изпрати отново инструкциите за потвърждаване","title":"Изпрати отново инструкциите за потвърждаване"},"reset_password":{"submit":"Изпращане на нова парола","title":"Забравена парола?"},"sign_up":{"submit":"Регистрация","title":"Регистрация"},"subdomain":{"title":"Поддомейн"},"unlock":{"submit":"Изпрати отново инструкциите за отключване","title":"Изпрати отново инструкциите за отключване"},"username":{"title":"Потребителско име"}},"download":"Изтегляне:","dropdown_actions":{"button_label":"действия"},"edit":"Редакция","edit_model":"Редакция на %{model}","empty":"Празно","filters":{"buttons":{"clear":"Изчистване","filter":"Филтриране"},"predicates":{"contains":"съдържа","ends_with":"Завършва с","equals":"равно на","greater_than":"по-голямо от","less_than":"по-малко от","starts_with":"Започва с"}},"has_many_delete":"Изтриване","has_many_new":"Добавяне на %{model}","has_many_remove":"Премахване","index_list":{"block":"Списък","blog":"Блог","grid":"Грид","table":"Таблица"},"logout":"Изход","main_content":"Добавете %{model}#main_content за да видите съдържание.","new_model":"Създаване на %{model}","next":"Следващо","pagination":{"empty":"Не са намерени %{model}","entry":{"one":"запис","other":"записи"},"multiple":"Показване %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E от общо \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Показване %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Показване на \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Показване на \u003Cb\u003Eвсички %{n}\u003C/b\u003E %{model}"},"powered_by":"Задвижва се от %{active_admin} %{version}","previous":"Предишно","sidebars":{"filters":"Филтри"},"status_tag":{"no":"не","yes":"Да"},"view":"Преглед"}});
-I18n.translations["bs"] = I18n.extend((I18n.translations["bs"] || {}), {"active_admin":{"access_denied":{"message":"Nemaš dopuštenja."},"any":"Bilo koji","batch_actions":{"action_label":"%{title} označene","button_label":"Grupne akcije","default_confirmation":"Jeste li sigurni da želite to učiniti?","delete_confirmation":"Jeste li sigurni da želite obrisati %{plural_model}?","labels":{"destroy":"Obriši"},"link":"Izradi jedan","selection_toggle_explanation":"(Izmijeni odabir)","succesfully_destroyed":{"few":"Uspješno su obrisana %{count} %{plural_model}","many":"Uspješno je obrisano %{count} %{plural_model}","one":"Uspješno je obrisan 1 %{model}","other":"Uspješno je obrisano %{count} %{plural_model}"}},"blank_slate":{"content":"Još uvijek ne postoji niti jedan zapis tipa %{resource_name}.","link":"Izradi jedan"},"cancel":"Odustani","comments":{"add":"Dodaj komentar","author":"Autor","author_missing":"Anoniman","author_type":"Tip autora","body":"Sadržaj","errors":{"empty_text":"Komentar nije spremljen, sadržaj je prazan."},"no_comments_yet":"Još nema komentara.","resource":"Objekt","resource_type":"Tip objekta","title":"Komentar","title_content":"Komentari (%{count})"},"dashboard":"Upravljačka ploča","dashboard_welcome":{"call_to_action":"Da biste dodali nove odjeljke na upravljačku ploču, pogledajte 'app/admin/dashboard.rb'","welcome":"Dobrodošli u Active Admin. Ovo je početna upravljačka ploča."},"delete":"Obriši","delete_confirmation":"Jeste li sigurni da želite ovo obrisati?","delete_model":"Obriši %{model}","details":"%{model} detalji","devise":{"change_password":{"submit":"Izmijeni lozinku","title":"Izmjena lozinke"},"email":{"title":"Email"},"links":{"forgot_your_password":"Zaboravljena lozinka?","sign_in":"Prijavi se","sign_in_with_omniauth_provider":"Prijavite se za %{provider}"},"login":{"remember_me":"Zapamti me","submit":"Prijavi se","title":"Prijava"},"password":{"title":"Lozinka"},"resend_confirmation_instructions":{"submit":"Pošalji","title":"Ponovno slanje uputstva za potvrdu"},"reset_password":{"submit":"Resetuj lozinku","title":"Zaboravljena lozinka?"},"sign_up":{"submit":"Registruj","title":"Registracija"},"subdomain":{"title":"Poddomena"},"unlock":{"submit":"Pošalji","title":"Ponovno slanje uputstva za otključavanje"},"username":{"title":"Korisničko ime"}},"download":"Spremi na računalo:","edit":"Uredi","edit_model":"Uredi %{model}","empty":"Prazno","filters":{"buttons":{"clear":"Ukloni filtere","filter":"Filtriraj"},"predicates":{"contains":"Sadrži","ends_with":"Završava sa","equals":"Jednako","greater_than":"Veće od","less_than":"Manje od","starts_with":"počinje s"}},"has_many_delete":"Obriši","has_many_new":"Dodaj novi %{model}","has_many_remove":"Ukloniti","index_list":{"block":"Lista","blog":"Blog","grid":"Rešetka","table":"Tabela"},"logout":"Odjavi se","main_content":"Molim Vas, implementirajte %{model}#main_content da biste prikazali sadržaj.","new_model":"Novi %{model}","next":"Sljedeći","pagination":{"empty":"Nije pronađen niti jedan %{model}.","entry":{"few":"zapisa","many":"zapisa","one":"zapis","other":"zapisa"},"multiple":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E od ukupno \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Prikazan \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Prikazano \u003Cb\u003Esvih %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Prethodni","sidebars":{"filters":"Filtriranje"},"status_tag":{"no":"Nema","yes":"Da"},"view":"Pregledaj"}});
-I18n.translations["da"] = I18n.extend((I18n.translations["da"] || {}), {"active_admin":{"access_denied":{"message":"Du har ikke rettigheder til at udføre denne handling."},"any":"Alle","batch_actions":{"action_label":"%{title} Valgte","button_label":"Batch Handlinger","default_confirmation":"Er du sikker på du vil gøre dette?","delete_confirmation":"Er du sikker på du vil slette disse %{plural_model}?","labels":{"destroy":"Slet"},"link":"Opret en","selection_toggle_explanation":"(Skift Selection)","succesfully_destroyed":{"one":"Vellykket ødelagt 1 %{model}","other":"Vellykket ødelagt %{count} %{plural_model}"}},"blank_slate":{"content":"Der er ingen %{resource_name} endnu.","link":"Opret"},"cancel":"Fortryd","comments":{"add":"Tilføj Kommentar","author":"forfatter","author_type":"forfatter type","body":"krop","errors":{"empty_text":"Kommentar blev ikke gemt, tekst var tom."},"no_comments_yet":"Ingen kommentarer endnu.","resource":"Resource","resource_type":"resource type","title":"Kommentar","title_content":"Kommentarer (%{count})"},"dashboard":"Kontrolpanel","dashboard_welcome":{"call_to_action":"Rediger 'app/admin/dashboard.rb' for at tilføje nye elementer til oversigtssiden.","welcome":"Velkommen til Active Admin. Dette er standardoversigtssiden."},"delete":"Slet","delete_confirmation":"Er du sikker på at du ønsker at slette?","delete_model":"Slet %{model}","details":"%{model} detaljer","devise":{"change_password":{"submit":"Skift min adgangskode","title":"Skift din adgangskode"},"links":{"forgot_your_password":"Glemt din adgangskode?","sign_in":"Log ind","sign_in_with_omniauth_provider":"Log ind med %{provider}"},"login":{"remember_me":"Husk mig","submit":"Login","title":"Login"},"reset_password":{"submit":"Nulstille min adgangskode","title":"Glemt din adgangskode?"},"unlock":{"submit":"Send oplåsnings instruktioner igen","title":"Send oplåsnings instruktioner igen"}},"download":"Download:","dropdown_actions":{"button_label":"Handlinger"},"edit":"Rediger","edit_model":"Rediger %{model}","empty":"Tom","filters":{"buttons":{"clear":"Ryd filtre","filter":"Filtrer"},"predicates":{"contains":"Indeholder","ends_with":"Slutter med","equals":"lig","greater_than":"større end","less_than":"mindre end","starts_with":"Begynder med"}},"has_many_delete":"Slet","has_many_new":"Tilføj ny(t) %{model}","has_many_remove":"Fjern","index_list":{"block":"Liste","blog":"Blog","grid":"Gitter","table":"Tabel"},"logout":"Log ud","main_content":"Implementer venligst %{model}#main_content for at vise noget indhold.","new_model":"Ny(t) %{model}","next":"Næste","pagination":{"empty":"Ingen %{model} fundet","entry":{"one":"post","other":"poster"},"multiple":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E af \u003Cb\u003E%{total}\u003C/b\u003E i alt","multiple_without_total":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Viser \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Viser \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Forrige","sidebars":{"filters":"Filtre"},"status_tag":{"no":"Nej","yes":"Ja"},"view":"Vis"}});
-I18n.translations["de-CH"] = I18n.extend((I18n.translations["de-CH"] || {}), {"active_admin":{"any":"Alle","batch_actions":{"action_label":"%{title} ausgewählte","button_label":"Stapelverarbeitung","default_confirmation":"Bist du sicher, dass Sie dies tun wollen?","delete_confirmation":"Sind Sie sicher dass sie diese %{plural_model} löschen wollen?","labels":{"destroy":"Lösche"},"link":"erstellen","selection_toggle_explanation":"(Auswahl umschalten)","succesfully_destroyed":{"one":"Erfolgreich 1 %{model} gelöscht","other":"Erfolgreich %{count} %{plural_model} gelöscht"}},"blank_slate":{"content":"Es gibt noch keine %{resource_name}.","link":"Erstellen"},"cancel":"Abbrechen","comments":{"add":"Kommentar hinzufügen","author":"Autor","body":"Inhalt","delete":"Löschen","delete_confirmation":"Sind Sie sicher dass sie diesen Kommentar löschen wollen?","errors":{"empty_text":"Der Kommentar wurde nicht gespeichert, da der Text fehlt."},"no_comments_yet":"Es gibt noch keine Kommentare.","resource":"Resource","title":"Kommentar","title_content":"Kommentare (%{count})"},"dashboard":"Übersicht","dashboard_welcome":{"call_to_action":"Siehe 'app/admin/dashboards.rb', um Übersichts-Bereiche hinzuzufügen.","welcome":"Willkommen in Active Admin. Dies ist die Standard-Übersichtsseite."},"delete":"Löschen","delete_confirmation":"Wollen Sie dieses Element wirklich löschen?","delete_model":"%{model} löschen","details":"%{model} Details","devise":{"change_password":{"submit":"Mein Passwort ändern","title":"Ändern Sie Ihr Passwort"},"links":{"forgot_your_password":"Passwort vergessen?","resend_confirmation_instructions":"Bestätigungsanweisung erneut senden","resend_unlock_instructions":"Entsperrungsanweisung erneut senden","sign_in":"Anmeldung","sign_in_with_omniauth_provider":"Anmeldung mit %{provider}","sign_up":"Registrieren"},"login":{"remember_me":"erinnere dich an mich","submit":"Login","title":"Login"},"reset_password":{"submit":"Mein Passwort zurücksetzen","title":"Passwort vergessen?"}},"download":"Herunterladen:","dropdown_actions":{"button_label":"Aktionen"},"edit":"Bearbeiten","edit_model":"%{model} bearbeiten","empty":"Leer","filters":{"buttons":{"clear":"Filter entfernen","filter":"Filtern"},"predicates":{"contains":"Enthält","ends_with":"Endet mit","equals":"Gleich","greater_than":"Grösser als","less_than":"Kleiner als","starts_with":"Beginnt mit"}},"has_many_delete":"Löschen","has_many_new":"%{model} hinzufügen","has_many_remove":"Entfernen","logout":"Abmelden","main_content":"Bitte implementieren Sie %{model}#main_content, um Inhalte anzuzeigen.","new_model":"%{model} erstellen","next":"Weiter","pagination":{"empty":"Keine %{model} gefunden","entry":{"one":"Eintrag","other":"Einträge"},"multiple":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E von \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E","one":"Zeige \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Zeige \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Zurück","sidebars":{"filters":"Filter"},"status_tag":{"no":"Nicht","yes":"Ja"},"unsupported_browser":{"headline":"ActiveAdmin unterstützt nicht länger den Internet Explorer in Version 8 oder niedriger.","recommendation":"Wir empfehlen die Nutzung von \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, oder \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Wenn sie IE 9 oder neuer benutzen, stellen sie sicher das sie den \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E\"Kompatibilitätsansicht\" ausgeschaltet\u003C/a\u003E haben."},"view":"Anzeigen"}});
-I18n.translations["en-GB"] = I18n.extend((I18n.translations["en-GB"] || {}), {"active_admin":{"any":"Any","batch_actions":{"action_label":"%{title} Selected","button_label":"Batch Actions","default_confirmation":"Are you sure you want to do this?","delete_confirmation":"Are you sure you want to delete these %{plural_model}?","labels":{"destroy":"Delete"},"link":"Create one","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Successfully destroyed 1 %{model}","other":"Successfully destroyed %{count} %{plural_model}"}},"blank_slate":{"content":"There are no %{resource_name} yet.","link":"Create one"},"cancel":"Cancel","comments":{"add":"Add Comment","author":"Author","author_missing":"Anonymous","body":"Body","errors":{"empty_text":"Comment wasn't saved, text was empty."},"no_comments_yet":"No comments yet.","resource":"Resource","title":"Comment","title_content":"Comments (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"To add dashboard sections, checkout 'app/admin/dashboards.rb'","welcome":"Welcome to Active Admin. This is the default dashboard page."},"delete":"Delete","delete_confirmation":"Are you sure you want to delete this?","delete_model":"Delete %{model}","details":"%{model} Details","devise":{"change_password":{"submit":"Change my password","title":"Change your password"},"links":{"forgot_your_password":"Forgot your password?","resend_unlock_instructions":"Re-send unlock instructions","sign_in":"Sign in","sign_in_with_omniauth_provider":"Sign in with %{provider}"},"login":{"remember_me":"Remember me","submit":"Login","title":"Login"},"resend_confirmation_instructions":{"submit":"Resend confirmation instructions","title":"Resend confirmation instructions"},"reset_password":{"submit":"Reset My Password","title":"Forgot your password?"}},"download":"Download:","dropdown_actions":{"button_label":"Actions"},"edit":"Edit","edit_model":"Edit %{model}","empty":"Empty","filters":{"buttons":{"clear":"Clear Filters","filter":"Filter"},"predicates":{"contains":"Contains","ends_with":"Ends with","equals":"Equals","greater_than":"Greater than","less_than":"Less than","starts_with":"Starts with"}},"has_many_delete":"Delete","has_many_new":"Add New %{model}","has_many_remove":"Remove","logout":"Logout","main_content":"Please implement %{model}#main_content to display content.","new_model":"New %{model}","next":"Next","pagination":{"empty":"No %{model} found","entry":{"one":"entry","other":"entries"},"multiple":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E in total","multiple_without_total":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Displaying \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Displaying \u003Cb\u003Eall %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Previous","sidebars":{"filters":"Filters"},"status_tag":{"no":"No","yes":"Yes"},"view":"View"}});
-I18n.translations["es-MX"] = I18n.extend((I18n.translations["es-MX"] || {}), {"active_admin":{"any":"Cualquiera","batch_actions":{"action_label":"%{title} seleccionado","button_label":"Acciones en masa","default_confirmation":"¿Seguro que quieres hacer esto?","delete_confirmation":"Eliminar %{plural_model}: ¿Está seguro?","labels":{"destroy":"Borrar"},"link":"Añadir","selection_toggle_explanation":"(Cambiar selección)","succesfully_destroyed":{"one":"Se ha destruido 1 %{model} con éxito","other":"Se han destruido %{count} %{plural_model} con éxito"}},"blank_slate":{"content":"No hay %{resource_name} aún.","link":"Añadir"},"cancel":"Cancelar","comments":{"add":"Comentar","author":"Autor","body":"Cuerpo","errors":{"empty_text":"El comentario no fue guardado, el texto estaba vacío."},"no_comments_yet":"Aún sin comentarios.","resource":"Recurso","title":"Comentario","title_content":"Comentarios (%{count})"},"dashboard":"Inicio","dashboard_welcome":{"call_to_action":"Para agregar secciones edite 'app/admin/dashboard.rb'","welcome":"Bienvenido a Active Admin. Esta es la página de inicio predeterminada."},"delete":"Eliminar","delete_confirmation":"¿Está seguro de que quiere eliminar esto?","delete_model":"Eliminar %{model}","details":"Detalles de %{model}","devise":{"change_password":{"submit":"Cambiar mi contraseña","title":"Cambie su contraseña"},"links":{"forgot_your_password":"¿Olvidó su contraseña?","sign_in":"Registrarse","sign_in_with_omniauth_provider":"Conéctate con %{provider}"},"login":{"remember_me":"Recordarme","submit":"Iniciar Sesión","title":"Iniciar Sesión"},"reset_password":{"submit":"Restablecer mi contraseña","title":"¿Olvidó su contraseña?"}},"download":"Descargar:","dropdown_actions":{"button_label":"Acciones"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vacío","filters":{"buttons":{"clear":"Quitar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contiene","ends_with":"Termina con","equals":"Igual a","greater_than":"Mayor que","less_than":"Menor que","starts_with":"Empieza con"}},"has_many_delete":"Eliminar","has_many_new":"Añadir %{model}","has_many_remove":"Quitar","index_list":{"block":"Lista","blog":"Blog","grid":"Cuadrícula","table":"Tabla"},"logout":"Salir","main_content":"Por favor implemente %{model}#main_content para mostrar contenido.","new_model":"Añadir %{model}","next":"Siguiente","pagination":{"empty":"No se han encontrado %{model}","multiple":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de un total de \u003Cb\u003E%{total}\u003C/b\u003E","one":"Mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Mostrando \u003Cb\u003Eun total de %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","sidebars":{"filters":"Filtros"},"status_tag":{"no":"No","yes":"Sí"},"view":"Ver"}});
-I18n.translations["fa"] = I18n.extend((I18n.translations["fa"] || {}), {"active_admin":{"access_denied":{"message":"شما دسترسی لازم برای انجام این عملیات را ندارید."},"any":"هرکدام","batch_actions":{"action_label":"%{title} انتخاب شده است","button_label":"عملیاتهای دستهای","default_confirmation":"آیا برای اجرای این عملیات اطمینان دارید؟","delete_confirmation":"آیا برای حذف همه رکوردهای %{plural_model} اطمینان دارید؟","labels":{"destroy":"حذف"},"link":"ایجاد یک رکورد جدید","selection_toggle_explanation":"(انتخابها برعکس شوند)","succesfully_destroyed":{"one":"1 %{model} با موفقیت حذف شد","other":"%{count} %{plural_model} با موفقت حذف شدند."}},"blank_slate":{"content":"هنوز هیچ رکوردی از %{resource_name} درج نشده.","link":"درج اولین رکورد"},"cancel":"لغو","comments":{"add":"افزودن کامنت","author":"ایجاد کننده","author_missing":"بینام","author_type":"نوع ایجاد کننده","body":"بدنه","errors":{"empty_text":"کامنت درج نشد، متن کامنت خالی بود."},"no_comments_yet":"هنوز هیچ کامنتی نوشته نشده.","resource":"رکورد","resource_type":"نوع رکورد","title":"کامنت","title_content":"کامنتها (%{count})"},"dashboard":"داشبرد","dashboard_welcome":{"call_to_action":"برای اضافه کردن قسمتهایی به داشبرد اینجا را چک کنید: 'app/admin/dashboard.rb'","welcome":"به اکتیو ادمین خوش آمدید. این صفحه اول داشبرد است."},"delete":"حذف","delete_confirmation":"آیا برای حذف این آیتم اطمینان دارید؟","delete_model":"حذف %{model}","details":"جزئیات %{model}","devise":{"change_password":{"submit":"تغییر کلمه عبور","title":"تغییر کلمه عبور"},"email":{"title":"ایمیل"},"links":{"forgot_your_password":"کلمه عبور را فراموش کردهاید؟","sign_in":"ورود","sign_in_with_omniauth_provider":"ورود با حساب %{provider}"},"login":{"remember_me":"مرا به خاطر بسپار","submit":"ورود","title":"ورود"},"password":{"title":"کلمهعبور"},"resend_confirmation_instructions":{"submit":"ارسال مجدد تاییدیه ایمیل","title":"ارسال مجدد تاییدیه ایمیل"},"reset_password":{"submit":"دریافت کلمه عبور جدید","title":"کلمه عبور را فراموش کردهاید؟"},"sign_up":{"submit":"ثبتنام","title":"ثبتنام"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"ارسال مجدد دستورالعمل بازگشایی حساب کاربری","title":"ارسال مجدد دستورالعمل بازگشایی حساب کاربری"},"username":{"title":"نام کاربری"}},"download":"دریافت:","dropdown_actions":{"button_label":"عملیات"},"edit":"ویرایش","edit_model":"ویرایش %{model}","empty":"خالی","filters":{"buttons":{"clear":"پاک کردن فیلتر","filter":"فیلتر"},"predicates":{"contains":"شامل","ends_with":"پایان با","equals":"برابر با","greater_than":"بزرگتر از","less_than":"کوچکتر از","starts_with":"شروع با"}},"has_many_delete":"حذف","has_many_new":"اضافه کردن %{model} جدید","has_many_remove":"حذف","index_list":{"block":"لیست","blog":"وبلاگ","grid":"گرید","table":"جدول"},"logout":"خروج","main_content":"لطفا %{model}#main_content را پیاده سازی کنید تا محتوی نمایش داده شود.","new_model":"%{model} جدید","next":"بعدی","pagination":{"empty":"هیچ رکورد %{model} یافت نشد","entry":{"one":"آیتم","other":"آیتمها"},"multiple":"نمایش %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E از کل \u003Cb\u003E%{total}\u003C/b\u003E رکورد","multiple_without_total":"نمایش %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"نمایش \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"نمایش \u003Cb\u003Eهمه %{n}\u003C/b\u003E %{model}"},"powered_by":"قدرت گرفته از %{active_admin} %{version}","previous":"قبلی","sidebars":{"filters":"فیلترها"},"status_tag":{"no":"بدون","yes":"بله"},"view":"نمایش"}});
-I18n.translations["fi"] = I18n.extend((I18n.translations["fi"] || {}), {"active_admin":{"access_denied":{"message":"Sinulla ei ole oikeuksia suorittaa yrittämääsi toimintoa."},"any":"mikä vain","batch_actions":{"action_label":"%{title} Valittu","button_label":"Toimet","default_confirmation":"Oletko varma, että haluat tehdä tämän?","delete_confirmation":"Oletko varma, että haluat poistaa nämä %{plural_model}:t?","labels":{"destroy":"Poista"},"link":"Luo","selection_toggle_explanation":"(Vaihda valintaa)","succesfully_destroyed":{"one":"1 %{model} poistettu","other":"%{count} %{plural_model}:a poistettu"}},"blank_slate":{"content":"Järjestelmässä ei ole yhtään %{resource_name}:ia vielä.","link":"Luo ensimmäinen"},"cancel":"Peruuta","comments":{"add":"Lisää kommentti","author":"Luoja","author_type":"Luoja-tyyppi","body":"Runko","errors":{"empty_text":"Kommenttia ei pystytty tallentamaan, et kirjoittanut kommenttitekstiä."},"no_comments_yet":"Ei kommentteja.","resource":"Resurssi","resource_type":"Resurssityyppi","title":"Kommentti","title_content":"Kommentteja (%{count})"},"dashboard":"Etusivu","dashboard_welcome":{"call_to_action":"Lisätäksesi etusivun osioita katso: 'app/admin/dashboard.rb'","welcome":"Tervetuloa! Tämä on Active Adminin oletusetusivu."},"delete":"Poista","delete_confirmation":"Oletko varma, että haluat poistaa tämän?","delete_model":"Poista %{model}","details":"%{model} Tiedot","devise":{"change_password":{"submit":"Vaihda salasana","title":"Vaihda salasana"},"email":{"title":"Sähköposti"},"links":{"forgot_your_password":"Unohtunut salasana?","sign_in":"Kirjaudu sisään","sign_in_with_omniauth_provider":"Kirjaudu sisään %{provider}:ia käyttäen"},"login":{"remember_me":"Muista minut","submit":"Kirjaudu sisään","title":"Sisäänkirjautuminen"},"password":{"title":"Salasana"},"reset_password":{"submit":"Resetoi salasana","title":"Unohtunut salasana?"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Lähetä ohjeet lukituksen poistoon","title":"Lähetä ohjeet lukituksen poistoon"},"username":{"title":"Käyttäjänimi"}},"download":"Lataa:","dropdown_actions":{"button_label":"Acciones"},"edit":"Muokkaa","edit_model":"Muokaa %{model}","empty":"Tyhjä","filters":{"buttons":{"clear":"Tyhjennä valinnat","filter":"Hae"},"predicates":{"contains":"Sisältää","ends_with":"Päättyy","equals":"On yhtä kuin","greater_than":"Suurempi kuin","less_than":"Pienempi kuin","starts_with":"Alkaa"}},"has_many_delete":"Poista","has_many_new":"Lisää uusi %{model}","has_many_remove":"Poista","index_list":{"block":"Lista","blog":"Blogi","grid":"Ruudukko","table":"Taulukko"},"logout":"Kirjaudu ulos","main_content":"Ole hyvä, käytä %{model}#main_content:ia nähdäksesi jotain.","new_model":"Uusi %{model}","next":"Seuraava","pagination":{"empty":"%{model}:ia ei löytynyt","entry":{"one":"syöte","other":"syötteet"},"multiple":"Näytetään %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E (yhteensä \u003Cb\u003E%{total}\u003C/b\u003E)","multiple_without_total":"Näytetään %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Näytetään \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Näytetään \u003Cb\u003Ekaikki %{n}\u003C/b\u003E %{model}:it"},"powered_by":"Käyttää %{active_admin} %{version}:ia","previous":"Edellinen","sidebars":{"filters":"Haku"},"status_tag":{"no":"Ei","yes":"Kyllä"},"view":"Katso"}});
-I18n.translations["hr"] = I18n.extend((I18n.translations["hr"] || {}), {"active_admin":{"access_denied":{"message":"Nemaš dopuštenja."},"any":"Bilo koji","batch_actions":{"action_label":"%{title} označene","button_label":"Grupne akcije","default_confirmation":"Jeste li sigurni da želite to učiniti?","delete_confirmation":"Jeste li sigurni da želite obrisati %{plural_model}?","labels":{"destroy":"Obriši"},"link":"Izradi jedan","selection_toggle_explanation":"(Izmijeni odabir)","succesfully_destroyed":{"few":"Uspješno su obrisana %{count} %{plural_model}","many":"Uspješno je obrisano %{count} %{plural_model}","one":"Uspješno je obrisan 1 %{model}","other":"Uspješno je obrisano %{count} %{plural_model}"}},"blank_slate":{"content":"Još uvijek ne postoji niti jedan zapis tipa %{resource_name}.","link":"Izradi jedan"},"cancel":"Odustani","comments":{"add":"Dodaj komentar","author":"Autor","author_missing":"Anoniman","author_type":"Tip autora","body":"Sadržaj","errors":{"empty_text":"Komentar nije spremljen, sadržaj je prazan."},"no_comments_yet":"Još nema komentara.","resource":"Objekt","resource_type":"Tip objekta","title":"Komentar","title_content":"Komentari (%{count})"},"dashboard":"Upravljačka ploča","dashboard_welcome":{"call_to_action":"Da biste dodali nove odjeljke na upravljačku ploču, pogledajte 'app/admin/dashboard.rb'","welcome":"Dobrodošli u Active Admin. Ovo je početna upravljačka ploča."},"delete":"Obriši","delete_confirmation":"Jeste li sigurni da želite ovo obrisati?","delete_model":"Obriši %{model}","details":"%{model} detalji","devise":{"change_password":{"submit":"Izmijeni lozinku","title":"Izmjena lozinke"},"email":{"title":"Email"},"links":{"forgot_your_password":"Zaboravljena lozinka?","sign_in":"Prijavi se","sign_in_with_omniauth_provider":"Prijavite se za %{provider}"},"login":{"remember_me":"Zapamti me","submit":"Prijavi se","title":"Prijava"},"password":{"title":"Lozinka"},"resend_confirmation_instructions":{"submit":"Pošalji","title":"Ponovno slanje uputstva za potvrdu"},"reset_password":{"submit":"Resetiraj lozinku","title":"Zaboravljena lozinka?"},"sign_up":{"submit":"Registruj","title":"Registracija"},"subdomain":{"title":"Poddomena"},"unlock":{"submit":"Pošalji","title":"Ponovno slanje uputstva za otključavanje"},"username":{"title":"Korisničko ime"}},"download":"Spremi na računalo:","dropdown_actions":{"button_label":"Ukrepi"},"edit":"Uredi","edit_model":"Uredi %{model}","empty":"Prazno","filters":{"buttons":{"clear":"Očisti filtere","filter":"Filtriraj"},"predicates":{"contains":"Sadrži","ends_with":"Završava sa","equals":"Jednako","greater_than":"Veće od","less_than":"Manje od","starts_with":"počinje s"}},"has_many_delete":"Obriši","has_many_new":"Dodaj novi %{model}","has_many_remove":"Ukloniti","index_list":{"block":"Lista","blog":"Blog","grid":"Rešetka","table":"Tabela"},"logout":"Odjavi se","main_content":"Molim Vas, implementirajte %{model}#main_content da biste prikazali sadržaj.","new_model":"Novi %{model}","next":"Sljedeći","pagination":{"empty":"Nije pronađen niti jedan %{model}.","entry":{"few":"zapisa","many":"zapisa","one":"zapis","other":"zapisa"},"multiple":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E od ukupno \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Prikazan \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Prikazano \u003Cb\u003Esvih %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Prijašnji","sidebars":{"filters":"Filtriranje"},"status_tag":{"no":"Nema","yes":"Da"},"view":"Pregledaj"}});
-I18n.translations["id"] = I18n.extend((I18n.translations["id"] || {}), {"active_admin":{"access_denied":{"message":"Anda tidak diperkenankan melakukan aksi tersebut."},"any":"Apapun","batch_actions":{"action_label":"%{title} terpilih","button_label":"Tindakan Serentak","default_confirmation":"Apakah anda yakin akan melakukan ini?","delete_confirmation":"Apakah anda yakin akan menghapus %{plural_model}?","labels":{"destroy":"Hapus"},"link":"Tambah data","selection_toggle_explanation":"(Tampilkan Pilihan)","succesfully_destroyed":{"one":"Berhasil menghapus %{model}","other":"Berhasil menghapus %{count} %{plural_model}"}},"blank_slate":{"content":"%{resource_name} masih belum ada sama sekali.","link":"Tambah data"},"cancel":"Batal","comments":{"add":"Tambah Komentar","author":"Penulis","author_missing":"Anonim","author_type":"Tipe Penulis","body":"Isi","created_at":"Dibuat","delete":"Hapus Komentar","delete_confirmation":"Apakah anda yakin akan menghapus komentar tersebut?","errors":{"empty_text":"Komentar tak bisa disimpan, text tidak boleh dikosongi."},"no_comments_yet":"Belum ada komentar sama sekali.","resource":"Resource","resource_type":"Jenis Resource","title":"Komentar","title_content":"Komentar (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Tampilan halaman ini bisa diubah di file 'app/admin/dashboard.rb'","welcome":"Selamat datang di Active Admin. Ini adalah tampilan standar halaman dashboard."},"delete":"Hapus","delete_confirmation":"Apakah anda yakin ingin menghapus data ini?","delete_model":"Hapus %{model}","details":"Detail %{model}","devise":{"change_password":{"submit":"Kirimkan instruksi pengaturan ulang password","title":" - Atur Ulang Password"},"email":{"title":"Email"},"links":{"forgot_your_password":"Lupa password?","resend_confirmation_instructions":"Kirim lagi instruksi konfirmasi akun","resend_unlock_instructions":"Kirim instruksi pengaktifan kembali akun","sign_in":"Masuk","sign_in_with_omniauth_provider":"Daftar melalui %{provider}","sign_up":"Daftar"},"login":{"remember_me":"Ingat saya","submit":"Masuk","title":" - Masuk"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Kirimkan lagi instruksi konfirmasi akun","title":" - Kirim Lagi Instruksi Konfirmasi Akun"},"reset_password":{"submit":"Atur ulang password","title":" - Form Atur Ulang Password"},"sign_up":{"submit":"Daftar","title":" - Daftar"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Kirimkan instruksi pengaktifan kembali akun","title":" - Kirim Instruksi Pengaktifan Kembali Akun"},"username":{"title":"Username"}},"download":"Unduh:","dropdown_actions":{"button_label":"Tindakan"},"edit":"Ubah","edit_model":"Ubah %{model}","empty":"Kosong","filters":{"buttons":{"clear":"Hapus Filters","filter":"Filter"},"predicates":{"contains":"Mengandung","ends_with":"Diakhiri dengan","equals":"Sama dengan","greater_than":"Lebih besar dari","less_than":"Lebih kecil dari","starts_with":"Diawali dengan"}},"has_many_delete":"Hapus","has_many_new":"Tambah %{model} baru","has_many_remove":"Hapus","index_list":{"block":"Daftar","blog":"Blog","grid":"Grid","table":"Tabel"},"logout":"Keluar","main_content":"Harap mengimplementasikan %{model}#main_content untuk menampilkan konten.","new_model":"Tambah %{model} baru","next":"Berikutnya","pagination":{"empty":"Tidak ada %{model} yang bisa ditemukan","entry":{"one":"data","other":"data"},"multiple":"Menampilkan \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E dari \u003Cb\u003E%{total}\u003C/b\u003E keseluruhan %{model}","multiple_without_total":"Menampilkan \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to} %{model}\u003C/b\u003E","one":"Menampilkan \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Menampilkan \u003Cb\u003Esemua %{n}\u003C/b\u003E %{model}"},"powered_by":"Dibuat dengan %{active_admin} %{version}","previous":"Sebelumnya","search_status":{"current_filters":"Filter kini:","current_scope":"Scope:","headline":"Status Pencarian:","no_current_filters":"Tidak ada"},"sidebars":{"filters":"Filter","search_status":"Status Pencarian"},"status_tag":{"no":"Tidak","yes":"Ya"},"unsupported_browser":{"headline":"Harap dicatat bahwa ActiveAdmin sudah tidak mendukung InternetExplorer versi 8 atau versi sebelum itu.","recommendation":"Kami sarankan agar anda mengupgrade ke versi \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, atau \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E yang terbaru.","turn_off_compatibility_view":"Kalau anda menggunakan IE 9 atau yang lebih baru, pastikan anda \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Emematikan \"Compatibility View\"\u003C/a\u003E."},"view":"Lihat"}});
-I18n.translations["ko"] = I18n.extend((I18n.translations["ko"] || {}), {"active_admin":{"any":"어떤","batch_actions":{"action_label":"%{title} 선택됨","button_label":"배치 작업","default_confirmation":"확실하십니까?","delete_confirmation":"%{plural_model}을/를 삭제하시겠습니까?","labels":{"destroy":"삭제"},"link":"만들기","selection_toggle_explanation":"(선택 항목 바꾸기)","succesfully_destroyed":{"one":"성공적으로 1개 %{model}을/를 삭제하였습니다","other":"성공적으로 %{count}개의 %{plural_model}을/를 삭제하였습니다"}},"blank_slate":{"content":"아직 %{resource_name} 이/가 없습니다.","link":"추가하기"},"cancel":"취소","comments":{"add":"댓글 추가","author":"글쓴이","author_type":"글쓴이 종류","body":"내용","created_at":"작성시간","errors":{"empty_text":"댓글이 저장되지 않았습니다. 내용을 입력해주세요."},"no_comments_yet":"아직 댓글이 없습니다.","resource":"첨부파일","resource_type":"첨부파일 형태","title":"제목","title_content":"댓글 (%{count})"},"dashboard":"대시보드","dashboard_welcome":{"call_to_action":"대시보드에 섹션을 추가하시려면 'app/admin/dashboard.rb' 파일을 수정하십시오.","welcome":"ActiveAdmin에 오신 것을 환영합니다. 기본 대시보드 페이지 입니다."},"delete":"삭제","delete_confirmation":"정말로 삭제 하시겠습니까?","delete_model":"%{model} 삭제","details":"%{model} 상세보기","devise":{"change_password":{"submit":"내 비밀번호 변경","title":"비밀번호 변경"},"email":{"title":"이메일"},"links":{"forgot_your_password":"비밀번호를 잊으셨나요?","resend_confirmation_instructions":"계정 승인 요청하기","resend_unlock_instructions":"계정 잠금 해제하기","sign_in":"로그인","sign_in_with_omniauth_provider":"%{provider} 으로 로그인"},"login":{"remember_me":"내 계정 정보 기억","submit":"로그인","title":"로그인"},"password":{"title":"비밀번호"},"resend_confirmation_instructions":{"submit":"계정 승인 요청하기","title":"계정 승인 요청하기"},"reset_password":{"submit":"비밀번호 재설정","title":"비밀번호를 잊으셨나요?"},"sign_up":{"submit":"가입하기","title":"가입하기"},"subdomain":{"title":"서브도메인"},"unlock":{"submit":"계정 잠금 해제하기","title":"계정 잠금 해제하기"},"username":{"title":"아이디"}},"download":"다운로드:","dropdown_actions":{"button_label":"작업"},"edit":"수정","edit_model":"%{model} 수정","empty":"내용이 없습니다","filters":{"buttons":{"clear":"필터 초기화","filter":"필터"},"predicates":{"contains":"포함하는 문구","ends_with":"종료하는 문구","equals":"일치하는 문구","greater_than":"초과","less_than":"미만","starts_with":"시작하는 문구"}},"has_many_delete":"삭제","has_many_new":"%{model} 추가","has_many_remove":"삭제","logout":"로그아웃","main_content":"내용을 보시려면 %{model}#main_content의 코드를 먼저 구현해 주시기 바랍니다.","new_model":"%{model} 추가","next":"다음","pagination":{"empty":"%{model} 이/가 없습니다.","entry":{"one":"항목","other":"항목들"},"multiple":"\u003Cb\u003E%{total}\u003C/b\u003E개 중 \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E %{model} 표시중","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E %{model} 표시중","one":"\u003Cb\u003E1\u003C/b\u003E개 %{model} 표시중","one_page":"\u003Cb\u003E%{n}\u003C/b\u003E개 %{model} 표시중"},"powered_by":"Powered by %{active_admin} %{version}","previous":"이전","search_status":{"current_filters":"적용된 필터:","current_scope":"검색 범위:","headline":"검색 상태:","no_current_filters":"현재 적용된 필터가 없습니다"},"sidebars":{"filters":"필터 목록","search_status":"검색 상태"},"status_tag":{"no":"없음","yes":"있음"},"view":"보기"}});
-I18n.translations["lt"] = I18n.extend((I18n.translations["lt"] || {}), {"active_admin":{"access_denied":{"message":"Jūs nesate įgaliotas atlikti šį veiksmą."},"any":"Bet kokia","batch_actions":{"action_label":"%{title} Pasirinkta","button_label":"Veiksmai su pažymėtais","default_confirmation":"Ar jūs tikrai norite tai padaryti?","delete_confirmation":"Ar jūs tikrai norite pašalinti šiuos %{plural_model}?","labels":{"destroy":"Šalinti"},"link":"Sukurti","selection_toggle_explanation":"(Žymėti)","succesfully_destroyed":{"few":"Sėkmingai pašalinti %{count} %{plural_model}","one":"Sėkmingai pašalintas 1 %{model}","other":"Sėkmingai pašalinti %{count} %{plural_model}"}},"blank_slate":{"content":"Nėra %{resource_name}.","link":"Sukurti"},"cancel":"Atšaukti","comments":{"add":"Pridėti komentarą","author":"Autorius","author_missing":"Anonimas","author_type":"Autoriaus Tipas","body":"Įrašas","errors":{"empty_text":"Komentaras neišsaugotas, tekstas buvo tuščias."},"no_comments_yet":"Dar nėra komentarų.","resource":"Išteklių","resource_type":"Resurso Tipas","title":"Komentaras","title_content":"Komentarai (%{count})"},"dashboard":"Valdymo skydelis","dashboard_welcome":{"call_to_action":"Norėdami pridėti skydelyje skyrius, žiūrėkite app/admin/dashboard.rb","welcome":"Sveiki atvykę į Active Admin. Tai yra numatytasis valdymo skydelis."},"delete":"Šalinti","delete_confirmation":"Ar jūs tikrai norite tai pašalinti?","delete_model":"Pašalinti %{model}","details":"%{model} Informacija","devise":{"change_password":{"submit":"Pakeisti mano slaptažodį","title":"Slaptažodžio Keitimas"},"email":{"title":"El. paštas"},"links":{"forgot_your_password":"Pamiršote slaptažodį?","sign_in":"Prisijungti","sign_in_with_omniauth_provider":"Prisijungti su %{provider}"},"login":{"remember_me":"Prisiminti Mane","submit":"Prisijungti","title":"Prisijungimas"},"password":{"title":"Slaptažodis"},"resend_confirmation_instructions":{"submit":"Siųsti patvirtinimo instructions","title":"Patvirtinimo Instrukcijos"},"reset_password":{"submit":"Sukurti Naują Slaptažodį","title":"Pamiršote slaptažodį?"},"sign_up":{"submit":"Užsiregistruoti","title":"Registracija"},"subdomain":{"title":"Subdomenas"},"unlock":{"submit":"Pakartotinai siųsti atrakinimo instrukcijas","title":"Pakartotinio Atrakinimo Instrukcijos"},"username":{"title":"Vartotojo Vardas"}},"download":"Atsisiųsti","dropdown_actions":{"button_label":"Veiksmai"},"edit":"Redaguoti","edit_model":"Redaguoti %{model}","empty":"Tuščia","filters":{"buttons":{"clear":"Išvalyti filtrus","filter":"Filtras"},"predicates":{"contains":"Sudėtyje yra","ends_with":"Baigiasi","equals":"lygus","greater_than":"didesnis nei","less_than":"mažiau nei","starts_with":"Prasideda nuo"}},"has_many_delete":"Šalinti","has_many_new":"Pridėti naują %{model}","has_many_remove":"Pašalinti","index_list":{"block":"Sąrašas","blog":"Blog","grid":"Tinklelis","table":"Lentelė"},"logout":"Išeiti","main_content":"Prašome realizuoti %{model}#main_content turiniui vaizduoti.","new_model":"Naujas %{model}","next":"Toliau","pagination":{"empty":"%{model} nerastas","entry":{"one":"įrašas","other":"įrašai"},"multiple":"Rodomi %{model} \u003Cb\u003E%{iš}\u0026nbsp;-\u0026nbsp;%{to} \u003C/ b\u003E iš\u003Cb\u003E%{total} \u003C/ b\u003E iš viso","multiple_without_total":"Rodomi %{model} \u003Cb\u003E%{iš}\u0026nbsp;-\u0026nbsp;%{to} \u003C/ b\u003E ","one":"Rodoma \u003CB\u003E 1 \u003C/ b\u003E %{model}","one_page":"Rodoma \u003Cb\u003Evisi %{n} \u003C/ b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Atgal","sidebars":{"filters":"Filtrai"},"status_tag":{"no":"Nėra","yes":"Taip"},"view":"Žiūrėti"}});
-I18n.translations["lv"] = I18n.extend((I18n.translations["lv"] || {}), {"active_admin":{"any":"Jebkurš","batch_actions":{"action_label":"%{title} Selected","button_label":"Batch Actions","default_confirmation":"Vai tiešām vēlaties to darīt?","delete_confirmation":"Vai tiešām vēlaties dzēst šos %{plural_model}?","labels":{"destroy":"Delete"},"link":"Create one","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Successfully destroyed 1 %{model}","other":"Successfully destroyed %{count} %{plural_model}"}},"blank_slate":{"content":"Sadaļā '%{resource_name}' nav neviena ieraksta.","link":"Izveidot jaunu"},"cancel":"Atcelt","comments":{"add":"Pievienot komentāru","author":"Autors","body":"Saturs","errors":{"empty_text":"Komentārs netika saglabāts - nekas nav ierakstīts"},"no_comments_yet":"Nav neviena komentāra.","resource":"Resurss","title":"Komentārs","title_content":"Komentāri (%{count})"},"dashboard":"Panelis","dashboard_welcome":{"call_to_action":"Izmantojiet 'app/admin/dashboard.rb', lai pievienotu sadaļas panelim.","welcome":"Laipni lūgti Active Admin."},"delete":"Dzēst","delete_confirmation":"Vai Tu tiešām vēlies dzēst?","delete_model":"Dzēst '%{model}' ierakstu","details":"Apraksts","devise":{"change_password":{"submit":"Nomainīt savu paroli","title":"Nomainīt paroli"},"links":{"forgot_your_password":"Aizmirsāt savu paroli?","sign_in":"pierakstīties","sign_in_with_omniauth_provider":"Pierakstieties ar %{provider}"},"login":{"remember_me":"atcerēties mani","submit":"Ielogojaties","title":"Ielogojaties"},"reset_password":{"submit":"Atjaunotu savu paroli","title":"Aizmirsāt savu paroli?"}},"download":"Lejuplādēt:","dropdown_actions":{"button_label":"Actions"},"edit":"Labot","edit_model":"Labot '%{model}' ierakstu","empty":"Tukšs","filters":{"buttons":{"clear":"Novākt filtrus","filter":"Filtrēt"},"predicates":{"contains":"Satur","ends_with":"Beidzas ar","equals":"Vienāds ar","greater_than":"Lielāks par","less_than":"Mazāks par","starts_with":"Sākas ar"}},"has_many_delete":"Dzēst","has_many_new":"Pievienot jaunu '%{model}' ierakstu","has_many_remove":"Noņemt","logout":"Iziet","main_content":"Lūdzu implementēt %{model}#main_content, lai rādītos saturs.","new_model":"Pievienot '%{model}' ierakstu","next":"Nākošā","pagination":{"empty":"Nav ierakstu","entry":{"one":"ieraksts","other":"ieraksti"},"multiple":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E ieraksti no \u003Cb\u003E%{total}\u003C/b\u003E kopā","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"\u003Cb\u003E1\u003C/b\u003E ieraksts","one_page":"\u003Cb\u003E%{n}\u003C/b\u003E ieraksti"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Iepriekšējā","sidebars":{"filters":"Filtri"},"status_tag":{"no":"Nē","yes":"Jā"},"view":"Apskatīt"}});
-I18n.translations["nb"] = I18n.extend((I18n.translations["nb"] || {}), {"active_admin":{"access_denied":{"message":"Du er ikke autorisert til å utføre denne handlingen."},"any":"Alle","batch_actions":{"action_label":"%{title} valgt","button_label":"Gruppehandlinger","delete_confirmation":"Er du sikker på at du vil slette disse %{plural_model}? Dette kan ikke reverseres.","labels":{"destroy":"Slett"},"link":"Opprett en","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Slettet én %{model}","other":"Slettet %{count} %{plural_model}"}},"blank_slate":{"content":"Her er det ingen %{resource_name} enda.","link":"Opprett en"},"cancel":"Avbryt","comments":{"add":"Add Comment","author":"Author","body":"Body","errors":{"empty_text":"Kommentar ble ikke lagret, teksten var tom."},"no_comments_yet":"No comments yet.","resource":"Resource","title":"Comment","title_content":"Kommentarer (%{count})"},"dashboard":"Oversikt","dashboard_welcome":{"call_to_action":"Rediger 'app/admin/dashboard.rb' for å legge til elementer i oversikten.","welcome":"Velkommen til Active Admin. Dette er standardoversiktssiden."},"delete":"Slett","delete_confirmation":"Er du sikker på at du vil slette denne?","delete_model":"Slett %{model}","details":"%{model} Detaljer","devise":{"change_password":{"submit":"Endre mitt passord","title":"Endre passordet"},"email":{"title":"E-post"},"links":{"forgot_your_password":"Glemt passord?","sign_in":"Logg inn","sign_in_with_omniauth_provider":"Logg på med %{provider}"},"login":{"remember_me":"Husk meg","submit":"Logg inn","title":"Innlogging"},"password":{"title":"Passord"},"resend_confirmation_instructions":{"submit":"Send bekreftelsesinformasjon på nytt","title":"Send bekreftelsesinformasjon på nytt"},"reset_password":{"submit":"Tilbakestille passordet mitt","title":"Glemt passord?"},"sign_up":{"submit":"Opprett","title":"Opprett brukerkonto"},"subdomain":{"title":"Subdomene"},"unlock":{"submit":"Send info om gjenoppretting på nytt","title":"Send info om gjenoppretting på nytt"},"username":{"title":"Brukernavn"}},"download":"Last ned:","dropdown_actions":{"button_label":"Handlinger"},"edit":"Rediger","edit_model":"Rediger %{model}","empty":"Tom","filters":{"buttons":{"clear":"Fjern filter","filter":"Filter"},"predicates":{"contains":"Inneholder","ends_with":"Slutter med","equals":"Er lik","greater_than":"Større enn","less_than":"Mindre enn","starts_with":"Starter med"}},"has_many_delete":"Slett","has_many_new":"Legg til ny %{model}","has_many_remove":"Fjern","index_list":{"block":"Liste","blog":"Blogg","grid":"Gitter","table":"Tabell"},"logout":"Logg ut","main_content":"Vennligst implementer %{model}#main_content for å vise innhold.","new_model":"Ny %{model}","next":"Neste","pagination":{"empty":"Fant ingen %{model}","entry":{"one":"innslag","other":"innslag"},"multiple":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E av \u003Cb\u003E%{total}\u003C/b\u003E totalt","multiple_without_total":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Viser \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Viser \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Forrige","search_status":{"current_filters":"Gjeldende filtre:","current_scope":"Søkeområde:","headline":"Søkestatus:","no_current_filters":"Ingen"},"sidebars":{"filters":"Filtere"},"status_tag":{"no":"Nei","yes":"Ja"},"view":"Vis"}});
-I18n.translations["sv-SE"] = I18n.extend((I18n.translations["sv-SE"] || {}), {"active_admin":{"access_denied":{"message":"Du har inte rättighet att utföra denna åtgärd."},"any":"Någon","batch_actions":{"action_label":"%{title} Markerad","button_label":"Batch behandling","default_confirmation":"Är du säker på att du vill göra detta?","delete_confirmation":"Är du säker på att du vill radera dessa %{plural_model}?","labels":{"destroy":"Radera"},"link":"Skapa en","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Lyckades radera 1 %{model}","other":"Lyckades radera %{count} %{plural_model}"}},"blank_slate":{"content":"Finns inga %{resource_name} än.","link":"Skapa en"},"cancel":"Avbryt","comments":{"add":"Lägg till kommentar","author":"Författare","author_missing":"Anonym","author_type":"Författar typ","body":"Innehåll","created_at":"Skapad","errors":{"empty_text":"Kommentaren sparades inte, måste innehålla text."},"no_comments_yet":"Inga kommentarer än.","resource":"Resurs","resource_type":"Resurs typ","title":"Kommentar","title_content":"Kommentarer (%{count})"},"dashboard":"Skrivbord","dashboard_welcome":{"call_to_action":"För att lägga till sektioner, gör en checkout på 'app/admin/dashboard.rb'","welcome":"Välkommen till Active Admin. Detta är ditt standardskrivbord."},"delete":"Ta bort","delete_confirmation":"Är du säker att du vill ta bort denna?","delete_model":"Ta bort %{model}","details":"Detaljvy för %{model}","devise":{"change_password":{"submit":"Ändra mitt lösenord","title":"Ändra ditt lösenord"},"email":{"title":"Epost"},"links":{"forgot_your_password":"Glömt ditt lösenord?","resend_confirmation_instructions":"Skicka bekräftnings instruktioner","resend_unlock_instructions":"Skicka upplåsnings instruktioner","sign_in":"Logga in","sign_in_with_omniauth_provider":"Logga in med %{provider}","sign_up":"Registera"},"login":{"remember_me":"Kom ihåg mig","submit":"Inloggning","title":"Inloggning"},"password":{"title":"Lösenord"},"resend_confirmation_instructions":{"submit":"Skicka bekräftnings instruktioner","title":"Skicka bekräftnings instruktioner"},"reset_password":{"submit":"Återställa mitt lösenord","title":"Glömt ditt lösenord?"},"sign_up":{"submit":"Registera","title":"Registera"},"subdomain":{"title":"Subdomän"},"unlock":{"submit":"Skicka upplåsnings instruktioner","title":"Skicka upplåsnings instruktioner"},"username":{"title":"Användarnamn"}},"download":"Ladda ner:","dropdown_actions":{"button_label":"Behandling"},"edit":"Redigera","edit_model":"Redigera %{model}","empty":"Tom","filters":{"buttons":{"clear":"Rensa filter","filter":"Filter"},"predicates":{"contains":"Innehåller","ends_with":"Slutar med","equals":"Lika med","greater_than":"Större än","less_than":"Mindre än","starts_with":"Börjar med"}},"has_many_delete":"Ta bort","has_many_new":"Skapa en ny %{model}","has_many_remove":"Ta bort","index_list":{"block":"Lista","blog":"Blogg","grid":"Rutnät","table":"Tabell"},"logout":"Logga ut","main_content":"Implementera %{model}#main_content för att kunna visa något.","new_model":"Ny %{model}","next":"Nästa","pagination":{"empty":"Ingen %{model} funnen","entry":{"one":"inlägg","other":"inlägg"},"multiple":"Visar %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E av \u003Cb\u003E%{total}\u003C/b\u003E totalt","multiple_without_total":"Visar %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Visar \u003Cb\u003E1\u003C/b\u003E utav %{model}","one_page":"Visar \u003Cb\u003Ealla %{n}\u003C/b\u003E utav %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Föregående","search_status":{"current_filters":"Nuvarande filter:","current_scope":"Scope:","headline":"Sök status:","no_current_filters":"Inga"},"sidebars":{"filters":"Filter","search_status":"Sök status"},"status_tag":{"no":"Nej","yes":"Ja"},"unsupported_browser":{"headline":"Notera att ActiveAdmin inte längre stödjer Internet Explorer version 8 eller mindre.","recommendation":"Vi rekommenderar dig att uppgradera till den senaste versionen av \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, eller \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Om du använder IE 9 eller senare, se till att \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Estäng av \"Compatibility View\"\u003C/a\u003E."},"view":"Visa"}});
-I18n.translations["uk"] = I18n.extend((I18n.translations["uk"] || {}), {"active_admin":{"access_denied":{"message":"Ви не авторизовані для виконання даної дії."},"any":"Будь-який","batch_actions":{"action_label":"%{title} вибране","button_label":"Групові операції","default_confirmation":"Ви справді бажаєте це зробити?","delete_confirmation":"Ви впевнені, що хочете видалити %{plural_model}?","labels":{"destroy":"Видалити"},"link":"Створити","selection_toggle_explanation":"(Скасувати все / Зняти виділення)","succesfully_destroyed":{"few":"Успішно видалено: %{count} %{plural_model}","many":"Успішно видалено: %{count} %{plural_model}","one":"Успішно видалено: 1 %{model}","other":"Успішно видалено: %{count} %{plural_model}"}},"blank_slate":{"content":"Поки-що немає %{resource_name}.","link":"Створити"},"cancel":"Скасувати","comments":{"add":"Додати Коментар","author":"Автор","author_missing":"Анонім","author_type":"Тип автора","body":"Текст","errors":{"empty_text":"Коментар не збережено, текст не повинен бути пустим."},"no_comments_yet":"Поки-що немає коментарів.","resource":"Ресурс","resource_type":"Тип ресурса","title":"Коментар","title_content":"Коментарі (%{count})"},"dashboard":"Панель керування","dashboard_welcome":{"call_to_action":"Щоб додати сюди що-небудь, зазирніть у 'app/admin/dashboard.rb'","welcome":"Ласкаво просимо до Active Admin. Це стандартна сторінка керування сайтом."},"delete":"Видалити","delete_confirmation":"Ви впевнені, що хочете це видалити?","delete_model":"Видалити %{model}","details":"%{model} детальніше","devise":{"change_password":{"submit":"Змінити пароль","title":"Зміна паролю"},"email":{"title":"Електронна пошта"},"links":{"forgot_your_password":"Забули пароль?","resend_confirmation_instructions":"Повторна відправка інструкцій підтвердження","resend_unlock_instructions":"Повторна відправка інструкцій розблокування","sign_in":"Увійти","sign_in_with_omniauth_provider":"Увійти з допомогою %{provider}","sign_up":"Зареєструватись"},"login":{"remember_me":"Запам'ятати мене","submit":"Увійти","title":"Вхід"},"password":{"title":"Пароль"},"resend_confirmation_instructions":{"submit":"Відправити повторно листа з активацією","title":"Відправити повторно листа з активацією"},"reset_password":{"submit":"Скинути пароль","title":"Забули пароль?"},"sign_up":{"submit":"Зареєструватися","title":"Зареєструватися"},"subdomain":{"title":"Піддомен"},"unlock":{"submit":"Відправити повторно інструкції з розблокування","title":"Відправити повторно інструкції з розблокування"},"username":{"title":"Ім'я користувача"}},"download":"Завантаження:","dropdown_actions":{"button_label":"Oперації"},"edit":"Змінити","edit_model":"Змінити %{model}","empty":"Пусто","filters":{"buttons":{"clear":"Очистити","filter":"Фільтрувати"},"predicates":{"contains":"Містить","ends_with":"Закінчується","equals":"=","greater_than":"більше","less_than":"менше","starts_with":"Починається з"}},"has_many_delete":"Прибрати","has_many_new":"Додати %{model}","has_many_remove":"Видалити","index_list":{"block":"Список","blog":"Блог","grid":"Сітка","table":"Таблиця"},"logout":"Вийти","main_content":"Створіть %{model}#main_content для відображення вмісту.","new_model":"Створити %{model}","next":"Наст.","pagination":{"empty":"%{model} не знайдено","entry":{"few":"записи","many":"записів","one":"запис","other":"записів"},"multiple":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E з \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Результат: \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Результат: \u003Cb\u003E%{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Поперед.","search_status":{"current_filters":"Поточний фільтр:","current_scope":"Область:","headline":"Статус пошуку:","no_current_filters":"Жоден"},"sidebars":{"filters":"Фільтри","search_status":"Статус пошуку"},"status_tag":{"no":"Ні","yes":"Так"},"unsupported_browser":{"headline":"Зверніть, будь-ласка, увагу, що ActiveAdmin більше не підтримує Internet Explorer 8 версії і нижче","recommendation":"Ми рекомендуємо оновити версію вашого браузеру (\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, або \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E).","turn_off_compatibility_view":"Якщо ви використовуєте IE 9 і вище, переконайтесь, що \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eви вимкнули опцію \"Перегляд в режимі сумісності\"\u003C/a\u003E."},"view":"Переглянути"}});
-I18n.translations["vi"] = I18n.extend((I18n.translations["vi"] || {}), {"active_admin":{"any":"Bất kỳ","batch_actions":{"action_label":"%{title} được chọn","button_label":"Hành động hàng loạt","default_confirmation":"Bạn có chắc bạn muốn làm điều này?","delete_confirmation":"Bạn có chắc chắn muốn xóa những %{plural_model}?","labels":{"destroy":"Xóa"},"link":"Tạo mới","selection_toggle_explanation":"(Thay đổi lựa chọn)","succesfully_destroyed":{"one":"Đã xóa thành công 1 %{model}","other":"Đã xóa thành công %{count} %{plural_model}"}},"blank_slate":{"content":"Chưa có %{resource_name}.","link":"Tạo mới"},"cancel":"Hủy","comments":{"add":"Thêm bình luận","author":"Tác giả","body":"Nội dung","errors":{"empty_text":"Lời bình luận chưa được lưu, vì nội dung còn trống."},"no_comments_yet":"Chưa có bình luận.","resource":"Tài nguyên","title":"Bình luận","title_content":"Bình luận (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Để thêm phần phần cho trang Dashboar hãy chỉnh sửa 'app/admin/dashboard.rb'","welcome":"Chào mừng bạn đến với Active Admin. Đây là trang Dashboard mặc định."},"delete":"Xóa","delete_confirmation":"Bạn có chắc chắn rằng mình muốn xóa cái này?","delete_model":"Xóa %{model}","details":"%{model} Chi tiết","devise":{"change_password":{"submit":"Thay đổi mật khẩu của tôi","title":"Thay đổi mật khẩu của bạn"},"links":{"forgot_your_password":"Quên mật khẩu của bạn?","sign_in":"Đăng nhập","sign_in_with_omniauth_provider":"Đăng nhập với %{provider}"},"login":{"remember_me":"Ghi nhớ tôi","submit":"Đăng nhập","title":"Đăng nhập"},"reset_password":{"submit":"Thiết lập lại mật khẩu của tôi","title":"Quên mật khẩu của bạn?"}},"download":"Download:","dropdown_actions":{"button_label":"Hành động"},"edit":"Chỉnh sửa","edit_model":"Chỉnh sửa %{model}","empty":"Trống","filters":{"buttons":{"clear":"Xóa dữ liệu lọc","filter":"Lọc"},"predicates":{"contains":"Thông tin","ends_with":"Kết thúc với việc","equals":"Bằng","greater_than":"Lớn hơn","less_than":"Nhỏ hơn","starts_with":"Bắt đầu với"}},"has_many_delete":"Xóa","has_many_new":"Thêm mới %{model}","has_many_remove":"Hủy bỏ","logout":"Đăng xuất","main_content":"Xin bổ sung %{model}#main_content để hiển thị nội dung.","new_model":"Tạo mới %{model}","next":"Tiếp","pagination":{"empty":"Không có %{model} nào được tìm thấy","entry":{"one":"entry","other":"entries"},"multiple":"Đang hiển thị %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E trong tất cả.","multiple_without_total":"Đang hiển thị %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E.","one":"Đang hiển thị \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Đang hiển thị \u003Cb\u003Etất cả %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Trước","sidebars":{"filters":"Bộ Lọc"},"status_tag":{"no":"Không Có","yes":"Có"},"view":"Xem"}});
-I18n.translations["zh-TW"] = I18n.extend((I18n.translations["zh-TW"] || {}), {"active_admin":{"access_denied":{"message":"您沒有權限執行此項操作"},"any":"任何","batch_actions":{"action_label":"%{title} 已選取","button_label":"批次作業","default_confirmation":"你確定你要這樣做?","delete_confirmation":"你確定要刪除這些 %{plural_model} 嗎?","labels":{"destroy":"刪除"},"link":"建立一個","selection_toggle_explanation":"(切換選取)","succesfully_destroyed":{"one":"成功刪除 1 %{model}","other":"成功刪除 %{count} %{plural_model}"}},"blank_slate":{"content":"尚無 %{resource_name}","link":"建立一筆"},"cancel":"取消","comments":{"add":"新增評論","author":"作者","author_missing":"匿名","author_type":"作者身份","body":"內文","errors":{"empty_text":"評論儲存失敗,不允許空白的內容。"},"no_comments_yet":"尚無評論","resource":"資源","resource_type":"資源種類","title":"評論","title_content":"(%{count}) 則評論"},"dashboard":"儀表板","dashboard_welcome":{"call_to_action":"要新增儀表板內容,請查看 'app/admin/dashboard.rb'","welcome":"歡迎來到 Active Admin,這是預設的儀表板頁面。"},"delete":"刪除","delete_confirmation":"你確定要刪除嗎?","delete_model":"刪除 %{model}","details":"%{model} 明細","devise":{"change_password":{"submit":"更改我的密碼","title":"更改你的密碼"},"email":{"title":"電子郵件信箱"},"links":{"forgot_your_password":"忘記密碼?","resend_confirmation_instructions":"重新發送確認信","resend_unlock_instructions":"重新發送解鎖指示","sign_in":"登入","sign_in_with_omniauth_provider":"使用 %{provider} 登入","sign_up":"註冊"},"login":{"remember_me":"記住我","submit":"登入","title":"登入"},"password":{"title":"密碼"},"resend_confirmation_instructions":{"submit":"重新發送確認信","title":"重新發送確認信"},"reset_password":{"submit":"重置密碼","title":"忘記密碼?"},"sign_up":{"submit":"註冊","title":"註冊"},"subdomain":{"title":"子網域"},"unlock":{"submit":"重新發送解鎖指示","title":"重新發送解鎖指示"},"username":{"title":"帳號"}},"download":"下載:","dropdown_actions":{"button_label":"操作"},"edit":"編輯","edit_model":"編輯 %{model}","empty":"空的","filters":{"buttons":{"clear":"清除篩選條件","filter":"篩選"},"predicates":{"contains":"包含","ends_with":"結尾為","equals":"等於","greater_than":"大於","less_than":"小於","starts_with":"開頭為"}},"has_many_delete":"刪除","has_many_new":"增加新的 %{model}","has_many_remove":"清除","logout":"登出","main_content":"請實作 %{model}#main_content 以顯示內容。","new_model":"新增 %{model}","next":"下一個","pagination":{"empty":"找不到 %{model} ","entry":{"one":"筆","other":"筆"},"multiple":"總計 \u003Cb\u003E%{total}\u003C/b\u003E 顯示 %{model} 中\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 筆","multiple_without_total":"顯示 %{model} 中\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 筆","one":"顯示 \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"顯示 \u003Cb\u003E全部 %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"前一個","search_status":{"current_filters":"目前篩選條件:","current_scope":"子集:","headline":"搜尋條件:","no_current_filters":"無"},"sidebars":{"filters":"篩選條件","search_status":"搜尋條件"},"status_tag":{"no":"否","yes":"是"},"unsupported_browser":{"headline":"很抱歉,ActiveAdmin 已不再支援 Internet Explorer 8 以下版本的瀏覽器。","recommendation":"建議您升級到最新版本的\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E,\u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E,或是 \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E。","turn_off_compatibility_view":"若您是使用 IE 9 或更新的版本,請確認\u003Ca href=\"http://windows.microsoft.com/zh-TW/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E「相容性檢視」是關閉的\u003C/a\u003E。"},"view":"檢視"}});
+I18n.translations || (I18n.translations = {});
+I18n.translations["en"] = I18n.extend((I18n.translations["en"] || {}), {"about_page":{"body_text_tab_1_html":"\u003Cp\u003EFunding 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.\u003C/p\u003E \u003Cp\u003EThe \u003Ca href='http://www.dcc.ac.uk/' target='_blank'\u003EDCC\u003C/a\u003E 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EHow the tool works\u003C/h3\u003E \u003Cp\u003EThere 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EGetting Started\u003C/h3\u003E \u003Cp\u003EIf you have an account please sign in and start creating or editing your DMP.\u003C/p\u003E \u003Cp\u003EIf you do not have a DMPonline account, click on \u003Ca href='/'\u003E'Sign up'\u003C/a\u003E on the homepage.\u003C/p\u003E \u003Cp\u003EPlease visit the \u003Ca href='/help'\u003E'Help'\u003C/a\u003E page for guidance.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EAdditional Information\u003C/h3\u003E \u003Cp\u003EWe are constantly improving the user interface and functionality of DMPonline. If you would like to contribute with feedback and suggestions, please contact us by emailing \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20inquiry' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E. You can also report bugs and request new features directly on \u003Ca href='https://github.com/DigitalCurationCentre/DMPonline_v4' target='_top'\u003EGitHub\u003C/a\u003E\u003C/p\u003E \u003Cp\u003EIf you need to access plans from the earlier version of the tool please visit \u003Ca href='https://dmponline3.dcc.ac.uk' target='_top'\u003EDMPonline v3\u003C/a\u003E.\u003C/p\u003E","body_text_tab_2_html":"\u003Cp\u003EDMPonline stories from the DCC website\u003C/p\u003E\u003C/br\u003E","tab_1":"Background","tab_2":"Latest news","title":"About DMPonline"},"active_admin":{"access_denied":{"message":"You are not authorized to perform this action."},"any":"Any","batch_actions":{"action_label":"%{title} Selected","button_label":"Batch Actions","default_confirmation":"Are you sure you want to do this?","delete_confirmation":"Are you sure you want to delete these %{plural_model}?","labels":{"destroy":"Delete"},"link":"Create one","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Successfully destroyed 1 %{model}","other":"Successfully destroyed %{count} %{plural_model}"}},"blank_slate":{"content":"There are no %{resource_name} yet.","link":"Create one"},"cancel":"Cancel","comments":{"add":"Add Comment","author":"Author","author_missing":"Anonymous","author_type":"Author Type","body":"Body","created_at":"Created","delete":"Delete Comment","delete_confirmation":"Are you sure you want to delete these comment?","errors":{"empty_text":"Comment wasn't saved, text was empty."},"no_comments_yet":"No comments yet.","resource":"Resource","resource_type":"Resource Type","title":"Comment","title_content":"Comments (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"To add dashboard sections, checkout 'app/admin/dashboard.rb'","welcome":"Welcome to Active Admin. This is the default dashboard page."},"delete":"Delete","delete_confirmation":"Are you sure you want to delete this?","delete_model":"Delete %{model}","details":"%{model} Details","devise":{"change_password":{"submit":"Change my password","title":"Change your password"},"email":{"title":"Email"},"links":{"forgot_your_password":"Forgot your password?","resend_confirmation_instructions":"Resend confirmation instructions","resend_unlock_instructions":"Resend unlock instructions","sign_in":"Sign in","sign_in_with_omniauth_provider":"Sign in with %{provider}","sign_up":"Sign up"},"login":{"remember_me":"Remember me","submit":"Login","title":"Login"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Resend confirmation instructions","title":"Resend confirmation instructions"},"reset_password":{"submit":"Reset My Password","title":"Forgot your password?"},"sign_up":{"submit":"Sign up","title":"Sign up"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Resend unlock instructions","title":"Resend unlock instructions"},"username":{"title":"Username"}},"download":"Download:","dropdown_actions":{"button_label":"Actions"},"edit":"Edit","edit_model":"Edit %{model}","empty":"Empty","filters":{"buttons":{"clear":"Clear Filters","filter":"Filter"},"predicates":{"contains":"Contains","ends_with":"Ends with","equals":"Equals","greater_than":"Greater than","less_than":"Less than","starts_with":"Starts with"}},"has_many_delete":"Delete","has_many_new":"Add New %{model}","has_many_remove":"Remove","index_list":{"block":"List","blog":"Blog","grid":"Grid","table":"Table"},"logout":"Logout","main_content":"Please implement %{model}#main_content to display content.","new_model":"New %{model}","next":"Next","pagination":{"empty":"No %{model} found","entry":{"one":"entry","other":"entries"},"multiple":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E in total","multiple_without_total":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Displaying \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Displaying \u003Cb\u003Eall %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Previous","search_status":{"current_filters":"Current filters:","current_scope":"Scope:","headline":"Search status:","no_current_filters":"None"},"sidebars":{"filters":"Filters","search_status":"Search Status"},"status_tag":{"no":"No","yes":"Yes"},"unsupported_browser":{"headline":"Please note that ActiveAdmin no longer supports Internet Explorer versions 8 or less.","recommendation":"We recommend upgrading to the latest \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, or \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"If you are using IE 9 or later, make sure you \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eturn off \"Compatibility View\"\u003C/a\u003E."},"view":"View"},"activerecord":{"errors":{"messages":{"record_invalid":"Validation failed: %{errors}","restrict_dependent_destroy":{"many":"Cannot delete record because dependent %{record} exist","one":"Cannot delete record because a dependent %{record} exists"}}}},"admin":{"abbrev":"Abbreviation","desc":"Description","details":"Details","firstname":"First name","guidance":"Guidance","guidance_group":"Guidance group","last_logged_in":"Last logged in","multi_options":"Multiple question options","name":"Name","no_guidance_group":"No guidance group","old_temp_field":"old template field","old_theme_field":"old theme field","org":"Organisation","org_created_message":"Organisation was successfully created.","org_parent":"Parent organisation","org_title":"Organisation name","org_type":"Organisation type","org_updated_message":"Organisation was successfully updated.","orgs":"Organisations","phase":"Phase","phase_title":"Phase title","phases":"Phases","plans":"Plans","question":"Question","question_format":"Question Format","questions":"Questions","role":"Role","section":"Section","section_title":"Section title","sections":"Sections","sug_answer":"Suggested answer","sug_answers":"Suggested answers","surname":"Surname","template":"Template","template_title":"Template title","templates":"Templates","theme":"Theme","themes":"Themes","title":"Title","user":"User","user_name":"Username","user_org_role":"User role on an Organisation","user_role":"User role","user_role_type":"User role type","user_status":"User status","user_type":"User type","version":"Version","version_numb":"Version number","version_title":"Version title","versions":"Versions"},"contact_page":{"address_text_html":"\u003Cul\u003E \u003Cli\u003EDigital Curation Centre\u003C/li\u003E \u003Cli\u003ELevel 7, Appleton Tower\u003C/li\u003E \u003Cli\u003ECrichton Street\u003C/li\u003E \u003Cli\u003EEdinburgh\u003C/li\u003E \u003Cli\u003EEH8 9LE\u003C/li\u003E \u003Cli\u003EUK\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003ETel. +44 (0) 131 651 1239\u003C/p\u003E \u003Cp\u003EEmail \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20inquiry' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E\u003C/p\u003E","github_text_html":"\u003Cp\u003EIf you have a feature request or think you have found a bug, please check out the \u003Ca href='https://github.com/DigitalCurationCentre/DMPonline_v4/issues?state=open'\u003Elist of issues on GitHub\u003C/a\u003E. 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.\u003C/p\u003E","intro_text_html":"\u003Cp\u003EDMPonline is provided by the Digital Curation Centre. You can find out more about us on our \u003Ca href='http://www.dcc.ac.uk/' target='_blank'\u003Ewebsite\u003C/a\u003E. If you would like to contact us about DMPonline, please enter your query in the form below or email \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20inquiry' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E.\u003C/p\u003E","title":"Contact 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":{"contact_us":"Contact Us","email":"Email","message":"Message","name":"Name","subject":"Subject","submit":"Submit"},"new_formtastic":{"contact_us":"Contact Us","email":"Email","message":"Message","name":"Name","subject":"Subject","submit":"Submit"},"new_simple_form":{"contact_us":"Contact Us","email":"Email","message":"Message","name":"Name","subject":"Subject","submit":"Submit"}},"notices":{"error":"You must enter both fields.","success":"Contact email was successfully sent."}},"date":{"abbr_day_names":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"abbr_month_names":[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"day_names":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"formats":{"default":"%d-%m-%Y","long":"%d %B, %Y","short":"%d/%m/%Y"},"month_names":[null,"January","February","March","April","May","June","July","August","September","October","November","December"],"order":["day","month","year"]},"datetime":{"distance_in_words":{"about_x_hours":{"one":"about 1 hour","other":"about %{count} hours"},"about_x_months":{"one":"about 1 month","other":"about %{count} months"},"about_x_years":{"one":"about 1 year","other":"about %{count} years"},"almost_x_years":{"one":"almost 1 year","other":"almost %{count} years"},"half_a_minute":"half a minute","less_than_x_minutes":{"one":"less than a minute","other":"less than %{count} minutes"},"less_than_x_seconds":{"one":"less than 1 second","other":"less than %{count} seconds"},"over_x_years":{"one":"over 1 year","other":"over %{count} years"},"x_days":{"one":"1 day","other":"%{count} days"},"x_minutes":{"one":"1 minute","other":"%{count} minutes"},"x_months":{"one":"1 month","other":"%{count} months"},"x_seconds":{"one":"1 second","other":"%{count} seconds"}},"prompts":{"day":"Day","hour":"Hour","minute":"Minute","month":"Month","second":"Seconds","year":"Year"}},"dcc_name":"Digital Curation Centre","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.","invited":"You have a pending invitation, accept it to finish creating your account.","last_attempt":"You have one more attempt before your account is locked.","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."},"invitations":{"edit":{"header":"Set your password","submit_button":"Set my password"},"invitation_removed":"Your invitation was removed.","invitation_token_invalid":"The invitation token provided is not valid!","new":{"header":"Send invitation","submit_button":"Send an invitation"},"no_invitations_remaining":"No invitations remaining","send_instructions":"An invitation email has been sent to %{email}.","updated":"Your password was set successfully. You are now signed in.","updated_not_active":"Your password was set successfully."},"mailer":{"confirmation_instructions":{"subject":"Confirm your DMPonline account"},"invitation_instructions":{"accept":"Accept invitation","accept_until":"This invitation will be due in %{due_date}.","hello":"Hello %{email}","ignore":"If you don't want to accept the invitation, please ignore this email.\u003Cbr /\u003E\nYour account won't be created until you access the link above and set your password.","someone_invited_you":"Someone has invited you to %{url}, you can accept it through the link below.","subject":"Invitation instructions"},"password_change":{"subject":"Password Changed"},"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":{"already_signed_out":"Signed out successfully.","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."}},"dmponline3_text":"DMPonline previous version","errors":{"connection_refused":"Oops! Failed to connect to the Web Console middleware.\nPlease make sure a rails development server is running.\n","format":"%{attribute} %{message}","messages":{"accepted":"must be accepted","already_confirmed":"was already confirmed, please try signing in","blank":"can't be blank","confirmation":"doesn't match %{attribute}","confirmation_period_expired":"needs to be confirmed within %{period}, please request a new one","empty":"can't be empty","equal_to":"must be equal to %{count}","even":"must be even","exclusion":"is reserved","expired":"has expired, please request a new one","greater_than":"must be greater than %{count}","greater_than_or_equal_to":"must be greater than or equal to %{count}","inclusion":"is not included in the list","invalid":"is invalid","less_than":"must be less than %{count}","less_than_or_equal_to":"must be less than or equal to %{count}","not_a_number":"is not a number","not_an_integer":"must be an integer","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:"},"odd":"must be odd","other_than":"must be other than %{count}","present":"must be blank","taken":"has already been taken","too_long":"is too long (maximum is %{count} characters)","too_short":"is too short (minimum is %{count} characters)","url":"is not a valid URL","wrong_length":"is the wrong length (should be %{count} characters)"},"unacceptable_request":"A supported version is expected in the Accept header.\n","unavailable_session":"Session %{id} is is no longer available in memory.\n\nIf you happen to run on a multi-process server (like Unicorn or Puma) the process\nthis request hit doesn't store %{id} in memory. Consider turning the number of\nprocesses/workers to one (1) or using a different server in development.\n"},"flash":{"actions":{"create":{"notice":"%{resource_name} was successfully created."},"destroy":{"alert":"%{resource_name} could not be destroyed.","notice":"%{resource_name} was successfully destroyed."},"update":{"notice":"%{resource_name} was successfully updated."}}},"help_page":{"body_text_tab_1_html":"\u003Cp\u003EWhen 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.\u003C/p\u003E \u003Ch3\u003ECreate a plan\u003C/h3\u003E \u003Cp\u003ETo 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'\u003C/p\u003E \u003Ch3\u003EWrite your plan\u003C/h3\u003E \u003Cp\u003EThe tabbed interface allows you to navigate through different functions when editing your plan.\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- 'Plan details' includes basic administrative details, tells you what sets of questions and guidance your plan is based on and gives you an overview to the questions that you will be asked.\u003C/li\u003E \u003Cli\u003E- The following tab(s) present the questions to answer. There may be more than one tab if your funder or university asks different sets of questions at different stages e.g. at grant application and post-award.\u003C/li\u003E \u003Cli\u003E- The 'Share' tab allows you to invite others to read or contribute to your plan.\u003C/li\u003E \u003Cli\u003E- The 'Export' tab allows you to download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003EWhen 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.\u003C/p\u003E \u003Cp\u003EGuidance is displayed in the right-hand panel. Click the '+' symbol to view this.\u003C/p\u003E \u003Cp\u003ERemember to 'save' your responses before moving on.\u003C/p\u003E \u003Ch3\u003EShare plans\u003C/h3\u003E \u003Cp\u003EInsert 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'\u003C/p\u003E \u003Ch3\u003EExport plans\u003C/h3\u003E \u003Cp\u003EFrom 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.\u003C/p\u003E \u003Ch3\u003ELegacy data\u003C/h3\u003E \u003Cp\u003EIf you need to access plans from the earlier version of the tool please visit \u003Ca href='https://dmponline3.dcc.ac.uk' target='_top'\u003EDMPonline v3\u003C/a\u003E.\u003C/p\u003E","body_text_tab_2_html":"\u003Ch3\u003EUseful resources on Data Management Planning\u003C/h3\u003E \u003Cul class='help_ul'\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/resources/data-management-plans/funders-requirements'\u003EUK funder requirements for Data Management Plans\u003C/a\u003E [webpage]\u003Cbr /\u003E A summary of requirements from UK Research Councils and other charitable or health funders. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='https://dmp.cdlib.org/pages/funder_requirement'\u003EUS funder requirements for Data Management Plans\u003C/a\u003E [webpage]\u003Cbr /\u003E A summary of requirements from the NSF, NIH and other key funders in the USA. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/resource/DMP_Checklist_2013.pdf'\u003EDCC Checklist for a Data Management Plan\u003C/a\u003E [PDF, 3 pages]\u003Cbr /\u003E A list of 13 questions and associated guidance, that represent the main issues to come up in Data Management and Sharing Plans. The Checklist is used as a generic template in DMPonline, and is presented when no funder or organsiational requirements are applicable for the user. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/publications/reports/guides/How%20to%20Develop.pdf'\u003EHow to develop a Data Management and Sharing Plan\u003C/a\u003E [PDF, 8 pages]\u003Cbr /\u003EA guide by the Digital Curation Centre that outlines typical funder requirements for DMPs and the types of considerations to make when responding. \u003C/li\u003E \u003C/ul\u003E \u003Ch3\u003EExample Data Management Plans\u003C/h3\u003E \u003Cul class='help_ul'\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://data.bris.ac.uk/research/planning/files/2013/08/data.bris-AHRC-example-Technical-Plan-v2.pdf'\u003ETechnical plan submitted to the AHRC\u003C/a\u003E [PDF, 7 pages]\u003Cbr /\u003E A DMP submitted by a researcher from the University of Bristol, also including comments from the reviewers \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/adocs/Leeds-RoaDMaP-DMPs.pdf'\u003ETwo social science DMPs\u003C/a\u003E [PDF, 7 pages]\u003Cbr /\u003E Example plans from researchers at the University of Leeds, shared as part of the Leeds RoaDMaP training materials \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.northumbria.ac.uk/static/5007/ceispdf/dmpfull.pdf'\u003EHealth sciences DMP\u003C/a\u003E [PDF, 11 pages]\u003Cbr /\u003E Example DMP produced by the DATUM for Health RDM training project \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/adocs/DMTpsych-example-DMP.pdf'\u003EPsychology DMP\u003C/a\u003E [PDF, 11 pages]\u003Cbr /\u003E A very detailed, fictional psychology DMP produced by the DMTpsych RDM training project, based on a seminal psychology experiment \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://rci.ucsd.edu/data-curation/examples.html'\u003EUCSD Example Data Management Plans\u003C/a\u003E [webpage]\u003Cbr /\u003E Over 20 example plans submitted to the National Science Foundation (NSF) in the United States by academics at UC San Diego \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://inside.mines.edu/RDS-example-plans'\u003EColorado School of Mines examples\u003C/a\u003E [webpage]\u003Cbr /\u003E A variety of US example DMPs from Mines and elsewhere \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='https://www.dataone.org/data-management-planning'\u003ENSF data management plans\u003C/a\u003E [webpage]\u003Cbr /\u003E 5 DMPs submitted to the NSF, shared by the DataOne initiative \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://library.umassmed.edu/necdmc/dmp'\u003EBiology and chemistry DMPs\u003C/a\u003E [webpage]\u003Cbr /\u003E Three example DMPs from the USA shared by NECDMC, an instructional tool for teaching RDM to undergraduates, graduate students, and researchers in the health sciences, sciences and engineering. \u003C/li\u003E \u003C/ul\u003E \u003Ch3\u003EUseful guides on Research Data Management in general\u003C/h3\u003E \u003Cul class='help_ul'\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.data-archive.ac.uk/media/2894/managingsharing.pdf'\u003EManaging and Sharing Data: best practice for researchers\u003C/a\u003E [PDF, 36 pages]\u003Cbr /\u003E A guide by the UK Data Service covering a range of topics including data formats, documentaion, ethics, copyright and data sharing. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/publications/reports/guides/How_to_Cite_Link.pdf'\u003EHow to Cite Datasets and Link to Publications\u003C/a\u003E [PDF, 12 pages]\u003Cbr /\u003E 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. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/publications/reports/guides/How_To_License_Research_Data.pdf'\u003EHow to License Research Data\u003C/a\u003E [PDF, 16 pages]\u003Cbr /\u003E 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. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://www.dcc.ac.uk/sites/default/files/documents/How%20to%20Appraise%20and%20Select%20Research%20Data.pdf'\u003EHow to Appraise and Select Research Data for Curation\u003C/a\u003E [PDF, 8 pages]\u003Cbr /\u003E 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. \u003C/li\u003E \u003Cli\u003E \u003Ca target='_blank' href='http://datalib.edina.ac.uk/mantra'\u003EResearch Data MANTRA\u003C/a\u003E [online resource]\u003Cbr /\u003E 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. \u003C/li\u003E \u003C/ul\u003E","tab_1":"On DMPonline","tab_2":"On data management planning","title":"Help"},"helpers":{"about_us_label":"About","accept_terms_html":" I accept the \u003Ca href='/terms'\u003Eterms and conditions\u003C/a\u003E *","actions":"Actions","add_comment_accordion_label":"Share note","admin_area":"Super admin area","answer_questions":"Answer questions","answered_by":"Answered ","answered_by_part2":" by ","answers_label":"Answers","change_password":"Change your password","checkbox":"Check box","comment":"Comment","comment_accordion_label":"Notes","comments":{"add_comment_label":"Add note","add_comment_text":"Share note with collaborators","archive_comment_button_label":"Remove","archive_comment_question":"Are you sure you would like to remove this note?","archive_own_comment_button_label":"Remove","archive_own_comment_question":"Are you sure you would like to remove this note?","clear_by":"Note removed by","clear_label":"Remove","comment_label":"Note","commented_by":"Noted by:","comments_label":"Notes","edit_label":"Edit","retract_label":"Remove","retracted":"Note removed by you","view_label":"View"},"contact_label":"Contact","create_plan_label":"Create plan","current_password":"Current password","desc":"Description","dropdown":"Dropdown","edit_password_info":"If you would like to change your password please complete the following fields.","edit_profile":"Edit profile","email":"Email","error":"Error!","export":"Export","false_lowercase":"false","first_name":"First name","first_name_help_text":"Please enter your first name.","forgot_password":"Forgot your password?","guidance":"Guidance","guidance_accordion_label":"Guidance","help_label":"Help","home":"Home","institution_sign_in":" (UK users only)","institution_sign_in_link":"Or, sign in with your institutional credentials","jisc":"The DCC is funded by","last_edit":"Last edited","last_name":"Last name","links":{"back":"Back","cancel":"Cancel","confirm":"Are you sure?","destroy":"Delete","edit":"Edit","new":"New"},"loading":"Loading...","me":"Me","multi_select_box":"Multi select box","name":"Name","new_password":"New password","no_label":"No","no_pass_instructions":"Didn't receive confirmation instructions?","no_unlock_instructions":"Didn't receive unlock instructions?","none":"None","noquestionanswered":"No questions have been answered","notanswered":"Not answered yet","note":"Note","orcid_html":"ORCID number is a persistent digital identifier that distinguishes each researcher, \u003Ca href='http://orcid.org/content/initiative' target='_blank' rel='external' class='a_orange'\u003Emore info\u003C/a\u003E.","orcid_id":"ORCID number","org_not_listed":"My organisation isn't listed.","org_type":{"child":"Unit","funder":"Funder","institution":"Institution","org_name":"Organisation name","organisation":"Organisation","other_guidance":"Other guidance","other_org_help_text":"Please enter the name of your organisation.","project":"Project","publisher":"Publisher","school":"School","template":"Template","templates":"Templates"},"owner":"Owner","page_entries_info":{"more_pages":{"display_entries":"Displaying %{entry_name} \u003Cb\u003E%{first}\u0026nbsp;-\u0026nbsp;%{last}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E in total"},"one_page":{"display_entries":{"one":"Displaying \u003Cb\u003E1\u003C/b\u003E %{entry_name}","other":"Displaying \u003Cb\u003Eall %{count}\u003C/b\u003E %{entry_name}","zero":"No %{entry_name} found"}}},"password":"Password","password_conf":"Password confirmation","password_no_match":"This must match what you entered in the previous field.","password_too_small":"Your password must contain at least 8 characters.","plan":{"export":{"funder":"Funder","grant_title":"Grant Title","institution":"Institution","pdf":{"generated_by":"This document was generated by DMPonline (http://dmponline.dcc.ac.uk)","question_not_answered":"Question not answered."},"principal_investigator":"Principal Investigator / Researcher","project_data_contact":"Project Data Contact","project_description":"Description","project_identifier":"Project Identifier","project_name":"Project Name","space_used":"approx. %{space_used}% of available space used (max %{num_pages} pages)"}},"policy_expectations":"Policy Expectations","preview":"Preview","project":{"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'","columns":{"data_contact":"Plan data contact","description":"Description","grant_number":"Grant number","identifier":"Identifier","last_edited":"Last edited","name":"Name","owner":"Owner","principal_investigator":"Principal Investigator / Researcher","shared":"Shared?","template_owner":"Template Owner"},"configure":"Configure","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_button_text":"Yes, create plan","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: \u003Ca href='http://www.dcc.ac.uk/sites/default/files/documents/resource/DMP_Checklist_2013.pdf' target='_blank'\u003EDMP checklist 2013\u003C/a\u003E.","create":"Create plan","create_page":{"default_template":"Default DMP","desc_html":"\u003Cp\u003EPlease select from the following drop-downs so we can determine what questions and guidance should be displayed in your plan.\u003C/p\u003E \u003Cp\u003EIf you aren't responding to specific requirements from a funder or an institution, \u003Ca id='create-default-plan-button' data-toggle='modal' href='#default-template-confirmation-dialog'\u003Eselect here to write a generic DMP\u003C/a\u003E based on the most common themes.\u003C/p\u003E","funders_question":"If applying for funding, select your research funder.","funders_question_description":"Otherwise leave blank.","institution_question":"To see institutional questions and/or guidance, select your organisation.","institution_question_description":"You may leave blank or select a different organisation to your own.","other_funder_name_label":"Name of funder, if applicable.","other_guidance_question":"Tick to select any other sources of guidance you wish to see.","title":"Create a new plan"},"default_confirmation_button_text":"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: \u003Ca href='http://www.dcc.ac.uk/sites/default/files/documents/resource/DMP_Checklist_2013.pdf' target='_blank'\u003EDMP checklist 2013\u003C/a\u003E.","edit":"Edit plan details","export_text_html":"\u003Cp\u003EFrom 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.\u003C/br\u003E Select what format you wish to use and click to 'Export'.\u003C/p\u003E","filter":{"cancel":"Cancel","no_matches":"No plans match '%{filter}'","placeholder":"Filter plans","submit":"Filter"},"funder_help_text":"Research funder if relevant","funder_name":"Funder name","grant_help_text":"Grant reference number if applicable [POST-AWARD DMPs ONLY]","grant_title":"Grant number","multi_templates":"There are a number of possible templates you could use. Please choose one.","my_project_name":"My plan","not_applicable":"Not applicable/not listed.","not_saved_answers_confirmation_alert":"Would you like to save them now?","not_saved_answers_header":"Unsaved answers","not_saved_answers_text_alert":"You have altered answers but have not saved them:","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/.","project_data_contact":"Plan data contact","project_data_contact_help_text":"Name (if different to above), telephone and email contact details","project_desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003E\u003Ch4\u003EQuestions to consider:\u003C/h4\u003E\u003Cul\u003E\u003Cli\u003E- What is the nature of your research project?\u003C/li\u003E\u003Cli\u003E- What research questions are you addressing? \u003C/li\u003E\u003Cli\u003E- For what purpose are the data being collected or created? \u003C/li\u003E\u003C/ul\u003E\u003Ch4\u003EGuidance:\u003C/h4\u003E\u003Cp\u003EBriefly summarise the type of study (or studies) to help others understand the purposes for which the data are being collected or created.\u003C/p\u003E\u003C/div\u003E","project_details_editing_text_html":"Please fill in the basic project details below and click 'Update' to save","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_identifier":"ID","project_identifier_help_text":"A pertinent ID as determined by the founder and/or institution.","project_name":"Plan name","project_name_help_text":"If applying for funding, state the name exactly as in the grant proposal.","project_question_desc_label":"Summary about the questions","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_static_info":"This plan is based on:","project_text_when_no_project":"\u003Cp\u003E\u003Cstrong\u003EWelcome.\u003C/strong\u003E\u003C/br\u003E You are now ready to create your first DMP.\u003C/br\u003EClick the 'Create plan' button below to begin.\u003C/p\u003E","project_text_when_project":"\u003Cp\u003EThe table below lists the plans that you have created, and any that have been shared with you by others.\u003C/br\u003EThese can be edited, shared, exported or deleted at anytime.\u003C/p\u003E","projects_title":"My plans","questions_answered":"questions answered","share":{"add":"Add","add_collaborator":"Add collaborator","co_owner":"Co-owner","collaborators":"Collaborators","confirmation_question":"Are you sure?","edit":"Edit","locked_section_text":"This section is locked for editing by ","owner":"Owner","permissions":"Permissions","permissions_desc":"Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.","read_only":"Read only","remove":"Remove user access","share_text_html":"\u003Cp\u003EYou can give other people access to your plan here. There are three permission levels.\u003Cul\u003E\u003Cli\u003EUsers with \"read only\" access can only read the plan.\u003C/li\u003E\u003Cli\u003EEditors can contribute to the plan.\u003C/li\u003E\u003Cli\u003ECo-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.\u003C/li\u003E\u003C/ul\u003E\u003C/p\u003E\u003Cp\u003EAdd each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".\u003C/p\u003E\u003Cp\u003EThose 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.\u003C/p\u003E","shared_label":"Shared?","tab_share":"Share"},"success":"Plan was successfully created.","tab_export":"Export","tab_plan":"Plan details"},"questions_label":"Questions","radio_buttons":"Radio buttons","remember_me":"Remember me","removing":"Removing...","return_home":"Return to the home page","roadmap_label":"Roadmap","save":"Save","saving":"Saving...","section_label":"Section","sections_label":"Sections","select":{"prompt":"Please select"},"select_action":"Select an action","send":"Send","send_password_info":"Reset password instructions","settings":{"plans":{"custom_formatting":"(Using custom PDF formatting values)","default_formatting":"(Using default PDF formatting values)","errors":{"invalid_font_face":"Invalid font face","invalid_font_size":"Invalid font size","invalid_margin":"Margin value is invalid","invalid_max_pages":"Invalid maximum pages","missing_key":"A required setting has not been provided","negative_margin":"Margin cannot be negative","unknown_key":"Unknown formatting setting","unknown_margin":"Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'"},"font_face":"Face","font_size":"Size","included_elements":"Included Elements","margin":"Margin","margins":{"bottom":"Bottom","left":"Left","right":"Right","top":"Top"},"max_pages":"Maximum number of pages","pdf_formatting":"PDF Formatting","reset":"Reset","template_formatting":"(Using template PDF formatting values)","title":"Plan title"},"projects":{"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":{"duplicate":"Duplicate column name. Please only include each column once.","no_name":"'name' must be included in column list.","unknown":"Unknown column name."},"title":"Settings - My plans"},"title":"Settings"},"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_unlink_alert":"Unlink institutional credentials alert","shibboleth_unlink_dialog_text":"\u003Cp\u003EYou are about to unlink DMPonline of your institutional credentials, would you like to continue?\u003C/p\u003E","shibboleth_unlink_label":"Unlink your institutional credentials","sign_in":"Sign in","sign_out":"Sign out","sign_up":"Sign up","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. \u003C/br\u003E --\u003E If you \u003Cstrong\u003Edo not have\u003C/strong\u003E an account with DMPonline, please complete the form below.\u003C/br\u003E --\u003E If you \u003Cstrong\u003Ehave\u003C/strong\u003E an account with DMPonline, please \u003Ca href='#header-login-form' data-toggle='modal' class='a_orange'\u003ESign in\u003C/a\u003E so we can link your account to your institutional credentials.\u003C/br\u003E Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly.","sign_up_text":"New to DMPonline? Sign up today.","signed_in":"Signed in as ","submit":{"back":"Back","cancel":"Cancel","create":"Create","delete":"Delete","discard":"Discard","edit":"Edit","save":"Save","submit":"Save %{model}","update":"Update"},"suggested_answer":"Suggested answer","suggested_example":"Example answer","surname_help_text":"Please enter your surname or family name.","text_area":"Text area","text_field":"Text field","title":"Title","titles":{"delete":"Delete","edit":"Edit","new":"New","save":"Save"},"unlink_account":"Unlink account","unsaved":"Unsaved changes","user_details_paragraph_html":"You can edit any of the details below.","user_details_text_html":"\u003Cp\u003EPlease note that your email address is used as your username. If you change this, remember to use your new email address on sign in.\u003C/p\u003E","user_name":"Email address","valid_email":"You must enter a valid email address.","view":"View","view_plans_label":"View plans","yes_label":"Yes"},"number":{"currency":{"format":{"delimiter":",","format":"%u%n","precision":2,"separator":".","significant":false,"strip_insignificant_zeros":false,"unit":"$"}},"format":{"delimiter":",","precision":3,"separator":".","significant":false,"strip_insignificant_zeros":false},"human":{"decimal_units":{"format":"%n %u","units":{"billion":"Billion","million":"Million","quadrillion":"Quadrillion","thousand":"Thousand","trillion":"Trillion","unit":""}},"format":{"delimiter":"","precision":3,"significant":true,"strip_insignificant_zeros":true},"storage_units":{"format":"%n %u","units":{"byte":{"one":"Byte","other":"Bytes"},"gb":"GB","kb":"KB","mb":"MB","tb":"TB"}}},"percentage":{"format":{"delimiter":"","format":"%n%"}},"precision":{"format":{"delimiter":""}}},"org_admin":{"abbre_help_text":"Please enter an abbreviation to your organisation's name.","add_option_label":"Add option","add_question_label":"Add question","add_section_label":"Add section","admin_area":"Admin area","desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter information describing your organisation.\u003C/div\u003E","guidance":{"actions":"Actions","add_guidance":"Add guidance","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_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.","by_question_label":"by question","by_theme_or_by_question":"Should this guidance apply:","by_themes_help_text_html":"Select which theme(s) this guidance relates to.","by_themes_label":"by themes","created":"Created","created_message":"Guidance was successfully created.","delete_message_html":"You are about to delete '%{guidance_summary}'. Are you sure?","guidance_group_label":"Guidance group","guidance_group_select_help_text_html":"Select which group this guidance relates to.","guidance_list":"Guidance list","guidance_text_html":"\u003Cp\u003EYou 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.\u003C/p\u003E \u003Cp\u003EYou 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.\u003C/p\u003E","help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter guidance text for this theme.\u003C/div\u003E","last_updated":"Last updated","new_label":"New guidance","published":"Published","question_label":"Question","template":"Template","templates":"Templates","text_help_text_html":"Enter your guidance here. You can include links where needed.","text_label":"Text","themes_label":"Themes","updated_message":"Guidance was successfully updated.","view_all_guidance":"View all guidance"},"guidance_group":{"add_guidance_group":"Add guidance group","all_temp":"All templates","created_message":"Guidance group was successfully created.","delete_message":"You are about to delete '%{guidance_group_name}'. This will affect guidance. Are you sure?","destroyed_message":"Guidance group was successfully deleted.","guidance_group_list":"Guidance group list","guidance_group_text_html":"\u003Cp\u003EFirst 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.\u003C/p\u003E","help_text_add":"Please enter the group title","name_label":"Name","subset":"Optional subset","subset_eg":"e.g. School/ Department","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'","updated_message":"Guidance group was successfully updated."},"guidance_label":"Guidance","how_many_plans":"How many plans?","last_logged_in":"Last logged in","last_updated":"Last updated","name_help_text":"Please enter your organisation's name.","option_default_label":"Default","option_order_label":"Order","option_text_label":"Text","org_abbr":"Abbreviation","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.","org_banner_text":"Top banner text","org_desc":"Description","org_details_label":"Organisation details","org_name":"Name","org_target_url":"Website","org_text":"These are the basic details for your organisation.","org_type":"Organisation type","parent_org":"Main organisation","questions":{"answer_format_label":"Answer format","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.","default_answer_label":"Default answer","default_value_label":"Default value","delete_message":"You are about to delete '%{question_text}'. Are you sure?","delete_suggested_answer_message":"You are about to delete a suggested answer/ example for '%{question_text}'. Are you sure?","edit_suggested_answer_button":"Edit suggested answer/ example","example_answer_label":"Example of answer","guidance_label":"Guidance","number_help_text":"This allows you to order questions within a section.","option_comment_display":"Additional comment area will be displayed.","option_comment_display_checkbox":"Display additional comment area.","option_comment_hide":"No additional comment area will be displayed.","question_delete_button":"Delete question","question_edit_button":"Edit question","question_format_help_text_html":"You can choose from:\u003Cul\u003E\u003Cli\u003E- text area (large box for paragraphs);\u003C/li\u003E \u003Cli\u003E- text field (for a short answer);\u003C/li\u003E \u003Cli\u003E- checkboxes where options are presented in a list and multiple values can be selected;\u003C/li\u003E \u003Cli\u003E- radio buttons where options are presented in a list but only one can be selected;\u003C/li\u003E \u003Cli\u003E- dropdown like this box - only one option can be selected;\u003C/li\u003E \u003Cli\u003E- multiple select box allows users to select several options from a scrollable list, using the CTRL key;\u003C/li\u003E\u003C/ul\u003E","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.","question_number_label":"Question number","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.","question_text_label":"Question text","question_themes_help_text_html":"\u003Cp\u003ESelect themes that are relevant to this question.\u003C/p\u003E \u003Cp\u003EThis 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. \u003C/p\u003E \u003Cp\u003EYou can select multiple themes by using the CTRL button.\u003C/p\u003E","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_answer_label":"Suggested answer","suggested_or_example_answer_button":"Add suggested answer/ example","suggested_or_example_answer_label":"Suggested answer/ Example","themes_label":"Themes"},"remove_option_label":"Remove","target_url_help_text":"Please enter a web address valid.","template_desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003EEnter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.\u003C/div\u003E","template_label":"Templates","templates":{"actions":"Actions","add_phase_label":"Add new phase +","add_question":"Add question","add_section":"Add section","back_to_edit_phase_label":"Back to edit view","cannot_publish":"Please ensure you have created at least one phase with a published version.","create_new_template_text_html":"\u003Cp\u003ETo 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. \u003C/p\u003E","create_own_template_text_html":"\u003Cp\u003EIf 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.\u003C/p\u003E \u003Cp\u003EYour template will be presented to users within your institution when no founder templates apply. If you want to add questions to funder templates use the 'customise template' options below.\u003C/p\u003E","create_template":"Create a template","created":"Created at","created_message":"Information was successfully created.","customise":"Customise","desc_help_text_html":"Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences","desc_label":"Description","destroyed_message":"Information was successfully deleted.","edit_customisation":"Edit customisation","edit_details":"Edit template details","edit_phase_details_label":"Edit phase details","edit_phase_label":"Edit phase","funders_temp":"Funders templates","help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter template description for this theme.\u003C/div\u003E","last_updated":"Last updated","new_label":"New template","new_section":"New section title","own_temp":"Own templates","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_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_details_label":"Phase details","phase_details_text_html":"\u003Cp\u003EHere 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.\u003Cp/\u003E","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.","phase_number_help_text":"This allows you to order the phases of your template.","phase_order_label":"Order of display","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","published_label":"Published","section_delete_message":"You are about to delete '%{section_title}'. This will affect questions linked to this section. Are you sure?","section_desc_help_text_html":"\u003Cdiv class='tooltip_box'\u003EEnter 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.\u003C/div\u003E","section_number_help_text":"This allows you to order sections.","section_title_help_text":"Please enter section title","section_title_placeholder":"New section title","template_details":"Template details","title_help_text":"Please enter a title for your template.","title_label":"Title","updated_message":"Information was successfully updated.","version_details_label":"Version details","versions_label":"Versions","view_all_templates":"View all templates","view_phase_label":"View phase"},"templates_label":"Templates","top_banner_help_text_html":"\u003Cdiv class='tooltip_box'\u003EPlease enter information you would like your users to see while sign in. Do not enter more than 165 characteres.\u003C/div\u003E","user_full_name":"Name","user_list_label":"Users","user_name":"Email address","user_text_html":"Below is a list of users registered for your organisation. You can sort the data by each field.","users_list":"List of users","versions":{"clone_versions_label":"Make big changes","delete_message":"You are about to delete '%{version_title}'. This will affect sections and questions linked to this version. Are you sure?","desc_help_text_html":"Enter a basic description as an internal reference to describe the difference between versions","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","edit_label":"Edit","edit_versions_label":"Make small changes","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."}},"ransack":{"all":"all","and":"and","any":"any","asc":"ascending","attribute":"attribute","combinator":"combinator","condition":"condition","desc":"descending","or":"or","predicate":"predicate","predicates":{"blank":"is blank","cont":"contains","cont_all":"contains all","cont_any":"contains any","does_not_match":"doesn't match","does_not_match_all":"doesn't match all","does_not_match_any":"doesn't match any","end":"ends with","end_all":"ends with all","end_any":"ends with any","eq":"equals","eq_all":"equals all","eq_any":"equals any","false":"is false","gt":"greater than","gt_all":"greater than all","gt_any":"greater than any","gteq":"greater than or equal to","gteq_all":"greater than or equal to all","gteq_any":"greater than or equal to any","in":"in","in_all":"in all","in_any":"in any","lt":"less than","lt_all":"less than all","lt_any":"less than any","lteq":"less than or equal to","lteq_all":"less than or equal to all","lteq_any":"less than or equal to any","matches":"matches","matches_all":"matches all","matches_any":"matches any","not_cont":"doesn't contain","not_cont_all":"doesn't contain all","not_cont_any":"doesn't contain any","not_end":"doesn't end with","not_end_all":"doesn't end with all","not_end_any":"doesn't end with any","not_eq":"not equal to","not_eq_all":"not equal to all","not_eq_any":"not equal to any","not_in":"not in","not_in_all":"not in all","not_in_any":"not in any","not_null":"is not null","not_start":"doesn't start with","not_start_all":"doesn't start with all","not_start_any":"doesn't start with any","null":"is null","present":"is present","start":"starts with","start_all":"starts with all","start_any":"starts with any","true":"is true"},"search":"search","sort":"sort","value":"value"},"roadmap_page":{"body_text_tab_1_html":"\u003Cp\u003EDMPonline has an active and growing user base, and we are grateful to the members who suggest ideas for new and improved features. We regularly take stock of how we can expand our service to meet these evolving needs.\u003C/p\u003E \u003Cp\u003EA number of enhancements and new features are planned. These include:\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- APIs to create plans, extract guidance and generate statistics from DMPonline\u003C/li\u003E \u003Cli\u003E- Multi-lingual support so foreign language versions can be presented\u003C/li\u003E \u003Cli\u003E- Locale-aware support to provide tailored instances for particular countries or other contexts\u003C/li\u003E \u003Cli\u003E- A lifecycle to indicate the status of DMPs and allow institutional access to plans\u003C/li\u003E \u003Cli\u003E- Support for reviewing Data Management Plans\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003EWe are currently revising the timeframes for our roadmap due to staff changes and pending recruitment. We expect to have a new version online by early 2016.\u003C/p\u003E \u003Cp\u003ETo make sure we’re on the right track, we work to develop our roadmap in conjunction with our DMPonline user group. If you would like to help shape our future plans, please join the group. More information on how you can engage with us is available under the 'Get involved' tab.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003ECurrent release\u003C/h3\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-ReleaseNote-August2015.pdf' target='_blank'\u003ERelease Note\u003C/a\u003E\u003C/li\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-v4-InstitutionalBranding.pdf' target='_blank'\u003ECustomise DMPonline tool with institutional branding\u003C/a\u003E\u003C/li\u003E \u003C/ul\u003E \u003Cp\u003EThe code is available on \u003Ca target='_blank' href='https://github.com/DigitalCurationCentre/DMPonline_v4'\u003EGitHub\u003C/a\u003E\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EPrevious release\u003C/h3\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003Cul\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-DeliveryNote-May2015.pdf' target='_blank'\u003ERelease Note\u003C/a\u003E\u003C/li\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-v4-InstitutionalLogin.pdf' target='_blank'\u003ESigning into DMPonline version 4 with UK Institutional Credentials\u003C/a\u003E\u003C/li\u003E \u003Cli\u003E- \u003Ca href='/files/DMPonline-v4-LocaleSupport.pdf' target='_blank'\u003EDeveloping Locale-Aware Support for DMPonline version 4\u003C/a\u003E\u003C/li\u003E \u003C/ul\u003E \u003C/br\u003E","body_text_tab_2_html":"\u003Cp\u003EDMPonline 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:\u003C/p\u003E \u003Ch3\u003EJoin the user group\u003C/h3\u003E \u003Cp\u003EWe want to engage with our users more actively so invite you to join the user group. We run a \u003Ca target='_blank' href='https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=DMPONLINE-USER-GROUP'\u003Elistserv\u003C/a\u003E for the group that you can request to join. We also host periodic meetings to consult on our plans\u003C/p\u003E \u003Cp\u003EOur 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 also helpful for us to know what type of user you are –researcher, institutional administrator, librarian, developer, funder etc.\u003C/p\u003E \u003Cp\u003EPlease 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003ECustomise DMPonline\u003C/h3\u003E \u003Cp\u003EDMPonline 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 \u003Ca href='mailto:dmponline@dcc.ac.uk?Subject=DMPonline%20Admin%20access' target='_top'\u003Edmponline@dcc.ac.uk\u003C/a\u003E.\u003C/p\u003E \u003Cp\u003EFuther guidance on customising DMPonline is available on the \u003Ca href='http://www.dcc.ac.uk/dmponline' target='_blank'\u003EDCC website\u003C/a\u003E.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003EContribute to the code\u003C/h3\u003E \u003Cp\u003EDMPonline 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.\u003C/p\u003E \u003Cp\u003EIf 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.\u003C/p\u003E \u003Cp\u003EWe 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.\u003C/p\u003E \u003C/br\u003E \u003Ch3\u003ESupport our work\u003C/h3\u003E \u003Cp\u003EWe 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.\u003C/p\u003E \u003Cp\u003EWe 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.\u003C/p\u003E ","tab_1":"Future plans","tab_2":"Get involved","title":"Roadmap"},"screencast_error_text":"Your browser does not support the video tag.","screencast_text":"Screencast on how to use DMPonline","support":{"array":{"last_word_connector":", and ","two_words_connector":" and ","words_connector":", "}},"terms_page":{"body_text_html":"\u003Cdiv class='white_background'\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EDMPonline\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EDMPonline ('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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EYour personal details\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EIn 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EPrivacy policy\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EFreedom of Information\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EThe 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.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003EPasswords\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EYour password is stored in encrypted form and cannot be retrieved. If forgotten it has to be reset.\u003C/p\u003E \u003C/div\u003E \u003Ch3\u003ECookies\u003C/h3\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EPlease note that DMPonline uses Cookies. Further information about Cookies and how we use them is available on the \u003Ca target='_blank' href='http://www.dcc.ac.uk/about-us/about-site/website-terms-use/cookies'\u003Emain DCC website\u003C/a\u003E.\u003C/p\u003E \u003C/div\u003E \u003Cbr /\u003E \u003Cdiv class='white_background'\u003E \u003Cp\u003EUse of the tool indicates that you understand and agree to these terms and conditions.\u003C/p\u003E\u003C/div\u003E","title":"Terms of use"},"time":{"am":"am","formats":{"custom":"%d/%m/%Y %H:%M","default":"%a, %d %b %Y %H:%M:%S %z","devise":{"mailer":{"invitation_instructions":{"accept_until_format":"%B %d, %Y %I:%M %p"}}},"long":"%B %d, %Y %H:%M","short":"%d %b %H:%M"},"pm":"pm"},"tool_title":"DMPonline","views":{"pagination":{"first":"\u0026laquo; First","last":"Last \u0026raquo;","next":"Next \u0026rsaquo;","previous":"\u0026lsaquo; Prev","truncate":"\u0026hellip;"}},"welcome_text":"\u003Cp\u003EDMPonline has been developed by the \u003Ca href='http://dcc.ac.uk' target='_blank'\u003EDigital Curation Centre\u003C/a\u003E to help you write data management plans.\u003C/p\u003E","welcome_title":"Welcome."});
+I18n.translations["tr"] = I18n.extend((I18n.translations["tr"] || {}), {"active_admin":{"access_denied":{"message":"Bu işlemi gerçekleştirmek için yetkiniz yok."},"any":"Herhangi biri","batch_actions":{"action_label":"Seçilenleri %{title}","button_label":"Toplu İşlemler","default_confirmation":"Bunu yapmak istediğinizden emin misiniz?","delete_confirmation":"Bu %{plural_model} kayıtlarını silmek istediğinizden emin misiniz?","labels":{"destroy":"Sil"},"link":"Yeni oluştur","selection_toggle_explanation":"(Seçimi Değiştir)","succesfully_destroyed":{"one":"1 %{model} başarıyla silindi","other":"Toplam %{count} %{plural_model} başarıyla silindi"}},"blank_slate":{"content":"Henüz %{resource_name} yok.","link":"Bir tane oluşturun"},"cancel":"İptal","comments":{"add":"Yorum Ekle","author":"Yazar","author_missing":"Anonim","author_type":"Yazar Tipi","body":"Ayrıntı","created_at":"Oluşturma Tarihi","delete":"Yorumu Sil","delete_confirmation":"Bu yorumları silmek istediğinizden emin misiniz?","errors":{"empty_text":"Yorum boş olarak kaydedilemez."},"no_comments_yet":"Henüz yorum yok.","resource":"Kayıt","resource_type":"Kayıt Tipi","title":"Yorum","title_content":"Yorumlar (%{count})"},"dashboard":"Gösterge Paneli","dashboard_welcome":{"call_to_action":"Buraya bölümler eklemek için 'app/admin/dashboard.rb' dosyasına bakabilirsiniz.","welcome":"Active Admin'e hoş geldiniz. Burası varsayılan gösterge paneli sayfasıdır."},"delete":"Sil","delete_confirmation":"Bu kaydı silmek istediğinizden emin misiniz?","delete_model":"%{model} Kaydını Sil","details":"%{model} Ayrıntıları","devise":{"change_password":{"submit":"Şifremi değiştir","title":"Şifrenizi değiştirin"},"email":{"title":"E-posta adresi"},"links":{"forgot_your_password":"Şifrenizi mi unuttunuz?","resend_confirmation_instructions":"Onaylama talimatlarını tekrar gönder","resend_unlock_instructions":"Hesap geri açma talimatlarını tekrar gönder","sign_in":"Giriş yap","sign_in_with_omniauth_provider":"%{provider} ile giriş yapın","sign_up":"Kaydol"},"login":{"remember_me":"Beni hatırla","submit":"Giriş yap","title":"Giriş yap"},"password":{"title":"Şifre"},"resend_confirmation_instructions":{"submit":"Onaylama talimatlarını tekrar gönder","title":"Onaylama talimatlarını tekrar gönder"},"reset_password":{"submit":"Şifremi sıfırla","title":"Şifrenizi mi unuttunuz?"},"sign_up":{"submit":"Kaydol","title":"Kaydol"},"subdomain":{"title":"Alt alan adı"},"unlock":{"submit":"Hesap geri açma talimatlarını tekrar gönder","title":"Hesap geri açma talimatlarını tekrar gönder"},"username":{"title":"Kullanıcı adı"}},"download":"İndir:","dropdown_actions":{"button_label":"İşlemler"},"edit":"Düzenle","edit_model":"%{model} Kaydını Düzenle","empty":"Boş","filters":{"buttons":{"clear":"Filtreleri Temizle","filter":"Filtrele"},"predicates":{"contains":"İçerir","ends_with":"İle biter","equals":"Eşittir","greater_than":"Büyüktür","less_than":"Küçüktür","starts_with":"İle başlar"}},"has_many_delete":"Sil","has_many_new":"Yeni %{model} Ekle","has_many_remove":"Çıkar","index_list":{"block":"Liste","blog":"Blog","grid":"Izgara","table":"Tablo"},"logout":"Çıkış Yap","main_content":"İçeriği görüntülemek için lütfen %{model}#main_content metodunu ekleyin.","new_model":"Yeni %{model}","next":"Sonraki","pagination":{"empty":"Hiç %{model} yok","entry":{"one":"kayıt","other":"kayıtlar"},"multiple":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E arası %{model} görüntüleniyor (toplam %{total} kayıt)","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E arası %{model} görüntüleniyor","one":"\u003Cb\u003E1\u003C/b\u003E %{model} görüntüleniyor","one_page":"\u003Cb\u003E%{n}\u003C/b\u003E %{model} kaydının tamamı görüntüleniyor"},"powered_by":"%{active_admin} %{version} tarafından desteklenmektedir.","previous":"Önceki","search_status":{"current_filters":"Seçili filtreler:","current_scope":"Kapsam:","headline":"Arama","no_current_filters":"Yok"},"sidebars":{"filters":"Filtreler","search_status":"Arama Durumu"},"status_tag":{"no":"Hayır","yes":"Evet"},"unsupported_browser":{"headline":"ActiveAdmin Internet Explorer 8 ve altı artık desteklememektedir.","recommendation":"Son sürüm \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, ya da \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E tarayıcılarından birine geçmenizi tavsiye ederiz.","turn_off_compatibility_view":"IE 9 ya da üstünü kullanıyorsanız, \u003Ca href=\"http://windows.microsoft.com/tr-tr/internet-explorer/use-compatibility-view\"\u003E\"Uyumluluk Görünümü\"\u003C/a\u003Enü kapatmayı unutmayın."},"view":"Görüntüle"},"errors":{"messages":{"url":"Geçerli bir URL değil"}},"formtastic":{"cancel":"İptal","create":"%{model} oluştur","no":"Hayır","required":"Zorunlu","reset":"%{model} sıfırla","submit":"Gönder","update":"%{model} güncelle","yes":"Evet"}});
+I18n.translations["ja"] = I18n.extend((I18n.translations["ja"] || {}), {"active_admin":{"access_denied":{"message":"アクションを実行する権限がありません"},"any":"任意","batch_actions":{"action_label":"選択した行を%{title}","button_label":"一括操作","default_confirmation":"本当によろしいですか?","delete_confirmation":"%{plural_model} を削除してもよろしいですか?","labels":{"destroy":"削除する"},"link":"作成する","selection_toggle_explanation":"(選択)","succesfully_destroyed":{"one":"1件の %{model} を削除しました","other":"%{count}件の %{plural_model} を削除しました"}},"blank_slate":{"content":"%{resource_name} はまだありません。","link":"作成する"},"cancel":"取り消す","comments":{"add":"コメントを追加","author":"作成者","author_missing":"匿名ユーザ","author_type":"作成者種別","body":"本文","created_at":"作成日","delete":"コメントを削除","delete_confirmation":"本当にコメントを削除しますか?","errors":{"empty_text":"テキストが空のため、コメントは保存されませんでした。"},"no_comments_yet":"コメントはまだありません。","resource":"リソース","resource_type":"リソース種別","title":"コメント","title_content":"コメント (%{count})"},"dashboard":"ダッシュボード","dashboard_welcome":{"call_to_action":"ダッシュボードに項目を追加するために 'app/admin/dashboard.rb' を編集してください。","welcome":"Active Admin へようこそ。ダッシュボードの初期ページを表示しています。"},"delete":"削除","delete_confirmation":"本当に削除しますか?","delete_model":"%{model} を削除する","details":"%{model} の詳細","devise":{"change_password":{"submit":"パスワードを変更する","title":"パスワードを変更する"},"email":{"title":"メールアドレス"},"links":{"forgot_your_password":"パスワードをお忘れですか?","resend_confirmation_instructions":"ユーザ確認手順を再送する","resend_unlock_instructions":"ロックの解除方法を再送する","sign_in":"サインイン","sign_in_with_omniauth_provider":"%{provider}のアカウントを使ってログイン","sign_up":"ユーザ登録"},"login":{"remember_me":"次回から自動的にログイン","submit":"ログイン","title":"ログイン"},"password":{"title":"パスワード"},"resend_confirmation_instructions":{"submit":"確認方法を再送信する","title":"確認方法を再送信する"},"reset_password":{"submit":"パスワードをリセットする","title":"パスワードをお忘れですか?"},"sign_up":{"submit":"登録","title":"登録"},"subdomain":{"title":"サブドメイン"},"unlock":{"submit":"ロックの解除方法を送る","title":"ロックの解除方法を送る"},"username":{"title":"ユーザ名"}},"download":"ダウンロード:","dropdown_actions":{"button_label":"操作"},"edit":"編集","edit_model":"%{model} を編集する","empty":"空","filters":{"buttons":{"clear":"条件を削除する","filter":"絞り込む"},"predicates":{"contains":"含まれています","ends_with":"で終わる","equals":"等しい","greater_than":"より大きい","less_than":"より小さい","starts_with":"で始まる"}},"has_many_delete":"削除する","has_many_new":"新規に %{model} を追加する","has_many_remove":"削除する","index_list":{"block":"リスト","blog":"ブログ","grid":"グリッド","table":"テーブル"},"logout":"ログアウト","main_content":"内容を表示するために %{model}#main_content を実装してください。","new_model":"%{model} を作成する","next":"次","pagination":{"empty":"%{model} は見つかりませんでした","entry":{"one":"レコード","other":"レコード"},"multiple":"全 \u003Cb\u003E%{total}\u003C/b\u003E 件中 \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 件の %{model} を表示しています","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 件の %{model} を表示しています","one":"\u003Cb\u003E1\u003C/b\u003E 件の %{model} を表示しています","one_page":"\u003Cb\u003E全 %{n}\u003C/b\u003E 件の %{model} を表示しています"},"powered_by":"Powered by %{active_admin} %{version}","previous":"前","search_status":{"current_filters":"現在の絞り込み:","current_scope":"範囲:","headline":"検索条件:","no_current_filters":"なし"},"sidebars":{"filters":"検索条件","search_status":"検索状態"},"status_tag":{"no":"いいえ","yes":"はい"},"unsupported_browser":{"headline":"ActiveAdminは、Internet Explorer 8以下はサポートはしていません。","recommendation":"最新版の\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E、\u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E、もしくは\u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003Eを使うことを推奨します。","turn_off_compatibility_view":"Internet Explorer 9以降を使っている場合、\u003Ca href=\"http://windows.microsoft.com/ja-JP/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E互換表示をオフ\u003C/a\u003Eにしてください。"},"view":"閲覧"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"お問い合せメールを送信しました : %{email}","sent_by_name":"%{name} さんがお問い合せメールを送信しました : %{email}","subject":"お問い合わせメール : %{email}"}},"contacts":{"new":{"contact_us":"お問い合わせ","email":"メールアドレス","message":"お問い合せ内容","name":"お名前","subject":"件名","submit":"送信する"},"new_formtastic":{"contact_us":"お問い合わせ","email":"メールアドレス","message":"お問い合せ内容","name":"お名前","subject":"件名","submit":"送信する"},"new_simple_form":{"contact_us":"お問い合わせ","email":"メールアドレス","message":"お問い合せ内容","name":"お名前","subject":"件名","submit":"送信する"}},"notices":{"error":"すべての項目を入力してください。","success":"お問い合わせを送信しました。"}},"errors":{"messages":{"url":"は不正なURLです。"}},"formtastic":{"cancel":"中止","create":"%{model}を作成","no":"いいえ","required":"必須","reset":"リセット","submit":"送信","update":"%{model}を更新","yes":"はい"}});
+I18n.translations["cs"] = I18n.extend((I18n.translations["cs"] || {}), {"active_admin":{"access_denied":{"message":"Nemáte oprávnění k provedení této akce."},"any":"Kterákoliv","batch_actions":{"action_label":"%{title}","button_label":"Hromadné akce","default_confirmation":"Jste si jisti, že chcete provést?","delete_confirmation":"Jste si jisti, že chcete smazat tyto %{plural_model}?","labels":{"destroy":"Vymazat"},"link":"Vytvořit","selection_toggle_explanation":"(Změnit výběr)","succesfully_destroyed":{"few":"Úspěšně smazány %{count} %{plural_model}","one":"Úspěšně smazán %{model}","other":"Úspěšně smazáno %{count} %{plural_model}","zero":"Nebyl smazán žádný %{model}"}},"blank_slate":{"content":"Zatím zde není žádný obsah.","link":"Vytvořit"},"cancel":"Zrušit","comments":{"add":"Přidat komentář","author":"Autor","author_missing":"Anonymní","author_type":"Typ autora","body":"Tělo","errors":{"empty_text":"Komentář nebyl uložen, je prázdný."},"no_comments_yet":"Žádný komentář","resource":"Zdroj","resource_type":"Typ zdroje","title":"Komentář","title_content":"Komentáře administrátorů (%{count})"},"dashboard":"Úvod","dashboard_welcome":{"call_to_action":"Pro přidání sekcí na nástěnku se podívejte do souboru 'app/admin/dashboard.rb'","welcome":"Vítejte v Active Admin. Toto je nástěnka."},"delete":"Smazat","delete_confirmation":"Jste si jistí, že chcete tuto položku smazat?","delete_model":"Smazat","details":"Detaily","devise":{"change_password":{"submit":"Změnit své heslo","title":"Změnit heslo"},"links":{"forgot_your_password":"Zapomněli jste heslo?","sign_in":"Přihlásit se","sign_in_with_omniauth_provider":"Přihlásit se přes %{provider}","sign_up":"Registrovat se"},"login":{"remember_me":"Zapamatovat si mě","submit":"Přihlásit","title":"Přihlášení"},"reset_password":{"submit":"Obnovit heslo","title":"Zapomněli jste heslo?"},"unlock":{"submit":"Zaslat instrukce k odemčení účtu","title":"Zaslání instrukcí k odemčení účtu"}},"download":"Stáhnout:","dropdown_actions":{"button_label":"Akce"},"edit":"Upravit","edit_model":"Upravit","empty":"Prázdné","filters":{"buttons":{"clear":"Vyčistit filtry","filter":"Filtrovat"},"predicates":{"contains":"Obsahuje","ends_with":"Končí na","equals":"Odpovídá","greater_than":"Větší než","less_than":"Menší než","starts_with":"Začíná na"}},"has_many_delete":"Smazat","has_many_new":"Přidat nový","has_many_remove":"Odstranit","index_list":{"block":"Seznam","blog":"Blog","grid":"Tabulka","table":"Tabulka"},"logout":"Odhlásit","main_content":"Implementujte prosím %{model}#main_content pro zobrazení obsahu.","new_model":"Vytvořit","next":"Následující","pagination":{"empty":"Nenalezen.","entry":{"few":"položky","one":"položka","other":"položky"},"multiple":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E z \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Zobrazena \u003Cb\u003E1\u003C/b\u003E položka","one_page":"Počet zobrazených položek %{n}"},"powered_by":"%{active_admin} %{version}","previous":"Předchozí","sidebars":{"filters":"Filtry"},"status_tag":{"no":"Ne","yes":"Ano"},"view":"Zobrazit"},"ransack":{"all":"každou","and":"a","any":"kteroukoliv","asc":"vzestupné","attribute":"atribut","combinator":"kombinátor","condition":"podmínka","desc":"sestupné","or":"nebo","predicate":"predikát","predicates":{"blank":"je prázdné","cont":"obsahuje","cont_all":"obsahuje všechny","cont_any":"obsahuje kterékoliv","does_not_match":"neodpovídá","does_not_match_all":"neodpovídá všem","does_not_match_any":"neodpovídá kterékoliv","end":"končí s","end_all":"končí se všemi","end_any":"končí s kteroukoliv","eq":"rovno","eq_all":"rovno všem","eq_any":"rovno kterékoliv","false":"není pravdivé","gt":"větší než","gt_all":"větší než všechny","gt_any":"větší než kterákoliv","gteq":"větší nebo rovno než","gteq_all":"větší nebo rovno než všechny","gteq_any":"větší nebo rovno než kterákoliv","in":"v","in_all":"ve všech","in_any":"v kterékoliv","lt":"menší než","lt_all":"menší než všechny","lt_any":"menší než kterákoliv","lteq":"menší nebo rovno než","lteq_all":"menší nebo rovno než všechny","lteq_any":"menší nebo rovno než kterákoliv","matches":"odpovídá","matches_all":"odpovídá všem","matches_any":"odpovídá kterékoliv","not_cont":"neobsahuje","not_cont_all":"neobsahuje všechny","not_cont_any":"neobsahuje kteroukoliv","not_end":"nekončí s","not_end_all":"nekončí se všemi","not_end_any":"nekončí s kteroukoliv","not_eq":"nerovno","not_eq_all":"nerovno všem","not_eq_any":"nerovno kterékoliv","not_in":"není v","not_in_all":"není ve všech","not_in_any":"není v kterékoliv","not_null":"není null","not_start":"nezačíná s","not_start_all":"nezačíná se všemi","not_start_any":"nezačíná s kteroukoliv","null":"je null","present":"je vyplněné","start":"začíná s","start_all":"začíná se všemi","start_any":"začíná s kteroukoliv","true":"je pravdivé"},"search":"vyhledávání","sort":"řazení","value":"hodnota"}});
+I18n.translations["ro"] = I18n.extend((I18n.translations["ro"] || {}), {"active_admin":{"any":"Oricare","batch_actions":{"action_label":"%{title} Selectat","button_label":"Grupare Actiuni","default_confirmation":"Sunteţi sigur că doriţi să faceţi acest lucru?","delete_confirmation":"Sunteţi sigur că doriţi să stergeţi aceste %{plural_model}?","labels":{"destroy":"Sterge"},"link":"Creati unul","selection_toggle_explanation":"(Modifica Selectia)","succesfully_destroyed":{"few":"%{count} %{plural_model} sterse","one":"1 %{model} sters","other":"%{count} %{plural_model} sterse"}},"blank_slate":{"content":"Momentan nu exista %{resource_name}.","link":"Creati un"},"cancel":"Renuntati","comments":{"add":"Adaugati comentariu","author":"Autor","body":"Text","errors":{"empty_text":"Comentariul nu a fost salvat, textul lipseste."},"no_comments_yet":"Nu exista comentarii.","resource":"Resursa","title":"Comentariu","title_content":"Comentarii (%{count})"},"dashboard":"Pagina Principala","dashboard_welcome":{"call_to_action":"Pentru a adauga sectiuni, vedeti 'app/admin/dashboard.rb'","welcome":"Bine ati venit pe Active Admin. Aceasta este pagina principala."},"delete":"Stergeti","delete_confirmation":"Sigur vreti sa stergeti?","delete_model":"Stergeti %{model}","details":"Detalii %{model}","devise":{"change_password":{"submit":"Schimbă parola","title":"Schimbați parola"},"links":{"forgot_your_password":"Ați uitat parola?","sign_in":"Autentificare","sign_in_with_omniauth_provider":"Conectați-vă cu %{provider}"},"login":{"remember_me":"Tine-ma minte","submit":"Autentificare","title":"Autentificare"},"reset_password":{"submit":"Reseta parola","title":"Ați uitat parola?"},"unlock":{"submit":"Retrimite instrucțiunile de deblocare","title":"Retrimite instrucțiunile de deblocare"}},"download":"Descarcati:","dropdown_actions":{"button_label":"Actiuni"},"edit":"Modificati","edit_model":"Modificati %{model}","empty":"Gol","filters":{"buttons":{"clear":"Stergeti filtrele","filter":"Cautati"},"predicates":{"contains":"Conține","ends_with":"se termină cu","equals":"Egal Cu","greater_than":"Mai Mare Decat","less_than":"Mai Mic Decat","starts_with":"începe cu"}},"has_many_delete":"Stergeti","has_many_new":"Adaugati un nou %{model}","has_many_remove":"Scoate","logout":"Iesire","main_content":"Va rugam sa implementati %{model}#main_content pentru a afisa continut.","new_model":"Un nou %{model}","next":"Inainte","pagination":{"empty":"Nu am gasit nici un %{model}","entry":{"one":"inregistrare","other":"inregistrari"},"multiple":"Sunt afisate \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E din \u003Cb\u003E%{total}\u003C/b\u003E inregistrari","multiple_without_total":"Sunt afisate \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Afisare \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Sunt afisate \u003Cb\u003Etoate %{n}\u003C/b\u003E inregistrarile"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Inapoi","sidebars":{"filters":"Filtre"},"status_tag":{"no":"Nu","yes":"Da"},"view":"Vizualizati"},"ransack":{"all":"toate","and":"și","any":"oricare","asc":"crescător","attribute":"atribut","combinator":"combinator","condition":"condiție","desc":"descrescător","or":"sau","predicate":"predicat","predicates":{"blank":"este gol","cont":"conține","cont_all":"conține toate","cont_any":"conține unul din","does_not_match":"nu corespunde","does_not_match_all":"nu corespunde cu toate","does_not_match_any":"nu corespunde cu nici un","end":"se termină cu","end_all":"se termină cu toate","end_any":"se termină cu unul din","eq":"egal cu","eq_all":"egal cu toate","eq_any":"egal cu unul din","false":"este fals","gt":"mai mare de","gt_all":"mai mare decât toate","gt_any":"mai mare decât cel puțin unul din","gteq":"mai mare sau egal decât","gteq_all":"mai mare sau egal decât toate","gteq_any":"mai mare sau egal decât cel puțin unul din","in":"inclus în","in_all":"inclus în toate","in_any":"inclus într-unul din","lt":"mai mic de","lt_all":"mai mic decât toate","lt_any":"mai mic decât cel puțin unul din","lteq":"mai mic sau egal decât","lteq_all":"mai mic sau egal decât toate","lteq_any":"mai mic sau egal decât cel puțin unul din","matches":"corespunde","matches_all":"corespunde cu toate","matches_any":"corespunde cu unul din","not_cont":"nu conține","not_cont_all":"nu conține toate","not_cont_any":"nu conține unul din","not_end":"nu se termină cu","not_end_all":"nu se termină cu toate","not_end_any":"nu se termină cu unul din","not_eq":"diferit de","not_eq_all":"nu este egal cu toate","not_eq_any":"diferit de toate","not_in":"nu este inclus în","not_in_all":"nu este inclus în toate","not_in_any":"nu este inclus într-unul din","not_null":"nu este nul","not_start":"nu începe","not_start_all":"nu începe cu toate","not_start_any":"nu începe cu unul din","null":"este nul","present":"este prezent","start":"începe cu","start_all":"începe cu toate","start_any":"începe cu unul din","true":"este adevărat"},"search":"caută","sort":"sortează","value":"valoare"}});
+I18n.translations["nl"] = I18n.extend((I18n.translations["nl"] || {}), {"active_admin":{"access_denied":{"message":"U bent niet gemachtigd voor deze actie."},"any":"Alle","batch_actions":{"action_label":"%{title} geselecteerde","button_label":"Batch acties","default_confirmation":"Weet u zeker dat u dit wilt doen?","delete_confirmation":"Weet u zeker dat u deze %{plural_model} wilt verwijderen?","labels":{"destroy":"Verwijder"},"link":"Maak aan","selection_toggle_explanation":"(Toggle selectie)","succesfully_destroyed":{"one":"1 %{model} verwijderd.","other":"%{count} %{plural_model} verwijderd."}},"blank_slate":{"content":"Er zijn geen %{resource_name} gevonden.","link":"Maak aan"},"cancel":"Annuleren","comments":{"add":"Voeg commentaar toe","author":"Auteur","author_missing":"Anoniem","author_type":"Auteur Type","body":"Tekst","created_at":"Aangemaakt op","delete":"Verwijder commentaar","delete_confirmation":"Weet u zeker dat u dit commentaar wilt verwijderen?","errors":{"empty_text":"De reactie is niet opgeslagen, de tekst was leeg."},"no_comments_yet":"Nog geen reacties.","resource":"Resource","resource_type":"Resource Type","title":"Reactie","title_content":"Reacties (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Pas uw eigen dashboard aan in het bestand 'app/admin/dashboard.rb'","welcome":"Welkom bij Active Admin. Dit is de standaard dashboard pagina"},"delete":"Verwijder","delete_confirmation":"Weet u zeker dat je dit item wilt verwijderen?","delete_model":"Verwijder %{model}","details":"%{model} details","devise":{"change_password":{"submit":"Mijn wachtwoord wijzigen","title":"Wijzig uw wachtwoord"},"email":{"title":"Email"},"links":{"forgot_your_password":"Wachtwoord vergeten?","resend_confirmation_instructions":"Bevestigingsinstructies opnieuw versturen","resend_unlock_instructions":"Ontgrendelinstructies opnieuw versturen","sign_in":"Meld u aan","sign_in_with_omniauth_provider":"Log in met %{provider}","sign_up":"Registreren"},"login":{"remember_me":"Onthoud mij","submit":"inloggen","title":"inloggen"},"password":{"title":"Wachtwoord"},"resend_confirmation_instructions":{"submit":"Verstuur bevestigingsinstructies opnieuw","title":"Verstuur bevestigingsinstructies opnieuw"},"reset_password":{"submit":"Reset mijn wachtwoord vergeten","title":"Wachtwoord vergeten?"},"sign_up":{"submit":"Registreren","title":"Registreren"},"subdomain":{"title":"Subdomein"},"unlock":{"submit":"Verstuur ontgrendelinstructies opnieuw","title":"Verstuur ontgrendelinstructies opnieuw"},"username":{"title":"Gebruikersnaam"}},"download":"Download","dropdown_actions":{"button_label":"Acties"},"edit":"Wijzig","edit_model":"Wijzig %{model}","empty":"Leeg","filters":{"buttons":{"clear":"Maak Filters Ongedaan","filter":"Filter"},"predicates":{"contains":"Bevat","ends_with":"Eindigt op","equals":"Gelijk aan","greater_than":"Groter dan","less_than":"Kleiner dan","starts_with":"Begint met"}},"has_many_delete":"Verwijderen","has_many_new":"Voeg nieuwe %{model} toe","has_many_remove":"Verwijderen","index_list":{"block":"Lijst","blog":"Blog","grid":"Rooster","table":"Tabel"},"logout":"Uitloggen","main_content":"Implementeer %{model}#main_content om de content weer te geven.","new_model":"Nieuwe %{model}","next":"Volgende","pagination":{"empty":"Geen %{model} gevonden","entry":{"one":"entry","other":"entries"},"multiple":"Geeft %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E van de \u003Cb\u003E%{total}\u003C/b\u003E weer","multiple_without_total":"Geeft %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Geeft \u003Cb\u003E1\u003C/b\u003E %{model} weer","one_page":"Geeft \u003Cb\u003E%{n}\u003C/b\u003E %{model} weer"},"powered_by":"Mogelijk gemaakt door %{active_admin} %{version}","previous":"Vorige","search_status":{"current_filters":"Huidige filters:","current_scope":"Scope:","no_current_filters":"Geen"},"sidebars":{"filters":"Filters"},"status_tag":{"no":"Geen","yes":"Ja"},"unsupported_browser":{"headline":"Opgelet, ActiveAdmin bied geen support meer voor Internet Explorer 8 of lager","recommendation":"Wij raden aan om te upgraden naar de nieuwste \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, of \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Als u IE 9 of nieuwer gebruikt, zorg ervoor dat u \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E \"Compatibility View\" uit zet\u003C/a\u003E."},"view":"Bekijk"},"ransack":{"all":"alle","and":"en","any":"enig","asc":"oplopend","attribute":"attribuut","combinator":"combinator","condition":"conditie","desc":"aflopend","or":"of","predicate":"eigenschap","predicates":{"blank":"is afwezig","cont":"bevat","cont_all":"bevat alle","cont_any":"bevat enig","does_not_match":"evenaart niet","does_not_match_all":"evenaart niet voor alle","does_not_match_any":"evenaart niet voor enig","end":"eindigt met","end_all":"eindigt met alle","end_any":"eindigt met enig","eq":"gelijk","eq_all":"gelijk alle","eq_any":"gelijk enig","false":"is niet waar","gt":"groter dan","gt_all":"groter dan alle","gt_any":"groter dan enig","gteq":"groter dan or equal to","gteq_all":"groter dan or equal to alle","gteq_any":"groter dan or equal to enig","in":"in","in_all":"in alle","in_any":"in enig","lt":"kleiner dan","lt_all":"kleiner dan alle","lt_any":"kleiner dan enig","lteq":"kleiner dan of gelijk aan","lteq_all":"kleiner dan of gelijk aan alle","lteq_any":"kleiner dan of gelijk aan enig","matches":"evenaart","matches_all":"evenaart alle","matches_any":"evenaart enig","not_cont":"bevat niet","not_cont_all":"bevat niet alle","not_cont_any":"bevat niet enig","not_end":"eindigt niet met","not_end_all":"eindigt niet met alle","not_end_any":"eindigt niet met enig","not_eq":"niet gelijk aan","not_eq_all":"niet gelijk aan alle","not_eq_any":"niet gelijk aan enig","not_in":"niet in","not_in_all":"niet in alle","not_in_any":"niet in enig","not_null":"is niet null","not_start":"start niet met","not_start_all":"start niet met alle","not_start_any":"start niet met enig","null":"is null","present":"is present","start":"start met","start_all":"start met alle","start_any":"start met enig","true":"is waar"},"search":"zoeken","sort":"sorteren","value":"waarde"}});
+I18n.translations["es"] = I18n.extend((I18n.translations["es"] || {}), {"active_admin":{"access_denied":{"message":"No está autorizado/a a realizar esta acción."},"any":"Cualquiera","batch_actions":{"action_label":"%{title} seleccionado","button_label":"Acciones en masa","default_confirmation":"¿Seguro que quieres hacer esto?","delete_confirmation":"Eliminar %{plural_model}: ¿Está seguro?","labels":{"destroy":"Borrar"},"link":"Añadir","selection_toggle_explanation":"(Cambiar selección)","succesfully_destroyed":{"one":"Se ha destruido 1 %{model} con éxito","other":"Se han destruido %{count} %{plural_model} con éxito"}},"blank_slate":{"content":"No hay %{resource_name} aún.","link":"Añadir"},"cancel":"Cancelar","comments":{"add":"Comentar","author":"Autor","author_missing":"Anónimo","author_type":"Tipo de autor","body":"Cuerpo","created_at":"Fecha de creación","delete":"Borrar Comentario","delete_confirmation":"¿Está seguro que desea borrar este comentario?","errors":{"empty_text":"El comentario no fue guardado, el texto estaba vacío."},"no_comments_yet":"No hay comentarios aún.","resource":"Recurso","resource_type":"Tipo de recurso","title":"Comentario","title_content":"Comentarios (%{count})"},"dashboard":"Inicio","dashboard_welcome":{"call_to_action":"Para agregar secciones edite 'app/admin/dashboard.rb'","welcome":"Bienvenido a Active Admin. Esta es la página de inicio predeterminada."},"delete":"Eliminar","delete_confirmation":"¿Está seguro de que quiere eliminar esto?","delete_model":"Eliminar %{model}","details":"Detalles de %{model}","devise":{"change_password":{"submit":"Cambiar mi contraseña","title":"Cambie su contraseña"},"email":{"title":"Email"},"links":{"forgot_your_password":"¿Olvidó su contraseña?","resend_confirmation_instructions":"Reenviar instrucciones de confirmación","resend_unlock_instructions":"Reenviar instrucciones de desbloqueo","sign_in":"Registrarse","sign_in_with_omniauth_provider":"Conéctate con %{provider}","sign_up":"Ingresar"},"login":{"remember_me":"Recordarme","submit":"Iniciar Sesión","title":"Iniciar Sesión"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Reenviar instrucciones de confirmación","title":"Reenviar instrucciones de confirmación"},"reset_password":{"submit":"Restablecer mi contraseña","title":"¿Olvidó su contraseña?"},"sign_up":{"submit":"Registrarse","title":"Registrarse"},"subdomain":{"title":"Subdominio"},"unlock":{"submit":"Reenviar instrucciones de desbloqueo","title":"Reenviar instrucciones de desbloqueo"},"username":{"title":"Nombre de usuario"}},"download":"Descargar:","dropdown_actions":{"button_label":"Acciones"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vacío","filters":{"buttons":{"clear":"Quitar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contiene","ends_with":"Termina con","equals":"Igual a","greater_than":"Mayor que","less_than":"Menor que","starts_with":"Empieza con"}},"has_many_delete":"Eliminar","has_many_new":"Añadir %{model}","has_many_remove":"Quitar","index_list":{"block":"Lista","blog":"Blog","grid":"Grilla","table":"Tabla"},"logout":"Salir","main_content":"Por favor implemente %{model}#main_content para mostrar contenido.","new_model":"Añadir %{model}","next":"Siguiente","pagination":{"empty":"No se han encontrado %{model}","entry":{"one":"registro","other":"registros"},"multiple":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de un total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Mostrando \u003Cb\u003Eun total de %{n}\u003C/b\u003E %{model}"},"powered_by":"Funciona con %{active_admin} %{version}","previous":"Anterior","search_status":{"current_filters":"Filtros actuales:","current_scope":"Alcance:","headline":"Estado de la búsqueda:","no_current_filters":"Ninguno"},"sidebars":{"filters":"Filtros","search_status":"Estado de la búsqueda"},"status_tag":{"no":"No","yes":"Sí"},"unsupported_browser":{"headline":"Por favor tenga en cuenta que Active Admin no soporta versiones de Internet Explorer menores a 8.","recommendation":"Recomendamos que actualice a la última versión de \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, o \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Si está usando IE 9 o superior, asegúrese de \u003Ca href=\"http://windows.microsoft.com/es-es/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eapagar la \"Vista de compatibilidad\"\u003C/a\u003E."},"view":"Ver"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"Enviado por el formulario de contacto. %{email}","sent_by_name":"Sent by %{name} from %{email}","subject":"Contact Us message from %{email}"}},"contacts":{"new":{"contact_us":"Contactanos","email":"Email","message":"Mensaje","name":"Name","subject":"Subject","submit":"Enviar"},"new_formtastic":{"contact_us":"Contactanos","email":"Email","message":"Mensaje","name":"Name","subject":"Subject","submit":"Enviar"},"new_simple_form":{"contact_us":"Contactanos","email":"Email","message":"Mensaje","name":"Name","subject":"Subject","submit":"Enviar"}},"notices":{"error":"Debes de ingresar ambos campos.","success":"El correo electrónico de contacto fue enviado con éxito."}},"formtastic":{"cancel":"Cancelar","create":"Guardar %{model}","no":"No","required":"requerido","reset":"Restablecer %{model}","submit":"Aceptar","update":"Guardar %{model}","yes":"Sí"},"ransack":{"all":"todos","and":"y","any":"cualquier","asc":"ascendente","attribute":"atributo","combinator":"combinado","condition":"condición","desc":"descendente","or":"o","predicate":"predicado","predicates":{"blank":"está en blanco","cont":"contiene","cont_all":"contiene todos","cont_any":"contiene cualquier","does_not_match":"no coincide","does_not_match_all":"no coincide con todos","does_not_match_any":"no coincide con ninguna","end":"termina con","end_all":"termina con todo","end_any":"termina con cualquier","eq":"es igual a","eq_all":"es igual a todos","eq_any":"es igual a cualquier","false":"es falso","gt":"mayor que","gt_all":"mayor que todos","gt_any":"mayor que cualquier","gteq":"mayor que o igual a","gteq_all":"mayor que o igual a todos","gteq_any":"mayor que o igual a cualquier","in":"en","in_all":"en todos","in_any":"en cualquier","lt":"menor que","lt_all":"menor o igual a","lt_any":"menor que cualquier","lteq":"menor que o igual a","lteq_all":"menor o igual a todos","lteq_any":"menor o igual a cualquier","matches":"coincidir","matches_all":"coincidir a todos","matches_any":"coincidir a cualquier","not_cont":"no contiene","not_cont_all":"no contiene toda","not_cont_any":"no contiene ninguna","not_end":"no termina con","not_end_all":"no termina con todo","not_end_any":"no termina con cualquier","not_eq":"no es igual a","not_eq_all":"no es iguala todos","not_eq_any":"no es igual a cualquier","not_in":"no en","not_in_all":"no en todos","not_in_any":"no en cualquier","not_null":"no es nula","not_start":"no inicia con","not_start_all":"no inicia con toda","not_start_any":"no comienza con cualquier","null":"es nula","present":"es presente","start":"comienza con","start_all":"comienza con toda","start_any":"comienza con cualquier","true":"es verdadero"},"search":"buscar","sort":"ordernar","value":"valor"}});
+I18n.translations["zh"] = I18n.extend((I18n.translations["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":{"contact_us":"联系我们","email":"邮箱","message":"消息","name":"Name","subject":"Subject","submit":"发送"},"new_formtastic":{"contact_us":"联系我们","email":"邮箱","message":"消息","name":"Name","subject":"Subject","submit":"发送"},"new_simple_form":{"contact_us":"联系我们","email":"邮箱","message":"消息","name":"Name","subject":"Subject","submit":"发送"}},"notices":{"error":"请正确输入邮箱与信息。","success":"邮件已成功发送。"}},"ransack":{"all":"所有","and":"并且","any":"任意","asc":"升序","attribute":"属性","combinator":"条件组合(combinator)","condition":"条件","desc":"降序","or":"或者","predicate":"基于(predicate)","predicates":{"blank":"为空","cont":"包含","cont_all":"包含所有值","cont_any":"包含任意一个值","does_not_match":"不符合","does_not_match_all":"不符合所有条件","does_not_match_any":"符合任意条件","end":"以改值结尾","end_all":"以所有值结尾","end_any":"以任意一个值结尾","eq":"等于","eq_all":"等于所有值","eq_any":"等于任意值","false":"等于false","gt":"大于","gt_all":"大于所有值","gt_any":"大于任意一个值","gteq":"大于等于","gteq_all":"大于等于所有值","gteq_any":"大于等于任意一个值","in":"被包含","in_all":"被所有值包含","in_any":"被任意值包含","lt":"小于","lt_all":"小于所有值","lt_any":"小于任意一个值","lteq":"小于等于","lteq_all":"小于等于所有值","lteq_any":"小于等于任意一个值","matches":"符合","matches_all":"符合所有条件","matches_any":"符合任意条件","not_cont":"不包含","not_cont_all":"不包含所有值","not_cont_any":"不包含任意一个值","not_end":"不以改值结尾","not_end_all":"不以所有值结尾","not_end_any":"不以任意一个值结尾","not_eq":"不等于","not_eq_all":"不等于所有值","not_eq_any":"不等于任意值","not_in":"不被包含","not_in_all":"不被所有值包含","not_in_any":"不被任意值包含","not_null":"不是null","not_start":"不以改值开始","not_start_all":"不以所有值开始","not_start_any":"不以任意一个值开始","null":"是null","present":"有值","start":"以改值开始","start_all":"以所有值开始","start_any":"以任意一个值开始","true":"等于true"},"search":"搜索","sort":"排序","value":"数值"}});
+I18n.translations["hu"] = I18n.extend((I18n.translations["hu"] || {}), {"active_admin":{"any":"Összes","batch_actions":{"action_label":"%{title} kiválasztva","button_label":"Tömeges műveletek","default_confirmation":"Biztos vagy benne, hogy a ön akar-hoz csinál ez?","delete_confirmation":"Biztosan törli ezeket a %{plural_model}?","labels":{"destroy":"Törlés"},"link":"Létrehozás","selection_toggle_explanation":"(Kijelölés megfordítása)","succesfully_destroyed":{"one":"1 %{model} sikeresen törölve","other":"%{count} %{plural_model} sikeresen törölve"}},"blank_slate":{"content":"Még nincs létrehozva %{resource_name}.","link":"Létrehozás most"},"cancel":"Mégsem","comments":{"add":"Új hozzászólás","author":"Szerző","body":"Törzs","errors":{"empty_text":"A hozzászólás nem lett mentve, a törzs nem lehet üres."},"no_comments_yet":"Nincsenek hozzászólások.","resource":"Erőforrás","title":"Hozzászólás","title_content":"%{count} hozzászólás"},"dashboard":"Vezérlőpult","dashboard_welcome":{"call_to_action":"Elemek hozzáadásához nézze meg a 'app/admin/dashboard.rb' fájlt","welcome":"Üdvözöljük az Active Admin felületén. Ez a vezérlőpult kezdőlapja"},"delete":"Törlés","delete_confirmation":"Biztosan törli ezt az elemet?","delete_model":"%{model} törlése","details":"%{model} részletei","devise":{"change_password":{"submit":"Jelszó módosítása","title":"A jelszó módosítása"},"links":{"forgot_your_password":"Elfelejtette a jelszavát?","sign_in":"Bejelentkezés","sign_in_with_omniauth_provider":"Jelentkezzen be a %{provider}"},"login":{"remember_me":"Emlékezz rám","submit":"Belépés","title":"Bejelentkezés"},"resend_confirmation_instructions":{"submit":"Megerősítő levél újraküldése","title":"Megerősítő levél újraküldése"},"reset_password":{"submit":"Jelszó visszaállítása","title":"Elfelejtette a jelszavát?"},"unlock":{"submit":"Újraküldés unlock utasítások","title":"Újraküldés unlock utasítások"}},"download":"Letöltés:","dropdown_actions":{"button_label":"Műveletek"},"edit":"Szerkesztés","edit_model":"%{model} módosítása","empty":"Üres","filters":{"buttons":{"clear":"Feltételek törlése","filter":"Szűrés"},"predicates":{"contains":"Tartalmazza","ends_with":"végződik","equals":"Pontosan","greater_than":"Nagyobb, mint","less_than":"Kisebb, mint","starts_with":"kezdődik"}},"has_many_delete":"Törlés","has_many_new":"Új %{model} hozzáadása","has_many_remove":"Eltávolít","logout":"Kilépés","main_content":"Kérem, implementálja a %{model}#main_content metódust a tartalom megjelenítéséhez.","new_model":"Új %{model}","next":"Következő","pagination":{"empty":"Nincs több %{model}","entry":{"one":"elem","other":"elem"},"multiple":"%{model} listájának megjelenítése, \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E/\u003Cb\u003E%{total}\u003C/b\u003E ","multiple_without_total":"%{model} listájának megjelenítése, \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E ","one":"\u003Cb\u003EEgy\u003C/b\u003E %{model} megjelenítése","one_page":"\u003Cb\u003EAz összes (%{n} db)\u003C/b\u003E %{model} megjelenítése"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Előző","sidebars":{"filters":"Szűrők"},"status_tag":{"no":"Nem","yes":"Igen"},"view":"Megtekintés"},"ransack":{"all":"mindegyik","and":"és","any":"bármely","asc":"növekvő","attribute":"attribute","combinator":"combinator","condition":"feltétel","desc":"csökkenő","or":"vagy","predicate":"állítás","predicates":{"blank":"üres","cont":"tartalmazza","cont_all":"mindet tartalmazza","cont_any":"bármelyiket tartalmazza","does_not_match":"nem egyezik","does_not_match_all":"nem egyezik az összessel","does_not_match_any":"nem egyezik semelyikkel","end":"így végződik","end_all":"ezekkel végződik","end_any":"bármelyikkel végződik","eq":"egyenlő","eq_all":"minddel egyenlő","eq_any":"bármelyikkel egyenlő","false":"hamis","gt":"nagyobb, mint","gt_all":"mindegyiknél nagyobb","gt_any":"bármelyiknél nagyobb","gteq":"nagyobb vagy egyenlő, mint","gteq_all":"mindegyiknél nagyobb vagy egyenlő","gteq_any":"bármelyiknél nagyobb vagy egyenlő","in":"értéke","in_all":"értéke mindegyik","in_any":"értéke bármelyik","lt":"kisebb, mint","lt_all":"mindegyiknél kisebb","lt_any":"bármelyiknél kisebb","lteq":"kisebb vagy egyenlő, mint","lteq_all":"mindegyiknél kisebb vagy egyenlő","lteq_any":"bármelyiknél kisebb vagy egyenlő","matches":"egyezik","matches_all":"minddel egyezik","matches_any":"bármelyikkel egyezik","not_cont":"nem tartalmazza","not_cont_all":"nem tartalmazza mindet","not_cont_any":"egyiket sem tartalmazza","not_end":"nem úgy végződik","not_end_all":"nem ezekkel végződik","not_end_any":"nem ezek egyikével végződik","not_eq":"nem egyenlő","not_eq_all":"nem egyenlő egyikkel sem","not_eq_any":"nem egyenlő bármelyikkel","not_in":"nem ez az értéke","not_in_all":"értéke nem ezek az elemek","not_in_any":"értéke egyik sem","not_null":"nem null","not_start":"nem így kezdődik","not_start_all":"nem ezekkel kezdődik","not_start_any":"nem ezek egyikével kezdődik","null":"null","present":"létezik","start":"így kezdődik","start_all":"ezekkel kezdődik","start_any":"bármelyikkel kezdődik","true":"igaz"},"search":"keresés","sort":"rendezés","value":"érték"}});
+I18n.translations["de"] = I18n.extend((I18n.translations["de"] || {}), {"active_admin":{"access_denied":{"message":"Sie haben nicht die Berechtigung um diese Aktion auszuführen."},"any":"Alle","batch_actions":{"action_label":"%{title} ausgewählte","button_label":"Stapelverarbeitung","default_confirmation":"Bist du sicher, dass Sie dies tun wollen?","delete_confirmation":"Sind Sie sicher dass sie diese %{plural_model} löschen wollen?","labels":{"destroy":"Lösche"},"link":"erstellen","selection_toggle_explanation":"(Auswahl umschalten)","succesfully_destroyed":{"one":"Erfolgreich 1 %{model} gelöscht","other":"Erfolgreich %{count} %{plural_model} gelöscht"}},"blank_slate":{"content":"Es gibt noch keine %{resource_name}.","link":"Erstellen"},"cancel":"Abbrechen","comments":{"add":"Kommentar hinzufügen","author":"Autor","author_missing":"Unbekannt","author_type":"Autor-Typ","body":"Inhalt","delete":"Löschen","delete_confirmation":"Sind Sie sicher dass sie diesen Kommentar löschen wollen?","errors":{"empty_text":"Der Kommentar wurde nicht gespeichert, da der Text fehlt."},"no_comments_yet":"Es gibt noch keine Kommentare.","resource":"Ressource","resource_type":"Ressourcen-Typ","title":"Kommentar","title_content":"Kommentare (%{count})"},"dashboard":"Übersicht","dashboard_welcome":{"call_to_action":"Siehe 'app/admin/dashboard.rb', um Übersichts-Bereiche hinzuzufügen.","welcome":"Willkommen in Active Admin. Dies ist die Standard-Übersichtsseite."},"delete":"Löschen","delete_confirmation":"Wollen Sie dieses Element wirklich löschen?","delete_model":"%{model} löschen","details":"%{model} Details","devise":{"change_password":{"submit":"Mein Passwort ändern","title":"Ändern Sie Ihr Passwort"},"email":{"title":"E-Mail-Adresse"},"links":{"forgot_your_password":"Passwort vergessen?","resend_confirmation_instructions":"Bestätigungsanweisung erneut senden","resend_unlock_instructions":"Entsperrungsanweisung erneut senden","sign_in":"Anmeldung","sign_in_with_omniauth_provider":"Anmeldung mit %{provider}","sign_up":"Registrieren"},"login":{"remember_me":"Angemeldet bleiben","submit":"Login","title":"Login"},"password":{"title":"Passwort"},"resend_confirmation_instructions":{"submit":"Anleitung zur Bestätigung noch mal schicken","title":"Anleitung zur Bestätigung noch mal schicken"},"reset_password":{"submit":"Mein Passwort zurücksetzen","title":"Passwort vergessen?"},"sign_up":{"submit":"Registrieren","title":"Registrieren"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Entsperrungsanweisung erneut senden","title":"Entsperrungsanweisung erneut senden"},"username":{"title":"Benutzername"}},"download":"Herunterladen:","dropdown_actions":{"button_label":"Aktionen"},"edit":"Bearbeiten","edit_model":"%{model} bearbeiten","empty":"Leer","filters":{"buttons":{"clear":"Filter entfernen","filter":"Filtern"},"predicates":{"contains":"Enthält","ends_with":"Endet mit","equals":"Gleich","greater_than":"Größer als","less_than":"Kleiner als","starts_with":"Beginnt mit"}},"has_many_delete":"Löschen","has_many_new":"%{model} hinzufügen","has_many_remove":"Entfernen","index_list":{"block":"Liste","blog":"Blog","grid":"Gitter","table":"Tabelle"},"logout":"Abmelden","main_content":"Bitte implementieren Sie %{model}#main_content, um Inhalte anzuzeigen.","new_model":"%{model} erstellen","next":"Weiter","pagination":{"empty":"Keine %{model} gefunden","entry":{"one":"Eintrag","other":"Einträge"},"multiple":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E von \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E","one":"Zeige \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Zeige \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Zurück","search_status":{"current_filters":"Aktuelle Filter:","current_scope":"Anwendungsbereich:","headline":"Filter","no_current_filters":"Keine"},"sidebars":{"filters":"Filter","search_status":"Suchstatus"},"status_tag":{"no":"Nein","yes":"Ja"},"unsupported_browser":{"headline":"ActiveAdmin unterstützt nicht länger den Internet Explorer in Version 8 oder niedriger.","recommendation":"Wir empfehlen die Nutzung von \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, oder \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Wenn sie IE 9 oder neuer benutzen, stellen sie sicher das sie den \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E\"Kompatibilitätsansicht\" ausgeschaltet\u003C/a\u003E haben."},"view":"Anzeigen"},"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":{"contact_us":"Kontaktiere Uns","email":"E-Mail","message":"Nachricht","name":"Name","subject":"Betreff","submit":"Abschicken"},"new_formtastic":{"contact_us":"Kontaktiere Uns","email":"E-Mail","message":"Nachricht","name":"Name","subject":"Betreff","submit":"Abschicken"},"new_simple_form":{"contact_us":"Kontaktiere Uns","email":"E-Mail","message":"Nachricht","name":"Name","subject":"Betreff","submit":"Abschicken"}},"notices":{"error":"Beide Felder müssen ausgefüllt werden.","success":"Die Nachricht wurde erfolgreich versendet."}},"formtastic":{"cancel":"Abbrechen","create":"%{model} anlegen","no":"Nein","required":"Pflichtfeld","reset":"%{model} zurücksetzen","submit":"Abschicken","update":"%{model} aktualisieren","yes":"Ja"},"ransack":{"all":"alle","and":"und","any":"beliebige","asc":"aufsteigend","attribute":"Attribut","combinator":"Kombinator","condition":"Bedingung","desc":"absteigend","or":"oder","predicate":"Eigenschaft","predicates":{"blank":"ist leer","cont":"enthält","cont_all":"enthält alle","cont_any":"enthält beliebige","does_not_match":"stimmt nicht überein","does_not_match_all":"stimmt nicht mit allen überein","does_not_match_any":"erfüllt ein beliebiger/s nicht","end":"endet mit","end_all":"endet mit allen","end_any":"endet mit beliebigen","eq":"gleicht","eq_all":"gleicht allen","eq_any":"gleicht beliebigen","false":"ist falsch","gt":"größer als","gt_all":"größer als alle","gt_any":"größer als ein beliebiger/s","gteq":"größer oder gleich","gteq_all":"größer oder gleich alle","gteq_any":"größer oder gleich als ein beliebiger/s","in":"in","in_all":"in allen","in_any":"ist nicht in einem beliebigen","lt":"kleiner als","lt_all":"kleiner als alle als alle","lt_any":"kleiner als ein beliebiger/s","lteq":"kleiner oder gleich","lteq_all":"kleiner oder gleich allen","lteq_any":"kleiner oder gleich beliebige","matches":"entspricht","matches_all":"stimmt mit allen überein","matches_any":"stimmt überein mit einem beliebigen","not_cont":"enthält nicht","not_cont_all":"enthält keine/s","not_cont_any":"enthält ein beliebiger/s nicht","not_end":"endet nicht mit","not_end_all":"endet nicht mit allen","not_end_any":"endet nicht mit beliebigen","not_eq":"ungleich","not_eq_all":"ungleich allen","not_eq_any":"ungleich beliebigen","not_in":"nicht in","not_in_all":"nicht in allen","not_in_any":"nicht in beliebige","not_null":"ist nicht null","not_start":"beginnt nicht mit","not_start_all":"beginnt nicht mit allen","not_start_any":"beginnt nicht mit beliebigen","null":"ist null","present":"ist vorhanden","start":"beginnt mit","start_all":"beginnt mit allen","start_any":"beginnt mit beliebigen","true":"ist wahr"},"search":"suchen","sort":"sortieren","value":"Wert"}});
+I18n.translations["fr"] = I18n.extend((I18n.translations["fr"] || {}), {"active_admin":{"access_denied":{"message":"Vous n'êtes pas autorisé à exécuter cette action"},"any":"N'importe lequel","batch_actions":{"action_label":"%{title} les éléments sélectionnés","button_label":"Actions groupées","default_confirmation":"Êtes-vous sûr de vouloir faire cela ?","delete_confirmation":"Êtes-vous sûr de vouloir supprimer ces %{plural_model} ?","labels":{"destroy":"Supprimer"},"link":"Créer un","selection_toggle_explanation":"(Inverser la sélection)","succesfully_destroyed":{"one":"1 %{model} supprimé","other":"%{count} %{plural_model} supprimés"}},"blank_slate":{"content":"Il n'y a pas encore de %{resource_name}.","link":"Créez en un"},"cancel":"Annuler","comments":{"add":"Ajouter un commentaire","author":"Auteur","author_type":"Profil de l'auteur","body":"Corps","errors":{"empty_text":"Le commentaire n'a pas été enregistré puisque le texte était vide."},"no_comments_yet":"Aucun commentaire actuellement","resource":"Ressource","resource_type":"Type de ressource","title":"Commentaire","title_content":"Commentaires (%{count})"},"dashboard":"Tableau de bord","dashboard_welcome":{"call_to_action":"Pour ajouter des sections au tableau de bord, consultez 'app/admin/dashboard.rb'","welcome":"Bienvenue dans Active Admin. Ceci est la page par défaut."},"delete":"Supprimer","delete_confirmation":"Êtes-vous certain de vouloir supprimer ceci ?","delete_model":"Supprimer %{model}","details":"Détails de %{model}","devise":{"change_password":{"submit":"Changer mon mot de passe","title":"Changez votre mot de passe"},"email":{"title":"Email"},"links":{"forgot_your_password":"Vous avez oublié votre mot de passe ?","sign_in":"Connectez-vous","sign_in_with_omniauth_provider":"Connectez-vous avec %{provider}"},"login":{"remember_me":"Garder ma session ouverte","submit":"Se connecter","title":"Connexion"},"password":{"title":"Mot de passe"},"resend_confirmation_instructions":{"submit":"Renvoyer les instructions de confirmation","title":"Renvoyer les instructions de confirmation"},"reset_password":{"submit":"Réinitialiser mon mot de passe","title":"Vous avez oublié votre mot de passe ?"},"subdomain":{"title":"Sous-domaine"},"username":{"title":"Nom d'utilisateur"}},"download":"Télécharger :","dropdown_actions":{"button_label":"Actions"},"edit":"Modifier","edit_model":"Modifier %{model}","empty":"Vide","filters":{"buttons":{"clear":"Supprimer les filtres","filter":"Filtrer"},"predicates":{"contains":"Contient","ends_with":"Se termine par","equals":"Égal à","greater_than":"Plus grand que","less_than":"Plus petit que","starts_with":"Commence par"}},"has_many_delete":"Supprimer","has_many_new":"Ajouter un nouveau %{model}","has_many_remove":"Enlever","index_list":{"block":"Liste","blog":"Blog","grid":"Grille","table":"Tableau"},"logout":"Déconnexion","main_content":"Veuillez implémenter %{model}#main_content pour afficher le contenu.","new_model":"Créer %{model}","next":"Suivant","pagination":{"empty":"Aucun %{model} trouvé","entry":{"one":"entrée","other":"entrées"},"multiple":"Affichage de %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E sur un total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Affichage de %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Affichage de \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Affichage des \u003Cb\u003E%{n}\u003C/b\u003E %{model}"},"powered_by":"Propulsé par %{active_admin} %{version}","previous":"Précédent","search_status":{"current_filters":"Filtres actuels :","current_scope":"Etendu du filtre :","headline":"Statut de la recherche :","no_current_filters":"Aucun filtres"},"sidebars":{"filters":"Filtres","search_status":"Statut de la recherche"},"status_tag":{"no":"Non","yes":"Oui"},"view":"Voir"},"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":{"contact_us":"Contactez Nous","email":"Email","message":"Message","name":"Nom","subject":"Sujet","submit":"Envoyer"},"new_formtastic":{"contact_us":"Contactez Nous","email":"Email","message":"Message","name":"Nom","subject":"Sujet","submit":"Envoyer"},"new_simple_form":{"contact_us":"Contactez Nous","email":"Email","message":"Message","name":"Nom","subject":"Sujet","submit":"Envoyer"}},"notices":{"error":"Merci de saisir les deux champs.","success":"Votre message a bien été envoyé."}},"formtastic":{"cancel":"Annuler","create":"Créer un(e) %{model}","no":"Non","required":"requis(e)","reset":"Réinitialiser ce(tte) %{model}","submit":"Enregistrer ce(tte) %{model}","update":"Modifier ce(tte) %{model}","yes":"Oui"},"ransack":{"all":"tous","and":"et","any":"au moins un","asc":"ascendant","attribute":"attribut","combinator":"combinateur","condition":"condition","desc":"descendant","or":"ou","predicate":"prédicat","predicates":{"blank":"est blanc","cont":"contient","cont_all":"contient tous","cont_any":"contient au moins un","does_not_match":"ne correspond pas à","does_not_match_all":"ne correspond à aucun","does_not_match_any":"ne correspond pas à au moins un","end":"finit par","end_all":"finit par tous","end_any":"finit par au moins un","eq":"égal à","eq_all":"égal à tous","eq_any":"égal à au moins un","false":"est faux","gt":"supérieur à","gt_all":"supérieur à tous","gt_any":"supérieur à au moins un","gteq":"supérieur ou égal à","gteq_all":"supérieur ou égal à tous","gteq_any":"supérieur ou égal à au moins un","in":"inclus dans","in_all":"inclus dans tous","in_any":"inclus dans au moins un","lt":"inférieur à","lt_all":"inférieur à tous","lt_any":"inférieur à au moins un","lteq":"inférieur ou égal à","lteq_all":"inférieur ou égal à tous","lteq_any":"inférieur ou égal à au moins un","matches":"correspond à","matches_all":"correspond à tous","matches_any":"correspond à au moins un","not_cont":"ne contient pas","not_cont_all":"ne contient pas tous","not_cont_any":"ne contient pas au moins un","not_end":"ne finit pas par","not_end_all":"ne finit pas par tous","not_end_any":"ne finit pas par au moins un","not_eq":"différent de","not_eq_all":"différent de tous","not_eq_any":"différent d'au moins un","not_in":"non inclus dans","not_in_all":"non inclus dans tous","not_in_any":"non inclus dans au moins un","not_null":"n'est pas null","not_start":"ne commence pas par","not_start_all":"ne commence pas par tous","not_start_any":"ne commence pas par au moins un","null":"est null","present":"est présent","start":"commence par","start_all":"commence par tous","start_any":"commence par au moins un","true":"est vrai"},"search":"recherche","sort":"tri","value":"valeur"}});
+I18n.translations["el"] = I18n.extend((I18n.translations["el"] || {}), {"active_admin":{"access_denied":{"message":"Δεν έχετε πρόσβαση για αυτή την ενέργεια."},"any":"Όλες οι εγγραφές","batch_actions":{"action_label":"%{title} επιλεγμένων","button_label":"Μαζικές Ενέργειες","default_confirmation":"Είστε σίγουρος πως θέλετε να το κάνετε αυτό;","delete_confirmation":"Είστε σίγουρος πως θέλετε να διαγράψετε αυτά τα %{plural_model}?","labels":{"destroy":"Διαγραφή"},"link":"Δημιουργήστε ένα","selection_toggle_explanation":"(Αντιστροφή επιλογών)","succesfully_destroyed":{"one":"Διαγράφηκε επιτυχώς 1 %{model}","other":"Διαγράφηκαν επιτυχώς %{count} %{plural_model}"}},"blank_slate":{"content":"Δεν υπάρχουν %{resource_name} ακόμα.","link":"Δημιουργήστε μία εγγραφή"},"cancel":"Ακύρωση","comments":{"add":"Προσθήκη Σχολίου","author":"Συγγραφέας","author_missing":"Ανώνυμος","author_type":"Τύπος Συγγραφέα","body":"Κείμενο","errors":{"empty_text":"Το σχόλιο δε σώθηκε, το κείμενο ήταν κενό."},"no_comments_yet":"Δεν υπάρχει κανένα σχόλιο.","resource":"Εγγραφή","resource_type":"Τύπος Εγγραφής","title":"Σχόλιο","title_content":"Σχόλια (%{count})"},"dashboard":"Σελίδα διαχείρισης","dashboard_welcome":{"call_to_action":"Για να προσθέσετε ενότητες, ανατρέξτε στο αρχείο 'app/admin/dashboard.rb'","welcome":"Καλωσορίσατε στο Active Admin. Αυτή είναι η αρχική σελίδα διαχείρισης."},"delete":"Διαγραφή","delete_confirmation":"Είστε σίγουρος πως θέλετε να το διαγράψετε;","delete_model":"Διαγραφή %{model}","details":"Λεπτομέρειες %{model}","devise":{"change_password":{"submit":"Αλλαγή του κωδικού","title":"Αλλάξτε τον κωδικό σας"},"email":{"title":"Email"},"links":{"forgot_your_password":"Ξεχάσατε τον κωδικό σας;","resend_confirmation_instructions":"Αποστολή οδηγιών επιβεβαίωσης","resend_unlock_instructions":"Αποστολή οδηγιών ξεκλειδώματος","sign_in":"Σύνδεση","sign_in_with_omniauth_provider":"Σύνδεση με %{provider}","sign_up":"Εγγραφή"},"login":{"remember_me":"Να με θυμάσαι","submit":"Σύνδεση","title":"Σύνδεση"},"password":{"title":"Κωδικός"},"resend_confirmation_instructions":{"submit":"Αποστολή οδηγιών επιβεβαίωσης","title":"Αποστολή οδηγιών επιβεβαίωσης"},"reset_password":{"submit":"Επαναφορά κωδικού","title":"Ξεχάσατε τον κωδικό σας;"},"sign_up":{"submit":"Εγγραφή","title":"Εγγραφή"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Αποστολή οδηγιών ξεκλειδώματος","title":"Αποστολή οδηγιών ξεκλειδώματος"},"username":{"title":"Όνομα χρήστη"}},"download":"Κατέβασμα:","dropdown_actions":{"button_label":"Ενέργειες"},"edit":"Επεξεργασία","edit_model":"Επεξεργασία %{model}","empty":"Άδειο","filters":{"buttons":{"clear":"Καθαρισμός Φίλτρων","filter":"Φίλτρα"},"predicates":{"contains":"Περιέχει","ends_with":"Καταλήγει σε","equals":"Είναι ίσο με","greater_than":"Μεγαλύτερο από","less_than":"Μικρότερο από","starts_with":"Αρχίζει με"}},"has_many_delete":"Διαγραφή","has_many_new":"Προσθήκη Νέου %{model}","has_many_remove":"Αφαίρεση","index_list":{"block":"Λίστα","blog":"Blog","grid":"Πλέγμα","table":"Πίνακας"},"logout":"Αποσύνδεση","main_content":"Παρακαλώ υλοποιήστε την %{model}#main_content για να εμφανίσετε περιεχόμενο.","new_model":"Δημιουργία %{model}","next":"Επόμενη","pagination":{"empty":"Δε βρέθηκαν %{model}","entry":{"one":"εγγραφή","other":"εγγραφές"},"multiple":"Εμφανίζονται %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E από \u003Cb\u003E%{total}\u003C/b\u003E συνολικά","multiple_without_total":"Εμφανίζονται %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Εμφάνιζεται \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Εμφανίζονται \u003Cb\u003Eόλες οι %{n}\u003C/b\u003E εγγραφές %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Προηγούμενη","sidebars":{"filters":"Φίλτρα"},"status_tag":{"no":"Δεν","yes":"Ναι"},"unsupported_browser":{"headline":"Το ActiveAdmin δεν υποστηρίζει πλεον τον Internet Explorer έκδοση 8 η μικρότερη.","recommendation":"Σας προτείνουμε να αναβαθμίσετε στην τελευταία \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, or \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Αν χρησιμοποιείτε IE 9 ή μεγαλύτερη έκδοση, σιγουρευτείτε ότι \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eturn off \"Compatibility View\"\u003C/a\u003E."},"view":"Προβολή"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"Εστάλη μέσω της φόρμας επικοινωνίας από τον/την %{email}","sent_by_name":"Εστάλη από τον/την %{name} από τη διεύθυνση %{email}","subject":"Μήνυμα φόρμας επικοινωνίας από %{email}"}},"contacts":{"new":{"contact_us":"Επικοινωνία","email":"Διεύθυνση ηλεκτρονικού ταχυδρομείου","message":"Μήνυμα","name":"Όνομα","subject":"Θέμα","submit":"Αποστολή"},"new_formtastic":{"contact_us":"Επικοινωνία","email":"Διεύθυνση ηλεκτρονικού ταχυδρομείου","message":"Μήνυμα","name":"Όνομα","subject":"Θέμα","submit":"Αποστολή"},"new_simple_form":{"contact_us":"Επικοινωνία","email":"Διεύθυνση ηλεκτρονικού ταχυδρομείου","message":"Μήνυμα","name":"Όνομα","subject":"Θέμα","submit":"Αποστολή"}},"notices":{"error":"Πρέπει να συμπληρώσετε και τα δύο πεδία.","success":"Το μήνυμά σας εστάλη επιτυχώς."}}});
+I18n.translations["he"] = I18n.extend((I18n.translations["he"] || {}), {"active_admin":{"any":"Any","batch_actions":{"action_label":"%{title} נבחר","button_label":"פעולות מרובות","default_confirmation":"אתה בטוח שאתה רוצה לעשות את זה?","delete_confirmation":"האם הנך בטוח שאתה רוצה למרוח את %{plural_model}?","labels":{"destroy":"מחק"},"link":"צור","selection_toggle_explanation":"(שינוי בחירה)","succesfully_destroyed":{"few":"%{count} %{plural_model} נמחק בהצלחה","many":"%{count} %{plural_model} נמחק בהצלחה","one":"1 %{model} נמחק בהצלחה","other":"%{count} %{plural_model} נמחק בהצלחה"}},"blank_slate":{"content":"כרגע אין עוד אף %{resource_name}.","link":"צור אחד"},"cancel":"ביטול","comments":{"add":"הוסף תגובה","author":"נוצר ע\"י","body":"תוכן","errors":{"empty_text":"התגובה לא נשמרה, שדה התוכן ריק."},"no_comments_yet":"אין עדיין תגובות.","resource":"Resource","title":"תגובה","title_content":"תגובות (%{count})"},"dashboard":"פנל ניהול","dashboard_welcome":{"call_to_action":"כדי להוסיף אזורים בפנל הניהול, אנא בדוק את, 'app/admin/dashboard.rb'","welcome":"ברוכים הבאים לאקטיב אדמין. זהו פנל הניהול"},"delete":"מחיקה","delete_confirmation":"האם אתה בטוח שאתה רוצה למחוק את זה?","delete_model":"מחיקת %{model}","details":"פרטים על %{model}","devise":{"change_password":{"submit":"שנה את הסיסמא שלי","title":"שנה את הסיסמא שלך"},"links":{"forgot_your_password":"שכחת את הסיסמא שלך?","sign_in":"כניסה","sign_in_with_omniauth_provider":"%{provider} היכנס עם"},"login":{"remember_me":"זכור אותי","submit":"הכנס","title":"כניסה"},"reset_password":{"submit":"אפס את הסיסמא שלי","title":"שכחת סיסמא?"}},"download":"הורד:","dropdown_actions":{"button_label":"פעולו"},"edit":"עריכה","edit_model":"ערוך %{model}","empty":"ריק","filters":{"buttons":{"clear":"איפוס שדות","filter":"סינון"},"predicates":{"contains":"מכיל","ends_with":"מסתיים ב","equals":"שווה ל","greater_than":"גדול מ","less_than":"פחות מ","starts_with":"מתחיל עם"}},"has_many_delete":"מחיקה","has_many_new":"הוספת %{model} חדש","has_many_remove":"להסיר","logout":"התנתקות","main_content":"Please implement %{model}#main_content to display content.","new_model":"%{model} חדש","next":"הבא","pagination":{"empty":"אין %{model} בנמצא","entry":{"one":"רשומה בודדה","other":"רשומות"},"multiple":"מציג %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E מתוך \u003Cb\u003E%{total}\u003C/b\u003E בסך הכל","multiple_without_total":"מציג %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"מציג \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"הצגת \u003Cb\u003Eכל %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"הקודם","sidebars":{"filters":"סינון"},"status_tag":{"no":"לא","yes":"כן"},"view":"צפייה"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"נשלח על ידי קונטקט פורם מאת %{email}","sent_by_name":"נשלח על ידי %{name} מאת %{email}","subject":"צור קשר, הודעה מאת %{email}"}},"contacts":{"new":{"contact_us":"צור קשר","email":"מייל","message":"הודעה","name":"שם","subject":"נושא","submit":"שלח"},"new_formtastic":{"contact_us":"צור קשר","email":"מייל","message":"הודעה","name":"שם","subject":"נושא","submit":"שלח"},"new_simple_form":{"contact_us":"צור קשר","email":"מייל","message":"הודעה","name":"שם","subject":"נושא","submit":"שלח"}},"notices":{"error":"הנך צריך למלא את שתי השדות.","success":"הטופס נשלח בהצלחה."}}});
+I18n.translations["it"] = I18n.extend((I18n.translations["it"] || {}), {"active_admin":{"access_denied":{"message":"Non hai le autorizzazioni necessarie per eseguire questa azione."},"any":"Qualsiasi","batch_actions":{"action_label":"%{title} Selezionati","button_label":"Azioni multiple","default_confirmation":"Sei sicuro di che voler fare questo?","delete_confirmation":"Sei sicuro di volere cancellare %{plural_model}?","labels":{"destroy":"Elimina"},"link":"Crea uno","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Eliminato con successo 1 %{model}","other":"Eliminati con successo %{count} %{plural_model}"}},"blank_slate":{"content":"Non sono presenti %{resource_name}","link":"Crea nuovo/a"},"cancel":"Annulla","comments":{"add":"Aggiungi Commento","author":"Autore","author_missing":"Anonimo","author_type":"Tipo di Autore","body":"Corpo","created_at":"Creato il","delete":"Cancella Commento","delete_confirmation":"Sei sicuro di voler cancellare questo commento?","errors":{"empty_text":"Il commento non può essere salvato, il testo è vuoto."},"no_comments_yet":"Nessun commento.","resource":"Risorsa","resource_type":"Tipo di risorsa","title":"Commento","title_content":"Commenti (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Per aggiungere sezioni alla dashboard controlla il file 'app/admin/dashboard.rb'","welcome":"Benvenuti in Active Admin. Questa è la pagina dashboard di default."},"delete":"Rimuovi","delete_confirmation":"Sei sicuro di volerlo rimuovere?","delete_model":"Rimuovi %{model}","details":"Dettagli %{model}","devise":{"change_password":{"submit":"Cambia la mia password","title":"Cambia la tua password"},"email":{"title":"Email"},"links":{"forgot_your_password":"Dimenticato la password?","resend_confirmation_instructions":"Invia di nuovo le istruzioni per la conferma","resend_unlock_instructions":"Invia di nuovo le istruzioni per lo sblocco","sign_in":"Entra","sign_in_with_omniauth_provider":"Collegati a %{provider}"},"login":{"remember_me":"Ricordami","submit":"Entra","title":"Entra"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Invia di nuovo le istruzioni per la conferma","title":"Invia di nuovo le istruzioni per la conferma"},"reset_password":{"submit":"Reimposta la tua password","title":"Dimenticato la password?"},"sign_up":{"submit":"Iscriviti","title":"Iscriviti"},"subdomain":{"title":"Sottodominio"},"unlock":{"submit":"Invia di nuovo le istruzioni per sbloccare","title":"Invia di nuovo le istruzioni per sbloccare"},"username":{"title":"Nome Utente"}},"download":"Scarica:","dropdown_actions":{"button_label":"Azioni"},"edit":"Modifica","edit_model":"Modifica %{model}","empty":"Vuoto","filters":{"buttons":{"clear":"Rimuovi filtri","filter":"Filtra"},"predicates":{"contains":"Contiene","ends_with":"Finisce con","equals":"Uguale a","greater_than":"Maggiore di","less_than":"Minore di","starts_with":"Inizia con"}},"has_many_delete":"Rimuovi","has_many_new":"Aggiungi nuovo/a %{model}","has_many_remove":"Rimuovi","index_list":{"block":"Lista","blog":"Blog","grid":"Griglia","table":"Tabella"},"logout":"Esci","main_content":"Devi implemetare %{model}#main_content per mostrarne il contenuto.","new_model":"Aggiungi %{model}","next":"Prossimo","pagination":{"empty":"Nessun %{model} trovato","entry":{"one":"voce","other":"voci"},"multiple":"Sto mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E di \u003Cb\u003E%{total}\u003C/b\u003E in totale","multiple_without_total":"Sto mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Sto mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Sto mostrando \u003Cb\u003E%{n}\u003C/b\u003E %{model}. Lista completa."},"powered_by":"Powered by %{active_admin} %{version}","previous":"Precedente","search_status":{"current_filters":"Filtri attivi:","current_scope":"Contesto selezionato:","headline":"Situazione filtri:","no_current_filters":"Nessuno"},"sidebars":{"filters":"Filtri","search_status":"Informazioni sulla ricerca"},"status_tag":{"no":"No","yes":"Sì"},"unsupported_browser":{"headline":"Perfavore, notare che ActiveAdmin non supporta più Internet Explorer 8 o inferiore","recommendation":"Ti raccomandiamo di aggiornare alla versione più recente di \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, o \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Se stai utilizzando Internet Explorer 9 o successivo, assicurati di \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Edisabilitare la \"Modalità Compatibilità\"\u003C/a\u003E."},"view":"Mostra"},"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":{"contact_us":"Contattaci","email":"Email","message":"Messaggio","name":"Name","subject":"Subject","submit":"Inviare"},"new_formtastic":{"contact_us":"Contattaci","email":"Email","message":"Messaggio","name":"Name","subject":"Subject","submit":"Inviare"},"new_simple_form":{"contact_us":"Contattaci","email":"Email","message":"Messaggio","name":"Name","subject":"Subject","submit":"Inviare"}},"notices":{"error":"Devi inserire entrambi i campi.","success":"La mail di contatto è stata inviata."}},"formtastic":{"cancel":"Annulla","create":"Crea %{model}","no":"No","required":"obbligatorio","reset":"Ripristina %{model}","submit":"Invia","update":"Aggiorna %{model}","yes":"Sì"}});
+I18n.translations["pl"] = I18n.extend((I18n.translations["pl"] || {}), {"active_admin":{"any":"Jakikolwiek","batch_actions":{"action_label":"%{title} zaznaczone","button_label":"Akcje na partiach","default_confirmation":"Czy na pewno chcesz to zrobić?","delete_confirmation":"Czy na pewno chcesz usunąć te %{plural_model}?","labels":{"destroy":"Usuń"},"link":"Utwórz jeden","selection_toggle_explanation":"(Przełącz zaznaczenie)","succesfully_destroyed":{"few":"Poprawnie usunięto %{count} %{plural_model}","many":"Poprawnie usunięto %{count} %{plural_model}","one":"Poprawnie usunięto 1 %{model}","other":"Poprawnie usunięto %{count} %{plural_model}"}},"blank_slate":{"content":"Nie ma jeszcze zasobu %{resource_name}.","link":"Utwórz go"},"cancel":"Anuluj","comments":{"add":"Dodaj komentarz","author":"Autor","body":"Treść","errors":{"empty_text":"Komentarz nie został zapisany, zawartość była pusta."},"no_comments_yet":"Nie ma jeszcze komentarzy.","resource":"Zasób","title":"Komentarz","title_content":"Komentarze (%{count})"},"dashboard":"Pulpit","dashboard_welcome":{"call_to_action":"Aby dodać sekcje do pulpitu, sprawdź 'app/admin/dashboard.rb'","welcome":"Witaj w Active Adminie. To jest domyślny pulpit."},"delete":"Usuń","delete_confirmation":"Jesteś pewien, że chcesz to usunąć?","delete_model":"Usuń %{model}","details":"Detale %{model}","devise":{"change_password":{"submit":"Zmień hasło","title":"Zmień hasło"},"links":{"forgot_your_password":"Nie pamiętasz hasła?","sign_in":"Zaloguj się","sign_in_with_omniauth_provider":"Zaloguj się z %{provider}"},"login":{"remember_me":"Zapamiętaj mnie","submit":"Zaloguj się","title":"Logowanie"},"resend_confirmation_instructions":{"submit":"Wyślij ponownie instrukcje aktywacji","title":"Wyślij ponownie instrukcje aktywacji"},"reset_password":{"submit":"Zresetować hasło","title":"Nie pamiętasz hasła?"},"sign_up":{"submit":"Zarejestruj się","title":"Rejestracja"}},"download":"Pobierz:","dropdown_actions":{"button_label":"Akcje"},"edit":"Edytuj","edit_model":"Edytuj %{model}","empty":"Pusty","filters":{"buttons":{"clear":"Wyczyść Filtry","filter":"Filtruj"},"predicates":{"contains":"Zawiera","ends_with":"Kończy się","equals":"Równe","greater_than":"Większe niż","less_than":"Mniejsze niż","starts_with":"Zaczyna się"}},"has_many_delete":"Usuń","has_many_new":"Dodaj nowy %{model}","has_many_remove":"Usuń","logout":"Wyloguj","main_content":"Zaimplementuj %{model}#main_content aby wyświetlić treść.","new_model":"Nowy %{model}","next":"Następna","pagination":{"empty":"Nie znaleziono %{model}","multiple":"Wyświetlanie %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E z \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Wyświetlanie %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Wyświetlanie \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Wyświetlanie \u003Cb\u003Ewszystkich %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Poprzednia","sidebars":{"filters":"Filtry"},"status_tag":{"no":"Nie","yes":"Tak"},"view":"Podgląd"},"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":{"contact_us":"Kontakt z nami","email":"Email","message":"Wiadomość","name":"Imię","subject":"Temat","submit":"Wyślij"},"new_formtastic":{"contact_us":"Kontakt z nami","email":"Email","message":"Wiadomość","name":"Imię","subject":"Temat","submit":"Wyślij"},"new_simple_form":{"contact_us":"Kontakt z nami","email":"Email","message":"Wiadomość","name":"Imię","subject":"Temat","submit":"Wyślij"}},"notices":{"error":"Musisz wypełnić oba pola.","success":"Twój email został wysłany"}},"formtastic":{"create":"Utwórz %{model}","update":"Aktualizuj %{model}"}});
+I18n.translations["pt-BR"] = I18n.extend((I18n.translations["pt-BR"] || {}), {"active_admin":{"access_denied":{"message":"Você não tem permissão para realizar o solicitado"},"any":"Qualquer","batch_actions":{"action_label":"%{title} Selecionado","button_label":"Ações em lote","default_confirmation":"Tem certeza que quer fazer isso?","delete_confirmation":"Tem certeza que deseja excluir estes %{plural_model}?","labels":{"destroy":"Excluir"},"link":"Novo","selection_toggle_explanation":"(Alternar Seleção)","succesfully_destroyed":{"one":"Excluiu com sucesso 1 %{model}","other":"Excluiu com sucesso %{count} %{plural_model}"}},"blank_slate":{"content":"Não existem %{resource_name} ainda.","link":"Novo"},"cancel":"Cancelar","comments":{"add":"Adicionar Comentário","author":"Autor","author_missing":"Anônimo","author_type":"Tipo de Autor","body":"Conteúdo","created_at":"Criado em","delete":"Deletar comentário","delete_confirmation":"Tem certeza que deseja excluir este comentário?","errors":{"empty_text":"O comentário não foi salvo porque o texto estava vazio."},"no_comments_yet":"Nenhum comentário.","resource":"Objeto","resource_type":"Tipo de Objeto","title":"Comentário","title_content":"Comentários: %{count}"},"dashboard":"Painel Administrativo","dashboard_welcome":{"call_to_action":"Para adicionar seções ao painel, verifique 'app/admin/dashboard.rb'","welcome":"Bem vindo ao Active Admin. Esta é a página de painéis padrão."},"delete":"Remover","delete_confirmation":"Você tem certeza que deseja remover este item?","delete_model":"Remover %{model}","details":"Detalhes do(a) %{model}","devise":{"change_password":{"submit":"Troque minha senha","title":"Troque sua senha"},"email":{"title":"E-mail"},"links":{"forgot_your_password":"Esqueceu sua senha?","resend_confirmation_instructions":"Reenviar instruções de confirmação","resend_unlock_instructions":"Reenviar instruções de desbloqueio","sign_in":"Entrar","sign_in_with_omniauth_provider":"Entre com o %{provider}","sign_up":"Criar conta"},"login":{"remember_me":"Lembrar da senha","submit":"Entrar","title":"Conta"},"password":{"title":"Senha"},"resend_confirmation_instructions":{"submit":"Reenviar instruções de confirmação","title":"Reenviar instruções de confirmação"},"reset_password":{"submit":"Reinicie minha senha","title":"Esqueceu sua senha?"},"sign_up":{"submit":"Continuar","title":"Cadastre-se"},"subdomain":{"title":"Subdomínio"},"unlock":{"submit":"Reenviar instruções de desbloqueio","title":"Reenviar instruções de desbloqueio"},"username":{"title":"Nome de Usuário"}},"download":"Baixar:","dropdown_actions":{"button_label":"Ações"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vazio","filters":{"buttons":{"clear":"Limpar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contém","ends_with":"Termina com","equals":"Igual A","greater_than":"Maior Que","less_than":"Menor Que","starts_with":"Começa com"}},"has_many_delete":"Remover","has_many_new":"Adicionar Novo(a) %{model}","has_many_remove":"Remover","index_list":{"block":"Lista","blog":"Blog","grid":"Grid","table":"Tabela"},"logout":"Sair","main_content":"Por favor implemente %{model}#main_content para exibir conteúdo.","new_model":"Novo(a) %{model}","next":"Próximo","pagination":{"empty":"Nenhum(a) %{model} encontrado(a)","entry":{"one":"registro","other":"registros"},"multiple":"Exibindo %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de um total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Exibindo %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Exibindo \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Exibindo \u003Cb\u003Etodos(as) os(as) %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","search_status":{"current_filters":"Filtros escolhidos:","current_scope":"Em:","headline":"Buscou:","no_current_filters":"Nenhum"},"sidebars":{"filters":"Filtros","search_status":"Buscou"},"status_tag":{"no":"Não","yes":"Sim"},"unsupported_browser":{"headline":"O ActiveAdmin não oferece suporte ao Internet Explorer versão 8 ou inferior.","recommendation":"Nós recomendamos atualizar para a última versão do \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, ou \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Se você está usando o IE 9 ou superior, \u003Ca href=\"http://windows.microsoft.com/pt-BR/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Edesligue o \"Modo de Exibição de Compatibilidade\"\u003C/a\u003E."},"view":"Visualizar"},"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":{"contact_us":"Contate-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_formtastic":{"contact_us":"Contate-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_simple_form":{"contact_us":"Contate-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"}},"notices":{"error":"Você tem de preencher ambos os campos.","success":"Email de contato foi enviado com sucesso."}},"formtastic":{"cancel":"Cancelar %{model}","create":"Criar %{model}","no":"Não","required":"obrigatório","reset":"Voltar %{model}","submit":"Salvar %{model}","update":"Atualizar %{model}","yes":"Sim"}});
+I18n.translations["pt-PT"] = I18n.extend((I18n.translations["pt-PT"] || {}), {"active_admin":{"any":"Qualquer","batch_actions":{"action_label":"%{title} Selecionado","button_label":"Ações em quantidade","default_confirmation":"Tem a certeza que quer fazer isso?","delete_confirmation":"Tem a certeza de que deseja excluir estes %{plural_model}?","labels":{"destroy":"Excluir"},"link":"Novo","selection_toggle_explanation":"(Alternar Seleção)","succesfully_destroyed":{"one":"Excluiu com sucesso 1 %{model}","other":"Excluiu com sucesso %{count} %{plural_model}"}},"blank_slate":{"content":"Ainda não existem %{resource_name}.","link":"Novo"},"cancel":"Cancelar","comments":{"add":"Adicionar Comentário","author":"Autor","body":"Conteúdo","errors":{"empty_text":"O comentário não foi guardado porque o texto estava vazio."},"no_comments_yet":"Nenhum comentário.","resource":"Objeto","title":"Comentário","title_content":"Comentários: %{count}"},"dashboard":"Painel de Administração","dashboard_welcome":{"call_to_action":"Se pretende adicionar seções ao painel, consulte 'app/admin/dashboard.rb'","welcome":"Bem-vindo ao Active Admin. Esta é a página padrão."},"delete":"Remover","delete_confirmation":"Não tem a certeza de que deseja remover este ítem?","delete_model":"Remover %{model}","details":"Detalhes do(a) %{model}","devise":{"change_password":{"submit":"Trocar a minha senha","title":"Troque a sua senha"},"links":{"forgot_your_password":"Esqueceu-se da sua senha?","sign_in":"Entrar","sign_in_with_omniauth_provider":"Entre com o %{provider}"},"login":{"remember_me":"Lembrar-me","submit":"Entrar","title":"Conta"},"reset_password":{"submit":"Reiniciar a minha senha","title":"Esqueceu-de da sua senha?"}},"download":"Baixar:","dropdown_actions":{"button_label":"Ações"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vazio","filters":{"buttons":{"clear":"Limpar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contém","ends_with":"Termina com","equals":"Igual A","greater_than":"Maior Que","less_than":"Menor Que","starts_with":"Começa com"}},"has_many_delete":"Remover","has_many_new":"Adicionar Novo(a) %{model}","has_many_remove":"Remover","logout":"Sair","main_content":"Por favor implemente %{model}#main_content para mostrar o conteúdo.","new_model":"Novo(a) %{model}","next":"Próximo","pagination":{"empty":"Nenhum(a) %{model} encontrado(a)","entry":{"one":"registro","other":"registros"},"multiple":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de um total de \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Mostrando \u003Cb\u003Etodos(as) os(as) %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","sidebars":{"filters":"Filtros"},"status_tag":{"no":"Não","yes":"Sim"},"view":"Visualizar"},"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":{"contact_us":"Contacte-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_formtastic":{"contact_us":"Contacte-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"},"new_simple_form":{"contact_us":"Contacte-nos","email":"Email","message":"Mensagem","name":"Nome","subject":"Assunto","submit":"Enviar"}},"notices":{"error":"Tem de preencher ambos os campos.","success":"Email de contacto foi enviado com sucesso."}}});
+I18n.translations["ru"] = I18n.extend((I18n.translations["ru"] || {}), {"active_admin":{"access_denied":{"message":"Вы не авторизованы для выполнения данного действия."},"any":"Любой","batch_actions":{"action_label":"%{title} выбранное","button_label":"Групповые операции","default_confirmation":"Вы уверены, что вы хотите это сделать?","delete_confirmation":"Вы уверены, что хотите удалить %{plural_model}?","labels":{"destroy":"Удалить"},"link":"Создать","selection_toggle_explanation":"(Отметить всё / Снять выделение)","succesfully_destroyed":{"few":"Успешно удалено: %{count} %{plural_model}","many":"Успешно удалено: %{count} %{plural_model}","one":"Успешно удалено: 1 %{model}","other":"Успешно удалено: %{count} %{plural_model}"}},"blank_slate":{"content":"Пока нет %{resource_name}.","link":"Создать"},"cancel":"Отмена","comments":{"add":"Добавить Комментарий","author":"Автор","author_missing":"Аноним","author_type":"Тип автора","body":"Текст","delete":"Удалить Комментарий","delete_confirmation":"Вы уверены, что хотите удалить этот комментарий?","errors":{"empty_text":"Комментарий не сохранен, текст не должен быть пустым."},"no_comments_yet":"Пока нет комментариев.","resource":"Ресурс","resource_type":"Тип ресурса","title":"Комментарий","title_content":"Комментарии (%{count})"},"dashboard":"Панель управления","dashboard_welcome":{"call_to_action":"Чтобы добавить сюда что-нибудь загляните в 'app/admin/dashboard.rb'","welcome":"Добро пожаловать в Active Admin. Это стандартная страница управления сайтом."},"delete":"Удалить","delete_confirmation":"Вы уверены, что хотите удалить это?","delete_model":"Удалить %{model}","details":"%{model} подробнее","devise":{"change_password":{"submit":"Изменение пароля","title":"Изменение пароля"},"email":{"title":"Эл. почта"},"links":{"forgot_your_password":"Забыли пароль?","resend_confirmation_instructions":"Повторная отправка инструкций подтверждения","resend_unlock_instructions":"Повторная отправка инструкций разблокировки","sign_in":"Войти","sign_in_with_omniauth_provider":"Войти с помощью %{provider}","sign_up":"Зарегистрироваться"},"login":{"remember_me":"Запомнить меня","submit":"Войти","title":"Войти"},"password":{"title":"Пароль"},"resend_confirmation_instructions":{"submit":"Выслать повторно письмо с активацией","title":"Выслать повторно письмо с активацией"},"reset_password":{"submit":"Сбросить пароль","title":"Забыли пароль?"},"sign_up":{"submit":"Зарегистрироваться","title":"Зарегистрироваться"},"subdomain":{"title":"Поддомен"},"unlock":{"submit":"Повторно отправить инструкции по разблокировке","title":"Повторно отправить инструкции по разблокировке"},"username":{"title":"Имя пользователя"}},"download":"Загрузка:","dropdown_actions":{"button_label":"Oперации"},"edit":"Изменить","edit_model":"Изменить %{model}","empty":"Пусто","filters":{"buttons":{"clear":"Очистить","filter":"Фильтровать"},"predicates":{"contains":"Содержит","ends_with":"Заканчивается","equals":"Равно","greater_than":"больше","less_than":"меньше","starts_with":"Начинается с"}},"has_many_delete":"Удалить","has_many_new":"Добавить %{model}","has_many_remove":"Убрать","index_list":{"block":"Список","blog":"Блог","grid":"Сетка","table":"Таблица"},"logout":"Выйти","main_content":"Создайте %{model}#main_content для отображения содержимого.","new_model":"Создать %{model}","next":"След.","pagination":{"empty":"%{model} не найдено","entry":{"few":"записи","many":"записей","one":"запись","other":"записей"},"multiple":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E из \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Результат: \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Результат: \u003Cb\u003E%{n}\u003C/b\u003E %{model}"},"powered_by":"Работает на %{active_admin} %{version}","previous":"Пред.","search_status":{"current_filters":"Текущий фильтр:","current_scope":"Область:","headline":"Статус поиска:","no_current_filters":"Ни один"},"sidebars":{"filters":"Фильтры","search_status":"Статус поиска"},"status_tag":{"no":"Нет","yes":"Да"},"unsupported_browser":{"headline":"Пожалуйста, обратите внимание, что Active Admin больше не поддерживает старые версии Internet Explorer начиная с версии IE 8","recommendation":"Мы рекомендуем обновить версию вашего браузера (\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, или \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E).","turn_off_compatibility_view":"Если вы используете IE 9 или новее, убедитесь, что \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eвы выключили опцию \"Просмотр в режиме совместимости\"\u003C/a\u003E."},"view":"Открыть"},"contact_us":{"contact_mailer":{"contact_email":{"sent_by_contact_form":"Отправлено через контактную форму через %{email}","sent_by_name":"Отправлено от %{name} через %{email}","subject":"Контактное сообщение от %{email}"}},"contacts":{"new":{"contact_us":"Свяжитесь с Нами","email":"Электронная Почта","message":"Сообщение","name":"Имя","subject":"Тематика","submit":"Отправить"},"new_formtastic":{"contact_us":"Свяжитесь с Нами","email":"Электронная Почта","message":"Сообщение","name":"Имя","subject":"Тематика","submit":"Отправить"},"new_simple_form":{"contact_us":"Свяжитесь с Нами","email":"Электронная Почта","message":"Сообщение","name":"Имя","subject":"Тематика","submit":"Отправить"}},"notices":{"error":"Вы должны заполнить оба поля.","success":"Контактное сообщение отправлено."}}});
+I18n.translations["ca"] = I18n.extend((I18n.translations["ca"] || {}), {"active_admin":{"access_denied":{"message":"No esta autoritzat a realitzar aquesta acció."},"any":"Qualsevol","batch_actions":{"action_label":"%{title} seleccionat","button_label":"les accions per lots","default_confirmation":"¿Esteu segur que voleu fer-ho?","delete_confirmation":"¿Està segur que desitja eliminar aquests %{plural_model}?","labels":{"destroy":"esborrar"},"link":"crear una","selection_toggle_explanation":"(Selecció de Canviar)","succesfully_destroyed":{"one":"Va destruir amb èxit 1 %{model}","other":"Va destruir amb èxit %{count} %{plural_model}"}},"blank_slate":{"content":"Encara no hi ha cap %{resource_name}.","link":"Crea'n un/a"},"cancel":"Cancel·lar","comments":{"add":"Afegeix comentari","author":"autor","body":"Cos","errors":{"empty_text":"El comentari no es va salvar, el text estava buida."},"no_comments_yet":"No hi ha comentaris","resource":"Recurs","title":"comentari","title_content":"comentaris (%{count})"},"dashboard":"Tauler","dashboard_welcome":{"call_to_action":"Mira l'arxiu 'app/admin/dashboard.rb' per afegir seccions al tauler","welcome":"Benvingut a Active Admin. Aquest és el tauler per defecte."},"delete":"Elimina","delete_confirmation":"Segur que vols eliminar-ho?","delete_model":"eliminar %{model}","details":"Detalls de %{model}","devise":{"change_password":{"submit":"Canviar la contrasenya","title":"Canvieu la contrasenya"},"links":{"forgot_your_password":"Heu perdut la contrasenya?","sign_in":"Registrar","sign_in_with_omniauth_provider":"Connecta't amb %{provider}"},"login":{"remember_me":"Recordar","submit":"iniciar sessió","title":"iniciar sessió"},"resend_confirmation_instructions":{"submit":"Reenviar instruccions de confirmació","title":"Reenviar instruccions de confirmació"},"reset_password":{"submit":"Restablir la contrasenya","title":"Heu perdut la contrasenya?"},"unlock":{"submit":"Reenvia instruccions per a desbloquejar","title":"Reenvia instruccions per a desbloquejar"}},"download":"Descarregar:","dropdown_actions":{"button_label":"accions"},"edit":"Edita","edit_model":"Editar %{model}","empty":"Buit","filters":{"buttons":{"clear":"Treure filtres","filter":"Filtrar"},"predicates":{"contains":"Conté","ends_with":"Acaba amb","equals":"Igual a","greater_than":"Més gran que","less_than":"Més petit que","starts_with":"Comença amb"}},"has_many_delete":"Eliminar","has_many_new":"Afegir %{model}","has_many_remove":"Treure","index_list":{"block":"Llista","blog":"Bloc","grid":"Graella","table":"Taula"},"logout":"Desconnecta't","main_content":"Implementa %{model}#main_content per mostrar contingut.","new_model":"Crear %{model}","next":"Següent","pagination":{"empty":"No hi ha %{model}","entry":{"one":"entrada","other":"entrades"},"multiple":"S'estan mostrant %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de \u003Cb\u003E%{total}\u003C/b\u003E en total","multiple_without_total":"S'estan mostrant %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"S'està mostrant \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"S'estan mostrant \u003Cb\u003Etots %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","sidebars":{"filters":"Filtres"},"status_tag":{"no":"No","yes":"Sí"},"view":"Mostra"},"formtastic":{"cancel":"Cancel·lar","create":"Crear %{model}","no":"No","required":"obligatori","reset":"Restablir %{model}","submit":"Acceptar","update":"Actualitzar %{model}","yes":"Sí"}});
+I18n.translations["pt"] = I18n.extend((I18n.translations["pt"] || {}), {"formtastic":{"cancel":"Cancelar %{model}","create":"Criar %{model}","no":"Não","required":"obrigatório","reset":"Resetar %{model}","submit":"Salvar %{model}","update":"Atualizar %{model}","yes":"Sim"}});
+I18n.translations["zh-CN"] = I18n.extend((I18n.translations["zh-CN"] || {}), {"active_admin":{"access_denied":{"message":"您无权处理此操作"},"any":"任何","batch_actions":{"action_label":"%{title} 被选中","button_label":"批处理","default_confirmation":"你确定你要这样做?","delete_confirmation":"你确定要删除所有%{plural_model}?","labels":{"destroy":"删除"},"link":"新建一个","selection_toggle_explanation":"(切换选择)","succesfully_destroyed":{"one":"成功删除 1 %{model}","other":"成功删除 %{count} %{plural_model}"}},"blank_slate":{"content":"暂时还没有%{resource_name}.","link":"新建一个"},"cancel":"取消","comments":{"add":"添加评论","author":"作者","body":"内容","errors":{"empty_text":"评论保存失败,内空不能为空."},"no_comments_yet":"暂时没有评论","resource":"资源","title":"评论","title_content":"(%{count})条评论"},"dashboard":"控制面板","dashboard_welcome":{"call_to_action":"若要添加新的面板内容, 请修改 'app/admin/dashboard.rb'","welcome":"欢迎使用Active Admin. 这是默认的控制面板页."},"delete":"删除","delete_confirmation":"确定删除?","delete_model":"删除%{model}","details":"%{model}详情","devise":{"email":{"title":"邮箱"},"links":{"forgot_your_password":"忘记了密码?","sign_in":"登录","sign_in_with_omniauth_provider":"登入%{provider}"},"login":{"remember_me":"记住我","submit":"登录","title":"登录"},"password":{"title":"密码"},"resend_confirmation_instructions":{"submit":" 重新发送确认指示","title":" 重新发送确认指示"},"reset_password":{"submit":"重置我的密码","title":"忘记了密码?"},"subdomain":{"title":"子域"},"unlock":{"submit":"重新发送送解锁命令","title":"重新发送送解锁命令"},"username":{"title":"用户名"}},"download":"下载:","dropdown_actions":{"button_label":"行动"},"edit":"编辑","edit_model":"编辑%{model}","empty":"清空","filters":{"buttons":{"clear":"清除条件","filter":"过滤"},"predicates":{"contains":"包含","ends_with":"完与","equals":"等于","greater_than":"大于","less_than":"小于","starts_with":"开头"}},"has_many_delete":"删除","has_many_new":"新建一个%{model}","has_many_remove":"清除","logout":"退出","main_content":"请执行 %{model}#main_content 来显示内容.","new_model":"新建%{model}","next":"下一个","pagination":{"empty":"暂时没有%{model}","entry":{"one":"条目","other":"条目"},"multiple":"显示所有 \u003Cb\u003E%{total}\u003C/b\u003E %{model}中的\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 条","multiple_without_total":"%{model}中的\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 条","one":"显示 \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"显示 \u003Cb\u003E所有 %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"上一个","search_status":{"current_filters":"过滤条件:","current_scope":"搜索范围:","headline":"搜索条件:","no_current_filters":"无"},"sidebars":{"filters":"所有条件","search_status":"搜索条件"},"status_tag":{"no":"无","yes":"是的"},"view":"查看"},"formtastic":{"cancel":"取消","create":"新建%{model}","no":"NO","required":"必须的","reset":"重置%{model}","submit":"确认","update":"更新%{model}","yes":"YES"}});
+I18n.translations["ar"] = I18n.extend((I18n.translations["ar"] || {}), {"active_admin":{"access_denied":{"message":"لم يُصرّح لك بهذا الإجراء."},"any":"أي","batch_actions":{"action_label":"اُختير %{title}","button_label":"إجراءات متعددة","default_confirmation":"هل أنت متأكّد؟","delete_confirmation":"هل أنت متأكّد من حذف هذه %{plural_model}؟","labels":{"destroy":"حذف"},"link":"إنشاء","selection_toggle_explanation":"(تتبيث الخيار)","succesfully_destroyed":{"one":"حُذف بنجاح 1 %{model}","other":"حُذف بنجاح %{count} %{plural_model}"}},"blank_slate":{"content":"لايوجد %{resource_name} بعد.","link":"إنشاء"},"cancel":"إلغاء","comments":{"add":"إضافة تعليق","author":"مؤلّف","author_missing":"مجهول","author_type":"نوع الؤلّف","body":"هيكل","created_at":"أُنشئ","delete":"حذف تعليق","delete_confirmation":"هل أنت متأكّد من حذف هذه التعليقات؟","errors":{"empty_text":"لم يُحفظ التعليق، النص فارغ."},"no_comments_yet":"لا يوجد تعليقات بعد.","resource":"مصدر","resource_type":"نوع المصدر","title":"تعليق","title_content":"تعليقات (%{count})"},"dashboard":"لوحة تحكم","dashboard_welcome":{"call_to_action":"لإضافة أقسام إلى لوحة التحكم, راجع: 'app/admin/dashboard.rb'","welcome":"مرحبًا بك في في صفحة الإدارة، وهذه هي الصفحة الإفتراضيّة."},"delete":"حذف","delete_confirmation":"هل تريد تأكيد الحذف؟","delete_model":"حذف %{model}","details":"تفاصيل %{model}","devise":{"change_password":{"submit":"تغير كلمة المرور خاصتي","title":"تغير كلمة المرور خاصتك"},"email":{"title":"البريد الإلكترونيّ"},"links":{"forgot_your_password":"هل نسيت كلمة المرور؟","resend_confirmation_instructions":"إعادة إرسال تعليمات تأكيد الحساب","resend_unlock_instructions":"إعادة إرسال تعليمات تنشيط الحساب","sign_in":"دخول","sign_in_with_omniauth_provider":"تسجيل الدخول بـ %{provider}","sign_up":"التسجيل"},"login":{"remember_me":"تذكرني","submit":"تسحيل","title":"دخول"},"password":{"title":"كلمة المرور"},"resend_confirmation_instructions":{"submit":"إعادة ارسال تعليمات التأكيد","title":"إعادة ارسال تعليمات التأكيد"},"reset_password":{"submit":"استرجاع كلمة المرور","title":"هل نسيت كلمة المرور؟"},"sign_up":{"submit":"تسجيل الدخول","title":"تسجيل الدخول"},"subdomain":{"title":"مجال فرعي"},"unlock":{"submit":"إعادة إرسال تعليمات فك الحظر","title":"إعادة إرسال تعليمات فك الحظر"},"username":{"title":"اسم المستخدم"}},"download":"تحميل","dropdown_actions":{"button_label":"إجراءات"},"edit":"تعديل","edit_model":"تعديل %{model}","empty":"فارغ","filters":{"buttons":{"clear":"تفريغ التصفية","filter":"تصفية"},"predicates":{"contains":"يحتوي","ends_with":"ينتهي بـ","equals":"متساوي","greater_than":"أكبر من","less_than":"أقل من","starts_with":"يبدأ بـ"}},"has_many_delete":"حذف","has_many_new":"إضافة %{model} جديد","has_many_remove":"إزالة","index_list":{"block":"قائمة","blog":"مدونة","grid":"شبكة","table":"جدول"},"logout":"تسجيل الخروج","main_content":"الرجاء تنفيذ %{model}#main_content لعرض المحتوى.","new_model":"جديد %{model}","next":"التالي","pagination":{"empty":"لا يوجد %{model} ","entry":{"one":"مدخل","other":"مدخلات"},"multiple":"عرض %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E من \u003Cb\u003E%{total}\u003C/b\u003E بالمجمل","multiple_without_total":"عرض %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"عرض \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"عرض \u003Cb\u003Eall %{n}\u003C/b\u003E %{model}"},"powered_by":"تنفيذ %{active_admin} %{version}","previous":"السابق","search_status":{"current_filters":"المُرشحات الحاليّة:","current_scope":"المجال:","headline":"حالات البحث:","no_current_filters":"بدون"},"sidebars":{"filters":"المُرشحات","search_status":"حالات البحث"},"status_tag":{"no":"لا","yes":"نعم"},"unsupported_browser":{"headline":"يُرجى مُلاحظة أن (أكتف أدمن) لم تعد تدعم المُتصفّح إنترنت اكسبلوررالإصدار الثامن وما قبله","recommendation":"ننصح بالتحديث إلى الإصدارات الأخيرة من: \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, أو \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"إن كنت تستخدم الإصدار التاسع وما يليه من إنترنت إكسبلورر تأكّد من \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eتعطيل \"Compatibility View\"\u003C/a\u003E."},"view":"عرض"}});
+I18n.translations["bg"] = I18n.extend((I18n.translations["bg"] || {}), {"active_admin":{"access_denied":{"message":"Нямате права да извършите това действие."},"any":"Без значение","batch_actions":{"action_label":"%{title} избран","button_label":"Масови действия","default_confirmation":"Наистина ли искате да направите това?","delete_confirmation":"Сигурни ли сте, че искате да изтриете тези %{plural_model}?","labels":{"destroy":"Изтриване"},"link":"Създаване","selection_toggle_explanation":"(Инвертиране на маркирането)","succesfully_destroyed":{"one":"Успешно изтриване на 1 %{model}","other":"Успешно изтриване на %{count} %{plural_model}"}},"blank_slate":{"content":"Все още няма добавени %{resource_name}.","link":"Създаване"},"cancel":"Отказ","comments":{"add":"Добавяне на коментар","author":"Автор","author_missing":"Анонимен","author_type":"Тип автор","body":"Текст","errors":{"empty_text":"Коментарът с празен текст не беше запазен."},"no_comments_yet":"Все още няма коментари.","resource":"Ресурс","resource_type":"Тип ресурс","title":"Коментар","title_content":"Коментари (%{count})"},"dashboard":"Табло","dashboard_welcome":{"call_to_action":"За да добавите секции, редактирайте 'app/admin/dashboard.rb'","welcome":"Добре дошли в Active Admin. Това е таблото по подразбиране."},"delete":"Изтриване","delete_confirmation":"Сигурни ли сте, че искате да изтриете това?","delete_model":"Изтриване на %{model}","details":"%{model} детайли","devise":{"change_password":{"submit":"Промяна на паролата","title":"Промяна на паролата"},"email":{"title":"Поща"},"links":{"forgot_your_password":"Забравена парола?","sign_in":"Вход","sign_in_with_omniauth_provider":"Влез с %{provider}"},"login":{"remember_me":"Запомни ме","submit":"Вход","title":"Вход"},"password":{"title":"Парола"},"resend_confirmation_instructions":{"submit":"Изпрати отново инструкциите за потвърждаване","title":"Изпрати отново инструкциите за потвърждаване"},"reset_password":{"submit":"Изпращане на нова парола","title":"Забравена парола?"},"sign_up":{"submit":"Регистрация","title":"Регистрация"},"subdomain":{"title":"Поддомейн"},"unlock":{"submit":"Изпрати отново инструкциите за отключване","title":"Изпрати отново инструкциите за отключване"},"username":{"title":"Потребителско име"}},"download":"Изтегляне:","dropdown_actions":{"button_label":"действия"},"edit":"Редакция","edit_model":"Редакция на %{model}","empty":"Празно","filters":{"buttons":{"clear":"Изчистване","filter":"Филтриране"},"predicates":{"contains":"съдържа","ends_with":"Завършва с","equals":"равно на","greater_than":"по-голямо от","less_than":"по-малко от","starts_with":"Започва с"}},"has_many_delete":"Изтриване","has_many_new":"Добавяне на %{model}","has_many_remove":"Премахване","index_list":{"block":"Списък","blog":"Блог","grid":"Грид","table":"Таблица"},"logout":"Изход","main_content":"Добавете %{model}#main_content за да видите съдържание.","new_model":"Създаване на %{model}","next":"Следващо","pagination":{"empty":"Не са намерени %{model}","entry":{"one":"запис","other":"записи"},"multiple":"Показване %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E от общо \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Показване %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Показване на \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Показване на \u003Cb\u003Eвсички %{n}\u003C/b\u003E %{model}"},"powered_by":"Задвижва се от %{active_admin} %{version}","previous":"Предишно","sidebars":{"filters":"Филтри"},"status_tag":{"no":"не","yes":"Да"},"view":"Преглед"}});
+I18n.translations["bs"] = I18n.extend((I18n.translations["bs"] || {}), {"active_admin":{"access_denied":{"message":"Nemaš dopuštenja."},"any":"Bilo koji","batch_actions":{"action_label":"%{title} označene","button_label":"Grupne akcije","default_confirmation":"Jeste li sigurni da želite to učiniti?","delete_confirmation":"Jeste li sigurni da želite obrisati %{plural_model}?","labels":{"destroy":"Obriši"},"link":"Izradi jedan","selection_toggle_explanation":"(Izmijeni odabir)","succesfully_destroyed":{"few":"Uspješno su obrisana %{count} %{plural_model}","many":"Uspješno je obrisano %{count} %{plural_model}","one":"Uspješno je obrisan 1 %{model}","other":"Uspješno je obrisano %{count} %{plural_model}"}},"blank_slate":{"content":"Još uvijek ne postoji niti jedan zapis tipa %{resource_name}.","link":"Izradi jedan"},"cancel":"Odustani","comments":{"add":"Dodaj komentar","author":"Autor","author_missing":"Anoniman","author_type":"Tip autora","body":"Sadržaj","errors":{"empty_text":"Komentar nije spremljen, sadržaj je prazan."},"no_comments_yet":"Još nema komentara.","resource":"Objekt","resource_type":"Tip objekta","title":"Komentar","title_content":"Komentari (%{count})"},"dashboard":"Upravljačka ploča","dashboard_welcome":{"call_to_action":"Da biste dodali nove odjeljke na upravljačku ploču, pogledajte 'app/admin/dashboard.rb'","welcome":"Dobrodošli u Active Admin. Ovo je početna upravljačka ploča."},"delete":"Obriši","delete_confirmation":"Jeste li sigurni da želite ovo obrisati?","delete_model":"Obriši %{model}","details":"%{model} detalji","devise":{"change_password":{"submit":"Izmijeni lozinku","title":"Izmjena lozinke"},"email":{"title":"Email"},"links":{"forgot_your_password":"Zaboravljena lozinka?","sign_in":"Prijavi se","sign_in_with_omniauth_provider":"Prijavite se za %{provider}"},"login":{"remember_me":"Zapamti me","submit":"Prijavi se","title":"Prijava"},"password":{"title":"Lozinka"},"resend_confirmation_instructions":{"submit":"Pošalji","title":"Ponovno slanje uputstva za potvrdu"},"reset_password":{"submit":"Resetuj lozinku","title":"Zaboravljena lozinka?"},"sign_up":{"submit":"Registruj","title":"Registracija"},"subdomain":{"title":"Poddomena"},"unlock":{"submit":"Pošalji","title":"Ponovno slanje uputstva za otključavanje"},"username":{"title":"Korisničko ime"}},"download":"Spremi na računalo:","edit":"Uredi","edit_model":"Uredi %{model}","empty":"Prazno","filters":{"buttons":{"clear":"Ukloni filtere","filter":"Filtriraj"},"predicates":{"contains":"Sadrži","ends_with":"Završava sa","equals":"Jednako","greater_than":"Veće od","less_than":"Manje od","starts_with":"počinje s"}},"has_many_delete":"Obriši","has_many_new":"Dodaj novi %{model}","has_many_remove":"Ukloniti","index_list":{"block":"Lista","blog":"Blog","grid":"Rešetka","table":"Tabela"},"logout":"Odjavi se","main_content":"Molim Vas, implementirajte %{model}#main_content da biste prikazali sadržaj.","new_model":"Novi %{model}","next":"Sljedeći","pagination":{"empty":"Nije pronađen niti jedan %{model}.","entry":{"few":"zapisa","many":"zapisa","one":"zapis","other":"zapisa"},"multiple":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E od ukupno \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Prikazan \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Prikazano \u003Cb\u003Esvih %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Prethodni","sidebars":{"filters":"Filtriranje"},"status_tag":{"no":"Nema","yes":"Da"},"view":"Pregledaj"}});
+I18n.translations["da"] = I18n.extend((I18n.translations["da"] || {}), {"active_admin":{"access_denied":{"message":"Du har ikke rettigheder til at udføre denne handling."},"any":"Alle","batch_actions":{"action_label":"%{title} Valgte","button_label":"Batch Handlinger","default_confirmation":"Er du sikker på du vil gøre dette?","delete_confirmation":"Er du sikker på du vil slette disse %{plural_model}?","labels":{"destroy":"Slet"},"link":"Opret en","selection_toggle_explanation":"(Skift Selection)","succesfully_destroyed":{"one":"Vellykket ødelagt 1 %{model}","other":"Vellykket ødelagt %{count} %{plural_model}"}},"blank_slate":{"content":"Der er ingen %{resource_name} endnu.","link":"Opret"},"cancel":"Fortryd","comments":{"add":"Tilføj Kommentar","author":"forfatter","author_type":"forfatter type","body":"krop","errors":{"empty_text":"Kommentar blev ikke gemt, tekst var tom."},"no_comments_yet":"Ingen kommentarer endnu.","resource":"Resource","resource_type":"resource type","title":"Kommentar","title_content":"Kommentarer (%{count})"},"dashboard":"Kontrolpanel","dashboard_welcome":{"call_to_action":"Rediger 'app/admin/dashboard.rb' for at tilføje nye elementer til oversigtssiden.","welcome":"Velkommen til Active Admin. Dette er standardoversigtssiden."},"delete":"Slet","delete_confirmation":"Er du sikker på at du ønsker at slette?","delete_model":"Slet %{model}","details":"%{model} detaljer","devise":{"change_password":{"submit":"Skift min adgangskode","title":"Skift din adgangskode"},"links":{"forgot_your_password":"Glemt din adgangskode?","sign_in":"Log ind","sign_in_with_omniauth_provider":"Log ind med %{provider}"},"login":{"remember_me":"Husk mig","submit":"Login","title":"Login"},"reset_password":{"submit":"Nulstille min adgangskode","title":"Glemt din adgangskode?"},"unlock":{"submit":"Send oplåsnings instruktioner igen","title":"Send oplåsnings instruktioner igen"}},"download":"Download:","dropdown_actions":{"button_label":"Handlinger"},"edit":"Rediger","edit_model":"Rediger %{model}","empty":"Tom","filters":{"buttons":{"clear":"Ryd filtre","filter":"Filtrer"},"predicates":{"contains":"Indeholder","ends_with":"Slutter med","equals":"lig","greater_than":"større end","less_than":"mindre end","starts_with":"Begynder med"}},"has_many_delete":"Slet","has_many_new":"Tilføj ny(t) %{model}","has_many_remove":"Fjern","index_list":{"block":"Liste","blog":"Blog","grid":"Gitter","table":"Tabel"},"logout":"Log ud","main_content":"Implementer venligst %{model}#main_content for at vise noget indhold.","new_model":"Ny(t) %{model}","next":"Næste","pagination":{"empty":"Ingen %{model} fundet","entry":{"one":"post","other":"poster"},"multiple":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E af \u003Cb\u003E%{total}\u003C/b\u003E i alt","multiple_without_total":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Viser \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Viser \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Forrige","sidebars":{"filters":"Filtre"},"status_tag":{"no":"Nej","yes":"Ja"},"view":"Vis"}});
+I18n.translations["de-CH"] = I18n.extend((I18n.translations["de-CH"] || {}), {"active_admin":{"any":"Alle","batch_actions":{"action_label":"%{title} ausgewählte","button_label":"Stapelverarbeitung","default_confirmation":"Bist du sicher, dass Sie dies tun wollen?","delete_confirmation":"Sind Sie sicher dass sie diese %{plural_model} löschen wollen?","labels":{"destroy":"Lösche"},"link":"erstellen","selection_toggle_explanation":"(Auswahl umschalten)","succesfully_destroyed":{"one":"Erfolgreich 1 %{model} gelöscht","other":"Erfolgreich %{count} %{plural_model} gelöscht"}},"blank_slate":{"content":"Es gibt noch keine %{resource_name}.","link":"Erstellen"},"cancel":"Abbrechen","comments":{"add":"Kommentar hinzufügen","author":"Autor","body":"Inhalt","delete":"Löschen","delete_confirmation":"Sind Sie sicher dass sie diesen Kommentar löschen wollen?","errors":{"empty_text":"Der Kommentar wurde nicht gespeichert, da der Text fehlt."},"no_comments_yet":"Es gibt noch keine Kommentare.","resource":"Resource","title":"Kommentar","title_content":"Kommentare (%{count})"},"dashboard":"Übersicht","dashboard_welcome":{"call_to_action":"Siehe 'app/admin/dashboards.rb', um Übersichts-Bereiche hinzuzufügen.","welcome":"Willkommen in Active Admin. Dies ist die Standard-Übersichtsseite."},"delete":"Löschen","delete_confirmation":"Wollen Sie dieses Element wirklich löschen?","delete_model":"%{model} löschen","details":"%{model} Details","devise":{"change_password":{"submit":"Mein Passwort ändern","title":"Ändern Sie Ihr Passwort"},"links":{"forgot_your_password":"Passwort vergessen?","resend_confirmation_instructions":"Bestätigungsanweisung erneut senden","resend_unlock_instructions":"Entsperrungsanweisung erneut senden","sign_in":"Anmeldung","sign_in_with_omniauth_provider":"Anmeldung mit %{provider}","sign_up":"Registrieren"},"login":{"remember_me":"erinnere dich an mich","submit":"Login","title":"Login"},"reset_password":{"submit":"Mein Passwort zurücksetzen","title":"Passwort vergessen?"}},"download":"Herunterladen:","dropdown_actions":{"button_label":"Aktionen"},"edit":"Bearbeiten","edit_model":"%{model} bearbeiten","empty":"Leer","filters":{"buttons":{"clear":"Filter entfernen","filter":"Filtern"},"predicates":{"contains":"Enthält","ends_with":"Endet mit","equals":"Gleich","greater_than":"Grösser als","less_than":"Kleiner als","starts_with":"Beginnt mit"}},"has_many_delete":"Löschen","has_many_new":"%{model} hinzufügen","has_many_remove":"Entfernen","logout":"Abmelden","main_content":"Bitte implementieren Sie %{model}#main_content, um Inhalte anzuzeigen.","new_model":"%{model} erstellen","next":"Weiter","pagination":{"empty":"Keine %{model} gefunden","entry":{"one":"Eintrag","other":"Einträge"},"multiple":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E von \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Zeige %{model} \u003Cb\u003E%{from}\u0026nbsp;–\u0026nbsp;%{to}\u003C/b\u003E","one":"Zeige \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Zeige \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Zurück","sidebars":{"filters":"Filter"},"status_tag":{"no":"Nicht","yes":"Ja"},"unsupported_browser":{"headline":"ActiveAdmin unterstützt nicht länger den Internet Explorer in Version 8 oder niedriger.","recommendation":"Wir empfehlen die Nutzung von \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, oder \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Wenn sie IE 9 oder neuer benutzen, stellen sie sicher das sie den \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E\"Kompatibilitätsansicht\" ausgeschaltet\u003C/a\u003E haben."},"view":"Anzeigen"}});
+I18n.translations["en-GB"] = I18n.extend((I18n.translations["en-GB"] || {}), {"active_admin":{"any":"Any","batch_actions":{"action_label":"%{title} Selected","button_label":"Batch Actions","default_confirmation":"Are you sure you want to do this?","delete_confirmation":"Are you sure you want to delete these %{plural_model}?","labels":{"destroy":"Delete"},"link":"Create one","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Successfully destroyed 1 %{model}","other":"Successfully destroyed %{count} %{plural_model}"}},"blank_slate":{"content":"There are no %{resource_name} yet.","link":"Create one"},"cancel":"Cancel","comments":{"add":"Add Comment","author":"Author","author_missing":"Anonymous","body":"Body","errors":{"empty_text":"Comment wasn't saved, text was empty."},"no_comments_yet":"No comments yet.","resource":"Resource","title":"Comment","title_content":"Comments (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"To add dashboard sections, checkout 'app/admin/dashboards.rb'","welcome":"Welcome to Active Admin. This is the default dashboard page."},"delete":"Delete","delete_confirmation":"Are you sure you want to delete this?","delete_model":"Delete %{model}","details":"%{model} Details","devise":{"change_password":{"submit":"Change my password","title":"Change your password"},"links":{"forgot_your_password":"Forgot your password?","resend_unlock_instructions":"Re-send unlock instructions","sign_in":"Sign in","sign_in_with_omniauth_provider":"Sign in with %{provider}"},"login":{"remember_me":"Remember me","submit":"Login","title":"Login"},"resend_confirmation_instructions":{"submit":"Resend confirmation instructions","title":"Resend confirmation instructions"},"reset_password":{"submit":"Reset My Password","title":"Forgot your password?"}},"download":"Download:","dropdown_actions":{"button_label":"Actions"},"edit":"Edit","edit_model":"Edit %{model}","empty":"Empty","filters":{"buttons":{"clear":"Clear Filters","filter":"Filter"},"predicates":{"contains":"Contains","ends_with":"Ends with","equals":"Equals","greater_than":"Greater than","less_than":"Less than","starts_with":"Starts with"}},"has_many_delete":"Delete","has_many_new":"Add New %{model}","has_many_remove":"Remove","logout":"Logout","main_content":"Please implement %{model}#main_content to display content.","new_model":"New %{model}","next":"Next","pagination":{"empty":"No %{model} found","entry":{"one":"entry","other":"entries"},"multiple":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E in total","multiple_without_total":"Displaying %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Displaying \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Displaying \u003Cb\u003Eall %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Previous","sidebars":{"filters":"Filters"},"status_tag":{"no":"No","yes":"Yes"},"view":"View"}});
+I18n.translations["es-MX"] = I18n.extend((I18n.translations["es-MX"] || {}), {"active_admin":{"any":"Cualquiera","batch_actions":{"action_label":"%{title} seleccionado","button_label":"Acciones en masa","default_confirmation":"¿Seguro que quieres hacer esto?","delete_confirmation":"Eliminar %{plural_model}: ¿Está seguro?","labels":{"destroy":"Borrar"},"link":"Añadir","selection_toggle_explanation":"(Cambiar selección)","succesfully_destroyed":{"one":"Se ha destruido 1 %{model} con éxito","other":"Se han destruido %{count} %{plural_model} con éxito"}},"blank_slate":{"content":"No hay %{resource_name} aún.","link":"Añadir"},"cancel":"Cancelar","comments":{"add":"Comentar","author":"Autor","body":"Cuerpo","errors":{"empty_text":"El comentario no fue guardado, el texto estaba vacío."},"no_comments_yet":"Aún sin comentarios.","resource":"Recurso","title":"Comentario","title_content":"Comentarios (%{count})"},"dashboard":"Inicio","dashboard_welcome":{"call_to_action":"Para agregar secciones edite 'app/admin/dashboard.rb'","welcome":"Bienvenido a Active Admin. Esta es la página de inicio predeterminada."},"delete":"Eliminar","delete_confirmation":"¿Está seguro de que quiere eliminar esto?","delete_model":"Eliminar %{model}","details":"Detalles de %{model}","devise":{"change_password":{"submit":"Cambiar mi contraseña","title":"Cambie su contraseña"},"links":{"forgot_your_password":"¿Olvidó su contraseña?","sign_in":"Registrarse","sign_in_with_omniauth_provider":"Conéctate con %{provider}"},"login":{"remember_me":"Recordarme","submit":"Iniciar Sesión","title":"Iniciar Sesión"},"reset_password":{"submit":"Restablecer mi contraseña","title":"¿Olvidó su contraseña?"}},"download":"Descargar:","dropdown_actions":{"button_label":"Acciones"},"edit":"Editar","edit_model":"Editar %{model}","empty":"Vacío","filters":{"buttons":{"clear":"Quitar Filtros","filter":"Filtrar"},"predicates":{"contains":"Contiene","ends_with":"Termina con","equals":"Igual a","greater_than":"Mayor que","less_than":"Menor que","starts_with":"Empieza con"}},"has_many_delete":"Eliminar","has_many_new":"Añadir %{model}","has_many_remove":"Quitar","index_list":{"block":"Lista","blog":"Blog","grid":"Cuadrícula","table":"Tabla"},"logout":"Salir","main_content":"Por favor implemente %{model}#main_content para mostrar contenido.","new_model":"Añadir %{model}","next":"Siguiente","pagination":{"empty":"No se han encontrado %{model}","multiple":"Mostrando %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E de un total de \u003Cb\u003E%{total}\u003C/b\u003E","one":"Mostrando \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Mostrando \u003Cb\u003Eun total de %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Anterior","sidebars":{"filters":"Filtros"},"status_tag":{"no":"No","yes":"Sí"},"view":"Ver"}});
+I18n.translations["fa"] = I18n.extend((I18n.translations["fa"] || {}), {"active_admin":{"access_denied":{"message":"شما دسترسی لازم برای انجام این عملیات را ندارید."},"any":"هرکدام","batch_actions":{"action_label":"%{title} انتخاب شده است","button_label":"عملیاتهای دستهای","default_confirmation":"آیا برای اجرای این عملیات اطمینان دارید؟","delete_confirmation":"آیا برای حذف همه رکوردهای %{plural_model} اطمینان دارید؟","labels":{"destroy":"حذف"},"link":"ایجاد یک رکورد جدید","selection_toggle_explanation":"(انتخابها برعکس شوند)","succesfully_destroyed":{"one":"1 %{model} با موفقیت حذف شد","other":"%{count} %{plural_model} با موفقت حذف شدند."}},"blank_slate":{"content":"هنوز هیچ رکوردی از %{resource_name} درج نشده.","link":"درج اولین رکورد"},"cancel":"لغو","comments":{"add":"افزودن کامنت","author":"ایجاد کننده","author_missing":"بینام","author_type":"نوع ایجاد کننده","body":"بدنه","errors":{"empty_text":"کامنت درج نشد، متن کامنت خالی بود."},"no_comments_yet":"هنوز هیچ کامنتی نوشته نشده.","resource":"رکورد","resource_type":"نوع رکورد","title":"کامنت","title_content":"کامنتها (%{count})"},"dashboard":"داشبرد","dashboard_welcome":{"call_to_action":"برای اضافه کردن قسمتهایی به داشبرد اینجا را چک کنید: 'app/admin/dashboard.rb'","welcome":"به اکتیو ادمین خوش آمدید. این صفحه اول داشبرد است."},"delete":"حذف","delete_confirmation":"آیا برای حذف این آیتم اطمینان دارید؟","delete_model":"حذف %{model}","details":"جزئیات %{model}","devise":{"change_password":{"submit":"تغییر کلمه عبور","title":"تغییر کلمه عبور"},"email":{"title":"ایمیل"},"links":{"forgot_your_password":"کلمه عبور را فراموش کردهاید؟","sign_in":"ورود","sign_in_with_omniauth_provider":"ورود با حساب %{provider}"},"login":{"remember_me":"مرا به خاطر بسپار","submit":"ورود","title":"ورود"},"password":{"title":"کلمهعبور"},"resend_confirmation_instructions":{"submit":"ارسال مجدد تاییدیه ایمیل","title":"ارسال مجدد تاییدیه ایمیل"},"reset_password":{"submit":"دریافت کلمه عبور جدید","title":"کلمه عبور را فراموش کردهاید؟"},"sign_up":{"submit":"ثبتنام","title":"ثبتنام"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"ارسال مجدد دستورالعمل بازگشایی حساب کاربری","title":"ارسال مجدد دستورالعمل بازگشایی حساب کاربری"},"username":{"title":"نام کاربری"}},"download":"دریافت:","dropdown_actions":{"button_label":"عملیات"},"edit":"ویرایش","edit_model":"ویرایش %{model}","empty":"خالی","filters":{"buttons":{"clear":"پاک کردن فیلتر","filter":"فیلتر"},"predicates":{"contains":"شامل","ends_with":"پایان با","equals":"برابر با","greater_than":"بزرگتر از","less_than":"کوچکتر از","starts_with":"شروع با"}},"has_many_delete":"حذف","has_many_new":"اضافه کردن %{model} جدید","has_many_remove":"حذف","index_list":{"block":"لیست","blog":"وبلاگ","grid":"گرید","table":"جدول"},"logout":"خروج","main_content":"لطفا %{model}#main_content را پیاده سازی کنید تا محتوی نمایش داده شود.","new_model":"%{model} جدید","next":"بعدی","pagination":{"empty":"هیچ رکورد %{model} یافت نشد","entry":{"one":"آیتم","other":"آیتمها"},"multiple":"نمایش %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E از کل \u003Cb\u003E%{total}\u003C/b\u003E رکورد","multiple_without_total":"نمایش %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"نمایش \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"نمایش \u003Cb\u003Eهمه %{n}\u003C/b\u003E %{model}"},"powered_by":"قدرت گرفته از %{active_admin} %{version}","previous":"قبلی","sidebars":{"filters":"فیلترها"},"status_tag":{"no":"بدون","yes":"بله"},"view":"نمایش"}});
+I18n.translations["fi"] = I18n.extend((I18n.translations["fi"] || {}), {"active_admin":{"access_denied":{"message":"Sinulla ei ole oikeuksia suorittaa yrittämääsi toimintoa."},"any":"mikä vain","batch_actions":{"action_label":"%{title} Valittu","button_label":"Toimet","default_confirmation":"Oletko varma, että haluat tehdä tämän?","delete_confirmation":"Oletko varma, että haluat poistaa nämä %{plural_model}:t?","labels":{"destroy":"Poista"},"link":"Luo","selection_toggle_explanation":"(Vaihda valintaa)","succesfully_destroyed":{"one":"1 %{model} poistettu","other":"%{count} %{plural_model}:a poistettu"}},"blank_slate":{"content":"Järjestelmässä ei ole yhtään %{resource_name}:ia vielä.","link":"Luo ensimmäinen"},"cancel":"Peruuta","comments":{"add":"Lisää kommentti","author":"Luoja","author_type":"Luoja-tyyppi","body":"Runko","errors":{"empty_text":"Kommenttia ei pystytty tallentamaan, et kirjoittanut kommenttitekstiä."},"no_comments_yet":"Ei kommentteja.","resource":"Resurssi","resource_type":"Resurssityyppi","title":"Kommentti","title_content":"Kommentteja (%{count})"},"dashboard":"Etusivu","dashboard_welcome":{"call_to_action":"Lisätäksesi etusivun osioita katso: 'app/admin/dashboard.rb'","welcome":"Tervetuloa! Tämä on Active Adminin oletusetusivu."},"delete":"Poista","delete_confirmation":"Oletko varma, että haluat poistaa tämän?","delete_model":"Poista %{model}","details":"%{model} Tiedot","devise":{"change_password":{"submit":"Vaihda salasana","title":"Vaihda salasana"},"email":{"title":"Sähköposti"},"links":{"forgot_your_password":"Unohtunut salasana?","sign_in":"Kirjaudu sisään","sign_in_with_omniauth_provider":"Kirjaudu sisään %{provider}:ia käyttäen"},"login":{"remember_me":"Muista minut","submit":"Kirjaudu sisään","title":"Sisäänkirjautuminen"},"password":{"title":"Salasana"},"reset_password":{"submit":"Resetoi salasana","title":"Unohtunut salasana?"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Lähetä ohjeet lukituksen poistoon","title":"Lähetä ohjeet lukituksen poistoon"},"username":{"title":"Käyttäjänimi"}},"download":"Lataa:","dropdown_actions":{"button_label":"Acciones"},"edit":"Muokkaa","edit_model":"Muokaa %{model}","empty":"Tyhjä","filters":{"buttons":{"clear":"Tyhjennä valinnat","filter":"Hae"},"predicates":{"contains":"Sisältää","ends_with":"Päättyy","equals":"On yhtä kuin","greater_than":"Suurempi kuin","less_than":"Pienempi kuin","starts_with":"Alkaa"}},"has_many_delete":"Poista","has_many_new":"Lisää uusi %{model}","has_many_remove":"Poista","index_list":{"block":"Lista","blog":"Blogi","grid":"Ruudukko","table":"Taulukko"},"logout":"Kirjaudu ulos","main_content":"Ole hyvä, käytä %{model}#main_content:ia nähdäksesi jotain.","new_model":"Uusi %{model}","next":"Seuraava","pagination":{"empty":"%{model}:ia ei löytynyt","entry":{"one":"syöte","other":"syötteet"},"multiple":"Näytetään %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E (yhteensä \u003Cb\u003E%{total}\u003C/b\u003E)","multiple_without_total":"Näytetään %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Näytetään \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Näytetään \u003Cb\u003Ekaikki %{n}\u003C/b\u003E %{model}:it"},"powered_by":"Käyttää %{active_admin} %{version}:ia","previous":"Edellinen","sidebars":{"filters":"Haku"},"status_tag":{"no":"Ei","yes":"Kyllä"},"view":"Katso"}});
+I18n.translations["hr"] = I18n.extend((I18n.translations["hr"] || {}), {"active_admin":{"access_denied":{"message":"Nemaš dopuštenja."},"any":"Bilo koji","batch_actions":{"action_label":"%{title} označene","button_label":"Grupne akcije","default_confirmation":"Jeste li sigurni da želite to učiniti?","delete_confirmation":"Jeste li sigurni da želite obrisati %{plural_model}?","labels":{"destroy":"Obriši"},"link":"Izradi jedan","selection_toggle_explanation":"(Izmijeni odabir)","succesfully_destroyed":{"few":"Uspješno su obrisana %{count} %{plural_model}","many":"Uspješno je obrisano %{count} %{plural_model}","one":"Uspješno je obrisan 1 %{model}","other":"Uspješno je obrisano %{count} %{plural_model}"}},"blank_slate":{"content":"Još uvijek ne postoji niti jedan zapis tipa %{resource_name}.","link":"Izradi jedan"},"cancel":"Odustani","comments":{"add":"Dodaj komentar","author":"Autor","author_missing":"Anoniman","author_type":"Tip autora","body":"Sadržaj","errors":{"empty_text":"Komentar nije spremljen, sadržaj je prazan."},"no_comments_yet":"Još nema komentara.","resource":"Objekt","resource_type":"Tip objekta","title":"Komentar","title_content":"Komentari (%{count})"},"dashboard":"Upravljačka ploča","dashboard_welcome":{"call_to_action":"Da biste dodali nove odjeljke na upravljačku ploču, pogledajte 'app/admin/dashboard.rb'","welcome":"Dobrodošli u Active Admin. Ovo je početna upravljačka ploča."},"delete":"Obriši","delete_confirmation":"Jeste li sigurni da želite ovo obrisati?","delete_model":"Obriši %{model}","details":"%{model} detalji","devise":{"change_password":{"submit":"Izmijeni lozinku","title":"Izmjena lozinke"},"email":{"title":"Email"},"links":{"forgot_your_password":"Zaboravljena lozinka?","sign_in":"Prijavi se","sign_in_with_omniauth_provider":"Prijavite se za %{provider}"},"login":{"remember_me":"Zapamti me","submit":"Prijavi se","title":"Prijava"},"password":{"title":"Lozinka"},"resend_confirmation_instructions":{"submit":"Pošalji","title":"Ponovno slanje uputstva za potvrdu"},"reset_password":{"submit":"Resetiraj lozinku","title":"Zaboravljena lozinka?"},"sign_up":{"submit":"Registruj","title":"Registracija"},"subdomain":{"title":"Poddomena"},"unlock":{"submit":"Pošalji","title":"Ponovno slanje uputstva za otključavanje"},"username":{"title":"Korisničko ime"}},"download":"Spremi na računalo:","dropdown_actions":{"button_label":"Ukrepi"},"edit":"Uredi","edit_model":"Uredi %{model}","empty":"Prazno","filters":{"buttons":{"clear":"Očisti filtere","filter":"Filtriraj"},"predicates":{"contains":"Sadrži","ends_with":"Završava sa","equals":"Jednako","greater_than":"Veće od","less_than":"Manje od","starts_with":"počinje s"}},"has_many_delete":"Obriši","has_many_new":"Dodaj novi %{model}","has_many_remove":"Ukloniti","index_list":{"block":"Lista","blog":"Blog","grid":"Rešetka","table":"Tabela"},"logout":"Odjavi se","main_content":"Molim Vas, implementirajte %{model}#main_content da biste prikazali sadržaj.","new_model":"Novi %{model}","next":"Sljedeći","pagination":{"empty":"Nije pronađen niti jedan %{model}.","entry":{"few":"zapisa","many":"zapisa","one":"zapis","other":"zapisa"},"multiple":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E od ukupno \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Prikazani %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Prikazan \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Prikazano \u003Cb\u003Esvih %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Prijašnji","sidebars":{"filters":"Filtriranje"},"status_tag":{"no":"Nema","yes":"Da"},"view":"Pregledaj"}});
+I18n.translations["id"] = I18n.extend((I18n.translations["id"] || {}), {"active_admin":{"access_denied":{"message":"Anda tidak diperkenankan melakukan aksi tersebut."},"any":"Apapun","batch_actions":{"action_label":"%{title} terpilih","button_label":"Tindakan Serentak","default_confirmation":"Apakah anda yakin akan melakukan ini?","delete_confirmation":"Apakah anda yakin akan menghapus %{plural_model}?","labels":{"destroy":"Hapus"},"link":"Tambah data","selection_toggle_explanation":"(Tampilkan Pilihan)","succesfully_destroyed":{"one":"Berhasil menghapus %{model}","other":"Berhasil menghapus %{count} %{plural_model}"}},"blank_slate":{"content":"%{resource_name} masih belum ada sama sekali.","link":"Tambah data"},"cancel":"Batal","comments":{"add":"Tambah Komentar","author":"Penulis","author_missing":"Anonim","author_type":"Tipe Penulis","body":"Isi","created_at":"Dibuat","delete":"Hapus Komentar","delete_confirmation":"Apakah anda yakin akan menghapus komentar tersebut?","errors":{"empty_text":"Komentar tak bisa disimpan, text tidak boleh dikosongi."},"no_comments_yet":"Belum ada komentar sama sekali.","resource":"Resource","resource_type":"Jenis Resource","title":"Komentar","title_content":"Komentar (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Tampilan halaman ini bisa diubah di file 'app/admin/dashboard.rb'","welcome":"Selamat datang di Active Admin. Ini adalah tampilan standar halaman dashboard."},"delete":"Hapus","delete_confirmation":"Apakah anda yakin ingin menghapus data ini?","delete_model":"Hapus %{model}","details":"Detail %{model}","devise":{"change_password":{"submit":"Kirimkan instruksi pengaturan ulang password","title":" - Atur Ulang Password"},"email":{"title":"Email"},"links":{"forgot_your_password":"Lupa password?","resend_confirmation_instructions":"Kirim lagi instruksi konfirmasi akun","resend_unlock_instructions":"Kirim instruksi pengaktifan kembali akun","sign_in":"Masuk","sign_in_with_omniauth_provider":"Daftar melalui %{provider}","sign_up":"Daftar"},"login":{"remember_me":"Ingat saya","submit":"Masuk","title":" - Masuk"},"password":{"title":"Password"},"resend_confirmation_instructions":{"submit":"Kirimkan lagi instruksi konfirmasi akun","title":" - Kirim Lagi Instruksi Konfirmasi Akun"},"reset_password":{"submit":"Atur ulang password","title":" - Form Atur Ulang Password"},"sign_up":{"submit":"Daftar","title":" - Daftar"},"subdomain":{"title":"Subdomain"},"unlock":{"submit":"Kirimkan instruksi pengaktifan kembali akun","title":" - Kirim Instruksi Pengaktifan Kembali Akun"},"username":{"title":"Username"}},"download":"Unduh:","dropdown_actions":{"button_label":"Tindakan"},"edit":"Ubah","edit_model":"Ubah %{model}","empty":"Kosong","filters":{"buttons":{"clear":"Hapus Filters","filter":"Filter"},"predicates":{"contains":"Mengandung","ends_with":"Diakhiri dengan","equals":"Sama dengan","greater_than":"Lebih besar dari","less_than":"Lebih kecil dari","starts_with":"Diawali dengan"}},"has_many_delete":"Hapus","has_many_new":"Tambah %{model} baru","has_many_remove":"Hapus","index_list":{"block":"Daftar","blog":"Blog","grid":"Grid","table":"Tabel"},"logout":"Keluar","main_content":"Harap mengimplementasikan %{model}#main_content untuk menampilkan konten.","new_model":"Tambah %{model} baru","next":"Berikutnya","pagination":{"empty":"Tidak ada %{model} yang bisa ditemukan","entry":{"one":"data","other":"data"},"multiple":"Menampilkan \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E dari \u003Cb\u003E%{total}\u003C/b\u003E keseluruhan %{model}","multiple_without_total":"Menampilkan \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to} %{model}\u003C/b\u003E","one":"Menampilkan \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Menampilkan \u003Cb\u003Esemua %{n}\u003C/b\u003E %{model}"},"powered_by":"Dibuat dengan %{active_admin} %{version}","previous":"Sebelumnya","search_status":{"current_filters":"Filter kini:","current_scope":"Scope:","headline":"Status Pencarian:","no_current_filters":"Tidak ada"},"sidebars":{"filters":"Filter","search_status":"Status Pencarian"},"status_tag":{"no":"Tidak","yes":"Ya"},"unsupported_browser":{"headline":"Harap dicatat bahwa ActiveAdmin sudah tidak mendukung InternetExplorer versi 8 atau versi sebelum itu.","recommendation":"Kami sarankan agar anda mengupgrade ke versi \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, atau \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E yang terbaru.","turn_off_compatibility_view":"Kalau anda menggunakan IE 9 atau yang lebih baru, pastikan anda \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Emematikan \"Compatibility View\"\u003C/a\u003E."},"view":"Lihat"}});
+I18n.translations["ko"] = I18n.extend((I18n.translations["ko"] || {}), {"active_admin":{"any":"어떤","batch_actions":{"action_label":"%{title} 선택됨","button_label":"배치 작업","default_confirmation":"확실하십니까?","delete_confirmation":"%{plural_model}을/를 삭제하시겠습니까?","labels":{"destroy":"삭제"},"link":"만들기","selection_toggle_explanation":"(선택 항목 바꾸기)","succesfully_destroyed":{"one":"성공적으로 1개 %{model}을/를 삭제하였습니다","other":"성공적으로 %{count}개의 %{plural_model}을/를 삭제하였습니다"}},"blank_slate":{"content":"아직 %{resource_name} 이/가 없습니다.","link":"추가하기"},"cancel":"취소","comments":{"add":"댓글 추가","author":"글쓴이","author_type":"글쓴이 종류","body":"내용","created_at":"작성시간","errors":{"empty_text":"댓글이 저장되지 않았습니다. 내용을 입력해주세요."},"no_comments_yet":"아직 댓글이 없습니다.","resource":"첨부파일","resource_type":"첨부파일 형태","title":"제목","title_content":"댓글 (%{count})"},"dashboard":"대시보드","dashboard_welcome":{"call_to_action":"대시보드에 섹션을 추가하시려면 'app/admin/dashboard.rb' 파일을 수정하십시오.","welcome":"ActiveAdmin에 오신 것을 환영합니다. 기본 대시보드 페이지 입니다."},"delete":"삭제","delete_confirmation":"정말로 삭제 하시겠습니까?","delete_model":"%{model} 삭제","details":"%{model} 상세보기","devise":{"change_password":{"submit":"내 비밀번호 변경","title":"비밀번호 변경"},"email":{"title":"이메일"},"links":{"forgot_your_password":"비밀번호를 잊으셨나요?","resend_confirmation_instructions":"계정 승인 요청하기","resend_unlock_instructions":"계정 잠금 해제하기","sign_in":"로그인","sign_in_with_omniauth_provider":"%{provider} 으로 로그인"},"login":{"remember_me":"내 계정 정보 기억","submit":"로그인","title":"로그인"},"password":{"title":"비밀번호"},"resend_confirmation_instructions":{"submit":"계정 승인 요청하기","title":"계정 승인 요청하기"},"reset_password":{"submit":"비밀번호 재설정","title":"비밀번호를 잊으셨나요?"},"sign_up":{"submit":"가입하기","title":"가입하기"},"subdomain":{"title":"서브도메인"},"unlock":{"submit":"계정 잠금 해제하기","title":"계정 잠금 해제하기"},"username":{"title":"아이디"}},"download":"다운로드:","dropdown_actions":{"button_label":"작업"},"edit":"수정","edit_model":"%{model} 수정","empty":"내용이 없습니다","filters":{"buttons":{"clear":"필터 초기화","filter":"필터"},"predicates":{"contains":"포함하는 문구","ends_with":"종료하는 문구","equals":"일치하는 문구","greater_than":"초과","less_than":"미만","starts_with":"시작하는 문구"}},"has_many_delete":"삭제","has_many_new":"%{model} 추가","has_many_remove":"삭제","logout":"로그아웃","main_content":"내용을 보시려면 %{model}#main_content의 코드를 먼저 구현해 주시기 바랍니다.","new_model":"%{model} 추가","next":"다음","pagination":{"empty":"%{model} 이/가 없습니다.","entry":{"one":"항목","other":"항목들"},"multiple":"\u003Cb\u003E%{total}\u003C/b\u003E개 중 \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E %{model} 표시중","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E %{model} 표시중","one":"\u003Cb\u003E1\u003C/b\u003E개 %{model} 표시중","one_page":"\u003Cb\u003E%{n}\u003C/b\u003E개 %{model} 표시중"},"powered_by":"Powered by %{active_admin} %{version}","previous":"이전","search_status":{"current_filters":"적용된 필터:","current_scope":"검색 범위:","headline":"검색 상태:","no_current_filters":"현재 적용된 필터가 없습니다"},"sidebars":{"filters":"필터 목록","search_status":"검색 상태"},"status_tag":{"no":"없음","yes":"있음"},"view":"보기"}});
+I18n.translations["lt"] = I18n.extend((I18n.translations["lt"] || {}), {"active_admin":{"access_denied":{"message":"Jūs nesate įgaliotas atlikti šį veiksmą."},"any":"Bet kokia","batch_actions":{"action_label":"%{title} Pasirinkta","button_label":"Veiksmai su pažymėtais","default_confirmation":"Ar jūs tikrai norite tai padaryti?","delete_confirmation":"Ar jūs tikrai norite pašalinti šiuos %{plural_model}?","labels":{"destroy":"Šalinti"},"link":"Sukurti","selection_toggle_explanation":"(Žymėti)","succesfully_destroyed":{"few":"Sėkmingai pašalinti %{count} %{plural_model}","one":"Sėkmingai pašalintas 1 %{model}","other":"Sėkmingai pašalinti %{count} %{plural_model}"}},"blank_slate":{"content":"Nėra %{resource_name}.","link":"Sukurti"},"cancel":"Atšaukti","comments":{"add":"Pridėti komentarą","author":"Autorius","author_missing":"Anonimas","author_type":"Autoriaus Tipas","body":"Įrašas","errors":{"empty_text":"Komentaras neišsaugotas, tekstas buvo tuščias."},"no_comments_yet":"Dar nėra komentarų.","resource":"Išteklių","resource_type":"Resurso Tipas","title":"Komentaras","title_content":"Komentarai (%{count})"},"dashboard":"Valdymo skydelis","dashboard_welcome":{"call_to_action":"Norėdami pridėti skydelyje skyrius, žiūrėkite app/admin/dashboard.rb","welcome":"Sveiki atvykę į Active Admin. Tai yra numatytasis valdymo skydelis."},"delete":"Šalinti","delete_confirmation":"Ar jūs tikrai norite tai pašalinti?","delete_model":"Pašalinti %{model}","details":"%{model} Informacija","devise":{"change_password":{"submit":"Pakeisti mano slaptažodį","title":"Slaptažodžio Keitimas"},"email":{"title":"El. paštas"},"links":{"forgot_your_password":"Pamiršote slaptažodį?","sign_in":"Prisijungti","sign_in_with_omniauth_provider":"Prisijungti su %{provider}"},"login":{"remember_me":"Prisiminti Mane","submit":"Prisijungti","title":"Prisijungimas"},"password":{"title":"Slaptažodis"},"resend_confirmation_instructions":{"submit":"Siųsti patvirtinimo instructions","title":"Patvirtinimo Instrukcijos"},"reset_password":{"submit":"Sukurti Naują Slaptažodį","title":"Pamiršote slaptažodį?"},"sign_up":{"submit":"Užsiregistruoti","title":"Registracija"},"subdomain":{"title":"Subdomenas"},"unlock":{"submit":"Pakartotinai siųsti atrakinimo instrukcijas","title":"Pakartotinio Atrakinimo Instrukcijos"},"username":{"title":"Vartotojo Vardas"}},"download":"Atsisiųsti","dropdown_actions":{"button_label":"Veiksmai"},"edit":"Redaguoti","edit_model":"Redaguoti %{model}","empty":"Tuščia","filters":{"buttons":{"clear":"Išvalyti filtrus","filter":"Filtras"},"predicates":{"contains":"Sudėtyje yra","ends_with":"Baigiasi","equals":"lygus","greater_than":"didesnis nei","less_than":"mažiau nei","starts_with":"Prasideda nuo"}},"has_many_delete":"Šalinti","has_many_new":"Pridėti naują %{model}","has_many_remove":"Pašalinti","index_list":{"block":"Sąrašas","blog":"Blog","grid":"Tinklelis","table":"Lentelė"},"logout":"Išeiti","main_content":"Prašome realizuoti %{model}#main_content turiniui vaizduoti.","new_model":"Naujas %{model}","next":"Toliau","pagination":{"empty":"%{model} nerastas","entry":{"one":"įrašas","other":"įrašai"},"multiple":"Rodomi %{model} \u003Cb\u003E%{iš}\u0026nbsp;-\u0026nbsp;%{to} \u003C/ b\u003E iš\u003Cb\u003E%{total} \u003C/ b\u003E iš viso","multiple_without_total":"Rodomi %{model} \u003Cb\u003E%{iš}\u0026nbsp;-\u0026nbsp;%{to} \u003C/ b\u003E ","one":"Rodoma \u003CB\u003E 1 \u003C/ b\u003E %{model}","one_page":"Rodoma \u003Cb\u003Evisi %{n} \u003C/ b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Atgal","sidebars":{"filters":"Filtrai"},"status_tag":{"no":"Nėra","yes":"Taip"},"view":"Žiūrėti"}});
+I18n.translations["lv"] = I18n.extend((I18n.translations["lv"] || {}), {"active_admin":{"any":"Jebkurš","batch_actions":{"action_label":"%{title} Selected","button_label":"Batch Actions","default_confirmation":"Vai tiešām vēlaties to darīt?","delete_confirmation":"Vai tiešām vēlaties dzēst šos %{plural_model}?","labels":{"destroy":"Delete"},"link":"Create one","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Successfully destroyed 1 %{model}","other":"Successfully destroyed %{count} %{plural_model}"}},"blank_slate":{"content":"Sadaļā '%{resource_name}' nav neviena ieraksta.","link":"Izveidot jaunu"},"cancel":"Atcelt","comments":{"add":"Pievienot komentāru","author":"Autors","body":"Saturs","errors":{"empty_text":"Komentārs netika saglabāts - nekas nav ierakstīts"},"no_comments_yet":"Nav neviena komentāra.","resource":"Resurss","title":"Komentārs","title_content":"Komentāri (%{count})"},"dashboard":"Panelis","dashboard_welcome":{"call_to_action":"Izmantojiet 'app/admin/dashboard.rb', lai pievienotu sadaļas panelim.","welcome":"Laipni lūgti Active Admin."},"delete":"Dzēst","delete_confirmation":"Vai Tu tiešām vēlies dzēst?","delete_model":"Dzēst '%{model}' ierakstu","details":"Apraksts","devise":{"change_password":{"submit":"Nomainīt savu paroli","title":"Nomainīt paroli"},"links":{"forgot_your_password":"Aizmirsāt savu paroli?","sign_in":"pierakstīties","sign_in_with_omniauth_provider":"Pierakstieties ar %{provider}"},"login":{"remember_me":"atcerēties mani","submit":"Ielogojaties","title":"Ielogojaties"},"reset_password":{"submit":"Atjaunotu savu paroli","title":"Aizmirsāt savu paroli?"}},"download":"Lejuplādēt:","dropdown_actions":{"button_label":"Actions"},"edit":"Labot","edit_model":"Labot '%{model}' ierakstu","empty":"Tukšs","filters":{"buttons":{"clear":"Novākt filtrus","filter":"Filtrēt"},"predicates":{"contains":"Satur","ends_with":"Beidzas ar","equals":"Vienāds ar","greater_than":"Lielāks par","less_than":"Mazāks par","starts_with":"Sākas ar"}},"has_many_delete":"Dzēst","has_many_new":"Pievienot jaunu '%{model}' ierakstu","has_many_remove":"Noņemt","logout":"Iziet","main_content":"Lūdzu implementēt %{model}#main_content, lai rādītos saturs.","new_model":"Pievienot '%{model}' ierakstu","next":"Nākošā","pagination":{"empty":"Nav ierakstu","entry":{"one":"ieraksts","other":"ieraksti"},"multiple":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E ieraksti no \u003Cb\u003E%{total}\u003C/b\u003E kopā","multiple_without_total":"\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"\u003Cb\u003E1\u003C/b\u003E ieraksts","one_page":"\u003Cb\u003E%{n}\u003C/b\u003E ieraksti"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Iepriekšējā","sidebars":{"filters":"Filtri"},"status_tag":{"no":"Nē","yes":"Jā"},"view":"Apskatīt"}});
+I18n.translations["nb"] = I18n.extend((I18n.translations["nb"] || {}), {"active_admin":{"access_denied":{"message":"Du er ikke autorisert til å utføre denne handlingen."},"any":"Alle","batch_actions":{"action_label":"%{title} valgt","button_label":"Gruppehandlinger","delete_confirmation":"Er du sikker på at du vil slette disse %{plural_model}? Dette kan ikke reverseres.","labels":{"destroy":"Slett"},"link":"Opprett en","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Slettet én %{model}","other":"Slettet %{count} %{plural_model}"}},"blank_slate":{"content":"Her er det ingen %{resource_name} enda.","link":"Opprett en"},"cancel":"Avbryt","comments":{"add":"Add Comment","author":"Author","body":"Body","errors":{"empty_text":"Kommentar ble ikke lagret, teksten var tom."},"no_comments_yet":"No comments yet.","resource":"Resource","title":"Comment","title_content":"Kommentarer (%{count})"},"dashboard":"Oversikt","dashboard_welcome":{"call_to_action":"Rediger 'app/admin/dashboard.rb' for å legge til elementer i oversikten.","welcome":"Velkommen til Active Admin. Dette er standardoversiktssiden."},"delete":"Slett","delete_confirmation":"Er du sikker på at du vil slette denne?","delete_model":"Slett %{model}","details":"%{model} Detaljer","devise":{"change_password":{"submit":"Endre mitt passord","title":"Endre passordet"},"email":{"title":"E-post"},"links":{"forgot_your_password":"Glemt passord?","sign_in":"Logg inn","sign_in_with_omniauth_provider":"Logg på med %{provider}"},"login":{"remember_me":"Husk meg","submit":"Logg inn","title":"Innlogging"},"password":{"title":"Passord"},"resend_confirmation_instructions":{"submit":"Send bekreftelsesinformasjon på nytt","title":"Send bekreftelsesinformasjon på nytt"},"reset_password":{"submit":"Tilbakestille passordet mitt","title":"Glemt passord?"},"sign_up":{"submit":"Opprett","title":"Opprett brukerkonto"},"subdomain":{"title":"Subdomene"},"unlock":{"submit":"Send info om gjenoppretting på nytt","title":"Send info om gjenoppretting på nytt"},"username":{"title":"Brukernavn"}},"download":"Last ned:","dropdown_actions":{"button_label":"Handlinger"},"edit":"Rediger","edit_model":"Rediger %{model}","empty":"Tom","filters":{"buttons":{"clear":"Fjern filter","filter":"Filter"},"predicates":{"contains":"Inneholder","ends_with":"Slutter med","equals":"Er lik","greater_than":"Større enn","less_than":"Mindre enn","starts_with":"Starter med"}},"has_many_delete":"Slett","has_many_new":"Legg til ny %{model}","has_many_remove":"Fjern","index_list":{"block":"Liste","blog":"Blogg","grid":"Gitter","table":"Tabell"},"logout":"Logg ut","main_content":"Vennligst implementer %{model}#main_content for å vise innhold.","new_model":"Ny %{model}","next":"Neste","pagination":{"empty":"Fant ingen %{model}","entry":{"one":"innslag","other":"innslag"},"multiple":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E av \u003Cb\u003E%{total}\u003C/b\u003E totalt","multiple_without_total":"Viser %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Viser \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Viser \u003Cb\u003Ealle %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Forrige","search_status":{"current_filters":"Gjeldende filtre:","current_scope":"Søkeområde:","headline":"Søkestatus:","no_current_filters":"Ingen"},"sidebars":{"filters":"Filtere"},"status_tag":{"no":"Nei","yes":"Ja"},"view":"Vis"}});
+I18n.translations["sv-SE"] = I18n.extend((I18n.translations["sv-SE"] || {}), {"active_admin":{"access_denied":{"message":"Du har inte rättighet att utföra denna åtgärd."},"any":"Någon","batch_actions":{"action_label":"%{title} Markerad","button_label":"Batch behandling","default_confirmation":"Är du säker på att du vill göra detta?","delete_confirmation":"Är du säker på att du vill radera dessa %{plural_model}?","labels":{"destroy":"Radera"},"link":"Skapa en","selection_toggle_explanation":"(Toggle Selection)","succesfully_destroyed":{"one":"Lyckades radera 1 %{model}","other":"Lyckades radera %{count} %{plural_model}"}},"blank_slate":{"content":"Finns inga %{resource_name} än.","link":"Skapa en"},"cancel":"Avbryt","comments":{"add":"Lägg till kommentar","author":"Författare","author_missing":"Anonym","author_type":"Författar typ","body":"Innehåll","created_at":"Skapad","errors":{"empty_text":"Kommentaren sparades inte, måste innehålla text."},"no_comments_yet":"Inga kommentarer än.","resource":"Resurs","resource_type":"Resurs typ","title":"Kommentar","title_content":"Kommentarer (%{count})"},"dashboard":"Skrivbord","dashboard_welcome":{"call_to_action":"För att lägga till sektioner, gör en checkout på 'app/admin/dashboard.rb'","welcome":"Välkommen till Active Admin. Detta är ditt standardskrivbord."},"delete":"Ta bort","delete_confirmation":"Är du säker att du vill ta bort denna?","delete_model":"Ta bort %{model}","details":"Detaljvy för %{model}","devise":{"change_password":{"submit":"Ändra mitt lösenord","title":"Ändra ditt lösenord"},"email":{"title":"Epost"},"links":{"forgot_your_password":"Glömt ditt lösenord?","resend_confirmation_instructions":"Skicka bekräftnings instruktioner","resend_unlock_instructions":"Skicka upplåsnings instruktioner","sign_in":"Logga in","sign_in_with_omniauth_provider":"Logga in med %{provider}","sign_up":"Registera"},"login":{"remember_me":"Kom ihåg mig","submit":"Inloggning","title":"Inloggning"},"password":{"title":"Lösenord"},"resend_confirmation_instructions":{"submit":"Skicka bekräftnings instruktioner","title":"Skicka bekräftnings instruktioner"},"reset_password":{"submit":"Återställa mitt lösenord","title":"Glömt ditt lösenord?"},"sign_up":{"submit":"Registera","title":"Registera"},"subdomain":{"title":"Subdomän"},"unlock":{"submit":"Skicka upplåsnings instruktioner","title":"Skicka upplåsnings instruktioner"},"username":{"title":"Användarnamn"}},"download":"Ladda ner:","dropdown_actions":{"button_label":"Behandling"},"edit":"Redigera","edit_model":"Redigera %{model}","empty":"Tom","filters":{"buttons":{"clear":"Rensa filter","filter":"Filter"},"predicates":{"contains":"Innehåller","ends_with":"Slutar med","equals":"Lika med","greater_than":"Större än","less_than":"Mindre än","starts_with":"Börjar med"}},"has_many_delete":"Ta bort","has_many_new":"Skapa en ny %{model}","has_many_remove":"Ta bort","index_list":{"block":"Lista","blog":"Blogg","grid":"Rutnät","table":"Tabell"},"logout":"Logga ut","main_content":"Implementera %{model}#main_content för att kunna visa något.","new_model":"Ny %{model}","next":"Nästa","pagination":{"empty":"Ingen %{model} funnen","entry":{"one":"inlägg","other":"inlägg"},"multiple":"Visar %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E av \u003Cb\u003E%{total}\u003C/b\u003E totalt","multiple_without_total":"Visar %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Visar \u003Cb\u003E1\u003C/b\u003E utav %{model}","one_page":"Visar \u003Cb\u003Ealla %{n}\u003C/b\u003E utav %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Föregående","search_status":{"current_filters":"Nuvarande filter:","current_scope":"Scope:","headline":"Sök status:","no_current_filters":"Inga"},"sidebars":{"filters":"Filter","search_status":"Sök status"},"status_tag":{"no":"Nej","yes":"Ja"},"unsupported_browser":{"headline":"Notera att ActiveAdmin inte längre stödjer Internet Explorer version 8 eller mindre.","recommendation":"Vi rekommenderar dig att uppgradera till den senaste versionen av \u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, eller \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E.","turn_off_compatibility_view":"Om du använder IE 9 eller senare, se till att \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Estäng av \"Compatibility View\"\u003C/a\u003E."},"view":"Visa"}});
+I18n.translations["uk"] = I18n.extend((I18n.translations["uk"] || {}), {"active_admin":{"access_denied":{"message":"Ви не авторизовані для виконання даної дії."},"any":"Будь-який","batch_actions":{"action_label":"%{title} вибране","button_label":"Групові операції","default_confirmation":"Ви справді бажаєте це зробити?","delete_confirmation":"Ви впевнені, що хочете видалити %{plural_model}?","labels":{"destroy":"Видалити"},"link":"Створити","selection_toggle_explanation":"(Скасувати все / Зняти виділення)","succesfully_destroyed":{"few":"Успішно видалено: %{count} %{plural_model}","many":"Успішно видалено: %{count} %{plural_model}","one":"Успішно видалено: 1 %{model}","other":"Успішно видалено: %{count} %{plural_model}"}},"blank_slate":{"content":"Поки-що немає %{resource_name}.","link":"Створити"},"cancel":"Скасувати","comments":{"add":"Додати Коментар","author":"Автор","author_missing":"Анонім","author_type":"Тип автора","body":"Текст","errors":{"empty_text":"Коментар не збережено, текст не повинен бути пустим."},"no_comments_yet":"Поки-що немає коментарів.","resource":"Ресурс","resource_type":"Тип ресурса","title":"Коментар","title_content":"Коментарі (%{count})"},"dashboard":"Панель керування","dashboard_welcome":{"call_to_action":"Щоб додати сюди що-небудь, зазирніть у 'app/admin/dashboard.rb'","welcome":"Ласкаво просимо до Active Admin. Це стандартна сторінка керування сайтом."},"delete":"Видалити","delete_confirmation":"Ви впевнені, що хочете це видалити?","delete_model":"Видалити %{model}","details":"%{model} детальніше","devise":{"change_password":{"submit":"Змінити пароль","title":"Зміна паролю"},"email":{"title":"Електронна пошта"},"links":{"forgot_your_password":"Забули пароль?","resend_confirmation_instructions":"Повторна відправка інструкцій підтвердження","resend_unlock_instructions":"Повторна відправка інструкцій розблокування","sign_in":"Увійти","sign_in_with_omniauth_provider":"Увійти з допомогою %{provider}","sign_up":"Зареєструватись"},"login":{"remember_me":"Запам'ятати мене","submit":"Увійти","title":"Вхід"},"password":{"title":"Пароль"},"resend_confirmation_instructions":{"submit":"Відправити повторно листа з активацією","title":"Відправити повторно листа з активацією"},"reset_password":{"submit":"Скинути пароль","title":"Забули пароль?"},"sign_up":{"submit":"Зареєструватися","title":"Зареєструватися"},"subdomain":{"title":"Піддомен"},"unlock":{"submit":"Відправити повторно інструкції з розблокування","title":"Відправити повторно інструкції з розблокування"},"username":{"title":"Ім'я користувача"}},"download":"Завантаження:","dropdown_actions":{"button_label":"Oперації"},"edit":"Змінити","edit_model":"Змінити %{model}","empty":"Пусто","filters":{"buttons":{"clear":"Очистити","filter":"Фільтрувати"},"predicates":{"contains":"Містить","ends_with":"Закінчується","equals":"=","greater_than":"більше","less_than":"менше","starts_with":"Починається з"}},"has_many_delete":"Прибрати","has_many_new":"Додати %{model}","has_many_remove":"Видалити","index_list":{"block":"Список","blog":"Блог","grid":"Сітка","table":"Таблиця"},"logout":"Вийти","main_content":"Створіть %{model}#main_content для відображення вмісту.","new_model":"Створити %{model}","next":"Наст.","pagination":{"empty":"%{model} не знайдено","entry":{"few":"записи","many":"записів","one":"запис","other":"записів"},"multiple":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E з \u003Cb\u003E%{total}\u003C/b\u003E","multiple_without_total":"Результат: %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E","one":"Результат: \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Результат: \u003Cb\u003E%{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Поперед.","search_status":{"current_filters":"Поточний фільтр:","current_scope":"Область:","headline":"Статус пошуку:","no_current_filters":"Жоден"},"sidebars":{"filters":"Фільтри","search_status":"Статус пошуку"},"status_tag":{"no":"Ні","yes":"Так"},"unsupported_browser":{"headline":"Зверніть, будь-ласка, увагу, що ActiveAdmin більше не підтримує Internet Explorer 8 версії і нижче","recommendation":"Ми рекомендуємо оновити версію вашого браузеру (\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E, \u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E, або \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E).","turn_off_compatibility_view":"Якщо ви використовуєте IE 9 і вище, переконайтесь, що \u003Ca href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003Eви вимкнули опцію \"Перегляд в режимі сумісності\"\u003C/a\u003E."},"view":"Переглянути"}});
+I18n.translations["vi"] = I18n.extend((I18n.translations["vi"] || {}), {"active_admin":{"any":"Bất kỳ","batch_actions":{"action_label":"%{title} được chọn","button_label":"Hành động hàng loạt","default_confirmation":"Bạn có chắc bạn muốn làm điều này?","delete_confirmation":"Bạn có chắc chắn muốn xóa những %{plural_model}?","labels":{"destroy":"Xóa"},"link":"Tạo mới","selection_toggle_explanation":"(Thay đổi lựa chọn)","succesfully_destroyed":{"one":"Đã xóa thành công 1 %{model}","other":"Đã xóa thành công %{count} %{plural_model}"}},"blank_slate":{"content":"Chưa có %{resource_name}.","link":"Tạo mới"},"cancel":"Hủy","comments":{"add":"Thêm bình luận","author":"Tác giả","body":"Nội dung","errors":{"empty_text":"Lời bình luận chưa được lưu, vì nội dung còn trống."},"no_comments_yet":"Chưa có bình luận.","resource":"Tài nguyên","title":"Bình luận","title_content":"Bình luận (%{count})"},"dashboard":"Dashboard","dashboard_welcome":{"call_to_action":"Để thêm phần phần cho trang Dashboar hãy chỉnh sửa 'app/admin/dashboard.rb'","welcome":"Chào mừng bạn đến với Active Admin. Đây là trang Dashboard mặc định."},"delete":"Xóa","delete_confirmation":"Bạn có chắc chắn rằng mình muốn xóa cái này?","delete_model":"Xóa %{model}","details":"%{model} Chi tiết","devise":{"change_password":{"submit":"Thay đổi mật khẩu của tôi","title":"Thay đổi mật khẩu của bạn"},"links":{"forgot_your_password":"Quên mật khẩu của bạn?","sign_in":"Đăng nhập","sign_in_with_omniauth_provider":"Đăng nhập với %{provider}"},"login":{"remember_me":"Ghi nhớ tôi","submit":"Đăng nhập","title":"Đăng nhập"},"reset_password":{"submit":"Thiết lập lại mật khẩu của tôi","title":"Quên mật khẩu của bạn?"}},"download":"Download:","dropdown_actions":{"button_label":"Hành động"},"edit":"Chỉnh sửa","edit_model":"Chỉnh sửa %{model}","empty":"Trống","filters":{"buttons":{"clear":"Xóa dữ liệu lọc","filter":"Lọc"},"predicates":{"contains":"Thông tin","ends_with":"Kết thúc với việc","equals":"Bằng","greater_than":"Lớn hơn","less_than":"Nhỏ hơn","starts_with":"Bắt đầu với"}},"has_many_delete":"Xóa","has_many_new":"Thêm mới %{model}","has_many_remove":"Hủy bỏ","logout":"Đăng xuất","main_content":"Xin bổ sung %{model}#main_content để hiển thị nội dung.","new_model":"Tạo mới %{model}","next":"Tiếp","pagination":{"empty":"Không có %{model} nào được tìm thấy","entry":{"one":"entry","other":"entries"},"multiple":"Đang hiển thị %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E of \u003Cb\u003E%{total}\u003C/b\u003E trong tất cả.","multiple_without_total":"Đang hiển thị %{model} \u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E.","one":"Đang hiển thị \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"Đang hiển thị \u003Cb\u003Etất cả %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"Trước","sidebars":{"filters":"Bộ Lọc"},"status_tag":{"no":"Không Có","yes":"Có"},"view":"Xem"}});
+I18n.translations["zh-TW"] = I18n.extend((I18n.translations["zh-TW"] || {}), {"active_admin":{"access_denied":{"message":"您沒有權限執行此項操作"},"any":"任何","batch_actions":{"action_label":"%{title} 已選取","button_label":"批次作業","default_confirmation":"你確定你要這樣做?","delete_confirmation":"你確定要刪除這些 %{plural_model} 嗎?","labels":{"destroy":"刪除"},"link":"建立一個","selection_toggle_explanation":"(切換選取)","succesfully_destroyed":{"one":"成功刪除 1 %{model}","other":"成功刪除 %{count} %{plural_model}"}},"blank_slate":{"content":"尚無 %{resource_name}","link":"建立一筆"},"cancel":"取消","comments":{"add":"新增評論","author":"作者","author_missing":"匿名","author_type":"作者身份","body":"內文","errors":{"empty_text":"評論儲存失敗,不允許空白的內容。"},"no_comments_yet":"尚無評論","resource":"資源","resource_type":"資源種類","title":"評論","title_content":"(%{count}) 則評論"},"dashboard":"儀表板","dashboard_welcome":{"call_to_action":"要新增儀表板內容,請查看 'app/admin/dashboard.rb'","welcome":"歡迎來到 Active Admin,這是預設的儀表板頁面。"},"delete":"刪除","delete_confirmation":"你確定要刪除嗎?","delete_model":"刪除 %{model}","details":"%{model} 明細","devise":{"change_password":{"submit":"更改我的密碼","title":"更改你的密碼"},"email":{"title":"電子郵件信箱"},"links":{"forgot_your_password":"忘記密碼?","resend_confirmation_instructions":"重新發送確認信","resend_unlock_instructions":"重新發送解鎖指示","sign_in":"登入","sign_in_with_omniauth_provider":"使用 %{provider} 登入","sign_up":"註冊"},"login":{"remember_me":"記住我","submit":"登入","title":"登入"},"password":{"title":"密碼"},"resend_confirmation_instructions":{"submit":"重新發送確認信","title":"重新發送確認信"},"reset_password":{"submit":"重置密碼","title":"忘記密碼?"},"sign_up":{"submit":"註冊","title":"註冊"},"subdomain":{"title":"子網域"},"unlock":{"submit":"重新發送解鎖指示","title":"重新發送解鎖指示"},"username":{"title":"帳號"}},"download":"下載:","dropdown_actions":{"button_label":"操作"},"edit":"編輯","edit_model":"編輯 %{model}","empty":"空的","filters":{"buttons":{"clear":"清除篩選條件","filter":"篩選"},"predicates":{"contains":"包含","ends_with":"結尾為","equals":"等於","greater_than":"大於","less_than":"小於","starts_with":"開頭為"}},"has_many_delete":"刪除","has_many_new":"增加新的 %{model}","has_many_remove":"清除","logout":"登出","main_content":"請實作 %{model}#main_content 以顯示內容。","new_model":"新增 %{model}","next":"下一個","pagination":{"empty":"找不到 %{model} ","entry":{"one":"筆","other":"筆"},"multiple":"總計 \u003Cb\u003E%{total}\u003C/b\u003E 顯示 %{model} 中\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 筆","multiple_without_total":"顯示 %{model} 中\u003Cb\u003E%{from}\u0026nbsp;-\u0026nbsp;%{to}\u003C/b\u003E 筆","one":"顯示 \u003Cb\u003E1\u003C/b\u003E %{model}","one_page":"顯示 \u003Cb\u003E全部 %{n}\u003C/b\u003E %{model}"},"powered_by":"Powered by %{active_admin} %{version}","previous":"前一個","search_status":{"current_filters":"目前篩選條件:","current_scope":"子集:","headline":"搜尋條件:","no_current_filters":"無"},"sidebars":{"filters":"篩選條件","search_status":"搜尋條件"},"status_tag":{"no":"否","yes":"是"},"unsupported_browser":{"headline":"很抱歉,ActiveAdmin 已不再支援 Internet Explorer 8 以下版本的瀏覽器。","recommendation":"建議您升級到最新版本的\u003Ca href=\"http://windows.microsoft.com/ie\"\u003EInternet Explorer\u003C/a\u003E,\u003Ca href=\"https://chrome.google.com/\"\u003EGoogle Chrome\u003C/a\u003E,或是 \u003Ca href=\"https://mozilla.org/firefox/\"\u003EFirefox\u003C/a\u003E。","turn_off_compatibility_view":"若您是使用 IE 9 或更新的版本,請確認\u003Ca href=\"http://windows.microsoft.com/zh-TW/windows7/webpages-look-incorrect-in-Internet-Explorer\"\u003E「相容性檢視」是關閉的\u003C/a\u003E。"},"view":"檢視"}});
diff --git a/public/robots.txt b/public/robots.txt
index 085187f..caedd8e 100644
--- a/public/robots.txt
+++ b/public/robots.txt
@@ -1,5 +1,5 @@
-# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
-#
-# To ban all spiders from the entire site uncomment the next two lines:
-# User-Agent: *
-# Disallow: /
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
diff --git a/test/api/guidance_group_api_test.rb b/test/api/guidance_group_api_test.rb
index 84426cc..0e37f15 100644
--- a/test/api/guidance_group_api_test.rb
+++ b/test/api/guidance_group_api_test.rb
@@ -1,73 +1,73 @@
-require "test_helper"
-
-# describe "GuidanceGroupsController" do
-# describe "GET :index" do
-# before do
-# get :index
-# end
-
-# it "renders items/index" do
-# must_render_template "items/index"
-# end
-
-# it "responds with success" do
-# must_respond_with :success
-# end
-# end
-# end
-#
-
-
-class GuidanceGroupsTest < ActionDispatch::IntegrationTest #ActiveSupport::TestCase
- setup do
- @guidance_group = guidance_groups(:one)
- end
-
-=begin
- test "should get index" do
- get :index
- assert_response :success
- end
-
- test "should show a Guidance Group" do
- get :show, id: @guidance_group
- assert_response :success
- end
-=end
-
- # BASIC AUTH
- # should not respond to incorrect api_tokens
- #
- # should not respond to correct api_tokens with incorrect permissions
- # i.e. their permissions for token include "guidance"
- #
- # INDEX
- # should not respond with non-viewable guidance groups for a user
- #
- # should respond with all viewable guidance groups for a user
- #
- # SHOW
- # should not respond with non-viewable guidance group for a user
- #
- # should respond wiht viewable guidance_group for a user
- #
- # BASIC VIEWS
- # should respond with json
- #
- # should respond with the correct template (index/show.jbuilder)
- #
- # should not respond to post
- #
- # should not respond to put
- #
- # should not respond to delete
- #
- # WHAT IT MEANS TO BE VIEABLE
- # -belongs to the dcc
- # -belongs to any funder
- # -belongs to an organisation, of which the user is a member
- # -TODO: strictly define classes of organisation types, what are proj/institution/reaserch?
- #
-
-
-end
+require "test_helper"
+
+# describe "GuidanceGroupsController" do
+# describe "GET :index" do
+# before do
+# get :index
+# end
+
+# it "renders items/index" do
+# must_render_template "items/index"
+# end
+
+# it "responds with success" do
+# must_respond_with :success
+# end
+# end
+# end
+#
+
+
+class GuidanceGroupsTest < ActionDispatch::IntegrationTest #ActiveSupport::TestCase
+ setup do
+ @guidance_group = guidance_groups(:one)
+ end
+
+=begin
+ test "should get index" do
+ get :index
+ assert_response :success
+ end
+
+ test "should show a Guidance Group" do
+ get :show, id: @guidance_group
+ assert_response :success
+ end
+=end
+
+ # BASIC AUTH
+ # should not respond to incorrect api_tokens
+ #
+ # should not respond to correct api_tokens with incorrect permissions
+ # i.e. their permissions for token include "guidance"
+ #
+ # INDEX
+ # should not respond with non-viewable guidance groups for a user
+ #
+ # should respond with all viewable guidance groups for a user
+ #
+ # SHOW
+ # should not respond with non-viewable guidance group for a user
+ #
+ # should respond wiht viewable guidance_group for a user
+ #
+ # BASIC VIEWS
+ # should respond with json
+ #
+ # should respond with the correct template (index/show.jbuilder)
+ #
+ # should not respond to post
+ #
+ # should not respond to put
+ #
+ # should not respond to delete
+ #
+ # WHAT IT MEANS TO BE VIEABLE
+ # -belongs to the dcc
+ # -belongs to any funder
+ # -belongs to an organisation, of which the user is a member
+ # -TODO: strictly define classes of organisation types, what are proj/institution/reaserch?
+ #
+
+
+end
diff --git a/test/fixtures/answers.yml b/test/fixtures/answers.yml
index 0bccdd9..af9ebc8 100644
--- a/test/fixtures/answers.yml
+++ b/test/fixtures/answers.yml
@@ -1,13 +1,13 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-one:
- text: MyText
- plan_id: 1
- user_id: 1
- question_id: 1
-
-#two:
-# text: MyText
-# plan_id: 1
-# user_id: 1
-# question_id: 1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ text: MyText
+ plan_id: 1
+ user_id: 1
+ question_id: 1
+
+#two:
+# text: MyText
+# plan_id: 1
+# user_id: 1
+# question_id: 1
diff --git a/test/fixtures/comments.yml b/test/fixtures/comments.yml
index 0227f37..69b84d4 100644
--- a/test/fixtures/comments.yml
+++ b/test/fixtures/comments.yml
@@ -1,11 +1,11 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-one:
- user_id: 1
- question_id: 1
- text: MyText
-
-two:
- user_id: 1
- question_id: 1
- text: MyText
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ user_id: 1
+ question_id: 1
+ text: MyText
+
+two:
+ user_id: 1
+ question_id: 1
+ text: MyText
diff --git a/test/fixtures/dmptemplates.yml b/test/fixtures/dmptemplates.yml
index faeab52..5a3fbae 100644
--- a/test/fixtures/dmptemplates.yml
+++ b/test/fixtures/dmptemplates.yml
@@ -1,65 +1,65 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-dcc_template:
- title: "DMP Template"
- description: "The default DCC template"
- published: true
- organisation: dcc
- locale: en
- is_default: true
-
-ahrc_template:
- title: "AHRC Template"
- description: "AHRC template"
- published: true
- organisation: ahrc
- locale: en
-
-bbsrc_template:
- title: "BBSRC Template"
- description: "BBSRC template"
- published: true
- organisation: bbsrc
- locale: en
-
-cruk_template:
- title: "CRUK Template"
- description: "CRUK template"
- published: true
- organisation: cruk
- locale: en
-
-esrc_template:
- title: "ESRC Template"
- description: "ESRC template"
- published: true
- organisation: esrc
- locale: en
-
-nerc_template:
- title: "NERC Template"
- description: "NERC template"
- published: true
- organisation: nerc
- locale: en
-
-mrc_template:
- title: "MRC Template"
- description: "MRC template"
- published: true
- organisation: mrc
- locale: en
-
-stfc_template:
- title: "STFC Template"
- description: "STFC template"
- published: true
- organisation: stfc
- locale: en
-
-wellcome_template:
- title: "Wellcome Trust Template"
- description: "Wellcome Trust template"
- published: true
- organisation: wellcome
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+dcc_template:
+ title: "DMP Template"
+ description: "The default DCC template"
+ published: true
+ organisation: dcc
+ locale: en
+ is_default: true
+
+ahrc_template:
+ title: "AHRC Template"
+ description: "AHRC template"
+ published: true
+ organisation: ahrc
+ locale: en
+
+bbsrc_template:
+ title: "BBSRC Template"
+ description: "BBSRC template"
+ published: true
+ organisation: bbsrc
+ locale: en
+
+cruk_template:
+ title: "CRUK Template"
+ description: "CRUK template"
+ published: true
+ organisation: cruk
+ locale: en
+
+esrc_template:
+ title: "ESRC Template"
+ description: "ESRC template"
+ published: true
+ organisation: esrc
+ locale: en
+
+nerc_template:
+ title: "NERC Template"
+ description: "NERC template"
+ published: true
+ organisation: nerc
+ locale: en
+
+mrc_template:
+ title: "MRC Template"
+ description: "MRC template"
+ published: true
+ organisation: mrc
+ locale: en
+
+stfc_template:
+ title: "STFC Template"
+ description: "STFC template"
+ published: true
+ organisation: stfc
+ locale: en
+
+wellcome_template:
+ title: "Wellcome Trust Template"
+ description: "Wellcome Trust template"
+ published: true
+ organisation: wellcome
locale: en
\ No newline at end of file
diff --git a/test/fixtures/file_types.yml b/test/fixtures/file_types.yml
index dce99ac..2fbb4fb 100644
--- a/test/fixtures/file_types.yml
+++ b/test/fixtures/file_types.yml
@@ -1,13 +1,13 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# name: MyString
-# icon_name: MyString
-# icon_size: 1
-# icon_location: MyString
-#
-#two:
-# name: MyString
-# icon_name: MyString
-# icon_size: 1
-# icon_location: MyString
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# name: MyString
+# icon_name: MyString
+# icon_size: 1
+# icon_location: MyString
+#
+#two:
+# name: MyString
+# icon_name: MyString
+# icon_size: 1
+# icon_location: MyString
diff --git a/test/fixtures/file_uploads.yml b/test/fixtures/file_uploads.yml
index 55c042d..4499d51 100644
--- a/test/fixtures/file_uploads.yml
+++ b/test/fixtures/file_uploads.yml
@@ -1,19 +1,19 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# name: MyString
-# title: MyString
-# description: MyText
-# size: 1
-# published: false
-# location: MyString
-# file_type_id: 1
-#
-#two:
-# name: MyString
-# title: MyString
-# description: MyText
-# size: 1
-# published: false
-# location: MyString
-# file_type_id: 1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# name: MyString
+# title: MyString
+# description: MyText
+# size: 1
+# published: false
+# location: MyString
+# file_type_id: 1
+#
+#two:
+# name: MyString
+# title: MyString
+# description: MyText
+# size: 1
+# published: false
+# location: MyString
+# file_type_id: 1
diff --git a/test/fixtures/guidance_groups.yml b/test/fixtures/guidance_groups.yml
index ce3dbdd..06003a8 100644
--- a/test/fixtures/guidance_groups.yml
+++ b/test/fixtures/guidance_groups.yml
@@ -1,53 +1,53 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-dcc_guidance_group_1:
- name: "DCC guidance group 1"
- organisation: dcc
- guidances: related_policies, existing_data, licensing_of_existing_data, relationship_to_existing_data, description_of_data_content, data_format, data_volumes, data_type, data_capture_methods, data_organisation, data_quality, documentation, metadata_capture, metadata_standards, discovery_by_users, ethical_issues, ipr_ownership_and_licencing, active_data_storage, backup_procedures, data_security, data_selection, preservation_plan, period_of_preservation, data_repository, audience, expected_reuse, method_for_data_sharing, timeframe_for_data_sharing, embargo_period, restrictions_on_sharing, managed_access_procedures, responsibilities, resourcing_skills_and_training, resourcing_hardware_and_software, resourcing_preservation_and_data_sharing
- dmptemplates: dcc_template
-
-# funder groups
-funder_guidance_group_1:
- name: "Funder guidance group 1"
- organisation: ahrc
- guidances: ahrc_funder_guidance
- dmptemplates: ahrc_template
-
-funder_guidance_group_2:
- name: "Funder guidance group 2"
- organisation: bbsrc
- guidances: bbsrc_funder_guidance
- dmptemplates: bbsrc_template
-
-# institution groups
-institution_guidance_group_1:
- name: "Anglia Ruskin University guidance group"
- organisation: aru
- guidances: aru_institution_guidance
- dmptemplates: aru_template
-
-institution_guidance_group_2:
- name: "Aston University guidance group"
- organisation: au
- guidances: au_institution_guidance_1, au_institution_guidance_2
- dmptemplates: au_template
-
-institution_guidance_group_3:
- name: "Bangor University guidance group 1"
- organisation: bu
- guidances: bu_institution_guidance_1
- dmptemplates: bu_template
-
-institution_guidance_group_4:
- name: "Bangor University guidance group 2"
- organisation: bu
- guidances: bu_institution_guidance_2
- dmptemplates: bu_template
-
-institution_guidance_group_5:
- name: "institution child guidance group 1"
- organisation: institution_child_one
-
-institution_guidance_group_6:
- name: "institution child guidance group 2"
- organisation: institution_child_one
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+dcc_guidance_group_1:
+ name: "DCC guidance group 1"
+ organisation: dcc
+ guidances: related_policies, existing_data, licensing_of_existing_data, relationship_to_existing_data, description_of_data_content, data_format, data_volumes, data_type, data_capture_methods, data_organisation, data_quality, documentation, metadata_capture, metadata_standards, discovery_by_users, ethical_issues, ipr_ownership_and_licencing, active_data_storage, backup_procedures, data_security, data_selection, preservation_plan, period_of_preservation, data_repository, audience, expected_reuse, method_for_data_sharing, timeframe_for_data_sharing, embargo_period, restrictions_on_sharing, managed_access_procedures, responsibilities, resourcing_skills_and_training, resourcing_hardware_and_software, resourcing_preservation_and_data_sharing
+ dmptemplates: dcc_template
+
+# funder groups
+funder_guidance_group_1:
+ name: "Funder guidance group 1"
+ organisation: ahrc
+ guidances: ahrc_funder_guidance
+ dmptemplates: ahrc_template
+
+funder_guidance_group_2:
+ name: "Funder guidance group 2"
+ organisation: bbsrc
+ guidances: bbsrc_funder_guidance
+ dmptemplates: bbsrc_template
+
+# institution groups
+institution_guidance_group_1:
+ name: "Anglia Ruskin University guidance group"
+ organisation: aru
+ guidances: aru_institution_guidance
+ dmptemplates: aru_template
+
+institution_guidance_group_2:
+ name: "Aston University guidance group"
+ organisation: au
+ guidances: au_institution_guidance_1, au_institution_guidance_2
+ dmptemplates: au_template
+
+institution_guidance_group_3:
+ name: "Bangor University guidance group 1"
+ organisation: bu
+ guidances: bu_institution_guidance_1
+ dmptemplates: bu_template
+
+institution_guidance_group_4:
+ name: "Bangor University guidance group 2"
+ organisation: bu
+ guidances: bu_institution_guidance_2
+ dmptemplates: bu_template
+
+institution_guidance_group_5:
+ name: "institution child guidance group 1"
+ organisation: institution_child_one
+
+institution_guidance_group_6:
+ name: "institution child guidance group 2"
+ organisation: institution_child_one
diff --git a/test/fixtures/guidances.yml b/test/fixtures/guidances.yml
index 0474bd2..7aaac07 100644
--- a/test/fixtures/guidances.yml
+++ b/test/fixtures/guidances.yml
@@ -1,176 +1,176 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-related_policies:
- text: " Are there any existing procedures that you will base your approach on? Does your department/group have data management guidelines? Does your institution have a data protection or security policy that you will follow? Does your institution have a Research Data Management (RDM) policy? Does your funder have a Research Data Management policy? Are there any formal standards that you will adopt? List any other relevant funder, institutional, departmental or group policies on data management, data sharing and data security. Some of the information you give in the remainder of the DMP will be determined by the content of other policies. If so, point/link to them here.
"
- themes: related_policies
-
-existing_data:
- text: " Are there any existing data or methods that you can reuse? Check to see if there are any existing data that you can reuse, for examples by consulting relevant repositories.
When creating new data sources, explain why existing data sources cannot be re-used.
A list of repositories is provided by Databib or Re3data .
"
- themes: existing_data
-
-licensing_of_existing_data:
- text: " Do you need to pay to reuse existing data? Are there any restrictions on the reuse of third-party data? Can the data that you create - which may be derived from third-party data - be shared? If purchasing or reusing existing data sources, explain how issues such as copyright and IPR have been addressed.
"
- themes: licensing_of_existing_data
-
-relationship_to_existing_data:
- text: " What is the relationship to existing data e.g. in public repositories? How does your data complement and integrate with existing data? Consider the relationship between the data that you will capture and existing data available in public repositories or elsewhere.
"
- themes: relationship_to_existing_data
-
-description_of_data_content:
- text: " What data will you create? Give a brief description of the data that will be created, noting its content and coverage
"
- themes: description_of_data_content
-
-data_format:
- text: " What format will your data be in? Why have you chosen to use particular formats? Do the chosen formats and software enable sharing and long-term validity of data? Outline and justify your choice of format e.g. SPSS, Open Document Format, tab-delimited format, MS Excel.
Decisions may be based on staff expertise, a preference for Open formats, the standards accepted by data centres or widespread usage with a given community. Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data.
See UKDA Guidance on recommended data formats.
"
- themes: data_format
-
-data_volumes:
- text: " Do you have sufficient storage? Do you need to include costs for additional managed storage? Will the scale of the data pose challenges when sharing or transferring data between sites? Consider the implications of data volumes in terms of storage, backup and access.
Estimate the volume of data in KB/MB/GB and how this will grow to make sure any additional storage and technical support required can be provided.
"
- themes: data_volumes
-
-data_type:
- text: " What types of data will you create? Which types of data will have long-term value? Outline the types of data that are expected to be produced from the project e.g. quantitative, qualitative, survey data, experimental measurements, models, images, audiovisual data, samples…
Include the raw data arising directly from the research, the reduced data derived from it, and published data.
"
- themes: data_type
-
-data_capture_methods:
- text: " How will the data be created? What standards or methodologies will you use? Outline how the data will be collected/generated and which community data standards (if any) will be used at this stage.
"
- themes: data_capture_methods
-
-data_organisation:
- text: " How will you structure and name your folders and files? How will you ensure that different versions of a dataset are easily identifiable? Indicate how the data will be organised during the project, mentioning for example naming conventions, version control and folder structures. Consistent, well-ordered research data will be easier for the research team to find, understand and reuse.
"
- themes: data_organisation
-
-data_quality:
- text: " How will you control data capture to ensure data quality? What quality assurance processes will you adopt? Explain how the consistency and quality of data collection will be controlled and documented.
This may include processes such as calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.
"
- themes: data_quality
-
-documentation:
- text: " What metadata, documentation or other supporting material should accompany the data for it to be interpreted correctly? What information needs to be retained to enable the data to be read and interpreted in the future? Describe the types of documentation that will accompany the data to provide a secondary users with any necessary details to prevent misuse, misinterpretation or confusion. This may include information on the methodology used to collect the data, analytical and procedural information, definitions of variables, units of measurement, any assumptions made, the format and file type of the data.
"
- themes: documentation
-
-metadata_capture:
- text: " How will you capture / create the metadata? Can any of this information be created automatically? Metadata should be created to describe the data and aid discovery. Consider how you will capture this information and where it will be recorded e.g. in a database with links to each item, in a ‘readme’ text file, in file headers.
"
- themes: metadata_capture
-
-metadata_standards:
- text: " What metadata standards will you use and why? Researchers are strongly encouraged to utilise community standards to describe and structure data, where these are in place. The DCC offers a catalogue of disciplinary metadata standards.
"
- themes: metadata_standards
-
-discovery_by_users:
- text: " How will potential users find out about your data? Will you provide metadata online to aid discovery and reuse? Indicate how potential new users can find out about your data and identify whether they could be suitable for their research purposes. For example, you may provide basic discovery metadata online, such as title, author, subjects, keywords and publisher.
"
- themes: discovery_by_users
-
-ethical_issues:
- text: " Have you gained consent for data preservation and sharing? How will sensitive data be handled to ensure it is stored and transferred securely? How will you protect the identity of participants? e.g. via anonymisation or using managed access procedures? Investigators carrying out research involving human participants must ensure that consent is obtained to share data. Managing ethical concerns may include: anonymisation of data; referral to departmental or institutional ethics committees; and formal consent agreements. Ethical issues may affect how you store data, who can see/use it and how long it is kept. You should show that you’re aware of this and have planned accordingly.
See UKDA Guidance on Consent, Confidentiality and Ethics.
"
- themes: ethical_issues
-
-ipr_ownership_and_licencing:
- text: " Who owns the data? How will the data be licensed for reuse? Will data sharing be postponed / restricted e.g. to seek patents? State who will own the copyright and IPR of any new data that you will generate. For multi-partner projects, IPR ownership may be worth covering in a consortium agreement. Outline any restrictions needed on data sharing e.g. to protect proprietary or patentable data.
See DCC How to license research data.
"
- themes: ipr_ownership_and_licencing
-
-active_data_storage:
- text: " Where will the data be stored? Do you have access to enough storage or will you need to include charges for additional services? Storing data on laptops, computer hard drives or external storage devices alone is very risky. The use of robust, managed storage provided by university IT teams is preferable.
See UKDA Guidance on Data Storage.
"
- themes: active_data_storage
-
-backup_procedures:
- text: " How will the data be backed up? i.e. how often, to where, how many copies, is this automated… Who will be responsible for backup? Have you tested whether you can restore from your backups? Describe the data back-up procedures that you will adopt to ensure the data and metadata are securely stored during the lifetime of the project. You may need to discuss your institution’s policy on back-ups. It is better to use automatic backup services provided by university IT than rely on manual processes.
See UKDA Guidance on Data Backup.
"
- themes: backup_procedures
-
-data_security:
- text: " What are the risks to data security and how will these be managed? Will you follow any formal standards? If your data is sensitive (e.g. detailed personal data, politically sensitive information or trade secrets) you should discuss any appropriate security measures that you will be taking. Note the main risks and how these will be managed. Identify any formal standards that you will comply with e.g. ISO 27001.
See DCC Briefing Paper on Information Security Management - ISO 27000.
See UKDA Guidance on Data Security.
"
- themes: data_security
-
-data_selection:
- text: " Which data are of long-term value and should be shared and/or preserved? How will you decide what to keep? Indicate which data you intend to preserve beyond the period of funding. This should be based on what has long-term value and is economically viable to keep. Consider how long you wish to keep the data and what will happen to it e.g. deposit in a data repository to enable reuse.
See DCC How to appraise and select research data.
"
- themes: data_selection
-
-preservation_plan:
- text: " What is the long-term preservation plan for the dataset? e.g. deposit in a data repository Will additional resources be needed to prepare data for deposit or meet charges from data repositories? Researchers should consider how datasets that have long-term value will be preserved and curated beyond the lifetime of the grant. Also outline the plans for preparing and documenting data for sharing and archiving.
If you do not propose to use an established repository, the data management plan should demonstrate that resources and systems will be in place to enable the data to be curated effectively beyond the lifetime of the grant.
"
- themes: preservation_plan
-
-period_of_preservation:
- text: " How long will the data be retained and preserved? This may depend on the type of data. Most research funders expect data to be retained for a minimum of 10 years from the end of the project. For data that by their nature cannot be re-measured, efforts should be made to retain them indefinitely.
"
- themes: period_of_preservation
-
-data_repository:
- text: " Where (i.e. in which repository) will the data be deposited? Most research funders recommend the use of established data repositories, community databases and related initiatives to aid data preservation, sharing and reuse.
An international list of data repositories is available via Databib or Re3data.
"
- themes: data_repository
-
-audience:
- text: " Who may be interested in using your data? Where possible outline the types of users you expect and estimate numbers.
"
- themes: audiencethe
-
-expected_reuse:
- text: " What are the further intended or foreseeable research uses for the data? You should think about the possibilities for re-use of your data in other contexts and by other users, and connect this as appropriate with your plans for dissemination and Pathways to Impact. Where there is potential for reuse, you should use standards and formats that facilitate this.
"
- themes: expected_reuse
-
-method_for_data_sharing:
- text: " How will you make the data available to others? With whom will you share the data, and under what conditions? Consider where, how, and to whom the data should be made available. Will you share data via a data repository, handle data requests directly or use another mechanism?
The methods used to share data will be dependent on a number of factors such as the type, size, complexity and sensitivity of data. Mention earlier examples to show a track record of effective data sharing.
"
- themes: method_for_data_sharing
-
-timeframe_for_data_sharing:
- text: " When will you make the data available? Data (with accompanying metadata) should be shared in a timely fashion. It is generally expected that timely release would generally be no later than the release through publication of the main findings and should be in-line with established best practice in the field.
"
- themes: timeframe_for_data_sharing
-
-embargo_period:
- text: " For how long do you need exclusive use of the data and why? The value of data often depends on timeliness. Researchers have a legitimate interest in benefiting from their investment of time and effort in producing data, but not in prolonged exclusive use. Research funders typically allow embargoes in line with practice in the field, but expect these to be outlined and justified.
"
- themes: embargo_period
-
-restrictions_on_sharing:
- text: " Are any restrictions on data sharing required? e.g. limits on who can use the data, when and for what purpose. What restrictions are needed and why? What action will you take to overcome or minimise restrictions? Outline any expected difficulties in data sharing, along with causes and possible measures to overcome these. Restrictions to data sharing may be due to participant confidentiality, consent agreements or IPR. Strategies to limit restrictions may include: anonymising or aggregating data; gaining participant consent for data sharing; gaining copyright permissions; and agreeing a limited embargo period.
"
- themes: restrictions_on_sharing
-
-managed_access_procedures:
- text: " Will access be tightly controlled or restricted? e.g. by using data enclaves / secure data services Will a data sharing agreement be required? How will the data be licensed for reuse? Indicate whether external users are (will be) bound by data sharing agreements, licenses or end-user agreements. If so, set out the terms and key responsibilities to be followed.
Note how access will be controlled, for example by the use of specialist services. A data enclave provides a controlled secure environment in which eligible researchers can perform analyses using restricted data resources.
Where a managed access process is required, the procedure should be clearly described and transparent.
"
- themes: managed_access_procedures
-
-responsibilities:
- text: " Who is responsible for each data management activity? How are responsibilities split across partner sites in collaborative research projects? Outline the roles and responsibilities for all activities e.g. data capture, metadata production, data quality, storage and backup, data archiving & data sharing. Individuals should be named where possible. For collaborative projects you should explain the co-ordination of data management responsibilities across partners.
See UKDA Guidance on data management roles and responsibilities.
"
- themes: responsibilities
-
-resourcing_skills_and_training:
- text: " Is additional specialist expertise (or training for existing staff) required? How will additional skills be sourced? Carefully consider any resources needed to deliver the plan. Where dedicated resources are needed, these should be outlined and justified.
Outline any relevant technical expertise, support and training that is likely to be required and how it will be acquired.
"
- themes: resourcing_skills_and_training
-
-resourcing_hardware_and_software:
- text: " Are there appropriate computational facilities to manage, store and analyse the data? Carefully consider any resources needed to deliver the plan. Where dedicated resources are needed, these should be outlined and justified.
Provide details and justification for any hardware or software which will be used to support the project’s research methodology, which is additional or exceptional to conventional desk-based research and institutional provision. This includes additional storage and backup costs that may be charged by IT services.
"
- themes: resourcing_hardware_and_software
-
-resourcing_preservation_and_data_sharing:
- text: " Will charges be applied by data repositories? Have you costed in time and effort to prepare the data for sharing / preservation? Carefully consider any resources needed to deliver the plan. Where dedicated resources are needed, these should be outlined and justified.
Funding should be included to cover any charges applied by data repositories, for example to handle data of exceptional size or complexity. Also remember to cost in time and effort to prepare data for deposit and ensure it is adequately documented to enable reuse.
If you are not depositing in a data repository, ensure you have appropriate resources and systems in place to share and preserve the data.
See UKDA How to cost data management.
"
- themes: resourcing_preservation_and_data_sharing
-
-ahrc_funder_guidance:
- text: "sample funder guidance ahrc"
- themes: embargo_period
-
-bbsrc_funder_guidance:
- text: "sample funder guidance bbsrc"
- themes: embargo_period
-
-aru_institution_guidance:
- text: "sample institution guidance aru"
- themes: embargo_period
-
-au_institution_guidance_1:
- text: "sample institution guidance au 1"
- themes: embargo_period
-
-au_institution_guidance_2:
- text: "sample instiution guidance au 2"
- themes: embargo_period
-
-bu_institution_guidance_1:
- text: "sample institution guidance bu 1"
- themes: embargo_period
-
-bu_institution_guidance_2:
- text: "sample institution guidance bu 2"
- themes: embargo_period
-
-one:
- text: "one"
- themes: embargo_period
-
-
-
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+related_policies:
+ text: " Are there any existing procedures that you will base your approach on? Does your department/group have data management guidelines? Does your institution have a data protection or security policy that you will follow? Does your institution have a Research Data Management (RDM) policy? Does your funder have a Research Data Management policy? Are there any formal standards that you will adopt? List any other relevant funder, institutional, departmental or group policies on data management, data sharing and data security. Some of the information you give in the remainder of the DMP will be determined by the content of other policies. If so, point/link to them here.
"
+ themes: related_policies
+
+existing_data:
+ text: " Are there any existing data or methods that you can reuse? Check to see if there are any existing data that you can reuse, for examples by consulting relevant repositories.
When creating new data sources, explain why existing data sources cannot be re-used.
A list of repositories is provided by Databib or Re3data .
"
+ themes: existing_data
+
+licensing_of_existing_data:
+ text: " Do you need to pay to reuse existing data? Are there any restrictions on the reuse of third-party data? Can the data that you create - which may be derived from third-party data - be shared? If purchasing or reusing existing data sources, explain how issues such as copyright and IPR have been addressed.
"
+ themes: licensing_of_existing_data
+
+relationship_to_existing_data:
+ text: " What is the relationship to existing data e.g. in public repositories? How does your data complement and integrate with existing data? Consider the relationship between the data that you will capture and existing data available in public repositories or elsewhere.
"
+ themes: relationship_to_existing_data
+
+description_of_data_content:
+ text: " What data will you create? Give a brief description of the data that will be created, noting its content and coverage
"
+ themes: description_of_data_content
+
+data_format:
+ text: " What format will your data be in? Why have you chosen to use particular formats? Do the chosen formats and software enable sharing and long-term validity of data? Outline and justify your choice of format e.g. SPSS, Open Document Format, tab-delimited format, MS Excel.
Decisions may be based on staff expertise, a preference for Open formats, the standards accepted by data centres or widespread usage with a given community. Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data.
See UKDA Guidance on recommended data formats.
"
+ themes: data_format
+
+data_volumes:
+ text: " Do you have sufficient storage? Do you need to include costs for additional managed storage? Will the scale of the data pose challenges when sharing or transferring data between sites? Consider the implications of data volumes in terms of storage, backup and access.
Estimate the volume of data in KB/MB/GB and how this will grow to make sure any additional storage and technical support required can be provided.
"
+ themes: data_volumes
+
+data_type:
+ text: " What types of data will you create? Which types of data will have long-term value? Outline the types of data that are expected to be produced from the project e.g. quantitative, qualitative, survey data, experimental measurements, models, images, audiovisual data, samples…
Include the raw data arising directly from the research, the reduced data derived from it, and published data.
"
+ themes: data_type
+
+data_capture_methods:
+ text: " How will the data be created? What standards or methodologies will you use? Outline how the data will be collected/generated and which community data standards (if any) will be used at this stage.
"
+ themes: data_capture_methods
+
+data_organisation:
+ text: " How will you structure and name your folders and files? How will you ensure that different versions of a dataset are easily identifiable? Indicate how the data will be organised during the project, mentioning for example naming conventions, version control and folder structures. Consistent, well-ordered research data will be easier for the research team to find, understand and reuse.
"
+ themes: data_organisation
+
+data_quality:
+ text: " How will you control data capture to ensure data quality? What quality assurance processes will you adopt? Explain how the consistency and quality of data collection will be controlled and documented.
This may include processes such as calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.
"
+ themes: data_quality
+
+documentation:
+ text: " What metadata, documentation or other supporting material should accompany the data for it to be interpreted correctly? What information needs to be retained to enable the data to be read and interpreted in the future? Describe the types of documentation that will accompany the data to provide a secondary users with any necessary details to prevent misuse, misinterpretation or confusion. This may include information on the methodology used to collect the data, analytical and procedural information, definitions of variables, units of measurement, any assumptions made, the format and file type of the data.
"
+ themes: documentation
+
+metadata_capture:
+ text: " How will you capture / create the metadata? Can any of this information be created automatically? Metadata should be created to describe the data and aid discovery. Consider how you will capture this information and where it will be recorded e.g. in a database with links to each item, in a ‘readme’ text file, in file headers.
"
+ themes: metadata_capture
+
+metadata_standards:
+ text: " What metadata standards will you use and why? Researchers are strongly encouraged to utilise community standards to describe and structure data, where these are in place. The DCC offers a catalogue of disciplinary metadata standards.
"
+ themes: metadata_standards
+
+discovery_by_users:
+ text: " How will potential users find out about your data? Will you provide metadata online to aid discovery and reuse? Indicate how potential new users can find out about your data and identify whether they could be suitable for their research purposes. For example, you may provide basic discovery metadata online, such as title, author, subjects, keywords and publisher.
"
+ themes: discovery_by_users
+
+ethical_issues:
+ text: " Have you gained consent for data preservation and sharing? How will sensitive data be handled to ensure it is stored and transferred securely? How will you protect the identity of participants? e.g. via anonymisation or using managed access procedures? Investigators carrying out research involving human participants must ensure that consent is obtained to share data. Managing ethical concerns may include: anonymisation of data; referral to departmental or institutional ethics committees; and formal consent agreements. Ethical issues may affect how you store data, who can see/use it and how long it is kept. You should show that you’re aware of this and have planned accordingly.
See UKDA Guidance on Consent, Confidentiality and Ethics.
"
+ themes: ethical_issues
+
+ipr_ownership_and_licencing:
+ text: " Who owns the data? How will the data be licensed for reuse? Will data sharing be postponed / restricted e.g. to seek patents? State who will own the copyright and IPR of any new data that you will generate. For multi-partner projects, IPR ownership may be worth covering in a consortium agreement. Outline any restrictions needed on data sharing e.g. to protect proprietary or patentable data.
See DCC How to license research data.
"
+ themes: ipr_ownership_and_licencing
+
+active_data_storage:
+ text: " Where will the data be stored? Do you have access to enough storage or will you need to include charges for additional services? Storing data on laptops, computer hard drives or external storage devices alone is very risky. The use of robust, managed storage provided by university IT teams is preferable.
See UKDA Guidance on Data Storage.
"
+ themes: active_data_storage
+
+backup_procedures:
+ text: " How will the data be backed up? i.e. how often, to where, how many copies, is this automated… Who will be responsible for backup? Have you tested whether you can restore from your backups? Describe the data back-up procedures that you will adopt to ensure the data and metadata are securely stored during the lifetime of the project. You may need to discuss your institution’s policy on back-ups. It is better to use automatic backup services provided by university IT than rely on manual processes.
See UKDA Guidance on Data Backup.
"
+ themes: backup_procedures
+
+data_security:
+ text: " What are the risks to data security and how will these be managed? Will you follow any formal standards? If your data is sensitive (e.g. detailed personal data, politically sensitive information or trade secrets) you should discuss any appropriate security measures that you will be taking. Note the main risks and how these will be managed. Identify any formal standards that you will comply with e.g. ISO 27001.
See DCC Briefing Paper on Information Security Management - ISO 27000.
See UKDA Guidance on Data Security.
"
+ themes: data_security
+
+data_selection:
+ text: " Which data are of long-term value and should be shared and/or preserved? How will you decide what to keep? Indicate which data you intend to preserve beyond the period of funding. This should be based on what has long-term value and is economically viable to keep. Consider how long you wish to keep the data and what will happen to it e.g. deposit in a data repository to enable reuse.
See DCC How to appraise and select research data.
"
+ themes: data_selection
+
+preservation_plan:
+ text: " What is the long-term preservation plan for the dataset? e.g. deposit in a data repository Will additional resources be needed to prepare data for deposit or meet charges from data repositories? Researchers should consider how datasets that have long-term value will be preserved and curated beyond the lifetime of the grant. Also outline the plans for preparing and documenting data for sharing and archiving.
If you do not propose to use an established repository, the data management plan should demonstrate that resources and systems will be in place to enable the data to be curated effectively beyond the lifetime of the grant.
"
+ themes: preservation_plan
+
+period_of_preservation:
+ text: " How long will the data be retained and preserved? This may depend on the type of data. Most research funders expect data to be retained for a minimum of 10 years from the end of the project. For data that by their nature cannot be re-measured, efforts should be made to retain them indefinitely.
"
+ themes: period_of_preservation
+
+data_repository:
+ text: " Where (i.e. in which repository) will the data be deposited? Most research funders recommend the use of established data repositories, community databases and related initiatives to aid data preservation, sharing and reuse.
An international list of data repositories is available via Databib or Re3data.
"
+ themes: data_repository
+
+audience:
+ text: " Who may be interested in using your data? Where possible outline the types of users you expect and estimate numbers.
"
+ themes: audiencethe
+
+expected_reuse:
+ text: " What are the further intended or foreseeable research uses for the data? You should think about the possibilities for re-use of your data in other contexts and by other users, and connect this as appropriate with your plans for dissemination and Pathways to Impact. Where there is potential for reuse, you should use standards and formats that facilitate this.
"
+ themes: expected_reuse
+
+method_for_data_sharing:
+ text: " How will you make the data available to others? With whom will you share the data, and under what conditions? Consider where, how, and to whom the data should be made available. Will you share data via a data repository, handle data requests directly or use another mechanism?
The methods used to share data will be dependent on a number of factors such as the type, size, complexity and sensitivity of data. Mention earlier examples to show a track record of effective data sharing.
"
+ themes: method_for_data_sharing
+
+timeframe_for_data_sharing:
+ text: " When will you make the data available? Data (with accompanying metadata) should be shared in a timely fashion. It is generally expected that timely release would generally be no later than the release through publication of the main findings and should be in-line with established best practice in the field.
"
+ themes: timeframe_for_data_sharing
+
+embargo_period:
+ text: " For how long do you need exclusive use of the data and why? The value of data often depends on timeliness. Researchers have a legitimate interest in benefiting from their investment of time and effort in producing data, but not in prolonged exclusive use. Research funders typically allow embargoes in line with practice in the field, but expect these to be outlined and justified.
"
+ themes: embargo_period
+
+restrictions_on_sharing:
+ text: " Are any restrictions on data sharing required? e.g. limits on who can use the data, when and for what purpose. What restrictions are needed and why? What action will you take to overcome or minimise restrictions? Outline any expected difficulties in data sharing, along with causes and possible measures to overcome these. Restrictions to data sharing may be due to participant confidentiality, consent agreements or IPR. Strategies to limit restrictions may include: anonymising or aggregating data; gaining participant consent for data sharing; gaining copyright permissions; and agreeing a limited embargo period.
"
+ themes: restrictions_on_sharing
+
+managed_access_procedures:
+ text: " Will access be tightly controlled or restricted? e.g. by using data enclaves / secure data services Will a data sharing agreement be required? How will the data be licensed for reuse? Indicate whether external users are (will be) bound by data sharing agreements, licenses or end-user agreements. If so, set out the terms and key responsibilities to be followed.
Note how access will be controlled, for example by the use of specialist services. A data enclave provides a controlled secure environments in which eligible researchers can perform analyses using restricted data resources.
Where a managed access process is required, the procedure should be clearly described and transparent.
"
+ themes: managed_access_procedures
+
+responsibilities:
+ text: " Who is responsible for each data management activity? How are responsibilities split across partner sites in collaborative research projects? Outline the roles and responsibilities for all activities e.g. data capture, metadata production, data quality, storage and backup, data archiving & data sharing. Individuals should be named where possible. For collaborative projects you should explain the co-ordination of data management responsibilities across partners.
See UKDA Guidance on data management roles and responsibilities.
"
+ themes: responsibilities
+
+resourcing_skills_and_training:
+ text: " Is additional specialist expertise (or training for existing staff) required? How will additional skills be sourced? Carefully consider any resources needed to deliver the plan. Where dedicated resources are needed, these should be outlined and justified.
Outline any relevant technical expertise, support and training that is likely to be required and how it will be acquired.
"
+ themes: resourcing_skills_and_training
+
+resourcing_hardware_and_software:
+ text: " Are there appropriate computational facilities to manage, store and analyse the data? Carefully consider any resources needed to deliver the plan. Where dedicated resources are needed, these should be outlined and justified.
Provide details and justification for any hardware or software which will be used to support the project’s research methodology, which is additional or exceptional to conventional desk-based research and institutional provision. This includes additional storage and backup costs that may be charged by IT services.
"
+ themes: resourcing_hardware_and_software
+
+resourcing_preservation_and_data_sharing:
+ text: " Will charges be applied by data repositories? Have you costed in time and effort to prepare the data for sharing / preservation? Carefully consider any resources needed to deliver the plan. Where dedicated resources are needed, these should be outlined and justified.
Funding should be included to cover any charges applied by data repositories, for example to handle data of exceptional size or complexity. Also remember to cost in time and effort to prepare data for deposit and ensure it is adequately documented to enable reuse.
If you are not depositing in a data repository, ensure you have appropriate resources and systems in place to share and preserve the data.
See UKDA How to cost data management.
"
+ themes: resourcing_preservation_and_data_sharing
+
+ahrc_funder_guidance:
+ text: "sample funder guidance ahrc"
+ themes: embargo_period
+
+bbsrc_funder_guidance:
+ text: "sample funder guidance bbsrc"
+ themes: embargo_period
+
+aru_institution_guidance:
+ text: "sample institution guidance aru"
+ themes: embargo_period
+
+au_institution_guidance_1:
+ text: "sample institution guidance au 1"
+ themes: embargo_period
+
+au_institution_guidance_2:
+ text: "sample instiution guidance au 2"
+ themes: embargo_period
+
+bu_institution_guidance_1:
+ text: "sample institution guidance bu 1"
+ themes: embargo_period
+
+bu_institution_guidance_2:
+ text: "sample institution guidance bu 2"
+ themes: embargo_period
+
+one:
+ text: "one"
+ themes: embargo_period
+
+
+
diff --git a/test/fixtures/option_warnings.yml b/test/fixtures/option_warnings.yml
index 1a67380..46bac23 100644
--- a/test/fixtures/option_warnings.yml
+++ b/test/fixtures/option_warnings.yml
@@ -1,40 +1,40 @@
-single_select_1_warning:
- option: single_select_1
- organisation: uog
- text: This warning should display when option 1 of the single item select box example is selected for a project at the University of Glasgow
-
-single_select_2_warning:
- option: single_select_2
- organisation: hatii
- text: This warning should display when option 2 of the single item select box example is selected for a project at HATII
-
-
-multiple_select_3_warning:
- option: multiple_select_3
- organisation: uoe
- text: This warning should display when option 3 of the multiple item select box example is selected for a project at the University of Edinburgh
-
-multiple_select_4_warning:
- option: multiple_select_4
- organisation: uoe_si
- text: This warning should display when option 4 of the multiple item select box example is selected for a project at the School of Informatics
-
-radio_button_1_warning:
- option: radio_button_1
- organisation: uog
- text: This warning should display when option 1 of the radio button example is selected for a project at the University of Glasgow
-
-radio_button_2_warning:
- option: radio_button_2
- organisation: hatii
- text: This warning should display when option 2 of the radio button example is selected for a project at HATII
-
-checkbox_3_warning:
- option: checkbox_3
- organisation: uoe
- text: This warning should display when option 3 of the checkbox example is selected for a project at the University of Edinburgh
-
-checkbox_4_warning:
- option: checkbox_4
- organisation: uoe_si
+single_select_1_warning:
+ option: single_select_1
+ organisation: uog
+ text: This warning should display when option 1 of the single item select box example is selected for a project at the University of Glasgow
+
+single_select_2_warning:
+ option: single_select_2
+ organisation: hatii
+ text: This warning should display when option 2 of the single item select box example is selected for a project at HATII
+
+
+multiple_select_3_warning:
+ option: multiple_select_3
+ organisation: uoe
+ text: This warning should display when option 3 of the multiple item select box example is selected for a project at the University of Edinburgh
+
+multiple_select_4_warning:
+ option: multiple_select_4
+ organisation: uoe_si
+ text: This warning should display when option 4 of the multiple item select box example is selected for a project at the School of Informatics
+
+radio_button_1_warning:
+ option: radio_button_1
+ organisation: uog
+ text: This warning should display when option 1 of the radio button example is selected for a project at the University of Glasgow
+
+radio_button_2_warning:
+ option: radio_button_2
+ organisation: hatii
+ text: This warning should display when option 2 of the radio button example is selected for a project at HATII
+
+checkbox_3_warning:
+ option: checkbox_3
+ organisation: uoe
+ text: This warning should display when option 3 of the checkbox example is selected for a project at the University of Edinburgh
+
+checkbox_4_warning:
+ option: checkbox_4
+ organisation: uoe_si
text: This warning should display when option 4 of the checkbox example is selected for a project at the School of Informatics
\ No newline at end of file
diff --git a/test/fixtures/options.yml b/test/fixtures/options.yml
index 866aaf3..e54b8d9 100644
--- a/test/fixtures/options.yml
+++ b/test/fixtures/options.yml
@@ -1,89 +1,89 @@
-single_select_1:
- question: single_select_box
- text: Option 1
- number: 1
-
-single_select_2:
- question: single_select_box
- text: Option 2
- number: 2
-
-single_select_3:
- question: single_select_box
- text: Option 3
- number: 3
-
-single_select_4:
- question: single_select_box
- text: Option 4
- number: 4
-
-multiple_select_1:
- question: multiple_select_box
- text: Option 1
- number: 1
-
-multiple_select_2:
- question: multiple_select_box
- text: Option 2
- number: 2
-
-multiple_select_3:
- question: multiple_select_box
- text: Option 3
- number: 3
-
-multiple_select_4:
- question: multiple_select_box
- text: Option 4
- number: 4
-
-radio_button_1:
- question: radio_button
- text: Option 1
- number: 1
-
-radio_button_2:
- question: radio_button
- text: Option 2
- number: 2
-
-radio_button_3:
- question: radio_button
- text: Option 3
- number: 3
-
-radio_button_4:
- question: radio_button
- text: Option 4
- number: 4
-
-checkbox_1:
- question: checkbox
- text: Option 1
- number: 1
-
-checkbox_2:
- question: checkbox
- text: Option 2
- number: 2
-
-checkbox_3:
- question: checkbox
- text: Option 3
- number: 3
-
-checkbox_4:
- question: checkbox
- text: Option 4
- number: 4
-
-mrc_5_2_yes:
- question: mrc_5_2
- text: "Yes"
- number: 1
-
-mrc_5_2_no:
- question: mrc_5_2
- text: "No"
+single_select_1:
+ question: single_select_box
+ text: Option 1
+ number: 1
+
+single_select_2:
+ question: single_select_box
+ text: Option 2
+ number: 2
+
+single_select_3:
+ question: single_select_box
+ text: Option 3
+ number: 3
+
+single_select_4:
+ question: single_select_box
+ text: Option 4
+ number: 4
+
+multiple_select_1:
+ question: multiple_select_box
+ text: Option 1
+ number: 1
+
+multiple_select_2:
+ question: multiple_select_box
+ text: Option 2
+ number: 2
+
+multiple_select_3:
+ question: multiple_select_box
+ text: Option 3
+ number: 3
+
+multiple_select_4:
+ question: multiple_select_box
+ text: Option 4
+ number: 4
+
+radio_button_1:
+ question: radio_button
+ text: Option 1
+ number: 1
+
+radio_button_2:
+ question: radio_button
+ text: Option 2
+ number: 2
+
+radio_button_3:
+ question: radio_button
+ text: Option 3
+ number: 3
+
+radio_button_4:
+ question: radio_button
+ text: Option 4
+ number: 4
+
+checkbox_1:
+ question: checkbox
+ text: Option 1
+ number: 1
+
+checkbox_2:
+ question: checkbox
+ text: Option 2
+ number: 2
+
+checkbox_3:
+ question: checkbox
+ text: Option 3
+ number: 3
+
+checkbox_4:
+ question: checkbox
+ text: Option 4
+ number: 4
+
+mrc_5_2_yes:
+ question: mrc_5_2
+ text: "Yes"
+ number: 1
+
+mrc_5_2_no:
+ question: mrc_5_2
+ text: "No"
number: 2
\ No newline at end of file
diff --git a/test/fixtures/org_token_permissions.yml b/test/fixtures/org_token_permissions.yml
index 7f1a3a3..a4748f5 100644
--- a/test/fixtures/org_token_permissions.yml
+++ b/test/fixtures/org_token_permissions.yml
@@ -1,15 +1,15 @@
-dcc_one:
- token_permission_type: plans_token_type
- organisation: dcc
-
-dcc_two:
- token_permission_type: guidances_token_type
- organisation: dcc
-
-aru_one:
- token_permission_type: plans_token_type
- organisation: aru
-
-au_one:
- token_permission_type: guidances_token_type
+dcc_one:
+ token_permission_type: plans_token_type
+ organisation: dcc
+
+dcc_two:
+ token_permission_type: guidances_token_type
+ organisation: dcc
+
+aru_one:
+ token_permission_type: plans_token_type
+ organisation: aru
+
+au_one:
+ token_permission_type: guidances_token_type
organisation: au
\ No newline at end of file
diff --git a/test/fixtures/organisation_types.yml b/test/fixtures/organisation_types.yml
index 0f79cd8..06e3c78 100644
--- a/test/fixtures/organisation_types.yml
+++ b/test/fixtures/organisation_types.yml
@@ -1,21 +1,21 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-funder:
- name: "Funder"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
-
-institution:
- name: "Institution"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
-
-organisation:
- name: "Organisation"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
-
-school:
- name: "School"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
-
-project:
- name: "Project"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+funder:
+ name: "Funder"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
+
+institution:
+ name: "Institution"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
+
+organisation:
+ name: "Organisation"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
+
+school:
+ name: "School"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
+
+project:
+ name: "Project"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
diff --git a/test/fixtures/organisations.yml b/test/fixtures/organisations.yml
index 5a3f464..97e50b3 100644
--- a/test/fixtures/organisations.yml
+++ b/test/fixtures/organisations.yml
@@ -1,905 +1,905 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-dcc:
- name: "Digital Curation Centre"
- abbreviation: "DCC"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
- organisation_type: organisation
-
-ahrc:
- name: "Arts and Humanities Research Council"
- abbreviation: "AHRC"
- organisation_type: funder
-
-bbsrc:
- name: "Biotechnology and Biological Sciences Research Council"
- abbreviation: "BBSRC"
- organisation_type: funder
-
-cruk:
- name: "Cancer Research UK"
- abbreviation: "CRUK"
- organisation_type: funder
-
-esrc:
- name: "Economic and Social Research Council"
- abbreviation: "ESRC"
- organisation_type: funder
-
-nerc:
- name: "Natural Environment Research Council"
- abbreviation: "NERC"
- organisation_type: funder
-
-mrc:
- name: "Medical Research Council"
- abbreviation: "MRC"
- organisation_type: funder
-
-stfc:
- name: "Science and Technology Facilities Council"
- abbreviation: "STFC"
- organisation_type: funder
-
-wellcome:
- name: "Wellcome Trust"
- abbreviation: "Wellcome Trust"
- organisation_type: funder
-
-#uoe_si:
-# name: "School of informatics"
-# abbreviation: "UoE SI"
-# organisation_type: school
-# parent: uoe
-#
-#hatii:
-# name: Humanities Advanced Technology and Information Institute
-# abbreviation: HATII
-# organisation_type: school
-# parent: uog
-
-aru:
- name: Anglia Ruskin University
- domain: www.anglia.ac.uk
- organisation_type: institution
-
-au:
- name: Aston University
- domain: www.aston.ac.uk
- organisation_type: institution
-
-bu:
- name: Bangor University
- domain: www.bangor.ac.uk
- organisation_type: institution
-
-bsu:
- name: Bath Spa University
- domain: www.bathspa.ac.uk
- organisation_type: institution
-
-bc:
- name: Birkbeck College
- domain: www.bbk.ac.uk
- organisation_type: institution
-
-bcu:
- name: Birmingham City University
- domain: www.bcu.ac.uk
- organisation_type: institution
-
-bgucl:
- name: Bishop Grosseteste University College Lincoln
- domain: www.bishopg.ac.uk
- organisation_type: institution
-
-bou:
- name: Bournemouth University
- domain: www.bournemouth.ac.uk
- organisation_type: institution
-
-bru:
- name: Brunel University
- domain: www.brunel.ac.uk
- organisation_type: institution
-
-bnu:
- name: Buckinghamshire New University
- domain: www.bucks.ac.uk
- organisation_type: institution
-
-cccu:
- name: Canterbury Christ Church University
- domain: www.canterbury.ac.uk
- organisation_type: institution
-
-cmu:
- name: Cardiff Metropolitan University
- domain: www.cardiffmet.ac.uk
- organisation_type: institution
-
-cu:
- name: Cardiff University
- domain: www.cardiff.ac.uk
- organisation_type: institution
-
-cioa:
- name: Courtauld Institute Of Art
- domain: www.courtauld.ac.uk
- organisation_type: institution
-
-cu:
- name: Coventry University
- domain: www.coventry.ac.uk
- organisation_type: institution
-
-cru:
- name: Cranfield University
- domain: www.cranfield.ac.uk
- organisation_type: institution
-
-dmu:
- name: De Montfort University
- domain: www.dmu.ac.uk
- organisation_type: institution
-
-ehu:
- name: Edge Hill University
- domain: www.edgehill.ac.uk
- organisation_type: institution
-
-enu:
- name: Edinburgh Napier University
- domain: www.napier.ac.uk
- organisation_type: institution
-
-gcu:
- name: Glasgow Caledonian University
- domain: www.gcu.ac.uk
- organisation_type: institution
-
-gsa:
- name: Glasgow School Of Art
- domain: www.gsa.ac.uk
- organisation_type: institution
-
-gu:
- name: Glyndwr University
- domain: www.glyndwr.ac.uk
- organisation_type: institution
-
-gc:
- name: Goldsmiths' College
- domain: www.gold.ac.uk
- organisation_type: institution
-
-gsomad:
- name: Guildhall School Of Music And Drama
- domain: www.gsmd.ac.uk
- organisation_type: institution
-
-hauc:
- name: Harper Adams University College
- domain: www.harper-adams.ac.uk
- organisation_type: institution
-
-hwu:
- name: Heriot-Watt University
- domain: www.hw.ac.uk
- organisation_type: institution
-
-hc:
- name: Heythrop College
- domain: www.heythrop.ac.uk
- organisation_type: institution
-
-icostm:
- name: "Imperial College Of Science, Technology And Medicine"
- domain: www.imperial.ac.uk
- organisation_type: institution
-
-ioeuol:
- name: "Institute Of Education, University Of London"
- domain: www.ioe.ac.uk
- organisation_type: institution
-
-kcl:
- name: King's College London
- domain: www.kcl.ac.uk
- organisation_type: institution
-
-ku:
- name: Kingston University
- domain: www.kingston.ac.uk
- organisation_type: institution
-
-lcoa:
- name: Leeds College Of Art
- domain: www.leeds-art.ac.uk
- organisation_type: institution
-
-lcom:
- name: Leeds College Of Music
- domain: www.lcm.ac.uk
- organisation_type: institution
-
-lmu:
- name: Leeds Metropolitan University
- domain: www.leedsmet.ac.uk
- organisation_type: institution
-
-ltuc:
- name: Leeds Trinity University College
- domain: www.leedstrinity.ac.uk
- organisation_type: institution
-
-lhu:
- name: Liverpool Hope University
- domain: www.hope.ac.uk
- organisation_type: institution
-
-ljmu:
- name: Liverpool John Moores University
- domain: www.ljmu.ac.uk
- organisation_type: institution
-
-lbs:
- name: London Business School
- domain: www.london.edu
- organisation_type: institution
-
-lmu:
- name: London Metropolitan University
- domain: www.londonmet.ac.uk
- organisation_type: institution
-
-lsoeps:
- name: London School Of Economics & Political Science
- domain: www.lse.ac.uk
- organisation_type: institution
-
-lsohatm:
- name: London School Of Hygiene And Tropical Medicine
- domain: www.lshtm.ac.uk
- organisation_type: institution
-
-lsbu:
- name: London South Bank University
- domain: www.lsbu.ac.uk
- organisation_type: institution
-
-lu:
- name: Loughborough University
- domain: www.lboro.ac.uk
- organisation_type: institution
-
-mu:
- name: Middlesex University
- domain: www.mdx.ac.uk
- organisation_type: institution
-
-nuc:
- name: Newman University College
- domain: www.newman.ac.uk
- organisation_type: institution
-
-nsocd:
- name: Northern School Of Contemporary Dance
- domain: www.nscd.ac.uk
- organisation_type: institution
-
-nucota:
- name: Norwich University College Of The Arts
- domain: www.nuca.ac.uk
- organisation_type: institution
-
-ntu:
- name: Nottingham Trent University
- domain: www.ntu.ac.uk
- organisation_type: institution
-
-obu:
- name: Oxford Brookes University
- domain: www.brookes.ac.uk
- organisation_type: institution
-
-pa:
- name: Prifysgol Aberystwyth
- domain: www.aber.ac.uk
- organisation_type: institution
-
-qmue:
- name: "Queen Margaret University, Edinburgh"
- domain: www.qmu.ac.uk
- organisation_type: institution
-
-qmawcuol:
- name: "Queen Mary And Westfield College, University Of London"
- domain: www.qmul.ac.uk
- organisation_type: institution
-
-rl:
- name: Ravensbourne Limited
- domain: www.rave.ac.uk
- organisation_type: institution
-
-ru:
- name: Roehampton University
- domain: www.roehampton.ac.uk
- organisation_type: institution
-
-rbc:
- name: Rose Bruford College
- domain: www.bruford.ac.uk
- organisation_type: institution
-
-raom:
- name: Royal Academy Of Music
- domain: www.ram.ac.uk
- organisation_type: institution
-
-rac:
- name: Royal Agricultural College
- domain: www.rac.ac.uk
- organisation_type: institution
-
-rcom:
- name: Royal College Of Music
- domain: www.rcm.ac.uk
- organisation_type: institution
-
-rcos:
- name: Royal Conservatoire Of Scotland
- domain: www.rcs.ac.uk
- organisation_type: institution
-
-rhcabnc:
- name: Royal Holloway College And Bedford New College
- domain: www.rhul.ac.uk
- organisation_type: institution
-
-rncom:
- name: Royal Northern College Of Music
- domain: www.rncm.ac.uk
- organisation_type: institution
-
-rwcomadl:
- name: Royal Welsh College Of Music And Drama Limited
- domain: www.rwcmd.ac.uk
- organisation_type: institution
-
-sooaas:
- name: School Of Oriental And African Studies
- domain: www.soas.ac.uk
- organisation_type: institution
-
-shu:
- name: Sheffield Hallam University
- domain: www.shu.ac.uk
- organisation_type: institution
-
-ssu:
- name: Southampton Solent University
- domain: www.solent.ac.uk
- organisation_type: institution
-
-sruc:
- name: Sruc
- domain: www.sac.ac.uk
- organisation_type: institution
-
-sghms:
- name: St George's Hospital Medical School
- domain: www.sgul.ac.uk
- organisation_type: institution
-
-smuc:
- name: St Mary's University College
- domain: www.stmarys-belfast.ac.uk
- organisation_type: institution
-
-smuct:
- name: "St Mary's University College, Twickenham"
- domain: www.smuc.ac.uk
- organisation_type: institution
-
-su:
- name: Staffordshire University
- domain: www.staffs.ac.uk
- organisation_type: institution
-
-suc:
- name: Stranmillis University College
- domain: www.stran.ac.uk
- organisation_type: institution
-
-smu:
- name: Swansea Metropolitan University
- domain: www.smu.ac.uk
- organisation_type: institution
-
-su:
- name: Swansea University
- domain: www.swan.ac.uk
- organisation_type: institution
-
-tu:
- name: Teesside University
- domain: www.tees.ac.uk
- organisation_type: institution
-
-taucab:
- name: The Arts University College At Bournemouth
- domain: www.aucb.ac.uk
- organisation_type: institution
-
-tcsosad:
- name: The Central School Of Speech And Drama
- domain: www.cssd.ac.uk
- organisation_type: institution
-
-tcu:
- name: The City University
- domain: www.city.ac.uk
- organisation_type: institution
-
-tcosmasjf:
- name: The College Of St. Mark And St. John Foundation
- domain: www.marjon.ac.uk
- organisation_type: institution
-
-tcfdad:
- name: The Conservatoire For Dance And Drama
- domain: www.cdd.ac.uk
- organisation_type: institution
-
-tiocrrch:
- name: "The Institute Of Cancer Research: Royal Cancer Hospital"
- domain: www.icr.ac.uk
- organisation_type: institution
-
-tlifpa:
- name: The Liverpool Institute For Performing Arts
- domain: www.lipa.ac.uk
- organisation_type: institution
-
-tmmu:
- name: The Manchester Metropolitan University
- domain: www.mmu.ac.uk
- organisation_type: institution
-
-ou:
- name: The Open University
- domain: www.open.ac.uk
- organisation_type: institution
-
-qub:
- name: The Queen's University Of Belfast
- domain: www.qub.ac.uk
- organisation_type: institution
-
-rgu:
- name: The Robert Gordon University
- domain: www.rgu.ac.uk
- organisation_type: institution
-
-rca:
- name: The Royal College Of Art
- domain: www.rca.ac.uk
- organisation_type: institution
-
-rvc:
- name: The Royal Veterinary College
- domain: www.rvc.ac.uk
- organisation_type: institution
-
-tsopuol:
- name: The School Of Pharmacy University Of London
- domain: www.pharmacy.ac.uk
- organisation_type: institution
-
-tuob:
- name: The University Of Bath
- domain: www.bath.ac.uk
- organisation_type: institution
-
-tuobo:
- name: The University Of Bolton
- domain: www.bolton.ac.uk
- organisation_type: institution
-
-tuobu:
- name: The University Of Buckingham
- domain: www.buckingham.ac.uk
- organisation_type: institution
-
-tuoch:
- name: The University Of Chichester
- domain: www.chi.ac.uk
- organisation_type: institution
-
-tuocu:
- name: The University Of Cumbria
- domain: www.cumbria.ac.uk
- organisation_type: institution
-
-tuom:
- name: The University Of Manchester
- domain: www.manchester.ac.uk
- organisation_type: institution
-
-tuon:
- name: The University Of Northampton
- domain: www.northampton.ac.uk
- organisation_type: institution
-
-tuowl:
- name: The University Of West London
- domain: www.uwl.ac.uk
- organisation_type: institution
-
-tuow:
- name: The University Of Westminster
- domain: www.westminster.ac.uk
- organisation_type: institution
-
-tlcomadl:
- name: Trinity Laban Conservatoire Of Music And Dance Ltd
- domain: www.trinitylaban.ac.uk
- organisation_type: institution
-
-ucsl:
- name: University Campus Suffolk Ltd
- domain: www.ucs.ac.uk
- organisation_type: institution
-
-ucb:
- name: University College Birmingham
- domain: www.ucb.ac.uk
- organisation_type: institution
-
-ucf:
- name: University College Falmouth
- domain: www.falmouth.ac.uk
- organisation_type: institution
-
-ucl:
- name: University College London
- domain: www.ucl.ac.uk
- organisation_type: institution
-
-uftca:
- name: University For The Creative Arts
- domain: www.ucreative.ac.uk
- organisation_type: institution
-
-uoa:
- name: University Of Aberdeen
- domain: www.abdn.ac.uk
- organisation_type: institution
-
-uoad:
- name: University Of Abertay Dundee
- domain: www.abertay.ac.uk
- organisation_type: institution
-
-uobe:
- name: University Of Bedfordshire
- domain: www.beds.ac.uk
- organisation_type: institution
-
-uobi:
- name: University Of Birmingham
- domain: www.birmingham.ac.uk
- organisation_type: institution
-
-uobra:
- name: University Of Bradford
- domain: www.bradford.ac.uk
- organisation_type: institution
-
-uobrig:
- name: University Of Brighton
- domain: www.brighton.ac.uk
- organisation_type: institution
-
-uobris:
- name: University Of Bristol
- domain: www.bristol.ac.uk
- organisation_type: institution
-
-uoc:
- name: University Of Cambridge
- domain: www.cam.ac.uk
- organisation_type: institution
-
-uocl:
- name: University Of Central Lancashire
- domain: www.uclan.ac.uk
- organisation_type: institution
-
-uoch:
- name: University Of Chester
- domain: www.chester.ac.uk
- organisation_type: institution
-
-uod:
- name: University Of Derby
- domain: www.derby.ac.uk
- organisation_type: institution
-
-uodu:
- name: University Of Dundee
- domain: www.dundee.ac.uk
- organisation_type: institution
-
-uodur:
- name: University Of Durham
- domain: www.dur.ac.uk
- organisation_type: institution
-
-uoea:
- name: University Of East Anglia
- domain: www.uea.ac.uk
- organisation_type: institution
-
-uoel:
- name: University Of East London
- domain: www.uel.ac.uk
- organisation_type: institution
-
-uoe:
- name: University Of Edinburgh
- domain: www.ed.ac.uk
- organisation_type: institution
-
-uoes:
- name: University Of Essex
- domain: www.essex.ac.uk
- organisation_type: institution
-
-uoex:
- name: University Of Exeter
- domain: www.exeter.ac.uk
- organisation_type: institution
-
-uogpm:
- name: University Of Glamorgan / Prifysgol Morgannwg
- domain: www.glam.ac.uk
- organisation_type: institution
-
-uog:
- name: University Of Glasgow
- domain: www.gla.ac.uk
- organisation_type: institution
-
-uoglo:
- name: University Of Gloucestershire
- domain: www.glos.ac.uk
- organisation_type: institution
-
-uogr:
- name: University Of Greenwich
- domain: www.greenwich.ac.uk
- organisation_type: institution
-
-uoh:
- name: University Of Hertfordshire
- domain: www.herts.ac.uk
- organisation_type: institution
-
-uohud:
- name: University Of Huddersfield
- domain: www.hud.ac.uk
- organisation_type: institution
-
-uohul:
- name: University Of Hull
- domain: www.hull.ac.uk
- organisation_type: institution
-
-uokee:
- name: University Of Keele
- domain: www.keele.ac.uk
- organisation_type: institution
-
-uoken:
- name: University Of Kent
- domain: www.kent.ac.uk
- organisation_type: institution
-
-uola:
- name: University Of Lancaster
- domain: www.lancs.ac.uk
- organisation_type: institution
-
-uole:
- name: University Of Leeds
- domain: www.leeds.ac.uk
- organisation_type: institution
-
-uolei:
- name: University Of Leicester
- domain: www.le.ac.uk
- organisation_type: institution
-
-uoli:
- name: University Of Lincoln
- domain: www.lincoln.ac.uk
- organisation_type: institution
-
-uoliv:
- name: University Of Liverpool
- domain: www.liv.ac.uk
- organisation_type: institution
-
-uolo:
- name: University Of London
- domain: www.lon.ac.uk
- organisation_type: institution
-
-uonut:
- name: University Of Newcastle Upon Tyne
- domain: www.ncl.ac.uk
- organisation_type: institution
-
-uonan:
- name: University Of Northumbria At Newcastle
- domain: www.northumbria.ac.uk
- organisation_type: institution
-
-uon:
- name: University Of Nottingham
- domain: www.nottingham.ac.uk
- organisation_type: institution
-
-uoo:
- name: University Of Oxford
- domain: www.ox.ac.uk
- organisation_type: institution
-
-uop:
- name: University Of Plymouth
- domain: www.plymouth.ac.uk
- organisation_type: institution
-
-uopo:
- name: University Of Portsmouth
- domain: www.port.ac.uk
- organisation_type: institution
-
-uor:
- name: University Of Reading
- domain: www.reading.ac.uk
- organisation_type: institution
-
-uosa:
- name: University Of Salford
- domain: www.salford.ac.uk
- organisation_type: institution
-
-uosh:
- name: University Of Sheffield
- domain: www.shef.ac.uk
- organisation_type: institution
-
-uoso:
- name: University Of Southampton
- domain: www.soton.ac.uk
- organisation_type: institution
-
-uosa:
- name: University Of St Andrews
- domain: www.st-andrews.ac.uk
- organisation_type: institution
-
-uosti:
- name: University Of Stirling
- domain: www.stir.ac.uk
- organisation_type: institution
-
-uostr:
- name: University Of Strathclyde
- domain: www.strath.ac.uk
- organisation_type: institution
-
-uosu:
- name: University Of Sunderland
- domain: www.sunderland.ac.uk
- organisation_type: institution
-
-uosur:
- name: University Of Surrey
- domain: www.surrey.ac.uk
- organisation_type: institution
-
-uosus:
- name: University Of Sussex
- domain: www.sussex.ac.uk
- organisation_type: institution
-
-uotal:
- name: "University Of The Arts, London"
- domain: www.arts.ac.uk
- organisation_type: institution
-
-uothai:
- name: University Of The Highlands And Islands
- domain: www.uhi.ac.uk
- organisation_type: institution
-
-uotwoeb:
- name: "University Of The West Of England, Bristol"
- domain: www.uwe.ac.uk
- organisation_type: institution
-
-uotwos:
- name: University Of The West Of Scotland
- domain: www.uws.ac.uk
- organisation_type: institution
-
-uou:
- name: University Of Ulster
- domain: www.ulster.ac.uk
- organisation_type: institution
-
-uowpc:
- name: University Of Wales Prifysgol Cymru
- domain: www.wales.ac.uk
- organisation_type: institution
-
-uown:
- name: "University Of Wales, Newport"
- domain: www.newport.ac.uk
- organisation_type: institution
-
-uowtsd:
- name: "University Of Wales: Trinity Saint David"
- domain: www.trinitysaintdavid.ac.uk
- organisation_type: institution
-
-uowa:
- name: University Of Warwick
- domain: www.warwick.ac.uk
- organisation_type: institution
-
-uowi:
- name: University Of Winchester
- domain: www.winchester.ac.uk
- organisation_type: institution
-
-uowol:
- name: University Of Wolverhampton
- domain: www.wlv.ac.uk
- organisation_type: institution
-
-uowor:
- name: University Of Worcester
- domain: www.worc.ac.uk
- organisation_type: institution
-
-uoy:
- name: University Of York
- domain: www.york.ac.uk
- organisation_type: institution
-
-wc:
- name: Writtle College
- domain: www.writtle.ac.uk
- organisation_type: institution
-
-ysju:
- name: York St John University
- domain: www.yorksj.ac.uk
- organisation_type: institution
-
-institution_parent:
- name: "Institution Parent"
- domain: "www.example.com"
- organisation_type: institution
-
-institution_child_one:
- name: "instituiton Chile 1"
- domain: "www.institution_child.com"
- organisation_type: instituiton
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+dcc:
+ name: "Digital Curation Centre"
+ abbreviation: "DCC"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt"
+ organisation_type: organisation
+
+ahrc:
+ name: "Arts and Humanities Research Council"
+ abbreviation: "AHRC"
+ organisation_type: funder
+
+bbsrc:
+ name: "Biotechnology and Biological Sciences Research Council"
+ abbreviation: "BBSRC"
+ organisation_type: funder
+
+cruk:
+ name: "Cancer Research UK"
+ abbreviation: "CRUK"
+ organisation_type: funder
+
+esrc:
+ name: "Economic and Social Research Council"
+ abbreviation: "ESRC"
+ organisation_type: funder
+
+nerc:
+ name: "Natural Environment Research Council"
+ abbreviation: "NERC"
+ organisation_type: funder
+
+mrc:
+ name: "Medical Research Council"
+ abbreviation: "MRC"
+ organisation_type: funder
+
+stfc:
+ name: "Science and Technology Facilities Council"
+ abbreviation: "STFC"
+ organisation_type: funder
+
+wellcome:
+ name: "Wellcome Trust"
+ abbreviation: "Wellcome Trust"
+ organisation_type: funder
+
+#uoe_si:
+# name: "School of informatics"
+# abbreviation: "UoE SI"
+# organisation_type: school
+# parent: uoe
+#
+#hatii:
+# name: Humanities Advanced Technology and Information Institute
+# abbreviation: HATII
+# organisation_type: school
+# parent: uog
+
+aru:
+ name: Anglia Ruskin University
+ domain: www.anglia.ac.uk
+ organisation_type: institution
+
+au:
+ name: Aston University
+ domain: www.aston.ac.uk
+ organisation_type: institution
+
+bu:
+ name: Bangor University
+ domain: www.bangor.ac.uk
+ organisation_type: institution
+
+bsu:
+ name: Bath Spa University
+ domain: www.bathspa.ac.uk
+ organisation_type: institution
+
+bc:
+ name: Birkbeck College
+ domain: www.bbk.ac.uk
+ organisation_type: institution
+
+bcu:
+ name: Birmingham City University
+ domain: www.bcu.ac.uk
+ organisation_type: institution
+
+bgucl:
+ name: Bishop Grosseteste University College Lincoln
+ domain: www.bishopg.ac.uk
+ organisation_type: institution
+
+bou:
+ name: Bournemouth University
+ domain: www.bournemouth.ac.uk
+ organisation_type: institution
+
+bru:
+ name: Brunel University
+ domain: www.brunel.ac.uk
+ organisation_type: institution
+
+bnu:
+ name: Buckinghamshire New University
+ domain: www.bucks.ac.uk
+ organisation_type: institution
+
+cccu:
+ name: Canterbury Christ Church University
+ domain: www.canterbury.ac.uk
+ organisation_type: institution
+
+cmu:
+ name: Cardiff Metropolitan University
+ domain: www.cardiffmet.ac.uk
+ organisation_type: institution
+
+cu:
+ name: Cardiff University
+ domain: www.cardiff.ac.uk
+ organisation_type: institution
+
+cioa:
+ name: Courtauld Institute Of Art
+ domain: www.courtauld.ac.uk
+ organisation_type: institution
+
+cu:
+ name: Coventry University
+ domain: www.coventry.ac.uk
+ organisation_type: institution
+
+cru:
+ name: Cranfield University
+ domain: www.cranfield.ac.uk
+ organisation_type: institution
+
+dmu:
+ name: De Montfort University
+ domain: www.dmu.ac.uk
+ organisation_type: institution
+
+ehu:
+ name: Edge Hill University
+ domain: www.edgehill.ac.uk
+ organisation_type: institution
+
+enu:
+ name: Edinburgh Napier University
+ domain: www.napier.ac.uk
+ organisation_type: institution
+
+gcu:
+ name: Glasgow Caledonian University
+ domain: www.gcu.ac.uk
+ organisation_type: institution
+
+gsa:
+ name: Glasgow School Of Art
+ domain: www.gsa.ac.uk
+ organisation_type: institution
+
+gu:
+ name: Glyndwr University
+ domain: www.glyndwr.ac.uk
+ organisation_type: institution
+
+gc:
+ name: Goldsmiths' College
+ domain: www.gold.ac.uk
+ organisation_type: institution
+
+gsomad:
+ name: Guildhall School Of Music And Drama
+ domain: www.gsmd.ac.uk
+ organisation_type: institution
+
+hauc:
+ name: Harper Adams University College
+ domain: www.harper-adams.ac.uk
+ organisation_type: institution
+
+hwu:
+ name: Heriot-Watt University
+ domain: www.hw.ac.uk
+ organisation_type: institution
+
+hc:
+ name: Heythrop College
+ domain: www.heythrop.ac.uk
+ organisation_type: institution
+
+icostm:
+ name: "Imperial College Of Science, Technology And Medicine"
+ domain: www.imperial.ac.uk
+ organisation_type: institution
+
+ioeuol:
+ name: "Institute Of Education, University Of London"
+ domain: www.ioe.ac.uk
+ organisation_type: institution
+
+kcl:
+ name: King's College London
+ domain: www.kcl.ac.uk
+ organisation_type: institution
+
+ku:
+ name: Kingston University
+ domain: www.kingston.ac.uk
+ organisation_type: institution
+
+lcoa:
+ name: Leeds College Of Art
+ domain: www.leeds-art.ac.uk
+ organisation_type: institution
+
+lcom:
+ name: Leeds College Of Music
+ domain: www.lcm.ac.uk
+ organisation_type: institution
+
+lmu:
+ name: Leeds Metropolitan University
+ domain: www.leedsmet.ac.uk
+ organisation_type: institution
+
+ltuc:
+ name: Leeds Trinity University College
+ domain: www.leedstrinity.ac.uk
+ organisation_type: institution
+
+lhu:
+ name: Liverpool Hope University
+ domain: www.hope.ac.uk
+ organisation_type: institution
+
+ljmu:
+ name: Liverpool John Moores University
+ domain: www.ljmu.ac.uk
+ organisation_type: institution
+
+lbs:
+ name: London Business School
+ domain: www.london.edu
+ organisation_type: institution
+
+lmu:
+ name: London Metropolitan University
+ domain: www.londonmet.ac.uk
+ organisation_type: institution
+
+lsoeps:
+ name: London School Of Economics & Political Science
+ domain: www.lse.ac.uk
+ organisation_type: institution
+
+lsohatm:
+ name: London School Of Hygiene And Tropical Medicine
+ domain: www.lshtm.ac.uk
+ organisation_type: institution
+
+lsbu:
+ name: London South Bank University
+ domain: www.lsbu.ac.uk
+ organisation_type: institution
+
+lu:
+ name: Loughborough University
+ domain: www.lboro.ac.uk
+ organisation_type: institution
+
+mu:
+ name: Middlesex University
+ domain: www.mdx.ac.uk
+ organisation_type: institution
+
+nuc:
+ name: Newman University College
+ domain: www.newman.ac.uk
+ organisation_type: institution
+
+nsocd:
+ name: Northern School Of Contemporary Dance
+ domain: www.nscd.ac.uk
+ organisation_type: institution
+
+nucota:
+ name: Norwich University College Of The Arts
+ domain: www.nuca.ac.uk
+ organisation_type: institution
+
+ntu:
+ name: Nottingham Trent University
+ domain: www.ntu.ac.uk
+ organisation_type: institution
+
+obu:
+ name: Oxford Brookes University
+ domain: www.brookes.ac.uk
+ organisation_type: institution
+
+pa:
+ name: Prifysgol Aberystwyth
+ domain: www.aber.ac.uk
+ organisation_type: institution
+
+qmue:
+ name: "Queen Margaret University, Edinburgh"
+ domain: www.qmu.ac.uk
+ organisation_type: institution
+
+qmawcuol:
+ name: "Queen Mary And Westfield College, University Of London"
+ domain: www.qmul.ac.uk
+ organisation_type: institution
+
+rl:
+ name: Ravensbourne Limited
+ domain: www.rave.ac.uk
+ organisation_type: institution
+
+ru:
+ name: Roehampton University
+ domain: www.roehampton.ac.uk
+ organisation_type: institution
+
+rbc:
+ name: Rose Bruford College
+ domain: www.bruford.ac.uk
+ organisation_type: institution
+
+raom:
+ name: Royal Academy Of Music
+ domain: www.ram.ac.uk
+ organisation_type: institution
+
+rac:
+ name: Royal Agricultural College
+ domain: www.rac.ac.uk
+ organisation_type: institution
+
+rcom:
+ name: Royal College Of Music
+ domain: www.rcm.ac.uk
+ organisation_type: institution
+
+rcos:
+ name: Royal Conservatoire Of Scotland
+ domain: www.rcs.ac.uk
+ organisation_type: institution
+
+rhcabnc:
+ name: Royal Holloway College And Bedford New College
+ domain: www.rhul.ac.uk
+ organisation_type: institution
+
+rncom:
+ name: Royal Northern College Of Music
+ domain: www.rncm.ac.uk
+ organisation_type: institution
+
+rwcomadl:
+ name: Royal Welsh College Of Music And Drama Limited
+ domain: www.rwcmd.ac.uk
+ organisation_type: institution
+
+sooaas:
+ name: School Of Oriental And African Studies
+ domain: www.soas.ac.uk
+ organisation_type: institution
+
+shu:
+ name: Sheffield Hallam University
+ domain: www.shu.ac.uk
+ organisation_type: institution
+
+ssu:
+ name: Southampton Solent University
+ domain: www.solent.ac.uk
+ organisation_type: institution
+
+sruc:
+ name: Sruc
+ domain: www.sac.ac.uk
+ organisation_type: institution
+
+sghms:
+ name: St George's Hospital Medical School
+ domain: www.sgul.ac.uk
+ organisation_type: institution
+
+smuc:
+ name: St Mary's University College
+ domain: www.stmarys-belfast.ac.uk
+ organisation_type: institution
+
+smuct:
+ name: "St Mary's University College, Twickenham"
+ domain: www.smuc.ac.uk
+ organisation_type: institution
+
+su:
+ name: Staffordshire University
+ domain: www.staffs.ac.uk
+ organisation_type: institution
+
+suc:
+ name: Stranmillis University College
+ domain: www.stran.ac.uk
+ organisation_type: institution
+
+smu:
+ name: Swansea Metropolitan University
+ domain: www.smu.ac.uk
+ organisation_type: institution
+
+su:
+ name: Swansea University
+ domain: www.swan.ac.uk
+ organisation_type: institution
+
+tu:
+ name: Teesside University
+ domain: www.tees.ac.uk
+ organisation_type: institution
+
+taucab:
+ name: The Arts University College At Bournemouth
+ domain: www.aucb.ac.uk
+ organisation_type: institution
+
+tcsosad:
+ name: The Central School Of Speech And Drama
+ domain: www.cssd.ac.uk
+ organisation_type: institution
+
+tcu:
+ name: The City University
+ domain: www.city.ac.uk
+ organisation_type: institution
+
+tcosmasjf:
+ name: The College Of St. Mark And St. John Foundation
+ domain: www.marjon.ac.uk
+ organisation_type: institution
+
+tcfdad:
+ name: The Conservatoire For Dance And Drama
+ domain: www.cdd.ac.uk
+ organisation_type: institution
+
+tiocrrch:
+ name: "The Institute Of Cancer Research: Royal Cancer Hospital"
+ domain: www.icr.ac.uk
+ organisation_type: institution
+
+tlifpa:
+ name: The Liverpool Institute For Performing Arts
+ domain: www.lipa.ac.uk
+ organisation_type: institution
+
+tmmu:
+ name: The Manchester Metropolitan University
+ domain: www.mmu.ac.uk
+ organisation_type: institution
+
+ou:
+ name: The Open University
+ domain: www.open.ac.uk
+ organisation_type: institution
+
+qub:
+ name: The Queen's University Of Belfast
+ domain: www.qub.ac.uk
+ organisation_type: institution
+
+rgu:
+ name: The Robert Gordon University
+ domain: www.rgu.ac.uk
+ organisation_type: institution
+
+rca:
+ name: The Royal College Of Art
+ domain: www.rca.ac.uk
+ organisation_type: institution
+
+rvc:
+ name: The Royal Veterinary College
+ domain: www.rvc.ac.uk
+ organisation_type: institution
+
+tsopuol:
+ name: The School Of Pharmacy University Of London
+ domain: www.pharmacy.ac.uk
+ organisation_type: institution
+
+tuob:
+ name: The University Of Bath
+ domain: www.bath.ac.uk
+ organisation_type: institution
+
+tuobo:
+ name: The University Of Bolton
+ domain: www.bolton.ac.uk
+ organisation_type: institution
+
+tuobu:
+ name: The University Of Buckingham
+ domain: www.buckingham.ac.uk
+ organisation_type: institution
+
+tuoch:
+ name: The University Of Chichester
+ domain: www.chi.ac.uk
+ organisation_type: institution
+
+tuocu:
+ name: The University Of Cumbria
+ domain: www.cumbria.ac.uk
+ organisation_type: institution
+
+tuom:
+ name: The University Of Manchester
+ domain: www.manchester.ac.uk
+ organisation_type: institution
+
+tuon:
+ name: The University Of Northampton
+ domain: www.northampton.ac.uk
+ organisation_type: institution
+
+tuowl:
+ name: The University Of West London
+ domain: www.uwl.ac.uk
+ organisation_type: institution
+
+tuow:
+ name: The University Of Westminster
+ domain: www.westminster.ac.uk
+ organisation_type: institution
+
+tlcomadl:
+ name: Trinity Laban Conservatoire Of Music And Dance Ltd
+ domain: www.trinitylaban.ac.uk
+ organisation_type: institution
+
+ucsl:
+ name: University Campus Suffolk Ltd
+ domain: www.ucs.ac.uk
+ organisation_type: institution
+
+ucb:
+ name: University College Birmingham
+ domain: www.ucb.ac.uk
+ organisation_type: institution
+
+ucf:
+ name: University College Falmouth
+ domain: www.falmouth.ac.uk
+ organisation_type: institution
+
+ucl:
+ name: University College London
+ domain: www.ucl.ac.uk
+ organisation_type: institution
+
+uftca:
+ name: University For The Creative Arts
+ domain: www.ucreative.ac.uk
+ organisation_type: institution
+
+uoa:
+ name: University Of Aberdeen
+ domain: www.abdn.ac.uk
+ organisation_type: institution
+
+uoad:
+ name: University Of Abertay Dundee
+ domain: www.abertay.ac.uk
+ organisation_type: institution
+
+uobe:
+ name: University Of Bedfordshire
+ domain: www.beds.ac.uk
+ organisation_type: institution
+
+uobi:
+ name: University Of Birmingham
+ domain: www.birmingham.ac.uk
+ organisation_type: institution
+
+uobra:
+ name: University Of Bradford
+ domain: www.bradford.ac.uk
+ organisation_type: institution
+
+uobrig:
+ name: University Of Brighton
+ domain: www.brighton.ac.uk
+ organisation_type: institution
+
+uobris:
+ name: University Of Bristol
+ domain: www.bristol.ac.uk
+ organisation_type: institution
+
+uoc:
+ name: University Of Cambridge
+ domain: www.cam.ac.uk
+ organisation_type: institution
+
+uocl:
+ name: University Of Central Lancashire
+ domain: www.uclan.ac.uk
+ organisation_type: institution
+
+uoch:
+ name: University Of Chester
+ domain: www.chester.ac.uk
+ organisation_type: institution
+
+uod:
+ name: University Of Derby
+ domain: www.derby.ac.uk
+ organisation_type: institution
+
+uodu:
+ name: University Of Dundee
+ domain: www.dundee.ac.uk
+ organisation_type: institution
+
+uodur:
+ name: University Of Durham
+ domain: www.dur.ac.uk
+ organisation_type: institution
+
+uoea:
+ name: University Of East Anglia
+ domain: www.uea.ac.uk
+ organisation_type: institution
+
+uoel:
+ name: University Of East London
+ domain: www.uel.ac.uk
+ organisation_type: institution
+
+uoe:
+ name: University Of Edinburgh
+ domain: www.ed.ac.uk
+ organisation_type: institution
+
+uoes:
+ name: University Of Essex
+ domain: www.essex.ac.uk
+ organisation_type: institution
+
+uoex:
+ name: University Of Exeter
+ domain: www.exeter.ac.uk
+ organisation_type: institution
+
+uogpm:
+ name: University Of Glamorgan / Prifysgol Morgannwg
+ domain: www.glam.ac.uk
+ organisation_type: institution
+
+uog:
+ name: University Of Glasgow
+ domain: www.gla.ac.uk
+ organisation_type: institution
+
+uoglo:
+ name: University Of Gloucestershire
+ domain: www.glos.ac.uk
+ organisation_type: institution
+
+uogr:
+ name: University Of Greenwich
+ domain: www.greenwich.ac.uk
+ organisation_type: institution
+
+uoh:
+ name: University Of Hertfordshire
+ domain: www.herts.ac.uk
+ organisation_type: institution
+
+uohud:
+ name: University Of Huddersfield
+ domain: www.hud.ac.uk
+ organisation_type: institution
+
+uohul:
+ name: University Of Hull
+ domain: www.hull.ac.uk
+ organisation_type: institution
+
+uokee:
+ name: University Of Keele
+ domain: www.keele.ac.uk
+ organisation_type: institution
+
+uoken:
+ name: University Of Kent
+ domain: www.kent.ac.uk
+ organisation_type: institution
+
+uola:
+ name: University Of Lancaster
+ domain: www.lancs.ac.uk
+ organisation_type: institution
+
+uole:
+ name: University Of Leeds
+ domain: www.leeds.ac.uk
+ organisation_type: institution
+
+uolei:
+ name: University Of Leicester
+ domain: www.le.ac.uk
+ organisation_type: institution
+
+uoli:
+ name: University Of Lincoln
+ domain: www.lincoln.ac.uk
+ organisation_type: institution
+
+uoliv:
+ name: University Of Liverpool
+ domain: www.liv.ac.uk
+ organisation_type: institution
+
+uolo:
+ name: University Of London
+ domain: www.lon.ac.uk
+ organisation_type: institution
+
+uonut:
+ name: University Of Newcastle Upon Tyne
+ domain: www.ncl.ac.uk
+ organisation_type: institution
+
+uonan:
+ name: University Of Northumbria At Newcastle
+ domain: www.northumbria.ac.uk
+ organisation_type: institution
+
+uon:
+ name: University Of Nottingham
+ domain: www.nottingham.ac.uk
+ organisation_type: institution
+
+uoo:
+ name: University Of Oxford
+ domain: www.ox.ac.uk
+ organisation_type: institution
+
+uop:
+ name: University Of Plymouth
+ domain: www.plymouth.ac.uk
+ organisation_type: institution
+
+uopo:
+ name: University Of Portsmouth
+ domain: www.port.ac.uk
+ organisation_type: institution
+
+uor:
+ name: University Of Reading
+ domain: www.reading.ac.uk
+ organisation_type: institution
+
+uosa:
+ name: University Of Salford
+ domain: www.salford.ac.uk
+ organisation_type: institution
+
+uosh:
+ name: University Of Sheffield
+ domain: www.shef.ac.uk
+ organisation_type: institution
+
+uoso:
+ name: University Of Southampton
+ domain: www.soton.ac.uk
+ organisation_type: institution
+
+uosa:
+ name: University Of St Andrews
+ domain: www.st-andrews.ac.uk
+ organisation_type: institution
+
+uosti:
+ name: University Of Stirling
+ domain: www.stir.ac.uk
+ organisation_type: institution
+
+uostr:
+ name: University Of Strathclyde
+ domain: www.strath.ac.uk
+ organisation_type: institution
+
+uosu:
+ name: University Of Sunderland
+ domain: www.sunderland.ac.uk
+ organisation_type: institution
+
+uosur:
+ name: University Of Surrey
+ domain: www.surrey.ac.uk
+ organisation_type: institution
+
+uosus:
+ name: University Of Sussex
+ domain: www.sussex.ac.uk
+ organisation_type: institution
+
+uotal:
+ name: "University Of The Arts, London"
+ domain: www.arts.ac.uk
+ organisation_type: institution
+
+uothai:
+ name: University Of The Highlands And Islands
+ domain: www.uhi.ac.uk
+ organisation_type: institution
+
+uotwoeb:
+ name: "University Of The West Of England, Bristol"
+ domain: www.uwe.ac.uk
+ organisation_type: institution
+
+uotwos:
+ name: University Of The West Of Scotland
+ domain: www.uws.ac.uk
+ organisation_type: institution
+
+uou:
+ name: University Of Ulster
+ domain: www.ulster.ac.uk
+ organisation_type: institution
+
+uowpc:
+ name: University Of Wales Prifysgol Cymru
+ domain: www.wales.ac.uk
+ organisation_type: institution
+
+uown:
+ name: "University Of Wales, Newport"
+ domain: www.newport.ac.uk
+ organisation_type: institution
+
+uowtsd:
+ name: "University Of Wales: Trinity Saint David"
+ domain: www.trinitysaintdavid.ac.uk
+ organisation_type: institution
+
+uowa:
+ name: University Of Warwick
+ domain: www.warwick.ac.uk
+ organisation_type: institution
+
+uowi:
+ name: University Of Winchester
+ domain: www.winchester.ac.uk
+ organisation_type: institution
+
+uowol:
+ name: University Of Wolverhampton
+ domain: www.wlv.ac.uk
+ organisation_type: institution
+
+uowor:
+ name: University Of Worcester
+ domain: www.worc.ac.uk
+ organisation_type: institution
+
+uoy:
+ name: University Of York
+ domain: www.york.ac.uk
+ organisation_type: institution
+
+wc:
+ name: Writtle College
+ domain: www.writtle.ac.uk
+ organisation_type: institution
+
+ysju:
+ name: York St John University
+ domain: www.yorksj.ac.uk
+ organisation_type: institution
+
+institution_parent:
+ name: "Institution Parent"
+ domain: "www.example.com"
+ organisation_type: institution
+
+institution_child_one:
+ name: "instituiton Chile 1"
+ domain: "www.institution_child.com"
+ organisation_type: instituiton
parent: institution_parent
\ No newline at end of file
diff --git a/test/fixtures/phases.yml b/test/fixtures/phases.yml
index 5ce9407..651c759 100644
--- a/test/fixtures/phases.yml
+++ b/test/fixtures/phases.yml
@@ -1,57 +1,57 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-DCC_phase_1:
- title: "DCC Data Management Questions"
- number: 1
- dmptemplate: dcc_template
-
-ahrc_template_1:
- title: "AHRC Data Management Questions"
- number: 1
- description: "A Technical Plan should be no more than four pages long and provided for all applications where digital outputs or digital technologies are an essential part to the planned research outcomes.
"
- dmptemplate: ahrc_template
-
-bbsrc_template_1:
- title: "BBSRC Data Management Questions"
- number: 1
- description: "All applications seeking research grant funding from BBSRC must submit a statement on data sharing. This should include concise plans for data management and sharing as part of research grant proposal or provide explicit reasons why data sharing is not possible or appropriate. The “statement on data sharing” will be included as an additional page in the case for support.
"
- dmptemplate: bbsrc_template
-
-cruk_template_1:
- title: "CRUK Data Management Questions"
- number: 1
- description: "All applicants seeking funding from Cancer Research UK will be required to submit a data sharing plan as part of their research grant proposal. If data sharing is not appropriate, applicants must include a clear explanation why. The data sharing plan will be reviewed as part of the funding decision.
"
- dmptemplate: cruk_template
-
-esrc_template_1:
- title: "ESRC Data Management Questions"
- number: 1
- description: "The ESRC requires that all applicants seeking ESRC funding include a statement on data sharing in the relevant section of the Je-S application form. If data sharing is not possible, the applicant must present a strong argument to justify their case.
"
- dmptemplate: esrc_template
-
-nerc_template_1:
- title: "Outline for application"
- number: 1
- description: "NERC proposals should normally be accompanied by a Case for Support, and the length of these is specific to each scheme. In all cases this length should be increased by one page to be used for the Outline Data Management Plan.
"
- dmptemplate: nerc_template
-
-nerc_template_2:
- title: "Detail following award"
- number: 2
- description: "The Case for Support for successful proposals will be made available to the NERC Environmental Data Centres and, where appropriate, used to draft, in collaboration with the Principal Investigator, a full Data Management Plan (DMP). This full DMP should be mutually agreed between the Data Centre and the Principal Investigator within three months of the start date of the grant.
"
- dmptemplate: nerc_template
-
-mrc_template_1:
- title: "MRC Data Management Questions"
- number: 1
- dmptemplate: mrc_template
-
-stfc_template_1:
- title: "STFC Data Management Questions"
- number: 1
- dmptemplate: stfc_template
-
-wellcome_template_1:
- title: "Wellcome Trust Data Management Questions"
- number: 1
- dmptemplate: wellcome_template
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+DCC_phase_1:
+ title: "DCC Data Management Questions"
+ number: 1
+ dmptemplate: dcc_template
+
+ahrc_template_1:
+ title: "AHRC Data Management Questions"
+ number: 1
+ description: "A Technical Plan should be no more than four pages long and provided for all applications where digital outputs or digital technologies are an essential part to the planned research outcomes.
"
+ dmptemplate: ahrc_template
+
+bbsrc_template_1:
+ title: "BBSRC Data Management Questions"
+ number: 1
+ description: "All applications seeking research grant funding from BBSRC must submit a statement on data sharing. This should include concise plans for data management and sharing as part of research grant proposal or provide explicit reasons why data sharing is not possible or appropriate. The “statement on data sharing” will be included as an additional page in the case for support.
"
+ dmptemplate: bbsrc_template
+
+cruk_template_1:
+ title: "CRUK Data Management Questions"
+ number: 1
+ description: "All applicants seeking funding from Cancer Research UK will be required to submit a data sharing plan as part of their research grant proposal. If data sharing is not appropriate, applicants must include a clear explanation why. The data sharing plan will be reviewed as part of the funding decision.
"
+ dmptemplate: cruk_template
+
+esrc_template_1:
+ title: "ESRC Data Management Questions"
+ number: 1
+ description: "The ESRC requires that all applicants seeking ESRC funding include a statement on data sharing in the relevant section of the Je-S application form. If data sharing is not possible, the applicant must present a strong argument to justify their case.
"
+ dmptemplate: esrc_template
+
+nerc_template_1:
+ title: "Outline for application"
+ number: 1
+ description: "NERC proposals should normally be accompanied by a Case for Support, and the length of these is specific to each scheme. In all cases this length should be increased by one page to be used for the Outline Data Management Plan.
"
+ dmptemplate: nerc_template
+
+nerc_template_2:
+ title: "Detail following award"
+ number: 2
+ description: "The Case for Support for successful proposals will be made available to the NERC Environmental Data Centres and, where appropriate, used to draft, in collaboration with the Principal Investigator, a full Data Management Plan (DMP). This full DMP should be mutually agreed between the Data Centre and the Principal Investigator within three months of the start date of the grant.
"
+ dmptemplate: nerc_template
+
+mrc_template_1:
+ title: "MRC Data Management Questions"
+ number: 1
+ dmptemplate: mrc_template
+
+stfc_template_1:
+ title: "STFC Data Management Questions"
+ number: 1
+ dmptemplate: stfc_template
+
+wellcome_template_1:
+ title: "Wellcome Trust Data Management Questions"
+ number: 1
+ dmptemplate: wellcome_template
diff --git a/test/fixtures/plan_sections.yml b/test/fixtures/plan_sections.yml
index 3c7cecd..b5a70f5 100644
--- a/test/fixtures/plan_sections.yml
+++ b/test/fixtures/plan_sections.yml
@@ -1,15 +1,15 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# edit: false
-# at: 2013-06-11 15:17:04
-# user_editing_id: 1
-# section_id: 1
-# plan_id: 1
-#
-#two:
-# edit: false
-# at: 2013-06-11 15:17:04
-# user_editing_id: 1
-# section_id: 1
-# plan_id: 1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# edit: false
+# at: 2013-06-11 15:17:04
+# user_editing_id: 1
+# section_id: 1
+# plan_id: 1
+#
+#two:
+# edit: false
+# at: 2013-06-11 15:17:04
+# user_editing_id: 1
+# section_id: 1
+# plan_id: 1
diff --git a/test/fixtures/plans.yml b/test/fixtures/plans.yml
index 6b91b54..6b64ebd 100644
--- a/test/fixtures/plans.yml
+++ b/test/fixtures/plans.yml
@@ -1,11 +1,11 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# locked: false
-# project_id: 1
-# version_id: 1
-#
-#two:
-# locked: false
-# project_id: 1
-# version_id: 1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# locked: false
+# project_id: 1
+# version_id: 1
+#
+#two:
+# locked: false
+# project_id: 1
+# version_id: 1
diff --git a/test/fixtures/project_groups.yml b/test/fixtures/project_groups.yml
index 8130ab8..d0dd7b2 100644
--- a/test/fixtures/project_groups.yml
+++ b/test/fixtures/project_groups.yml
@@ -1,21 +1,21 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# project_creator: false
-# project_editor: false
-# user_id: 1
-# project_id: 1
-#
-#two:
-# project_creator: false
-# project_editor: false
-# user_id: 1
-# project_id: 1
-
-<% 4.times do |n| %>
- many_projects_group_<%= n + 1 %>:
- project_creator: true
- project_editor: true
- user: with_many_projects
- project: test_plan<%= "_#{n + 1}" if n > 0 %>
-<% end %>
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# project_creator: false
+# project_editor: false
+# user_id: 1
+# project_id: 1
+#
+#two:
+# project_creator: false
+# project_editor: false
+# user_id: 1
+# project_id: 1
+
+<% 4.times do |n| %>
+ many_projects_group_<%= n + 1 %>:
+ project_creator: true
+ project_editor: true
+ user: with_many_projects
+ project: test_plan<%= "_#{n + 1}" if n > 0 %>
+<% end %>
diff --git a/test/fixtures/projects.yml b/test/fixtures/projects.yml
index fc60a74..5218482 100644
--- a/test/fixtures/projects.yml
+++ b/test/fixtures/projects.yml
@@ -1,26 +1,26 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-#two:
-# title: MyString
-# note: MyText
-# locked: false
-# dmptemplate_id: 1
-
-test_plan:
- title: "AHRC Template project"
- dmptemplate: ahrc_template
- organisation: ahrc
-
-test_plan_2:
- title: "AHRC Template second project"
- dmptemplate: ahrc_template_2
- organisation: ahrc
-
-test_plan_3:
- title: "DCC Template project"
- dmptemplate: dcc_template
- organisation: dcc
-
-test_plan_4:
- title: "DMP Template project"
- dmptemplate: dmp_template
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+#two:
+# title: MyString
+# note: MyText
+# locked: false
+# dmptemplate_id: 1
+
+test_plan:
+ title: "AHRC Template project"
+ dmptemplate: ahrc_template
+ organisation: ahrc
+
+test_plan_2:
+ title: "AHRC Template second project"
+ dmptemplate: ahrc_template_2
+ organisation: ahrc
+
+test_plan_3:
+ title: "DCC Template project"
+ dmptemplate: dcc_template
+ organisation: dcc
+
+test_plan_4:
+ title: "DMP Template project"
+ dmptemplate: dmp_template
organisation: dcc
\ No newline at end of file
diff --git a/test/fixtures/questions.yml b/test/fixtures/questions.yml
index 955e6ae..a730517 100644
--- a/test/fixtures/questions.yml
+++ b/test/fixtures/questions.yml
@@ -1,746 +1,746 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#Administrative Data
-
-related_policies:
- text: "Related Policies:"
- guidance: " Are there any existing procedures that you will base your approach on? Does your department/group have data management guidelines? Does your institution have a data protection or security policy that you will follow? - Does your institution have a Research Data Management (RDM) policy? Does your funder have a Research Data Management policy? Are there any formal standards that you will adopt? List any other relevant funder, institutional, departmental or group policies on data management, data sharing and data security. Some of the information you give in the remainder of the DMP will be determined by the content of other policies. If so, point/link to them here.
"
- number: 1
- section: administrative_data
- themes: related_policies
-
-#Data Collection
-
-what_data_will_you_collect_or_create:
- text: What data will you collect or create?
- guidance: " What type, format and volume of data? Do your chosen formats and software enable sharing and long-term access to the data? Are there any existing data that you can reuse? Give a brief description of the data, including any existing data or third-party sources that will be used, in each case noting its content, type and coverage. Outline and justify your choice of format and consider the implications of data format and data volumes in terms of storage, backup and access.
"
- number: 1
- section: data_collection
- themes: data_format, data_volumes, data_type, existing_data, description_of_data_content
-
-how_will_the_data_be_collected_or_created:
- text: How will the data be collected or created?
- guidance: " What standards or methodologies will you use? How will you structure and name your folders and files? How will you handle versioning? What quality assurance processes will you adopt? Outline how the data will be collected/created and which community data standards (if any) will be used. Consider how the data will be organised during the project, mentioning for example naming conventions, version control and folder structures. Explain how the consistency and quality of data collection will be controlled and documented. This may include processes such as calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.
"
- number: 2
- section: data_collection
- themes: data_capture_methods, data_quality
-
-#Documentation and Metadata
-
-what_documentation_and_metadata_will_acompany_the_data:
- text: What documentation and metadata will acompany the data?
- guidance: " What information is needed for the data to be to be read and interpreted in the future? How will you capture / create this documentation and metadata? What metadata standards will you use and why? Describe the types of documentation that will accompany the data to help secondary users to understand and reuse it. This should at least include basic details that will help people to find the data, including who created or contributed to the data, its title, date of creation and under what conditions it can be accessed.
Documentation may also include details on the methodology used, analytical and procedural information, definitions of variables, vocabularies, units of measurement, any assumptions made, and the format and file type of the data. Consider how you will capture this information and where it will be recorded. Wherever possible you should identify and use existing community standards.
"
- number: 1
- section: documentation_and_metadata
- themes: metadata_capture, documentation, metadata_standards
-
-#Ethics and Legal Compliance
-
-how_will_you_manage_any_ethical_issues:
- text: How will you manage any ethical issues?
- guidance: " Have you gained consent for data preservation and sharing? How will you protect the identity of participants if required? e.g. via anonymisation How will sensitive data be handled to ensure it is stored and transferred securely? Ethical issues affect how you store data, who can see/use it and how long it is kept. Managing ethical concerns may include: anonymisation of data; referral to departmental or institutional ethics committees; and formal consent agreements. You should show that you are aware of any issues and have planned accordingly. If you are carrying out research involving human participants, you must also ensure that consent is requested to allow data to be shared and reused.
"
- number: 1
- section: ethics_and_legal_compliance
- themes: ethical_issues, data_security
-
-how_will_you_manage_copyright_and_intellectual_property_rights_ipr_issues:
- text: How will you manage copyright and Intellectual Property Rights (IPR) issues?
- guidance: " Who owns the data? How will the data be licensed for reuse? Are there any restrictions on the reuse of third-party data? Will data sharing be postponed / restricted e.g. to publish or seek patents? State who will own the copyright and IPR of any data that you will collect or create, along with the licence(s) for its use and reuse. For multi-partner projects, IPR ownership may be worth covering in a consortium agreement. Consider any relevant funder, institutional, departmental or group policies on copyright or IPR. Also consider permissions to reuse third-party data and any restrictions needed on data sharing.
"
- number: 2
- section: ethics_and_legal_compliance
- themes: licensing_of_existing_data, ipr_ownership_and_licencing
-
-#Storage and Backup
-
-how_will_the_data_be_stored_and_backed_up_during_the_research:
- text: How will the data be stored and backed up during the research?
- guidance: " Do you have sufficient storage or will you need to include charges for additional services? How will the data be backed up? Who will be responsible for backup and recovery? How will the data be recovered in the event of an incident? State how often the data will be backed up and to which locations. How many copies are being made? Storing data on laptops, computer hard drives or external storage devices alone is very risky. The use of robust, managed storage provided by university IT teams is preferable. Similarly, it is normally better to use automatic backup services provided by IT Services than rely on manual processes. If you choose to use a third-party service, you should ensure that this does not conflict with any funder, institutional, departmental or group policies, for example in terms of the legal jurisdiction in which data are held or the protection of sensitive data.
"
- number: 1
- section: storage_and_backup
- themes: active_data_storage, backup_procedures
-
-how_will_you_manage_access_and_security:
- text: How will you manage access and security?
- guidance: " What are the risks to data security and how will these be managed? How will you control access to keep the data secure? How will you ensure that collaborators can access your data securely? If creating or collecting data in the field how will you ensure its safe transfer into your main secured systems? If your data is confidential (e.g. personal data not already in the public domain, confidential information or trade secrets), you should outline any appropriate security measures and note any formal standards that you will comply with e.g. ISO 27001."
"
- number: 2
- section: storage_and_backup
- themes: data_security, managed_access_procedures
-
-#Selection and Preservation
-
-which_data_are_of_long-term_value_and_should_be_retained_shared_and-or_preserved:
- text: Which data are of long-term value and should be retained, shared, and/or preserved?
- guidance: " What data must be retained/destroyed for contractual, legal, or regulatory purposes? How will you decide what other data to keep? What are the foreseeable research uses for the data? How long will the data be retained and preserved? Consider how the data may be reused e.g. to validate your research findings, conduct new studies, or for teaching. Decide which data to keep and for how long. This could be based on any obligations to retain certain data, the potential reuse value, what is economically viable to keep, and any additional effort required to prepare the data for data sharing and preservation. Remember to consider any additional effort required to prepare the data for sharing and preservation, such as changing file formats.
"
- number: 1
- section: selection_and_preservation
- themes: data_selection
-
-what_is_the_long-term_preservation_plan_for_the_dataset:
- text: What is the long-term preservation plan for the dataset?
- guidance: " Where e.g. in which repository or archive will the data be held? What costs if any will your selected data repository or archive charge? Have you costed in time and effort to prepare the data for sharing / preservation? Consider how datasets that have long-term value will be preserved and curated beyond the lifetime of the grant. Also outline the plans for preparing and documenting data for sharing and archiving. If you do not propose to use an established repository, the data management plan should demonstrate that resources and systems will be in place to enable the data to be curated effectively beyond the lifetime of the grant.
"
- number: 2
- section: selection_and_preservation
- themes: preservation_plan
-
-#Data Sharing
-
-how_will_you_share_the_data:
- text: How will you share the data?
- guidance: " How will potential users find out about your data? With whom will you share the data, and under what conditions? Will you share data via a repository, handle requests directly or use another mechanism? When will you make the data available? Will you pursue getting a persistent identifier for your data? Consider where, how, and to whom data with acknowledged long-term value should be made available. The methods used to share data will be dependent on a number of factors such as the type, size, complexity and sensitivity of data. If possible, mention earlier examples to show a track record of effective data sharing. Consider how people might acknowledge the reuse of your data.
"
- number: 1
- section: data_sharing
- themes: method_for_data_sharing
-
-are_any_restrictions_on_data_sharing_required:
- text: Are any restrictions on data sharing required?
- guidance: " What action will you take to overcome or minimise restrictions? For how long do you need exclusive use of the data and why? Will a data sharing agreement (or equivalent) be required? Outline any expected difficulties in sharing data with acknowledged long-term value, along with causes and possible measures to overcome these. Restrictions may be due to confidentiality, lack of consent agreements or IPR, for example. Consider whether a non-disclosure agreement would give sufficient protection for confidential data.
"
- number: 2
- section: data_sharing
- themes: restrictions_on_sharing, embargo_period
-
-#Responsibilities and Resources
-
-who_will_be_responsible_for_data_management:
- text: Who will be responsible for data management?
- guidance: " Who is responsible for implementing the DMP, and ensuring it is reviewed and revised? Who will be responsible for each data management activity? How will responsibilities be split across partner sites in collaborative research projects? Will data ownership and responsibilities for RDM be part of any consortium agreement or contract agreed between partners? Outline the roles and responsibilities for all activities e.g. data capture, metadata production, data quality, storage and backup, data archiving & data sharing. Consider who will be responsible for ensuring relevant policies will be respected. Individuals should be named where possible.
"
- number: 1
- section: responsibilities_and_resources
- themes: responsibilities
-
-what_resources_will_you_require_to_deliver_your_plan:
- text: What resources will you require to deliver your plan?
- guidance: " Is additional specialist expertise (or training for existing staff) required? Do you require hardware or software which is additional or exceptional to existing institutional provision? Will charges be applied by data repositories? Carefully consider any resources needed to deliver the plan, e.g. software, hardware, technical expertise, etc. Where dedicated resources are needed, these should be outlined and justified.
"
- number: 2
- section: responsibilities_and_resources
- themes: resourcing_skills_and_training, resourcing_hardware_and_software, resourcing_preservation_and_data_sharing
-
-#Multiple Choice
-
-#single_select_box:
-# text: Example select box limited to one option
-# number: 1
-# section: multiple_choice
-#
-#multiple_select_box:
-# text: Example select box allowing multiple options
-# number: 2
-# section: multiple_choice
-#
-#radio_button:
-# text: Example radio button
-# number: 3
-# section: multiple_choice
-#
-#checkbox:
-# text: Example checkbox
-# number: 4
-# section: multiple_choice
-
-ahrc_1_1:
- text: Summary of Digital Outputs and Digital Technologies
- guidance: "You should provide a brief and clear description of the digital output or digital technology being proposed, considering the following aspects: purpose, source data, content, functionality, use and its relationship to the research questions. You should identify the type of access envisaged, if applicable, such as 'freely available online'.
The summary should provide clear overview of what you intend to achieve technically, to enable reviewers to assess whether the plans for achieving this are appropriate. You should provide a level of detail which is appropriate to the digital output or digital technology being proposed and its cost and status within the project.
"
- number: 1
- section: ahrc_1
- themes: description_of_data_content, method_for_data_sharing
-
-ahrc_2_1:
- text: "Technical Methodology: Standards and Formats"
- guidance: "You should provide information about your choice of data and file formats. You must provide any relevant vital statistics relating to the data, such as size, quantity and duration. Although such statistics might need to rely on estimation, you should provide the reasoning behind your calculations. You should give your reasons for using the standards or formats chosen.
"
- number: 1
- section: ahrc_2
- themes: data_format, data_volumes, data_type
-
-ahrc_2_2:
- text: "Technical Methodology: Hardware and Software"
- guidance: "
You should provide information about and the rationale for any hardware or software which will be used to support the project’s research methodology, which is additional or exceptional to conventional desk-based research and institutional provision. They should be included in the Justification of Resources and cross-referenced if there is an associated budget line. Where necessary you should produce additional justification of the use of such items.
You must write ‘Not applicable’ if this section is not relevant to the type of digital output or digital technology proposed.
"
- number: 2
- section: ahrc_2
- themes: resourcing_hardware_and_software
-
-ahrc_2_3:
- text: "Technical Methodology Data Acquisition, Processing, Analysis and Use"
- guidance: "You should provide information about the process of technical development, showing how the standards and formats described in section 2.a and the hardware and software described in section 2.b relate to each other. You must show that you have considered how you will achieve your digital output or digital technology in practice, including issues of timetabling.
You should consider the technical development process from the point of data capture or data creation through to final delivery (in the case of a digital output) or analysis (in the case of a digital process). You should consider issues such as backup, monitoring, quality control and internal documentation where relevant, identifying procedures which are appropriate to the research environment. For example Technical Reviewers acknowledge that the backup procedures which are possible during fieldwork might be very different to those which are possible within an office environment.
This section needs to relate to the timetable and milestones given in the Case for Support as well as the project’s overall research methodology. The Technical Reviewer will be assessing the alignment of the technical development process with other project activities for logic and timeliness.
"
- number: 3
- section: ahrc_2
- themes: data_capture_methods, data_quality, data_organisation, documentation, metadata_capture, metadata_standards, backup_procedures
-
-ahrc_3_1:
- text: "Technical Support and Relevant Experience"
- guidance: ""
- number: 1
- section: ahrc_3
- themes: resourcing_skills_and_training, responsibilities
-
-ahrc_4_1:
- text: "Preserving Your Data"
- guidance: "Preservation of digital outputs is necessary in order for them to endure changes in the technological environment and remain potentially re-usable in the future. In this section you must state what, if any, digital outputs of your project you intend to preserve beyond the period of funding.
The length and cost of preservation should be proportionate to the value and significance of the digital outputs. If you believe that none of these should be preserved this must be justified, and if the case is a good one the application will not be prejudiced.
You must consider preservation in four ways: what, where, how and for how long. You must also consider any institutional support needed in order to carry out these plans, whether from an individual, facility, organisation or service.
You should think about the possibilities for re-use of your data in other contexts and by other users, and connect this as appropriate with your plans for dissemination and Pathways to Impact.Where there is potential for re-usability, you should use standards and formats that facilitate this.
The Technical Reviewer will be looking for evidence that you understand the reasons for the choice of technical standards and formats described in Section 2.a Technical Methodology: Standards and Formats.
You should describe the types of documentation which will accompany the data. Documentation in this sense means technical documentation as well as user documentation. It includes, for instance, technical description, code commenting, project-build guidelines, the documentation of technical decisions and resource metadata which is additional to the standards which you have described in Section 2.a. Not all types of documentation will be relevant to a project and the quantity of documentation proposed should be proportionate to the envisaged value of the data.
"
- number: 1
- section: ahrc_4
- themes: preservation_plan, period_of_preservation, resourcing_preservation_and_data_sharing, documentation
-
-ahrc_4_2:
- text: "Ensuring Continued Accessibility and Use of Your Digital Outputs"
- guidance: "In this section you must provide information about any plans for ensuring that digital outputs remain sustainable in the sense of immediately accessible and usable beyond the period of funding. There are costs to ensuring sustainability in this sense over and above the costs of preservation. The project's sustainability plan should therefore be proportionate to the envisaged longer-term value of the data for the research community and should be closely related to your plans for dissemination and Pathways to Impact.
If you believe that digital outputs should not be sustained beyond the period of funding then this should be justified. It is not mandatory to sustain all digital outputs. While you should consider the long-term value of the digital outputs to the research community, where they are purely ancillary to a project’s research outputs there may not be a case for sustaining them (though there would usually be a case for preservation).
You must consider the sustainability of your digital outputs in five ways: what, where, how, for how long, and how the cost will be covered. You must make appropriate provision for user consultation and user testing in this connection, and plan the development of suitable user documentation.
You should provide justification if you do not envisage open, public access. A case can be made for charging for or otherwise limiting access, but the default expectation is that access will be open. The Technical Reviewer will be looking for realistic commitments to sustaining public access in line with affordability and the longer-term value of the digital output.
You must consider any institutional support needed in order to carry out these plans, if not covered under Section 3, as well as the cost of keeping the digital output publicly available in the future, including issues relating to maintenance, infrastructure and upgrade (such as the need to modify aspects of a web interface or software application in order to account for changes in the technological environment). In order to minimise sustainability costs, it is generally useful that the expertise involved in the development of your project is supported by expertise in your own or a partner institution.
A sustainability plan does not necessarily mean a requirement to generate income or prevent resources from being freely available. Rather it is a requirement to consider the direct costs and expertise of maintaining digital outputs for continued access. Some applicants might be able to demonstrate that there will be no significant sustainability problems with their digital output; in some cases the university’s computing services or library might provide a firm commitment to sustaining the resource for a specified period; others might see the benefit of Open Source community development models. You should provide reassurances of sustainability which are proportionate to the envisaged longer-term value of the digital outputs for the research community.
When completing this section, you should consider the potential impact of the data on research in your field (if research in the discipline will be improved through the creation of the digital output, how will it be affected if the resource then disappears?), and make the necessary connections with your Impact Plan. You must factor in the effects of any IP, copyright and ethical issues during the period in which the digital output will be publicly accessible, connecting what you say with the relevant part of your Case for Support.
You must identify whether or not you envisage the academic content (as distinct from the technology) of the digital output being extended or updated beyond the period of funding, addressing the following issues: how this will be done, by who and at what cost. You will need to show how the cost of this will be sustained after the period of funding ends.
"
- number: 2
- section: ahrc_4
- themes: resourcing_preservation_and_data_sharing, managed_access_procedures, data_repository, method_for_data_sharing, timeframe_for_data_sharing
-
-bbsrc_1_1:
- text: "Data areas and data types - the volume, type and content of data that will be generated e.g. experimental measurements, models, records and images"
- guidance: "BBSRC recognises that effective data sharing is already practiced in certain areas and expects this to continue. BBSRC supports, either directly or indirectly, a number of such resources. Data sharing in other areas is also expected where there is a strong scientific case and where it is cost effective.
BBSRC has identified a number of areas where there is a particularly strong scientific case for data sharing. These are:
Data arising from high volume experimentation Low throughput data arising from long time series or cumulative approaches Models generated using systems approaches BBSRC expects data sharing to take place in these areas."
- number: 1
- section: bbsrc_1
- themes: description_of_data_content, data_type, data_volumes
-
-bbsrc_2_1:
- text: "Standards and metadata - the standards and methodologies that will be adopted for data collection and management, and why these have been selected"
- guidance: "Standards are fundamental to effective data sharing. These can include standards for administrative processes, as well as for methodologies relating to data management and data formats. Researchers are expected to make use of current guidance and information on best practice.
It is expected that, in order to maximise the potential for re-use of data, BBSRC researchers should generate and manage data using existing widely accepted formats and methodologies where available. Data released for sharing should be validated and verified in line with accepted best practice and be of high quality. Data should be accompanied by the contextual information or documentation (metadata) needed to provide a secondary user with any necessary details on the origin or manipulation of the data in order to prevent any misuse, misinterpretation or confusion. Where standards for metadata exist, it is expected that these should be adhered to.
BBSRC encourages community development of standards where these do not currently exist or are not widely accepted and provides funding mechanisms for support of this type of activity.
"
- number: 1
- section: bbsrc_2
- themes: data_format, metadata_standards, data_quality, documentation
-
-bbsrc_3_1:
- text: "Relationship to other data available in public repositories"
- guidance: ""
- number: 1
- section: bbsrc_3
- themes: existing_data, relationship_to_existing data, licensing_of_existing data
-
-bbsrc_4_1:
- text: "Secondary use - further intended and/or foreseeable research uses for the completed dataset(s)"
- guidance: "BBSRC supports the view that those enabling sharing should receive full and appropriate recognition by funders, their academic institutions and new users for promoting secondary research.
Where data are shared through a third party resource or databases, secondary users should acknowledge the source of data. Where data are shared directly from the originator, depending on the level of usage and collaboration either joint authorship or acknowledgement to the data originator may be appropriate. It is also important to ensure that researchers and their research institutions are protected against claims that application of their data led to wrong conclusions/decisions by others: any use made of any data generated by third parties would not come with a warranty of its quality.
Furthermore, BBSRC expects that researchers accessing data have responsibilities to preserve data confidentiality and to observe the ethical and legal obligations pertaining to the data.
"
- number: 1
- section: bbsrc_4
- themes: expected_reuse, audience
-
-bbsrc_5_1:
- text: "Methods for data sharing - planned mechanisms for making these data available, e.g. through deposition in existing public databases or on request, including access mechanisms where appropriate"
- guidance: "BBSRC recognises that different approaches to data sharing will be required in different situations and considers that it is most appropriate for researchers to determine their own strategies for data sharing and outline these within their research grant proposal(s). Applicants should consider where, how, and to whom their data should be made available.
In addition, data sharing practices will change as areas of research develop and become more mature. This can be observed by looking at the areas of sequencing (i.e. well established mechanisms in place), microarrays (i.e. standards developed and being implemented) and systems biology (i.e. databases currently not well developed). Consideration should be given to what constitutes good practice in emerging areas of research.
It is expected that data sharing strategies will fall into the two broad categories below.
Data sharing via deposition in an existing database, repository or other community resource is expected where possible and researchers are encouraged to share data through mechanisms affording the widest availability for generating added value and enabling re-use.
Researchers are encouraged to use existing infrastructure to facilitate data sharing where possible. BBSRC funds or otherwise supports a number of such resources. Where no such resources exist, applicants may consider sharing data via other third party mechanisms such as journal websites and / or open access repositories, many of which are now able to capture and share data underpinning publications.
This method of data sharing may be appropriate for areas where suitable third party mechanisms are not available. Researchers are expected to ensure that data are maintained for a period of 10 years after the completion of the research project in suitable accessible formats using established standards where possible such that the data can be made available on request in line with BBSRC guidance on good scientific practice. This may lead to collaboration between the new user and the original data creators, with the responsibilities and rights of all parties agreed at the outset.
Other mechanisms for data sharing may be used where appropriate. These could include sharing data within closed communities or a combination of methods for different datasets. Specific access mechanisms could be appropriate for example where there are ethical considerations, a need to protect confidential data, or other reasons for limiting access.
"
- number: 1
- section: bbsrc_5
- themes: discovery_by_users, method_for_data_sharing, managed_access_procedures, data_repository
-
-bbsrc_6_1:
- text: "Proprietary data - any restrictions on data sharing due to the need to protect proprietary or patentable data"
- guidance: "In instances where BBSRC and a commercial partner jointly fund academic research work (for example LINK projects) there may be some restrictions over releasing data. Any such restrictions on data sharing due to co-funding arrangements should be set out in the “statement on data sharing” section of an application and will be considered when a grant application is peer reviewed. Applicants should also ensure they have obtained necessary clearances from relevant collaborators with regards to the content of the proposal including the data sharing plan in line with the BBSRC Research Grants Guide.
"
- number: 1
- section: bbsrc_6
- themes: ipr_ownership_and_licencing, restrictions_on_sharing
-
-bbsrc_7_1:
- text: "Timeframes - timescales for public release of data"
- guidance: "The value of data often depends on timeliness. Researchers have a legitimate interest in benefiting from their own time and effort in producing data, but not in prolonged exclusive use of these data. BBSRC expects that all data (with accompanying metadata) should be shared in a timely fashion as soon as it is verified. It is expected that timely release would generally be no later than the release through publication of the main findings and should be in-line with established best practice in the field. Where best practices does not exist release within three years of generation of the dataset is suggested as a guide.
The timescale for release for the data may differ for several reasons, depending on the nature of the data. These reasons may include:
Scientific Area: Researchers are expected to make data available in-line with established practices within the relevant research community. Examples include: Crystallography (Protein Data Bank) - the community has agreed a maximum 12-month delay between publishing the first paper on a structure and making coordinates public for secondary use. Sequencing (EMBL Nucleotide Sequence database) – submitted data can be withheld from public access until publication of results but no later. Metabolomics (MeT-RO) – Up to a six-month delay in publication can be requested. Arabidopsis microarray data (NASC Affymetrix service) – all data are made available after a maximum one-year confidential period. Intellectual Property (IP) issues and potential for commercialisation of research outputs: New knowledge generates patentable ideas. BBSRC is also driving a policy of Knowledge Transfer and strongly encourages the commercialisation of IP through various initiatives. BBSRC recognises the need for periods of exclusive use of data but considers that commercialisation of research does not preclude data sharing and should not unduly delay or prevent data sharing. Any IP issues or plans for commercialisation should be highlighted in the case for support of the grant application. Length or scope of research project: Data from large studies may be released in waves as they become available or as they are published. "
- number: 1
- section: bbsrc_7
- themes: timeframe_for_data_sharing
-
-bbsrc_8_1:
- text: "Format of the final dataset"
- guidance: ""
- number: 1
- section: bbsrc_8
- themes: data_format
-
-cruk_1_1:
- text: "The volume, type, content and format of the final dataset"
- guidance: ""
- number: 1
- section: cruk_1
- themes: description_of_data_content, data_format, data_volumes, data_type
-
-cruk_2_1:
- text: "The standards that will be utilised for data collection and management"
- guidance: ""
- number: 1
- section: cruk_2
- themes: data_capture_methods, metadata_standards
-
-cruk_3_1:
- text: "The metadata, documentation or other supporting material that should accompany the data for it to be interpreted correctly"
- guidance: "For data sharing to be a success it is important that data are prepared in such a way that those using the dataset have a clear understanding of what the data mean so that they can be used appropriately. To enable this, applicants are encouraged to include with the dataset all the necessary information (metadata) describing the data and their format. This information should include such information as the methodology used to collect data, definitions of variables, units of measurement, any assumptions made, the format of the data, file type of the data etc. To support this researchers are strongly encouraged to utilise community standards to describe and structure data, (e.g. common terminology, minimum information guidelines and standard data exchange formats).
"
- number: 1
- section: cruk_3
- themes: documentation, metadata_capture, data_quality
-
-cruk_4_1:
- text: "The method used to share data"
- guidance: "The methods used to share data will be dependent on a number of factors such as the type, size, complexity and sensitivity of data. Data can be shared by any of the following methods:
Investigators sharing under their own auspices may securely send data to a requestor, or upload the data to their institutional website. Investigators should consider using a data-sharing agreement (see below) to impose appropriate limitations on the secondary use of the data.
Through a third party
Investigators can share their data by transferring it to a data archive facility to distribute more widely to the scientific community, to maintain documentation and meet reporting requirements. Data archives are particularly attractive for investigators concerned about managing a large volume of requests for data, vetting frivolous or inappropriate requests, or providing technical assistance for users seeking to help with analyses.
Datasets that cannot be distributed to the general public due to confidentially concerns, or third-party licensing or use agreements that prohibit redistribution, can be accessed through a data enclave. A data enclave provides a controlled secure environment in which eligible researchers can perform analyses using restricted data resources.
Investigators may wish to share their data by a combination of the above methods or in different versions, in order to control the level of access permitted.
"
- number: 1
- section: cruk_4
- themes: discovery_by_users, method_for_data_sharing, data_repository
-
-cruk_5_1:
- text: "The timescale for public release of data"
- guidance: "As the value of data is often dependent on its timeliness Cancer Research UK expects that data sharing should occur in a timely manner. Cancer Research UK acknowledges that the investigators who generated the data have a legitimate interest in benefiting from their investment of time and effort and we therefore support the initial investigator having a reasonable period of private use of the data but not prolonged exclusive use.
Cancer Research UK expects data to be released no later than the acceptance for publication of the main findings from the final dataset (unless restrictions from third party agreements or IP protection still apply) or on a timescale in line with the procedures of the relevant research area. For example, for crystallography data there is an agreed 12-month delay between publishing the first paper on a structure and making the co-ordinates public.
With experiments carried out over an extended period of time, (e.g. population based studies), it is reasonable to expect that subsets of data analysed by the investigator(s) be made available for sharing. The investigator(s) can then continue to benefit from further reasonable periods of exclusive analysis while the dataset as a whole matures.
"
- number: 1
- section: cruk_5
- themes: timeframe_for_data_sharing
-
-cruk_6_1:
- text: "The long-term preservation plan for the dataset"
- guidance: "Once the funding for a project has ceased researchers should preserve all data resulting from that grant to ensure that data can be used for follow-up or new studies. Cancer Research UK expects that data be preserved and available for sharing with the science community for a minimum period of five years following the end of a research grant.
"
- number: 1
- section: cruk_6
- themes: preservation_plan
-
-cruk_7_1:
- text: "Whether a data sharing agreement will be required"
- guidance: " To ensure that data are used appropriately investigators may consider implementing a data sharing agreement that indicates the criteria for data access and conditions for research use. This can ensure the responsibilities of both parties, along with intellectual property, citation and publication rights are agreed at the outset. It may incorporate privacy and confidentiality standards, as needed, to ensure data security at the recipient site and prohibit manipulation of data. For further guidance on managing data access and the development of data sharing agreements please refer to the 'Samples and Data for Cancer Research: Template for Access Policy Development' document available from the NCRI website.
As a minimum, researchers using shared data are expected to acknowledge the investigators who generated the data upon which any published findings are based. When both parties have collaborated using a shared dataset, co-authorship on publications may be more appropriate. Researchers using shared data are also expected to acknowledge Cancer Research UK for supporting the original study.
"
- number: 1
- section: cruk_7
- themes: managed_access_procedures
-
-cruk_8_1:
- text: "Any reasons why there may be restrictions on data sharing?"
- guidance: "Data which might have the potential to be exploited commercially or otherwise to deliver patient benefit should be discussed with your technology transfer office and Cancer Research Technology prior to data sharing. Cancer Research UK encourages the appropriate filing of patents and recognises that there may be a need to delay the release of data until patent applications have been filed. Whilst there may be a delay in the release of data due to the application process, appropriate intellectual property protection should not hinder data sharing and may be the best way of ensuring that patient (and public) benefit is delivered. Any intellectual property issues or plans for commercialisation that may affect data sharing should be addressed in the data sharing plan. Cancer Research UK understands that unexpected intellectual property may arise during the course of the study and investigators may need to depart from their data sharing plan to protect intellectual property and for any other necessary steps to be taken. Data sharing may also be affected when co-funding is provided by the private sector (e.g. by a pharmaceutical company) or host institution resulting in some restrictions on the disclosure of data. For example with clinical trials, the Trial Management Group and/or trial sponsor etc may impose restrictions on data access. Any restrictions should be outlined in the data sharing plan and applicants should explore ways data sharing requests can be considered by the body that owns the data.
My research seeks supports from both the public and private sectors. How do I deal with the sharing of data? Where research is funded by a commercial sponsor, restrictions on data sharing may apply in arrangements agreed with the sponsor. Any such restriction(s) should be highlighted in the data management and sharing plan. In the event that researchers apply for or receive commercial funding for any part of their research that Cancer Research UK supports they should advise Cancer Research Technology of the situation without delay.
Investigators carrying out research involving human participants must ensure that consent is obtained to share information; furthermore the necessary legal, ethical and regulatory permissions regarding data sharing should be in place prior to disclosing any data. Every effort must be made to protect the identity of participants and, prior to sharing, data should be anonymised. In addition, any indirect identifiers that may lead to deductive disclosures should be removed to reduce the risk of identification. In most instances, sharing data should be possible without compromising the confidentiality of participants but if there are circumstances where data needs to be restricted due to the inability to protect confidentiality this should be fully addressed in the data management and sharing plan.
"
- number: 1
- section: cruk_8
- themes: restrictions_on_sharing, ipr_ownership_and_licencing, licensing_of_existing_data, ethical_issues
-
-esrc_1_1:
- text: "An explanation of the existing data sources that will be used by the research project (with references)"
- guidance: "When creating new data sources, explain why existing data sources can not be re-used. If purchasing or re-using existing data sources, explain whether issues such as copyright and IPR have been addressed to ensure that the data can be shared i.e. explain how you plan to deal with permissions to share data you have created which is derived from data which you do not own.
The following sources can be reviewed for the availability of existing data that could be used:
Data Catalogue - an integrated catalogue containing over 5,000 datasets covering an extensive range of key economic, social and historical data - both quantitative and qualitative - spanning many disciplines and themes, and with links to census data ESRC Research Catalogue - the ESRC's repository of past and present research awards and their outputs "
- number: 1
- section: esrc_1
- themes: existing_data, licensing_of_existing_data
-
-esrc_1_2:
- text: "An analysis of the gaps identified between the currently available and required data for the research"
- guidance: "When creating new data sources, explain why existing data sources can not be re-used. If purchasing or re-using existing data sources, explain whether issues such as copyright and IPR have been addressed to ensure that the data can be shared i.e. explain how you plan to deal with permissions to share data you have created which is derived from data which you do not own.
The following sources can be reviewed for the availability of existing data that could be used:
Data Catalogue - an integrated catalogue containing over 5,000 datasets covering an extensive range of key economic, social and historical data - both quantitative and qualitative - spanning many disciplines and themes, and with links to census data ESRC Research Catalogue - the ESRC's repository of past and present research awards and their outputs "
- number: 2
- section: esrc_1
- themes: relationship_to_existing_data
-
-esrc_2_1:
- text: "Data volume and data type, e.g. qualitative or quantitative data"
- guidance: "Give a brief description of new data which you envisage creating. This information should include how the data will be collected (in line with the proposed research methods), their format (e.g. SPSS, Open Document Format, tab-delimited format, MS Excel), and how they will be documented.
Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data. Clear and detailed data descriptions and annotation, together with user-friendly accompanying documentation on methods and contextual information, makes data easy to understand and interpret and therefore shareable and with long-lasting usability.
"
- number: 1
- section: esrc_2
- themes: data_volumes, data_type
-
-esrc_2_2:
- text: "Data quality, formats, standards documentation and metadata"
- guidance: "Give a brief description of new data which you envisage creating. This information should include how the data will be collected (in line with the proposed research methods), their format (e.g. SPSS, Open Document Format, tab-delimited format, MS Excel), and how they will be documented.
Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data. Clear and detailed data descriptions and annotation, together with user-friendly accompanying documentation on methods and contextual information, makes data easy to understand and interpret and therefore shareable and with long-lasting usability.
"
- number: 2
- section: esrc_2
- themes: data_format, metadata_standards, documentation
-
-esrc_2_3:
- text: "Methodologies for data collection"
- guidance: "Give a brief description of new data which you envisage creating. This information should include how the data will be collected (in line with the proposed research methods), their format (e.g. SPSS, Open Document Format, tab-delimited format, MS Excel), and how they will be documented.
Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data. Clear and detailed data descriptions and annotation, together with user-friendly accompanying documentation on methods and contextual information, makes data easy to understand and interpret and therefore shareable and with long-lasting usability.
"
- number: 3
- section: esrc_2
- themes: data_capture_methods
-
-esrc_3_1:
- text: "Quality Assurance"
- guidance: "Quality control of data is an integral part of a research process. Describe the procedures for quality assurance that will be carried out on the data collected at the time of data collection, data entry, digitisation and data checking.
For example this might include:
Documenting the calibration of instruments Taking duplicate samples or measurements Standardised data capture, data entry or recording methods Data entry validation techniques Methods of transcription Peer review of data "
- number: 1
- section: esrc_3
- themes: data_quality
-
-esrc_3_2:
- text: "Back-Up"
- guidance: "Describe the data back-up procedures that you will adopt to ensure the data and metadata are securely stored during the lifetime of the project. You may need to discuss your institution's policy on back-ups. If your data is sensitive (e.g. detailed personal data) you should discuss appropriate security measures which you will be taking.
The methods of version control of data files should also be stated. Version control includes making sure that if the information in one file is altered, the related information in other files is also adapted, as well as keeping track of versions of data files and their locations.
"
- number: 2
- section: esrc_3
- themes: backup_procedures, data_security, data_organisation
-
-esrc_4_1:
- text: "Plans for management and archiving of collected data"
- guidance: "Outline your plans for preparing and documenting data for sharing and archiving (unless otherwise agreed). Identify any additional plans for data sharing, if any. A crucial part of making data user-friendly, shareable and with long-lasting usability is to ensure they can be understood and interpreted by other users. This requires clear and detailed data description, annotation and contextual information.
"
- number: 1
- section: esrc_4
- themes: data_selection, preservation_plan, documentation
-
-esrc_5_1:
- text: "Expected difficulties in data sharing, along with causes and possible measures to overcome these difficulties."
- guidance: "We require that all applicants seeking ESRC funding include a statement on data sharing in the relevant section of the Je-S application form. If data sharing is not possible, the applicant must present a strong argument to justify their case. We reserve the right to decline the request or demand additional information from the applicant.
We expect grant holders to adhere to the Data Protection Act 1998, which contains eight (enforceable) principles of good practice, applying to anyone processing personal data, including the use of personal data in research. These include obtaining the data subject’s consent or meeting at least one of the ‘necessary’ conditions described in the Act.
The ESRC complies with the requirements of the Freedom of Information Act 2000 that establishes a general right of access to all types of recorded information held by public authorities, including Government Departments and Non-Departmental Public Bodies.
If the Principal Investigator does not state to the contrary in the Je-S application form, it will be assumed that they are willing for their contact details and other relevant information to be shared with the relevant data service provider working with the ESRC.
"
- number: 1
- section: esrc_5
- themes: restrictions_on_sharing, managed_access_procedures
-
-esrc_6_1:
- text: "Explicit mention of consent, confidentiality, anonymisation and other ethical considerations"
- guidance: "In facilitating innovative and high quality research, we require that the research we supports will be carried out to a high ethical standard. ESRC grant holders are, therefore, required to adhere to the key principles of ethical research addressed in the ESRC Framework for Research Ethics
"
- number: 1
- section: esrc_6
- themes: ethical_issues
-
-esrc_7_1:
- text: "Copyright and intellectual property ownership of the data"
- guidance: " In respect of research grant funding, unless stated otherwise, the ownership of intellectual property and responsibility for its exploitation, rests with the organisation carrying out the research. The ESRC may, in specific cases, reserve the right to retain ownership of the intellectual property and to arrange for it to be exploited for the national benefit in other ways. If exercised, this condition is included in the terms of the relevant award.
In taking responsibility for exploiting intellectual property, we expect the research organisation to ensure that individuals associated with the research understand the arrangements for exploitation. Where research is funded by or undertaken in collaboration with others, the research organisation is responsible for putting appropriate formal agreements in place covering the contributions and rights of the various organisations and individuals involved. Such agreements must be in place before the research begins. Research organisations are required to ensure that the terms of collaboration agreements do not conflict with the Terms and Conditions for Research Council Grants.
The ESRC expects grant holders to meet the copyright requirements set down in the Copyright, Designs and Patents Act 1988. Responsibility for ensuring compliance with all laws and other legal instruments rests with the grant holders and/or their institutions. We will not accept liability for any complaint or legal action taken against a researcher or the ESDS for infringements of copyrights, defamation or any other data protection requirements.
"
- number: 1
- section: esrc_7
- themes: ipr_ownership_and_licencing
-
-esrc_8_1:
- text: "Responsibilities for data management and curation within research teams at all participating institutions"
- guidance: "Indicate who within your research team will be responsible for data management, metadata production, dealing with quality issues and the final delivery of data for sharing or archiving. Provide this information within the Staff Duties section in the Je-S form and where appropriate in the Justification of Resources. If several people will be responsible state their roles and responsibilities in the relevant section of the Je-S form. For collaborative projects you should explain the co-ordination of data management responsibilities across partners in your Data Management Plan.
"
- number: 1
- section: esrc_8
- themes: project_data_contact, responsibilities
-
-nerc_1_1_1:
- text: Data management procedures to be followed during the lifetime of the grant or fellowship
- guidance: "Consider issues like:
metadata: will you document discovery (what, where, when, why, who) and descriptive (how collected, how processed, how stored, how linked) metadata and implement the NERC Discovery Metadata Standard (http://data-search.nerc.ac.uk/documents/metadatastandard_v1.0.pdf) early in the project? data storage: have you access to enough storage and backup? Will you need specialist help with database design? data quality: will there be an earmarked data manager within the team, what data quality checks will be used, will student data be integrated in the data plan? ethical and access issues: are there special data security or licensing issues and how will you address these? "
- number: 1
- section: nerc_1_1
- themes: metadata_capture, active_data_storage, data_quality, ethical_issues, managed_access_procedures
-
-nerc_1_2_1:
- text: Existing datasets to be used by the grant or fellowship
- guidance: "Comment on any restrictions on reuse.
"
- number: 1
- section: nerc_1_2
- themes: existing_data, licensing_of_existing_data
-
-nerc_1_3_1:
- text: Data Centre
- guidance: "The most appropriate NERC Data Centre – projects can contribute to more than one Data Centre.
"
- number: 1
- section: nerc_1_3
- themes: data_repository
-
-nerc_1_3_2:
- text: Data Description
- guidance: "1-2 sentences describing the data.
"
- number: 2
- section: nerc_1_3
- themes: description_of_data_content
-
-nerc_1_3_3:
- text: Release Date to Data Centre
- guidance: "Data should normally be delivered to a data centre within 2 years of collection.
"
- number: 3
- section: nerc_1_3
- themes: timeframe_for_data_sharing
-
-nerc_1_3_4:
- text: Reuse Scenarios
- guidance: "Possible user types and estimate of numbers if possible.
"
- number: 4
- section: nerc_1_3
- themes: expected_reuse
-
-nerc_2_1_1:
- text: Nominated Data Centre
- number: 1
- section: nerc_2_1
- themes: data_repository
-
-nerc_2_1_2:
- text: Data Centre Contact
- number: 2
- section: nerc_2_1
-
-nerc_2_1_3:
- text: Please specify any other team members with responsibility for data
- number: 3
- section: nerc_2_1
-
-nerc_2_2_1:
- text: Roles and Responsibilities
- guidance: "For example: who is responsible for obtaining 3rd party data, for capturing data in the field, producing metadata, transferring metadata and data to DDC.
"
- number: 1
- section: nerc_2_2
- themes: responsibilities
-
-nerc_2_3_1:
- text: Data Generation Activities
- guidance: "Short description of the what, how much, when and how etc.
"
- number: 1
- section: nerc_2_3
- themes: data_capture_methods
-
-nerc_2_4_1:
- text: In-Project Data Management Approach
- guidance: "Statement about how the data will be managed within the project, including backup & security.
"
- number: 1
- section: nerc_2_4
- themes: active_data_storage, backup_procedures, data_security
-
-nerc_2_5_1:
- text: Metadata and Documentation
- guidance: "Insert statement about how metadata will be supplied and standards to which it will adhere.
"
- number: 1
- section: nerc_2_5
- themes: metadata_capture, metadata_standards
-
-nerc_2_6_1:
- text: Data Quality
- guidance: "List procedures for quality control of data.
"
- number: 1
- section: nerc_2_6
- themes: data_quality
-
-nerc_2_7_1:
- text: Exceptions or Additional Services
- guidance: "Any exceptional expectations of Data Centres (for example exceptional size or complexity) - funding for which should be included within the project's Directly Incurred costs and explained within the Justification of Resources attachment.
"
- number: 1
- section: nerc_2_7
- themes: resourcing_preservation_and_data_sharing
-
-nerc_2_8_1:
- text: Digital Information
- guidance: "Enter a brief description of the activities that will produce the data.
"
- number: 1
- section: nerc_2_8
- themes: data_capture_methods, description_of_data_content, project_data_contact, data_volumes, data_format, ipr_ownership_and_licencing, timeframe_for_data_sharing, timeframe_for_data_sharing, expected_reuse, preservation_plan
-
-nerc_2_8_2:
- text: Hardcopy Records
- guidance: "Enter a brief description of the activities that will produce the data.
"
- number: 2
- section: nerc_2_8
- themes: data_capture_methods, project_data_contact, data_volumes, data_format, ipr_ownership_and_licencing, timeframe_for_data_sharing, preservation_plan
-
-nerc_2_8_3:
- text: Physical Collections & Samples
- guidance: "Enter a brief description of the activities that will produce the data
"
- number: 3
- section: nerc_2_8
- themes: data_capture_methods,project_data_contact,data_volumes,data_format,ipr_ownership_and_licencing,timeframe_for_data_sharing,preservation_plan
-
-nerc_2_9_1:
- text: Third Party/Existing Datasets
- number: 1
- section: nerc_2_9
- themes: existing_data, data_volumes, responsibilities, licensing_of_existing_data, restrictions_on_sharing
-
-mrc_1_1:
- text: Type of Study
- guidance: "Up to three lines of text that summarise the type of study (or studies) for which the data are being collected.
"
- number: 1
- section: mrc_1
- themes: project_description
-
-mrc_1_2:
- text: Types of Data
- guidance: "Types of research data to be managed in the following terms: quantitative, qualitative; generated from surveys, clinical measurements, interviews, medical records, electronic health records, administrative records, genotypic data, images, tissue samples,...
"
- number: 2
- section: mrc_1
- themes: data_type
-
-mrc_1_3:
- text: Format and scale of the data
- guidance: "File formats, software used, number of records, databases, sweeps, repetitions,… (in terms that are meaningful in your field of research). Do formats and software enable sharing and long-term validity of data?
"
- number: 1
- section: mrc_1
- themes: data_format, data_volumes
-
-mrc_2_1:
- text: Methodologies for data collection / generation
- guidance: "How the data will be collected/generated and which community data standards (if any) will be used at this stage.
"
- number: 1
- section: mrc_2
- themes: data_capture_methods
-
-mrc_2_2:
- text: Data quality and standards
- guidance: "How consistency and quality of data collection / generation will be controlled and documented, through processes of calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.
"
- number: 2
- section: mrc_2
- themes: data_quality, documentation
-
-mrc_3_1:
- text: Managing, storing and curating data
- guidance: "Briefly, how data will be stored, backed-up, managed and curated in the short to medium term. Specify any community agreed or other formal data standards used (with URL references). [Enter data security standards in Section 4].
"
- number: 1
- section: mrc_3
- themes: active_data_storage, backup_procedures
-
-mrc_3_2:
- text: Metadata standards and data documentation
- guidance: "Plans for documenting, annotating and describing data so that research data are usable by others than your own team. This may include documenting the methods used to generate the data, analytical and procedural information, capturing instrument metadata alongside data, documenting provenance of data and their coding, detailed descriptions for variables, records, etc.
"
- number: 2
- section: mrc_3
- themes: metadata_standards, documentation
-
-mrc_3_3:
- text: Data preservation strategy and standards
- guidance: "Plans and place for long-term storage, preservation and planned retention period for the research data. Formal preservation standards, if any. Indicate which data may not be retained (if any).
"
- number: 3
- section: mrc_3
- themes: preservation_plan, data_repository, period_of_preservation
-
-mrc_4_1:
- text: Formal information/data security standards
- guidance: "Identify formal information standards with which your study is or will be compliant. An example is ISO 27001.
"
- number: 1
- section: mrc_4
- themes: data_security
-
-mrc_4_2:
- text: Main risks to data security
- guidance: "If not using formal standards, summarise the main risks to the confidentiality and security of information related to human participants, and how these risks will be managed. Cover the main processes or facilities for storage and processing of personal data, data access, with controls put in place and any auditing of user compliance with consent and security conditions.
MRC guidance on the categories of data availability is provided.
"
- number: 2
- section: mrc_4
- themes: data_security
-
-mrc_5_1:
- text: Data sharing and access
- guidance: "Identify any data repository (-ies) that are, or will be, entrusted with storing, curating and/or sharing data from your study, where they exist for particular disciplinary domains or data types. Information on repositories is available here.
"
- number: 1
- section: mrc_5
- themes: data_repository
-
-mrc_5_2:
- text: Suitability for sharing
- guidance: "Indicate whether the data you propose to collect (or existing data you propose to use) in the study will be suitable for sharing. (“Yes” or “No”)
If “No,” indicate why they will not be suitable for sharing and then go to Section 6.
"
- number: 2
- section: mrc_5
-
-mrc_5_3:
- text: Discovery by potential users of the research data
- guidance: "Indicate how potential new users can find out about your data and identify whether they could be suitable for their research purposes, e.g. through summary information (metadata) being readily available on the study website, in the MRC gateway for population and patient research data, or in other databases or catalogues. Indicate whether your policy or approach to data sharing is (or will be) published on your study website (or by other means).
"
- number: 3
- section: mrc_5
- themes: discovery_by_users
-
-mrc_5_4:
- text: Governance of access
- guidance: "Identify who makes or will make the decision on whether to supply research data to a potential new user.
For population health and patient-based research, indicate how independent oversight of data access and sharing works (or will work) in compliance with MRC policy.
Indicate whether the research data will be deposited in and available from an identified community database, repository, archive or other infrastructure established to curate and share data.
"
- number: 4
- section: mrc_5
- themes: managed_access_procedures, method_for_data_sharing
-
-mrc_5_5:
- text: The study team’s exclusive use of the data
- guidance: "MRC’s requirement is for timely data sharing, with the understanding that a limited, defined period of exclusive use of data for primary research is reasonable according to the nature and value of the data, and that this restriction on sharing should be based on simple, clear principles.
Summarise the principles of your current/intended policy.
"
- number: 5
- section: mrc_5
- themes: timeframe_for_data_sharing
-
-mrc_5_6:
- text: Restrictions or delays to sharing, with planned actions to limit such restrictions
- guidance: "Restriction to data sharing may be due to participant confidentiality, consent agreements or IPR. Strategies to limit restrictions may include data being anonymised or aggregated; gaining participant consent for data sharing; gaining copyright permissions. For prospective studies, consent procedures should include provision for data sharing to maximise the value of the data for wider research use, while providing adequate safeguards for participants. As part of the consent process, proposed procedures for data sharing should be set out clearly and current and potential future risks associated with this explained to research participants.
"
- number: 6
- section: mrc_5
- themes: restrictions_on_sharing
-
-mrc_5_7:
- text: Regulation of responsibilities of users
- guidance: "Indicate whether external users are (will be) bound by data sharing agreements, setting out their main responsibilities.
"
- number: 7
- section: mrc_5
- themes: managed_access_procedures
-
-mrc_6_1:
- text: Responsibilities
- guidance: "Specify who, alongside the PI, is responsible for ensuring the study-wide data management, as well as for specific roles such as metadata creation, data security and quality assurance of data.
"
- number: 1
- section: mrc_6
- themes: responsibilities
-
-mrc_6_2:
- text: Relevant institutional, departmental or study policies on data sharing and data security
- guidance: "List policy, URL & reference
Please complete, where such policies are (i) relevant to your study, and (ii) are in the public domain, e.g. accessibly through the internet. Add any others that are relevant
"
- number: 2
- section: mrc_6
- themes: related_policies
-
-stfc_1_1:
- text: Specify the types of data the research will generate.
- guidance: "Data management plans should describe the types of data that are expected to be produced from the project, including the raw data arising directly from the research, the reduced data derived from it, and published data.
"
- number: 1
- section: stfc_1
- themes: data_type
-
-stfc_2_1:
- text: Specify which data will be preserved and how.
- guidance: "Unless there are compelling reasons not to do so, STFC expects data to be managed through an established repository, chosen to maximise the scientific value from aggregation of related data. This may be at the grant holder's institution or elsewhere. Data management plans may refer to the general policies of the chosen repository and only include further details if necessary to the specific project. (If it is proposed not to use an established repository, the data management plan will need to demonstrate that resources and systems will be in place to enable the data to be curated effectively beyond the lifetime of the grant, although STFC recognises that applicants may not have the expertise to describe in detail how data will be curated).
"
- number: 1
- section: stfc_2
- themes: data_selection, preservation_plan, data_repository
-
-stfc_3_1:
- text: Specify the software and metadata implications.
- guidance: "The data management plan should specify the software and metadata that will be retained to enable the data to be read and interpreted.
"
- number: 1
- section: stfc_3
- themes: documentation, metadata_standards
-
-stfc_4_1:
- text: Specify for how long the data will be preserved.
- guidance: "This may depend on the type of data. Where possible, STFC expects the original data, from which other related data can in principle be derived, to be retained for a minimum of 10 years from the end of the project. For data that by their nature cannot be re-measured, efforts should be made to retain them indefinitely.
"
- number: 1
- section: stfc_4
- themes: period_of_preservation
-
-stfc_5_1:
- text: Specify and justify which data will have value to others and should be shared.
- guidance: "Any data that are shared should be of a sufficiently high quality to be of value to other researchers. In general, published data – data that are displayed or otherwise referred to in a publication – should be made publicly available, but it is for applicants to consider and justify which types of data will, in the context of their project, meaningfully and practically constitute published data. Publicly available means available to anyone, but there may be a requirement for registration to enable tracking of data use and to provide notification of terms and conditions of use where they apply. Other data should be made available wherever it is appropriate and cost-effective to do so, taking into account the cost of curation compared with the cost or feasibility of re-creation, the potential long-term demand for the data and the feasibility of their reuse by others.
"
- number: 1
- section: stfc_5
- themes: audience, expected_reuse, data_selection
-
-stfc_6_1:
- text: Specify and justify the length of any proprietary period.
- guidance: "This might for example refer to the reasonable needs of the research team to have a first opportunity to exploit the results of their research, including any intellectual property arising. Where there are accepted norms within a scientific field or specific archive they should normally be followed. In general, STFC expects that published data should be made publicly available within six months of publication unless justified otherwise.
"
- number: 1
- section: stfc_6
- themes: timeframe_for_data_sharing
-
-stfc_7_1:
- text: Specify how data will be shared
- guidance: "The minimum level of data sharing expected would be that of making the data available in the natural format in which they were created, along with documentation and metadata, according to the standard accepted procedures within the scientific field. Where the data are likely to be in great demand by others it may be appropriate to request resources for a more proactive approach to data sharing, which maximises opportunities for cross linkage with other sectors.
"
- number: 1
- section: stfc_7
- themes: method_for_data_sharing
-
-stfc_8_1:
- text: Specify and justify any resources required to preserve and share the data.
- guidance: "Wherever possible, data management should make use of existing skills and capabilities. However, justification should be made for any additional specialist staff (or training for existing staff) needed within the grant to enable the research team to manage, preserve and share data effectively; and for any computational facilities needed to manage, store and share the data generated by the research.
"
- number: 1
- section: stfc_8
- themes: resourcing_preservation_and_data_sharing, resourcing_skills_and_training
-
-wellcome_1_1:
- text: What data outputs will your research generate and what data will have value to other researchers?
- guidance: "Researchers should maximise access to research datasets of value to the wider research community in a timely and responsible manner. Any data that is shared should be of a sufficiently high quality that it will have value to other researchers and should be provided in a format that enables it to be used effectively.
We recognise that in some cases it may not be appropriate for researchers to share their data. However, if your research meets the criteria for requiring a data management and sharing plan but you are intending not to share your data, the reasons for this must be clearly justified.
Data should be shared in accordance with recognised data standards where these exist, and in a way that maximises opportunities for data linkage and interoperability. Sufficient metadata must be provided to enable the dataset to be used by others. Agreed best practice standards for metadata provision should be adopted where these are in place.
When developing data management and sharing plans, researchers should therefore consider and briefly describe:
what types of data the proposed research will generate? which data will have value to other research users and could be shared? what data formats and quality standards will be applied to enable the data to be shared effectively? "
- number: 1
- section: wellcome_1
- themes: description_of_data_content, data_selection, audience, data_format, data_quality, data_type
-
-wellcome_2_1:
- text: When will you share the data?
- guidance: "All data management and sharing plans must state clearly the timescales over which datasets of value will be shared. Such timescales should take account of any recognised standards of good practice in the applicant's research field.
In considering the timescales that are appropriate, the Trust recognises fully that data generators have the right to a reasonable (but not unlimited) period of exclusive use for the research data that they produce.
As set out in our guidelines on good research practice, all grant holders must ensure as an absolute minimum that the data underpinning research papers are made available to other researchers on publication, providing this is consistent with any ethics approvals and consents which cover the data and any intellectual property rights in them.
In cases where the creation of a database resource is the primary goal of a Trust-funded activity, we would normally expect the data to be made widely available to user communities at the earliest feasible opportunity.
In line with the Fort Lauderdale Principles and subsequent Toronto statement on pre-publication data sharing, the Trust also encourages timely and responsible pre-publication data sharing for research that might constitute a \"community resource\" (i.e. those that have the characteristics set out in point 7 above).
Where appropriate, researchers may use publication moratoria to facilitate pre-publication sharing of data with other researchers, while protecting their right to first publication. Any such restrictions on data use should be reasonable, transparent and in line with established best practice.
Illustrative examples of timescales for data sharing are provided to help demonstrate different models that have been adopted and may be considered as examples of good practice in the field of large-scale genetics and genomics studies.
"
- number: 1
- section: wellcome_2
- themes: timeframe_for_data_sharing
-
-wellcome_3_1:
- text: Where will you make the data available?
- guidance: "Researchers should deposit data in recognised data repositories where these exist for particular data types, unless there is a compelling reason not to do so. Further information on repositories that may be appropriate
If the intention is to create a tailored database resource or to store data locally, researchers should ensure that they have the resources and systems in place so that the data are curated, secured and shared in an way that maximises its value and safeguards any associated risks.This includes consideration of how data held in this way can be effectively linked and integrated with other datasets to enhance its value to users.
"
- number: 1
- section: wellcome_3
- themes: method_for_data_sharing, data_repository
-
-wellcome_4_1:
- text: How will other researchers be able to access the data?
- guidance: "Data should be made available to other researchers with as few restrictions as possible. Where a managed access process is required - for example, where a study involves potentially identifiable data about research participants - the access mechanisms established should be proportionate to the risks associated with the data, and must not unduly restrict or delay access. Any managed access procedures that are proposed must be described clearly as part of your data management and sharing plan.
Depending on the study, it may be appropriate to establish a graded access procedure in which less sensitive data (e.g. anonymised and aggregate data) are made readily available, whereas applications to access to more sensitive datasets are subject to a more stringent assessment process.
Any managed access procedures should be consistent and transparent. In cases where a Data Access Committee is required to assess applications to access data, the composition of such Committees should include individuals with appropriate expertise who are independent of the project.
Where appropriate, the Trust would encourage those generating datasets that are likely to be of significant value to other researchers to publish a 'marker paper' or other form of publication, which enables data users to formally cite their usage of the resource.
Where a database resource is being developed as part of a funded activity, researchers should take reasonable steps to ensure that potential users are made aware of its availability. These should be outlined briefly in your plan.
"
- number: 1
- section: wellcome_4
- themes: managed_access_procedures, method_for_data_sharing
-
-wellcome_5_1:
- text: Are any limits to data sharing required - for example, to either safeguard research participants or to gain appropriate intellectual property protection?
- guidance: "For some research, delays or limits on data sharing may be necessary and appropriate to safeguard research participants or to ensure intellectual property protection is gained. Any such restrictions should, however, be minimised as far as feasible and set out clearly in data management and sharing plans where these are required.
For research involving samples or information pertaining to human subjects, data must be managed and shared in a way which is fully consistent with the terms of the consent under which samples and data were provided by the research participants.
For prospective studies, consent procedures should include provision for data sharing in a way that maximises the value of the data for wider research use, while providing adequate safeguards for participants. As part of the consent process, proposed procedures for data sharing should be set out clearly and current and potential future risks associated with this explained to research participants.
In designing studies, researchers must ensure that they have appropriate systems to protect the confidentiality and security of data pertaining to human subjects, and minimise any risks of identification by data users. This can be achieved through the use of appropriate anonymisation procedures and managed access processes. Such systems should be sufficient to safeguard participants, but proportionate to the level of sensitivity of the data and associated risk. They should not unduly inhibit responsible data sharing for legitimate research uses.
In line with our policy on intellectual property and patenting, we expect our funded researchers to ensure that any intellectual property in the outputs of their research is suitably protected and managed in a way that best enables the use of that knowledge for ultimate health benefit.
Delays or restrictions on data sharing may be appropriate to gain intellectual property protection or to further development of a technology for public benefit. As noted above, any such limits should be minimised as far as is feasible.
"
- number: 1
- section: wellcome_5
- themes: restrictions_on_sharing, data_security, ethical_issues, ipr_ownership_and_licencing
-
-wellcome_6_1:
- text: How will you ensure that key datasets are preserved to ensure their long-term value?
- guidance: "Researchers must consider how datasets that have long-term value will be preserved and curated beyond the lifetime of the grant. If the proposal is to create a bespoke data resource or to store data locally rather than to use a recognised data repository, data management plans should state clearly how the applicant expects that the dataset will be preserved and shared when the period of grant funding comes to an end.
The Trust is happy to discuss issues relating to longer-term preservation and sustainability with researchers so as to help provide the support required to maximise the long-term value of key research datasets.
"
- number: 1
- section: wellcome_6
- themes: preservation_plan, data_repository
-
-wellcome_7_1:
- text: What resources will you require to deliver your plan?
- guidance: "In preparing data management and sharing plans, researchers should consider carefully any resources they may need to deliver their plan.Where dedicated resources are required, these should be outlined and justified as part of the plan.
Issues to consider include:
People and skills - is there sufficient expertise and resource in the research team to manage, preserve and share the data effectively?Is additional specialist expertise (or training for existing staff) required? If so, how will this be sourced? Infrastructure - are there appropriate computational facilities to manage, store and analyse the data generated by the research? Tools - will additional computational facilities and resources need to be accessed, and what will be the costs associated with this? "
- number: 1
- section: wellcome_7
- themes: resourcing_skills_and_training, resourcing_hardware_and_software, resourcing_preservation_and_data_sharing
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#Administrative Data
+
+related_policies:
+ text: "Related Policies:"
+ guidance: " Are there any existing procedures that you will base your approach on? Does your department/group have data management guidelines? Does your institution have a data protection or security policy that you will follow? - Does your institution have a Research Data Management (RDM) policy? Does your funder have a Research Data Management policy? Are there any formal standards that you will adopt? List any other relevant funder, institutional, departmental or group policies on data management, data sharing and data security. Some of the information you give in the remainder of the DMP will be determined by the content of other policies. If so, point/link to them here.
"
+ number: 1
+ section: administrative_data
+ themes: related_policies
+
+#Data Collection
+
+what_data_will_you_collect_or_create:
+ text: What data will you collect or create?
+ guidance: " What type, format and volume of data? Do your chosen formats and software enable sharing and long-term access to the data? Are there any existing data that you can reuse? Give a brief description of the data, including any existing data or third-party sources that will be used, in each case noting its content, type and coverage. Outline and justify your choice of format and consider the implications of data format and data volumes in terms of storage, backup and access.
"
+ number: 1
+ section: data_collection
+ themes: data_format, data_volumes, data_type, existing_data, description_of_data_content
+
+how_will_the_data_be_collected_or_created:
+ text: How will the data be collected or created?
+ guidance: " What standards or methodologies will you use? How will you structure and name your folders and files? How will you handle versioning? What quality assurance processes will you adopt? Outline how the data will be collected/created and which community data standards (if any) will be used. Consider how the data will be organised during the project, mentioning for example naming conventions, version control and folder structures. Explain how the consistency and quality of data collection will be controlled and documented. This may include processes such as calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.
"
+ number: 2
+ section: data_collection
+ themes: data_capture_methods, data_quality
+
+#Documentation and Metadata
+
+what_documentation_and_metadata_will_acompany_the_data:
+ text: What documentation and metadata will acompany the data?
+ guidance: " What information is needed for the data to be to be read and interpreted in the future? How will you capture / create this documentation and metadata? What metadata standards will you use and why? Describe the types of documentation that will accompany the data to help secondary users to understand and reuse it. This should at least include basic details that will help people to find the data, including who created or contributed to the data, its title, date of creation and under what conditions it can be accessed.
Documentation may also include details on the methodology used, analytical and procedural information, definitions of variables, vocabularies, units of measurement, any assumptions made, and the format and file type of the data. Consider how you will capture this information and where it will be recorded. Wherever possible you should identify and use existing community standards.
"
+ number: 1
+ section: documentation_and_metadata
+ themes: metadata_capture, documentation, metadata_standards
+
+#Ethics and Legal Compliance
+
+how_will_you_manage_any_ethical_issues:
+ text: How will you manage any ethical issues?
+ guidance: " Have you gained consent for data preservation and sharing? How will you protect the identity of participants if required? e.g. via anonymisation How will sensitive data be handled to ensure it is stored and transferred securely? Ethical issues affect how you store data, who can see/use it and how long it is kept. Managing ethical concerns may include: anonymisation of data; referral to departmental or institutional ethics committees; and formal consent agreements. You should show that you are aware of any issues and have planned accordingly. If you are carrying out research involving human participants, you must also ensure that consent is requested to allow data to be shared and reused.
"
+ number: 1
+ section: ethics_and_legal_compliance
+ themes: ethical_issues, data_security
+
+how_will_you_manage_copyright_and_intellectual_property_rights_ipr_issues:
+ text: How will you manage copyright and Intellectual Property Rights (IPR) issues?
+ guidance: " Who owns the data? How will the data be licensed for reuse? Are there any restrictions on the reuse of third-party data? Will data sharing be postponed / restricted e.g. to publish or seek patents? State who will own the copyright and IPR of any data that you will collect or create, along with the licence(s) for its use and reuse. For multi-partner projects, IPR ownership may be worth covering in a consortium agreement. Consider any relevant funder, institutional, departmental or group policies on copyright or IPR. Also consider permissions to reuse third-party data and any restrictions needed on data sharing.
"
+ number: 2
+ section: ethics_and_legal_compliance
+ themes: licensing_of_existing_data, ipr_ownership_and_licencing
+
+#Storage and Backup
+
+how_will_the_data_be_stored_and_backed_up_during_the_research:
+ text: How will the data be stored and backed up during the research?
+ guidance: " Do you have sufficient storage or will you need to include charges for additional services? How will the data be backed up? Who will be responsible for backup and recovery? How will the data be recovered in the event of an incident? State how often the data will be backed up and to which locations. How many copies are being made? Storing data on laptops, computer hard drives or external storage devices alone is very risky. The use of robust, managed storage provided by university IT teams is preferable. Similarly, it is normally better to use automatic backup services provided by IT Services than rely on manual processes. If you choose to use a third-party service, you should ensure that this does not conflict with any funder, institutional, departmental or group policies, for example in terms of the legal jurisdiction in which data are held or the protection of sensitive data.
"
+ number: 1
+ section: storage_and_backup
+ themes: active_data_storage, backup_procedures
+
+how_will_you_manage_access_and_security:
+ text: How will you manage access and security?
+ guidance: " What are the risks to data security and how will these be managed? How will you control access to keep the data secure? How will you ensure that collaborators can access your data securely? If creating or collecting data in the field how will you ensure its safe transfer into your main secured systems? If your data is confidential (e.g. personal data not already in the public domain, confidential information or trade secrets), you should outline any appropriate security measures and note any formal standards that you will comply with e.g. ISO 27001."
"
+ number: 2
+ section: storage_and_backup
+ themes: data_security, managed_access_procedures
+
+#Selection and Preservation
+
+which_data_are_of_long-term_value_and_should_be_retained_shared_and-or_preserved:
+ text: Which data are of long-term value and should be retained, shared, and/or preserved?
+ guidance: " What data must be retained/destroyed for contractual, legal, or regulatory purposes? How will you decide what other data to keep? What are the foreseeable research uses for the data? How long will the data be retained and preserved? Consider how the data may be reused e.g. to validate your research findings, conduct new studies, or for teaching. Decide which data to keep and for how long. This could be based on any obligations to retain certain data, the potential reuse value, what is economically viable to keep, and any additional effort required to prepare the data for data sharing and preservation. Remember to consider any additional effort required to prepare the data for sharing and preservation, such as changing file formats.
"
+ number: 1
+ section: selection_and_preservation
+ themes: data_selection
+
+what_is_the_long-term_preservation_plan_for_the_dataset:
+ text: What is the long-term preservation plan for the dataset?
+ guidance: " Where e.g. in which repository or archive will the data be held? What costs if any will your selected data repository or archive charge? Have you costed in time and effort to prepare the data for sharing / preservation? Consider how datasets that have long-term value will be preserved and curated beyond the lifetime of the grant. Also outline the plans for preparing and documenting data for sharing and archiving. If you do not propose to use an established repository, the data management plan should demonstrate that resources and systems will be in place to enable the data to be curated effectively beyond the lifetime of the grant.
"
+ number: 2
+ section: selection_and_preservation
+ themes: preservation_plan
+
+#Data Sharing
+
+how_will_you_share_the_data:
+ text: How will you share the data?
+ guidance: " How will potential users find out about your data? With whom will you share the data, and under what conditions? Will you share data via a repository, handle requests directly or use another mechanism? When will you make the data available? Will you pursue getting a persistent identifier for your data? Consider where, how, and to whom data with acknowledged long-term value should be made available. The methods used to share data will be dependent on a number of factors such as the type, size, complexity and sensitivity of data. If possible, mention earlier examples to show a track record of effective data sharing. Consider how people might acknowledge the reuse of your data.
"
+ number: 1
+ section: data_sharing
+ themes: method_for_data_sharing
+
+are_any_restrictions_on_data_sharing_required:
+ text: Are any restrictions on data sharing required?
+ guidance: " What action will you take to overcome or minimise restrictions? For how long do you need exclusive use of the data and why? Will a data sharing agreement (or equivalent) be required? Outline any expected difficulties in sharing data with acknowledged long-term value, along with causes and possible measures to overcome these. Restrictions may be due to confidentiality, lack of consent agreements or IPR, for example. Consider whether a non-disclosure agreement would give sufficient protection for confidential data.
"
+ number: 2
+ section: data_sharing
+ themes: restrictions_on_sharing, embargo_period
+
+#Responsibilities and Resources
+
+who_will_be_responsible_for_data_management:
+ text: Who will be responsible for data management?
+ guidance: " Who is responsible for implementing the DMP, and ensuring it is reviewed and revised? Who will be responsible for each data management activity? How will responsibilities be split across partner sites in collaborative research projects? Will data ownership and responsibilities for RDM be part of any consortium agreement or contract agreed between partners? Outline the roles and responsibilities for all activities e.g. data capture, metadata production, data quality, storage and backup, data archiving & data sharing. Consider who will be responsible for ensuring relevant policies will be respected. Individuals should be named where possible.
"
+ number: 1
+ section: responsibilities_and_resources
+ themes: responsibilities
+
+what_resources_will_you_require_to_deliver_your_plan:
+ text: What resources will you require to deliver your plan?
+ guidance: " Is additional specialist expertise (or training for existing staff) required? Do you require hardware or software which is additional or exceptional to existing institutional provision? Will charges be applied by data repositories? Carefully consider any resources needed to deliver the plan, e.g. software, hardware, technical expertise, etc. Where dedicated resources are needed, these should be outlined and justified.
"
+ number: 2
+ section: responsibilities_and_resources
+ themes: resourcing_skills_and_training, resourcing_hardware_and_software, resourcing_preservation_and_data_sharing
+
+#Multiple Choice
+
+#single_select_box:
+# text: Example select box limited to one option
+# number: 1
+# section: multiple_choice
+#
+#multiple_select_box:
+# text: Example select box allowing multiple options
+# number: 2
+# section: multiple_choice
+#
+#radio_button:
+# text: Example radio button
+# number: 3
+# section: multiple_choice
+#
+#checkbox:
+# text: Example checkbox
+# number: 4
+# section: multiple_choice
+
+ahrc_1_1:
+ text: Summary of Digital Outputs and Digital Technologies
+ guidance: "You should provide a brief and clear description of the digital output or digital technology being proposed, considering the following aspects: purpose, source data, content, functionality, use and its relationship to the research questions. You should identify the type of access envisaged, if applicable, such as 'freely available online'.
The summary should provide clear overview of what you intend to achieve technically, to enable reviewers to assess whether the plans for achieving this are appropriate. You should provide a level of detail which is appropriate to the digital output or digital technology being proposed and its cost and status within the project.
"
+ number: 1
+ section: ahrc_1
+ themes: description_of_data_content, method_for_data_sharing
+
+ahrc_2_1:
+ text: "Technical Methodology: Standards and Formats"
+ guidance: "You should provide information about your choice of data and file formats. You must provide any relevant vital statistics relating to the data, such as size, quantity and duration. Although such statistics might need to rely on estimation, you should provide the reasoning behind your calculations. You should give your reasons for using the standards or formats chosen.
"
+ number: 1
+ section: ahrc_2
+ themes: data_format, data_volumes, data_type
+
+ahrc_2_2:
+ text: "Technical Methodology: Hardware and Software"
+ guidance: "
You should provide information about and the rationale for any hardware or software which will be used to support the project’s research methodology, which is additional or exceptional to conventional desk-based research and institutional provision. They should be included in the Justification of Resources and cross-referenced if there is an associated budget line. Where necessary you should produce additional justification of the use of such items.
You must write ‘Not applicable’ if this section is not relevant to the type of digital output or digital technology proposed.
"
+ number: 2
+ section: ahrc_2
+ themes: resourcing_hardware_and_software
+
+ahrc_2_3:
+ text: "Technical Methodology Data Acquisition, Processing, Analysis and Use"
+ guidance: "You should provide information about the process of technical development, showing how the standards and formats described in section 2.a and the hardware and software described in section 2.b relate to each other. You must show that you have considered how you will achieve your digital output or digital technology in practice, including issues of timetabling.
You should consider the technical development process from the point of data capture or data creation through to final delivery (in the case of a digital output) or analysis (in the case of a digital process). You should consider issues such as backup, monitoring, quality control and internal documentation where relevant, identifying procedures which are appropriate to the research environments. For example Technical Reviewers acknowledge that the backup procedures which are possible during fieldwork might be very different to those which are possible within an office environments.
This section needs to relate to the timetable and milestones given in the Case for Support as well as the project’s overall research methodology. The Technical Reviewer will be assessing the alignment of the technical development process with other project activities for logic and timeliness.
"
+ number: 3
+ section: ahrc_2
+ themes: data_capture_methods, data_quality, data_organisation, documentation, metadata_capture, metadata_standards, backup_procedures
+
+ahrc_3_1:
+ text: "Technical Support and Relevant Experience"
+ guidance: ""
+ number: 1
+ section: ahrc_3
+ themes: resourcing_skills_and_training, responsibilities
+
+ahrc_4_1:
+ text: "Preserving Your Data"
+ guidance: "Preservation of digital outputs is necessary in order for them to endure changes in the technological environments and remain potentially re-usable in the future. In this section you must state what, if any, digital outputs of your project you intend to preserve beyond the period of funding.
The length and cost of preservation should be proportionate to the value and significance of the digital outputs. If you believe that none of these should be preserved this must be justified, and if the case is a good one the application will not be prejudiced.
You must consider preservation in four ways: what, where, how and for how long. You must also consider any institutional support needed in order to carry out these plans, whether from an individual, facility, organisation or service.
You should think about the possibilities for re-use of your data in other contexts and by other users, and connect this as appropriate with your plans for dissemination and Pathways to Impact.Where there is potential for re-usability, you should use standards and formats that facilitate this.
The Technical Reviewer will be looking for evidence that you understand the reasons for the choice of technical standards and formats described in Section 2.a Technical Methodology: Standards and Formats.
You should describe the types of documentation which will accompany the data. Documentation in this sense means technical documentation as well as user documentation. It includes, for instance, technical description, code commenting, project-build guidelines, the documentation of technical decisions and resource metadata which is additional to the standards which you have described in Section 2.a. Not all types of documentation will be relevant to a project and the quantity of documentation proposed should be proportionate to the envisaged value of the data.
"
+ number: 1
+ section: ahrc_4
+ themes: preservation_plan, period_of_preservation, resourcing_preservation_and_data_sharing, documentation
+
+ahrc_4_2:
+ text: "Ensuring Continued Accessibility and Use of Your Digital Outputs"
+ guidance: "In this section you must provide information about any plans for ensuring that digital outputs remain sustainable in the sense of immediately accessible and usable beyond the period of funding. There are costs to ensuring sustainability in this sense over and above the costs of preservation. The project's sustainability plan should therefore be proportionate to the envisaged longer-term value of the data for the research community and should be closely related to your plans for dissemination and Pathways to Impact.
If you believe that digital outputs should not be sustained beyond the period of funding then this should be justified. It is not mandatory to sustain all digital outputs. While you should consider the long-term value of the digital outputs to the research community, where they are purely ancillary to a project’s research outputs there may not be a case for sustaining them (though there would usually be a case for preservation).
You must consider the sustainability of your digital outputs in five ways: what, where, how, for how long, and how the cost will be covered. You must make appropriate provision for user consultation and user testing in this connection, and plan the development of suitable user documentation.
You should provide justification if you do not envisage open, public access. A case can be made for charging for or otherwise limiting access, but the default expectation is that access will be open. The Technical Reviewer will be looking for realistic commitments to sustaining public access in line with affordability and the longer-term value of the digital output.
You must consider any institutional support needed in order to carry out these plans, if not covered under Section 3, as well as the cost of keeping the digital output publicly available in the future, including issues relating to maintenance, infrastructure and upgrade (such as the need to modify aspects of a web interface or software application in order to account for changes in the technological environments). In order to minimise sustainability costs, it is generally useful that the expertise involved in the development of your project is supported by expertise in your own or a partner institution.
A sustainability plan does not necessarily mean a requirement to generate income or prevent resources from being freely available. Rather it is a requirement to consider the direct costs and expertise of maintaining digital outputs for continued access. Some applicants might be able to demonstrate that there will be no significant sustainability problems with their digital output; in some cases the university’s computing services or library might provide a firm commitment to sustaining the resource for a specified period; others might see the benefit of Open Source community development models. You should provide reassurances of sustainability which are proportionate to the envisaged longer-term value of the digital outputs for the research community.
When completing this section, you should consider the potential impact of the data on research in your field (if research in the discipline will be improved through the creation of the digital output, how will it be affected if the resource then disappears?), and make the necessary connections with your Impact Plan. You must factor in the effects of any IP, copyright and ethical issues during the period in which the digital output will be publicly accessible, connecting what you say with the relevant part of your Case for Support.
You must identify whether or not you envisage the academic content (as distinct from the technology) of the digital output being extended or updated beyond the period of funding, addressing the following issues: how this will be done, by who and at what cost. You will need to show how the cost of this will be sustained after the period of funding ends.
"
+ number: 2
+ section: ahrc_4
+ themes: resourcing_preservation_and_data_sharing, managed_access_procedures, data_repository, method_for_data_sharing, timeframe_for_data_sharing
+
+bbsrc_1_1:
+ text: "Data areas and data types - the volume, type and content of data that will be generated e.g. experimental measurements, models, records and images"
+ guidance: "BBSRC recognises that effective data sharing is already practiced in certain areas and expects this to continue. BBSRC supports, either directly or indirectly, a number of such resources. Data sharing in other areas is also expected where there is a strong scientific case and where it is cost effective.
BBSRC has identified a number of areas where there is a particularly strong scientific case for data sharing. These are:
Data arising from high volume experimentation Low throughput data arising from long time series or cumulative approaches Models generated using systems approaches BBSRC expects data sharing to take place in these areas."
+ number: 1
+ section: bbsrc_1
+ themes: description_of_data_content, data_type, data_volumes
+
+bbsrc_2_1:
+ text: "Standards and metadata - the standards and methodologies that will be adopted for data collection and management, and why these have been selected"
+ guidance: "Standards are fundamental to effective data sharing. These can include standards for administrative processes, as well as for methodologies relating to data management and data formats. Researchers are expected to make use of current guidance and information on best practice.
It is expected that, in order to maximise the potential for re-use of data, BBSRC researchers should generate and manage data using existing widely accepted formats and methodologies where available. Data released for sharing should be validated and verified in line with accepted best practice and be of high quality. Data should be accompanied by the contextual information or documentation (metadata) needed to provide a secondary user with any necessary details on the origin or manipulation of the data in order to prevent any misuse, misinterpretation or confusion. Where standards for metadata exist, it is expected that these should be adhered to.
BBSRC encourages community development of standards where these do not currently exist or are not widely accepted and provides funding mechanisms for support of this type of activity.
"
+ number: 1
+ section: bbsrc_2
+ themes: data_format, metadata_standards, data_quality, documentation
+
+bbsrc_3_1:
+ text: "Relationship to other data available in public repositories"
+ guidance: ""
+ number: 1
+ section: bbsrc_3
+ themes: existing_data, relationship_to_existing data, licensing_of_existing data
+
+bbsrc_4_1:
+ text: "Secondary use - further intended and/or foreseeable research uses for the completed dataset(s)"
+ guidance: "BBSRC supports the view that those enabling sharing should receive full and appropriate recognition by funders, their academic institutions and new users for promoting secondary research.
Where data are shared through a third party resource or databases, secondary users should acknowledge the source of data. Where data are shared directly from the originator, depending on the level of usage and collaboration either joint authorship or acknowledgement to the data originator may be appropriate. It is also important to ensure that researchers and their research institutions are protected against claims that application of their data led to wrong conclusions/decisions by others: any use made of any data generated by third parties would not come with a warranty of its quality.
Furthermore, BBSRC expects that researchers accessing data have responsibilities to preserve data confidentiality and to observe the ethical and legal obligations pertaining to the data.
"
+ number: 1
+ section: bbsrc_4
+ themes: expected_reuse, audience
+
+bbsrc_5_1:
+ text: "Methods for data sharing - planned mechanisms for making these data available, e.g. through deposition in existing public databases or on request, including access mechanisms where appropriate"
+ guidance: "BBSRC recognises that different approaches to data sharing will be required in different situations and considers that it is most appropriate for researchers to determine their own strategies for data sharing and outline these within their research grant proposal(s). Applicants should consider where, how, and to whom their data should be made available.
In addition, data sharing practices will change as areas of research develop and become more mature. This can be observed by looking at the areas of sequencing (i.e. well established mechanisms in place), microarrays (i.e. standards developed and being implemented) and systems biology (i.e. databases currently not well developed). Consideration should be given to what constitutes good practice in emerging areas of research.
It is expected that data sharing strategies will fall into the two broad categories below.
Data sharing via deposition in an existing database, repository or other community resource is expected where possible and researchers are encouraged to share data through mechanisms affording the widest availability for generating added value and enabling re-use.
Researchers are encouraged to use existing infrastructure to facilitate data sharing where possible. BBSRC funds or otherwise supports a number of such resources. Where no such resources exist, applicants may consider sharing data via other third party mechanisms such as journal websites and / or open access repositories, many of which are now able to capture and share data underpinning publications.
This method of data sharing may be appropriate for areas where suitable third party mechanisms are not available. Researchers are expected to ensure that data are maintained for a period of 10 years after the completion of the research project in suitable accessible formats using established standards where possible such that the data can be made available on request in line with BBSRC guidance on good scientific practice. This may lead to collaboration between the new user and the original data creators, with the responsibilities and rights of all parties agreed at the outset.
Other mechanisms for data sharing may be used where appropriate. These could include sharing data within closed communities or a combination of methods for different datasets. Specific access mechanisms could be appropriate for example where there are ethical considerations, a need to protect confidential data, or other reasons for limiting access.
"
+ number: 1
+ section: bbsrc_5
+ themes: discovery_by_users, method_for_data_sharing, managed_access_procedures, data_repository
+
+bbsrc_6_1:
+ text: "Proprietary data - any restrictions on data sharing due to the need to protect proprietary or patentable data"
+ guidance: "In instances where BBSRC and a commercial partner jointly fund academic research work (for example LINK projects) there may be some restrictions over releasing data. Any such restrictions on data sharing due to co-funding arrangements should be set out in the “statement on data sharing” section of an application and will be considered when a grant application is peer reviewed. Applicants should also ensure they have obtained necessary clearances from relevant collaborators with regards to the content of the proposal including the data sharing plan in line with the BBSRC Research Grants Guide.
"
+ number: 1
+ section: bbsrc_6
+ themes: ipr_ownership_and_licencing, restrictions_on_sharing
+
+bbsrc_7_1:
+ text: "Timeframes - timescales for public release of data"
+ guidance: "The value of data often depends on timeliness. Researchers have a legitimate interest in benefiting from their own time and effort in producing data, but not in prolonged exclusive use of these data. BBSRC expects that all data (with accompanying metadata) should be shared in a timely fashion as soon as it is verified. It is expected that timely release would generally be no later than the release through publication of the main findings and should be in-line with established best practice in the field. Where best practices does not exist release within three years of generation of the dataset is suggested as a guide.
The timescale for release for the data may differ for several reasons, depending on the nature of the data. These reasons may include:
Scientific Area: Researchers are expected to make data available in-line with established practices within the relevant research community. Examples include: Crystallography (Protein Data Bank) - the community has agreed a maximum 12-month delay between publishing the first paper on a structure and making coordinates public for secondary use. Sequencing (EMBL Nucleotide Sequence database) – submitted data can be withheld from public access until publication of results but no later. Metabolomics (MeT-RO) – Up to a six-month delay in publication can be requested. Arabidopsis microarray data (NASC Affymetrix service) – all data are made available after a maximum one-year confidential period. Intellectual Property (IP) issues and potential for commercialisation of research outputs: New knowledge generates patentable ideas. BBSRC is also driving a policy of Knowledge Transfer and strongly encourages the commercialisation of IP through various initiatives. BBSRC recognises the need for periods of exclusive use of data but considers that commercialisation of research does not preclude data sharing and should not unduly delay or prevent data sharing. Any IP issues or plans for commercialisation should be highlighted in the case for support of the grant application. Length or scope of research project: Data from large studies may be released in waves as they become available or as they are published. "
+ number: 1
+ section: bbsrc_7
+ themes: timeframe_for_data_sharing
+
+bbsrc_8_1:
+ text: "Format of the final dataset"
+ guidance: ""
+ number: 1
+ section: bbsrc_8
+ themes: data_format
+
+cruk_1_1:
+ text: "The volume, type, content and format of the final dataset"
+ guidance: ""
+ number: 1
+ section: cruk_1
+ themes: description_of_data_content, data_format, data_volumes, data_type
+
+cruk_2_1:
+ text: "The standards that will be utilised for data collection and management"
+ guidance: ""
+ number: 1
+ section: cruk_2
+ themes: data_capture_methods, metadata_standards
+
+cruk_3_1:
+ text: "The metadata, documentation or other supporting material that should accompany the data for it to be interpreted correctly"
+ guidance: "For data sharing to be a success it is important that data are prepared in such a way that those using the dataset have a clear understanding of what the data mean so that they can be used appropriately. To enable this, applicants are encouraged to include with the dataset all the necessary information (metadata) describing the data and their format. This information should include such information as the methodology used to collect data, definitions of variables, units of measurement, any assumptions made, the format of the data, file type of the data etc. To support this researchers are strongly encouraged to utilise community standards to describe and structure data, (e.g. common terminology, minimum information guidelines and standard data exchange formats).
"
+ number: 1
+ section: cruk_3
+ themes: documentation, metadata_capture, data_quality
+
+cruk_4_1:
+ text: "The method used to share data"
+ guidance: "The methods used to share data will be dependent on a number of factors such as the type, size, complexity and sensitivity of data. Data can be shared by any of the following methods:
Investigators sharing under their own auspices may securely send data to a requestor, or upload the data to their institutional website. Investigators should consider using a data-sharing agreement (see below) to impose appropriate limitations on the secondary use of the data.
Through a third party
Investigators can share their data by transferring it to a data archive facility to distribute more widely to the scientific community, to maintain documentation and meet reporting requirements. Data archives are particularly attractive for investigators concerned about managing a large volume of requests for data, vetting frivolous or inappropriate requests, or providing technical assistance for users seeking to help with analyses.
Datasets that cannot be distributed to the general public due to confidentially concerns, or third-party licensing or use agreements that prohibit redistribution, can be accessed through a data enclave. A data enclave provides a controlled secure environments in which eligible researchers can perform analyses using restricted data resources.
Investigators may wish to share their data by a combination of the above methods or in different versions, in order to control the level of access permitted.
"
+ number: 1
+ section: cruk_4
+ themes: discovery_by_users, method_for_data_sharing, data_repository
+
+cruk_5_1:
+ text: "The timescale for public release of data"
+ guidance: "As the value of data is often dependent on its timeliness Cancer Research UK expects that data sharing should occur in a timely manner. Cancer Research UK acknowledges that the investigators who generated the data have a legitimate interest in benefiting from their investment of time and effort and we therefore support the initial investigator having a reasonable period of private use of the data but not prolonged exclusive use.
Cancer Research UK expects data to be released no later than the acceptance for publication of the main findings from the final dataset (unless restrictions from third party agreements or IP protection still apply) or on a timescale in line with the procedures of the relevant research area. For example, for crystallography data there is an agreed 12-month delay between publishing the first paper on a structure and making the co-ordinates public.
With experiments carried out over an extended period of time, (e.g. population based studies), it is reasonable to expect that subsets of data analysed by the investigator(s) be made available for sharing. The investigator(s) can then continue to benefit from further reasonable periods of exclusive analysis while the dataset as a whole matures.
"
+ number: 1
+ section: cruk_5
+ themes: timeframe_for_data_sharing
+
+cruk_6_1:
+ text: "The long-term preservation plan for the dataset"
+ guidance: "Once the funding for a project has ceased researchers should preserve all data resulting from that grant to ensure that data can be used for follow-up or new studies. Cancer Research UK expects that data be preserved and available for sharing with the science community for a minimum period of five years following the end of a research grant.
"
+ number: 1
+ section: cruk_6
+ themes: preservation_plan
+
+cruk_7_1:
+ text: "Whether a data sharing agreement will be required"
+ guidance: " To ensure that data are used appropriately investigators may consider implementing a data sharing agreement that indicates the criteria for data access and conditions for research use. This can ensure the responsibilities of both parties, along with intellectual property, citation and publication rights are agreed at the outset. It may incorporate privacy and confidentiality standards, as needed, to ensure data security at the recipient site and prohibit manipulation of data. For further guidance on managing data access and the development of data sharing agreements please refer to the 'Samples and Data for Cancer Research: Template for Access Policy Development' document available from the NCRI website.
As a minimum, researchers using shared data are expected to acknowledge the investigators who generated the data upon which any published findings are based. When both parties have collaborated using a shared dataset, co-authorship on publications may be more appropriate. Researchers using shared data are also expected to acknowledge Cancer Research UK for supporting the original study.
"
+ number: 1
+ section: cruk_7
+ themes: managed_access_procedures
+
+cruk_8_1:
+ text: "Any reasons why there may be restrictions on data sharing?"
+ guidance: "Data which might have the potential to be exploited commercially or otherwise to deliver patient benefit should be discussed with your technology transfer office and Cancer Research Technology prior to data sharing. Cancer Research UK encourages the appropriate filing of patents and recognises that there may be a need to delay the release of data until patent applications have been filed. Whilst there may be a delay in the release of data due to the application process, appropriate intellectual property protection should not hinder data sharing and may be the best way of ensuring that patient (and public) benefit is delivered. Any intellectual property issues or plans for commercialisation that may affect data sharing should be addressed in the data sharing plan. Cancer Research UK understands that unexpected intellectual property may arise during the course of the study and investigators may need to depart from their data sharing plan to protect intellectual property and for any other necessary steps to be taken. Data sharing may also be affected when co-funding is provided by the private sector (e.g. by a pharmaceutical company) or host institution resulting in some restrictions on the disclosure of data. For example with clinical trials, the Trial Management Group and/or trial sponsor etc may impose restrictions on data access. Any restrictions should be outlined in the data sharing plan and applicants should explore ways data sharing requests can be considered by the body that owns the data.
My research seeks supports from both the public and private sectors. How do I deal with the sharing of data? Where research is funded by a commercial sponsor, restrictions on data sharing may apply in arrangements agreed with the sponsor. Any such restriction(s) should be highlighted in the data management and sharing plan. In the event that researchers apply for or receive commercial funding for any part of their research that Cancer Research UK supports they should advise Cancer Research Technology of the situation without delay.
Investigators carrying out research involving human participants must ensure that consent is obtained to share information; furthermore the necessary legal, ethical and regulatory permissions regarding data sharing should be in place prior to disclosing any data. Every effort must be made to protect the identity of participants and, prior to sharing, data should be anonymised. In addition, any indirect identifiers that may lead to deductive disclosures should be removed to reduce the risk of identification. In most instances, sharing data should be possible without compromising the confidentiality of participants but if there are circumstances where data needs to be restricted due to the inability to protect confidentiality this should be fully addressed in the data management and sharing plan.
"
+ number: 1
+ section: cruk_8
+ themes: restrictions_on_sharing, ipr_ownership_and_licencing, licensing_of_existing_data, ethical_issues
+
+esrc_1_1:
+ text: "An explanation of the existing data sources that will be used by the research project (with references)"
+ guidance: "When creating new data sources, explain why existing data sources can not be re-used. If purchasing or re-using existing data sources, explain whether issues such as copyright and IPR have been addressed to ensure that the data can be shared i.e. explain how you plan to deal with permissions to share data you have created which is derived from data which you do not own.
The following sources can be reviewed for the availability of existing data that could be used:
Data Catalogue - an integrated catalogue containing over 5,000 datasets covering an extensive range of key economic, social and historical data - both quantitative and qualitative - spanning many disciplines and themes, and with links to census data ESRC Research Catalogue - the ESRC's repository of past and present research awards and their outputs "
+ number: 1
+ section: esrc_1
+ themes: existing_data, licensing_of_existing_data
+
+esrc_1_2:
+ text: "An analysis of the gaps identified between the currently available and required data for the research"
+ guidance: "When creating new data sources, explain why existing data sources can not be re-used. If purchasing or re-using existing data sources, explain whether issues such as copyright and IPR have been addressed to ensure that the data can be shared i.e. explain how you plan to deal with permissions to share data you have created which is derived from data which you do not own.
The following sources can be reviewed for the availability of existing data that could be used:
Data Catalogue - an integrated catalogue containing over 5,000 datasets covering an extensive range of key economic, social and historical data - both quantitative and qualitative - spanning many disciplines and themes, and with links to census data ESRC Research Catalogue - the ESRC's repository of past and present research awards and their outputs "
+ number: 2
+ section: esrc_1
+ themes: relationship_to_existing_data
+
+esrc_2_1:
+ text: "Data volume and data type, e.g. qualitative or quantitative data"
+ guidance: "Give a brief description of new data which you envisage creating. This information should include how the data will be collected (in line with the proposed research methods), their format (e.g. SPSS, Open Document Format, tab-delimited format, MS Excel), and how they will be documented.
Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data. Clear and detailed data descriptions and annotation, together with user-friendly accompanying documentation on methods and contextual information, makes data easy to understand and interpret and therefore shareable and with long-lasting usability.
"
+ number: 1
+ section: esrc_2
+ themes: data_volumes, data_type
+
+esrc_2_2:
+ text: "Data quality, formats, standards documentation and metadata"
+ guidance: "Give a brief description of new data which you envisage creating. This information should include how the data will be collected (in line with the proposed research methods), their format (e.g. SPSS, Open Document Format, tab-delimited format, MS Excel), and how they will be documented.
Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data. Clear and detailed data descriptions and annotation, together with user-friendly accompanying documentation on methods and contextual information, makes data easy to understand and interpret and therefore shareable and with long-lasting usability.
"
+ number: 2
+ section: esrc_2
+ themes: data_format, metadata_standards, documentation
+
+esrc_2_3:
+ text: "Methodologies for data collection"
+ guidance: "Give a brief description of new data which you envisage creating. This information should include how the data will be collected (in line with the proposed research methods), their format (e.g. SPSS, Open Document Format, tab-delimited format, MS Excel), and how they will be documented.
Using standardised and interchangeable or open lossless data formats ensures the long-term usability of data. Clear and detailed data descriptions and annotation, together with user-friendly accompanying documentation on methods and contextual information, makes data easy to understand and interpret and therefore shareable and with long-lasting usability.
"
+ number: 3
+ section: esrc_2
+ themes: data_capture_methods
+
+esrc_3_1:
+ text: "Quality Assurance"
+ guidance: "Quality control of data is an integral part of a research process. Describe the procedures for quality assurance that will be carried out on the data collected at the time of data collection, data entry, digitisation and data checking.
For example this might include:
Documenting the calibration of instruments Taking duplicate samples or measurements Standardised data capture, data entry or recording methods Data entry validation techniques Methods of transcription Peer review of data "
+ number: 1
+ section: esrc_3
+ themes: data_quality
+
+esrc_3_2:
+ text: "Back-Up"
+ guidance: "Describe the data back-up procedures that you will adopt to ensure the data and metadata are securely stored during the lifetime of the project. You may need to discuss your institution's policy on back-ups. If your data is sensitive (e.g. detailed personal data) you should discuss appropriate security measures which you will be taking.
The methods of version control of data files should also be stated. Version control includes making sure that if the information in one file is altered, the related information in other files is also adapted, as well as keeping track of versions of data files and their locations.
"
+ number: 2
+ section: esrc_3
+ themes: backup_procedures, data_security, data_organisation
+
+esrc_4_1:
+ text: "Plans for management and archiving of collected data"
+ guidance: "Outline your plans for preparing and documenting data for sharing and archiving (unless otherwise agreed). Identify any additional plans for data sharing, if any. A crucial part of making data user-friendly, shareable and with long-lasting usability is to ensure they can be understood and interpreted by other users. This requires clear and detailed data description, annotation and contextual information.
"
+ number: 1
+ section: esrc_4
+ themes: data_selection, preservation_plan, documentation
+
+esrc_5_1:
+ text: "Expected difficulties in data sharing, along with causes and possible measures to overcome these difficulties."
+ guidance: "We require that all applicants seeking ESRC funding include a statement on data sharing in the relevant section of the Je-S application form. If data sharing is not possible, the applicant must present a strong argument to justify their case. We reserve the right to decline the request or demand additional information from the applicant.
We expect grant holders to adhere to the Data Protection Act 1998, which contains eight (enforceable) principles of good practice, applying to anyone processing personal data, including the use of personal data in research. These include obtaining the data subject’s consent or meeting at least one of the ‘necessary’ conditions described in the Act.
The ESRC complies with the requirements of the Freedom of Information Act 2000 that establishes a general right of access to all types of recorded information held by public authorities, including Government Departments and Non-Departmental Public Bodies.
If the Principal Investigator does not state to the contrary in the Je-S application form, it will be assumed that they are willing for their contact details and other relevant information to be shared with the relevant data service provider working with the ESRC.
"
+ number: 1
+ section: esrc_5
+ themes: restrictions_on_sharing, managed_access_procedures
+
+esrc_6_1:
+ text: "Explicit mention of consent, confidentiality, anonymisation and other ethical considerations"
+ guidance: "In facilitating innovative and high quality research, we require that the research we supports will be carried out to a high ethical standard. ESRC grant holders are, therefore, required to adhere to the key principles of ethical research addressed in the ESRC Framework for Research Ethics
"
+ number: 1
+ section: esrc_6
+ themes: ethical_issues
+
+esrc_7_1:
+ text: "Copyright and intellectual property ownership of the data"
+ guidance: " In respect of research grant funding, unless stated otherwise, the ownership of intellectual property and responsibility for its exploitation, rests with the organisation carrying out the research. The ESRC may, in specific cases, reserve the right to retain ownership of the intellectual property and to arrange for it to be exploited for the national benefit in other ways. If exercised, this condition is included in the terms of the relevant award.
In taking responsibility for exploiting intellectual property, we expect the research organisation to ensure that individuals associated with the research understand the arrangements for exploitation. Where research is funded by or undertaken in collaboration with others, the research organisation is responsible for putting appropriate formal agreements in place covering the contributions and rights of the various organisations and individuals involved. Such agreements must be in place before the research begins. Research organisations are required to ensure that the terms of collaboration agreements do not conflict with the Terms and Conditions for Research Council Grants.
The ESRC expects grant holders to meet the copyright requirements set down in the Copyright, Designs and Patents Act 1988. Responsibility for ensuring compliance with all laws and other legal instruments rests with the grant holders and/or their institutions. We will not accept liability for any complaint or legal action taken against a researcher or the ESDS for infringements of copyrights, defamation or any other data protection requirements.
"
+ number: 1
+ section: esrc_7
+ themes: ipr_ownership_and_licencing
+
+esrc_8_1:
+ text: "Responsibilities for data management and curation within research teams at all participating institutions"
+ guidance: "Indicate who within your research team will be responsible for data management, metadata production, dealing with quality issues and the final delivery of data for sharing or archiving. Provide this information within the Staff Duties section in the Je-S form and where appropriate in the Justification of Resources. If several people will be responsible state their roles and responsibilities in the relevant section of the Je-S form. For collaborative projects you should explain the co-ordination of data management responsibilities across partners in your Data Management Plan.
"
+ number: 1
+ section: esrc_8
+ themes: project_data_contact, responsibilities
+
+nerc_1_1_1:
+ text: Data management procedures to be followed during the lifetime of the grant or fellowship
+ guidance: "Consider issues like:
metadata: will you document discovery (what, where, when, why, who) and descriptive (how collected, how processed, how stored, how linked) metadata and implement the NERC Discovery Metadata Standard (http://data-search.nerc.ac.uk/documents/metadatastandard_v1.0.pdf) early in the project? data storage: have you access to enough storage and backup? Will you need specialist help with database design? data quality: will there be an earmarked data manager within the team, what data quality checks will be used, will student data be integrated in the data plan? ethical and access issues: are there special data security or licensing issues and how will you address these? "
+ number: 1
+ section: nerc_1_1
+ themes: metadata_capture, active_data_storage, data_quality, ethical_issues, managed_access_procedures
+
+nerc_1_2_1:
+ text: Existing datasets to be used by the grant or fellowship
+ guidance: "Comment on any restrictions on reuse.
"
+ number: 1
+ section: nerc_1_2
+ themes: existing_data, licensing_of_existing_data
+
+nerc_1_3_1:
+ text: Data Centre
+ guidance: "The most appropriate NERC Data Centre – projects can contribute to more than one Data Centre.
"
+ number: 1
+ section: nerc_1_3
+ themes: data_repository
+
+nerc_1_3_2:
+ text: Data Description
+ guidance: "1-2 sentences describing the data.
"
+ number: 2
+ section: nerc_1_3
+ themes: description_of_data_content
+
+nerc_1_3_3:
+ text: Release Date to Data Centre
+ guidance: "Data should normally be delivered to a data centre within 2 years of collection.
"
+ number: 3
+ section: nerc_1_3
+ themes: timeframe_for_data_sharing
+
+nerc_1_3_4:
+ text: Reuse Scenarios
+ guidance: "Possible user types and estimate of numbers if possible.
"
+ number: 4
+ section: nerc_1_3
+ themes: expected_reuse
+
+nerc_2_1_1:
+ text: Nominated Data Centre
+ number: 1
+ section: nerc_2_1
+ themes: data_repository
+
+nerc_2_1_2:
+ text: Data Centre Contact
+ number: 2
+ section: nerc_2_1
+
+nerc_2_1_3:
+ text: Please specify any other team members with responsibility for data
+ number: 3
+ section: nerc_2_1
+
+nerc_2_2_1:
+ text: Roles and Responsibilities
+ guidance: "For example: who is responsible for obtaining 3rd party data, for capturing data in the field, producing metadata, transferring metadata and data to DDC.
"
+ number: 1
+ section: nerc_2_2
+ themes: responsibilities
+
+nerc_2_3_1:
+ text: Data Generation Activities
+ guidance: "Short description of the what, how much, when and how etc.
"
+ number: 1
+ section: nerc_2_3
+ themes: data_capture_methods
+
+nerc_2_4_1:
+ text: In-Project Data Management Approach
+ guidance: "Statement about how the data will be managed within the project, including backup & security.
"
+ number: 1
+ section: nerc_2_4
+ themes: active_data_storage, backup_procedures, data_security
+
+nerc_2_5_1:
+ text: Metadata and Documentation
+ guidance: "Insert statement about how metadata will be supplied and standards to which it will adhere.
"
+ number: 1
+ section: nerc_2_5
+ themes: metadata_capture, metadata_standards
+
+nerc_2_6_1:
+ text: Data Quality
+ guidance: "List procedures for quality control of data.
"
+ number: 1
+ section: nerc_2_6
+ themes: data_quality
+
+nerc_2_7_1:
+ text: Exceptions or Additional Services
+ guidance: "Any exceptional expectations of Data Centres (for example exceptional size or complexity) - funding for which should be included within the project's Directly Incurred costs and explained within the Justification of Resources attachment.
"
+ number: 1
+ section: nerc_2_7
+ themes: resourcing_preservation_and_data_sharing
+
+nerc_2_8_1:
+ text: Digital Information
+ guidance: "Enter a brief description of the activities that will produce the data.
"
+ number: 1
+ section: nerc_2_8
+ themes: data_capture_methods, description_of_data_content, project_data_contact, data_volumes, data_format, ipr_ownership_and_licencing, timeframe_for_data_sharing, timeframe_for_data_sharing, expected_reuse, preservation_plan
+
+nerc_2_8_2:
+ text: Hardcopy Records
+ guidance: "Enter a brief description of the activities that will produce the data.
"
+ number: 2
+ section: nerc_2_8
+ themes: data_capture_methods, project_data_contact, data_volumes, data_format, ipr_ownership_and_licencing, timeframe_for_data_sharing, preservation_plan
+
+nerc_2_8_3:
+ text: Physical Collections & Samples
+ guidance: "Enter a brief description of the activities that will produce the data
"
+ number: 3
+ section: nerc_2_8
+ themes: data_capture_methods,project_data_contact,data_volumes,data_format,ipr_ownership_and_licencing,timeframe_for_data_sharing,preservation_plan
+
+nerc_2_9_1:
+ text: Third Party/Existing Datasets
+ number: 1
+ section: nerc_2_9
+ themes: existing_data, data_volumes, responsibilities, licensing_of_existing_data, restrictions_on_sharing
+
+mrc_1_1:
+ text: Type of Study
+ guidance: "Up to three lines of text that summarise the type of study (or studies) for which the data are being collected.
"
+ number: 1
+ section: mrc_1
+ themes: project_description
+
+mrc_1_2:
+ text: Types of Data
+ guidance: "Types of research data to be managed in the following terms: quantitative, qualitative; generated from surveys, clinical measurements, interviews, medical records, electronic health records, administrative records, genotypic data, images, tissue samples,...
"
+ number: 2
+ section: mrc_1
+ themes: data_type
+
+mrc_1_3:
+ text: Format and scale of the data
+ guidance: "File formats, software used, number of records, databases, sweeps, repetitions,… (in terms that are meaningful in your field of research). Do formats and software enable sharing and long-term validity of data?
"
+ number: 1
+ section: mrc_1
+ themes: data_format, data_volumes
+
+mrc_2_1:
+ text: Methodologies for data collection / generation
+ guidance: "How the data will be collected/generated and which community data standards (if any) will be used at this stage.
"
+ number: 1
+ section: mrc_2
+ themes: data_capture_methods
+
+mrc_2_2:
+ text: Data quality and standards
+ guidance: "How consistency and quality of data collection / generation will be controlled and documented, through processes of calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.
"
+ number: 2
+ section: mrc_2
+ themes: data_quality, documentation
+
+mrc_3_1:
+ text: Managing, storing and curating data
+ guidance: "Briefly, how data will be stored, backed-up, managed and curated in the short to medium term. Specify any community agreed or other formal data standards used (with URL references). [Enter data security standards in Section 4].
"
+ number: 1
+ section: mrc_3
+ themes: active_data_storage, backup_procedures
+
+mrc_3_2:
+ text: Metadata standards and data documentation
+ guidance: "Plans for documenting, annotating and describing data so that research data are usable by others than your own team. This may include documenting the methods used to generate the data, analytical and procedural information, capturing instrument metadata alongside data, documenting provenance of data and their coding, detailed descriptions for variables, records, etc.
"
+ number: 2
+ section: mrc_3
+ themes: metadata_standards, documentation
+
+mrc_3_3:
+ text: Data preservation strategy and standards
+ guidance: "Plans and place for long-term storage, preservation and planned retention period for the research data. Formal preservation standards, if any. Indicate which data may not be retained (if any).
"
+ number: 3
+ section: mrc_3
+ themes: preservation_plan, data_repository, period_of_preservation
+
+mrc_4_1:
+ text: Formal information/data security standards
+ guidance: "Identify formal information standards with which your study is or will be compliant. An example is ISO 27001.
"
+ number: 1
+ section: mrc_4
+ themes: data_security
+
+mrc_4_2:
+ text: Main risks to data security
+ guidance: "If not using formal standards, summarise the main risks to the confidentiality and security of information related to human participants, and how these risks will be managed. Cover the main processes or facilities for storage and processing of personal data, data access, with controls put in place and any auditing of user compliance with consent and security conditions.
MRC guidance on the categories of data availability is provided.
"
+ number: 2
+ section: mrc_4
+ themes: data_security
+
+mrc_5_1:
+ text: Data sharing and access
+ guidance: "Identify any data repository (-ies) that are, or will be, entrusted with storing, curating and/or sharing data from your study, where they exist for particular disciplinary domains or data types. Information on repositories is available here.
"
+ number: 1
+ section: mrc_5
+ themes: data_repository
+
+mrc_5_2:
+ text: Suitability for sharing
+ guidance: "Indicate whether the data you propose to collect (or existing data you propose to use) in the study will be suitable for sharing. (“Yes” or “No”)
If “No,” indicate why they will not be suitable for sharing and then go to Section 6.
"
+ number: 2
+ section: mrc_5
+
+mrc_5_3:
+ text: Discovery by potential users of the research data
+ guidance: "Indicate how potential new users can find out about your data and identify whether they could be suitable for their research purposes, e.g. through summary information (metadata) being readily available on the study website, in the MRC gateway for population and patient research data, or in other databases or catalogues. Indicate whether your policy or approach to data sharing is (or will be) published on your study website (or by other means).
"
+ number: 3
+ section: mrc_5
+ themes: discovery_by_users
+
+mrc_5_4:
+ text: Governance of access
+ guidance: "Identify who makes or will make the decision on whether to supply research data to a potential new user.
For population health and patient-based research, indicate how independent oversight of data access and sharing works (or will work) in compliance with MRC policy.
Indicate whether the research data will be deposited in and available from an identified community database, repository, archive or other infrastructure established to curate and share data.
"
+ number: 4
+ section: mrc_5
+ themes: managed_access_procedures, method_for_data_sharing
+
+mrc_5_5:
+ text: The study team’s exclusive use of the data
+ guidance: "MRC’s requirement is for timely data sharing, with the understanding that a limited, defined period of exclusive use of data for primary research is reasonable according to the nature and value of the data, and that this restriction on sharing should be based on simple, clear principles.
Summarise the principles of your current/intended policy.
"
+ number: 5
+ section: mrc_5
+ themes: timeframe_for_data_sharing
+
+mrc_5_6:
+ text: Restrictions or delays to sharing, with planned actions to limit such restrictions
+ guidance: "Restriction to data sharing may be due to participant confidentiality, consent agreements or IPR. Strategies to limit restrictions may include data being anonymised or aggregated; gaining participant consent for data sharing; gaining copyright permissions. For prospective studies, consent procedures should include provision for data sharing to maximise the value of the data for wider research use, while providing adequate safeguards for participants. As part of the consent process, proposed procedures for data sharing should be set out clearly and current and potential future risks associated with this explained to research participants.
"
+ number: 6
+ section: mrc_5
+ themes: restrictions_on_sharing
+
+mrc_5_7:
+ text: Regulation of responsibilities of users
+ guidance: "Indicate whether external users are (will be) bound by data sharing agreements, setting out their main responsibilities.
"
+ number: 7
+ section: mrc_5
+ themes: managed_access_procedures
+
+mrc_6_1:
+ text: Responsibilities
+ guidance: "Specify who, alongside the PI, is responsible for ensuring the study-wide data management, as well as for specific roles such as metadata creation, data security and quality assurance of data.
"
+ number: 1
+ section: mrc_6
+ themes: responsibilities
+
+mrc_6_2:
+ text: Relevant institutional, departmental or study policies on data sharing and data security
+ guidance: "List policy, URL & reference
Please complete, where such policies are (i) relevant to your study, and (ii) are in the public domain, e.g. accessibly through the internet. Add any others that are relevant
"
+ number: 2
+ section: mrc_6
+ themes: related_policies
+
+stfc_1_1:
+ text: Specify the types of data the research will generate.
+ guidance: "Data management plans should describe the types of data that are expected to be produced from the project, including the raw data arising directly from the research, the reduced data derived from it, and published data.
"
+ number: 1
+ section: stfc_1
+ themes: data_type
+
+stfc_2_1:
+ text: Specify which data will be preserved and how.
+ guidance: "Unless there are compelling reasons not to do so, STFC expects data to be managed through an established repository, chosen to maximise the scientific value from aggregation of related data. This may be at the grant holder's institution or elsewhere. Data management plans may refer to the general policies of the chosen repository and only include further details if necessary to the specific project. (If it is proposed not to use an established repository, the data management plan will need to demonstrate that resources and systems will be in place to enable the data to be curated effectively beyond the lifetime of the grant, although STFC recognises that applicants may not have the expertise to describe in detail how data will be curated).
"
+ number: 1
+ section: stfc_2
+ themes: data_selection, preservation_plan, data_repository
+
+stfc_3_1:
+ text: Specify the software and metadata implications.
+ guidance: "The data management plan should specify the software and metadata that will be retained to enable the data to be read and interpreted.
"
+ number: 1
+ section: stfc_3
+ themes: documentation, metadata_standards
+
+stfc_4_1:
+ text: Specify for how long the data will be preserved.
+ guidance: "This may depend on the type of data. Where possible, STFC expects the original data, from which other related data can in principle be derived, to be retained for a minimum of 10 years from the end of the project. For data that by their nature cannot be re-measured, efforts should be made to retain them indefinitely.
"
+ number: 1
+ section: stfc_4
+ themes: period_of_preservation
+
+stfc_5_1:
+ text: Specify and justify which data will have value to others and should be shared.
+ guidance: "Any data that are shared should be of a sufficiently high quality to be of value to other researchers. In general, published data – data that are displayed or otherwise referred to in a publication – should be made publicly available, but it is for applicants to consider and justify which types of data will, in the context of their project, meaningfully and practically constitute published data. Publicly available means available to anyone, but there may be a requirement for registration to enable tracking of data use and to provide notification of terms and conditions of use where they apply. Other data should be made available wherever it is appropriate and cost-effective to do so, taking into account the cost of curation compared with the cost or feasibility of re-creation, the potential long-term demand for the data and the feasibility of their reuse by others.
"
+ number: 1
+ section: stfc_5
+ themes: audience, expected_reuse, data_selection
+
+stfc_6_1:
+ text: Specify and justify the length of any proprietary period.
+ guidance: "This might for example refer to the reasonable needs of the research team to have a first opportunity to exploit the results of their research, including any intellectual property arising. Where there are accepted norms within a scientific field or specific archive they should normally be followed. In general, STFC expects that published data should be made publicly available within six months of publication unless justified otherwise.
"
+ number: 1
+ section: stfc_6
+ themes: timeframe_for_data_sharing
+
+stfc_7_1:
+ text: Specify how data will be shared
+ guidance: "The minimum level of data sharing expected would be that of making the data available in the natural format in which they were created, along with documentation and metadata, according to the standard accepted procedures within the scientific field. Where the data are likely to be in great demand by others it may be appropriate to request resources for a more proactive approach to data sharing, which maximises opportunities for cross linkage with other sectors.
"
+ number: 1
+ section: stfc_7
+ themes: method_for_data_sharing
+
+stfc_8_1:
+ text: Specify and justify any resources required to preserve and share the data.
+ guidance: "Wherever possible, data management should make use of existing skills and capabilities. However, justification should be made for any additional specialist staff (or training for existing staff) needed within the grant to enable the research team to manage, preserve and share data effectively; and for any computational facilities needed to manage, store and share the data generated by the research.
"
+ number: 1
+ section: stfc_8
+ themes: resourcing_preservation_and_data_sharing, resourcing_skills_and_training
+
+wellcome_1_1:
+ text: What data outputs will your research generate and what data will have value to other researchers?
+ guidance: "Researchers should maximise access to research datasets of value to the wider research community in a timely and responsible manner. Any data that is shared should be of a sufficiently high quality that it will have value to other researchers and should be provided in a format that enables it to be used effectively.
We recognise that in some cases it may not be appropriate for researchers to share their data. However, if your research meets the criteria for requiring a data management and sharing plan but you are intending not to share your data, the reasons for this must be clearly justified.
Data should be shared in accordance with recognised data standards where these exist, and in a way that maximises opportunities for data linkage and interoperability. Sufficient metadata must be provided to enable the dataset to be used by others. Agreed best practice standards for metadata provision should be adopted where these are in place.
When developing data management and sharing plans, researchers should therefore consider and briefly describe:
what types of data the proposed research will generate? which data will have value to other research users and could be shared? what data formats and quality standards will be applied to enable the data to be shared effectively? "
+ number: 1
+ section: wellcome_1
+ themes: description_of_data_content, data_selection, audience, data_format, data_quality, data_type
+
+wellcome_2_1:
+ text: When will you share the data?
+ guidance: "All data management and sharing plans must state clearly the timescales over which datasets of value will be shared. Such timescales should take account of any recognised standards of good practice in the applicant's research field.
In considering the timescales that are appropriate, the Trust recognises fully that data generators have the right to a reasonable (but not unlimited) period of exclusive use for the research data that they produce.
As set out in our guidelines on good research practice, all grant holders must ensure as an absolute minimum that the data underpinning research papers are made available to other researchers on publication, providing this is consistent with any ethics approvals and consents which cover the data and any intellectual property rights in them.
In cases where the creation of a database resource is the primary goal of a Trust-funded activity, we would normally expect the data to be made widely available to user communities at the earliest feasible opportunity.
In line with the Fort Lauderdale Principles and subsequent Toronto statement on pre-publication data sharing, the Trust also encourages timely and responsible pre-publication data sharing for research that might constitute a \"community resource\" (i.e. those that have the characteristics set out in point 7 above).
Where appropriate, researchers may use publication moratoria to facilitate pre-publication sharing of data with other researchers, while protecting their right to first publication. Any such restrictions on data use should be reasonable, transparent and in line with established best practice.
Illustrative examples of timescales for data sharing are provided to help demonstrate different models that have been adopted and may be considered as examples of good practice in the field of large-scale genetics and genomics studies.
"
+ number: 1
+ section: wellcome_2
+ themes: timeframe_for_data_sharing
+
+wellcome_3_1:
+ text: Where will you make the data available?
+ guidance: "Researchers should deposit data in recognised data repositories where these exist for particular data types, unless there is a compelling reason not to do so. Further information on repositories that may be appropriate
If the intention is to create a tailored database resource or to store data locally, researchers should ensure that they have the resources and systems in place so that the data are curated, secured and shared in an way that maximises its value and safeguards any associated risks.This includes consideration of how data held in this way can be effectively linked and integrated with other datasets to enhance its value to users.
"
+ number: 1
+ section: wellcome_3
+ themes: method_for_data_sharing, data_repository
+
+wellcome_4_1:
+ text: How will other researchers be able to access the data?
+ guidance: "Data should be made available to other researchers with as few restrictions as possible. Where a managed access process is required - for example, where a study involves potentially identifiable data about research participants - the access mechanisms established should be proportionate to the risks associated with the data, and must not unduly restrict or delay access. Any managed access procedures that are proposed must be described clearly as part of your data management and sharing plan.
Depending on the study, it may be appropriate to establish a graded access procedure in which less sensitive data (e.g. anonymised and aggregate data) are made readily available, whereas applications to access to more sensitive datasets are subject to a more stringent assessment process.
Any managed access procedures should be consistent and transparent. In cases where a Data Access Committee is required to assess applications to access data, the composition of such Committees should include individuals with appropriate expertise who are independent of the project.
Where appropriate, the Trust would encourage those generating datasets that are likely to be of significant value to other researchers to publish a 'marker paper' or other form of publication, which enables data users to formally cite their usage of the resource.
Where a database resource is being developed as part of a funded activity, researchers should take reasonable steps to ensure that potential users are made aware of its availability. These should be outlined briefly in your plan.
"
+ number: 1
+ section: wellcome_4
+ themes: managed_access_procedures, method_for_data_sharing
+
+wellcome_5_1:
+ text: Are any limits to data sharing required - for example, to either safeguard research participants or to gain appropriate intellectual property protection?
+ guidance: "For some research, delays or limits on data sharing may be necessary and appropriate to safeguard research participants or to ensure intellectual property protection is gained. Any such restrictions should, however, be minimised as far as feasible and set out clearly in data management and sharing plans where these are required.
For research involving samples or information pertaining to human subjects, data must be managed and shared in a way which is fully consistent with the terms of the consent under which samples and data were provided by the research participants.
For prospective studies, consent procedures should include provision for data sharing in a way that maximises the value of the data for wider research use, while providing adequate safeguards for participants. As part of the consent process, proposed procedures for data sharing should be set out clearly and current and potential future risks associated with this explained to research participants.
In designing studies, researchers must ensure that they have appropriate systems to protect the confidentiality and security of data pertaining to human subjects, and minimise any risks of identification by data users. This can be achieved through the use of appropriate anonymisation procedures and managed access processes. Such systems should be sufficient to safeguard participants, but proportionate to the level of sensitivity of the data and associated risk. They should not unduly inhibit responsible data sharing for legitimate research uses.
In line with our policy on intellectual property and patenting, we expect our funded researchers to ensure that any intellectual property in the outputs of their research is suitably protected and managed in a way that best enables the use of that knowledge for ultimate health benefit.
Delays or restrictions on data sharing may be appropriate to gain intellectual property protection or to further development of a technology for public benefit. As noted above, any such limits should be minimised as far as is feasible.
"
+ number: 1
+ section: wellcome_5
+ themes: restrictions_on_sharing, data_security, ethical_issues, ipr_ownership_and_licencing
+
+wellcome_6_1:
+ text: How will you ensure that key datasets are preserved to ensure their long-term value?
+ guidance: "Researchers must consider how datasets that have long-term value will be preserved and curated beyond the lifetime of the grant. If the proposal is to create a bespoke data resource or to store data locally rather than to use a recognised data repository, data management plans should state clearly how the applicant expects that the dataset will be preserved and shared when the period of grant funding comes to an end.
The Trust is happy to discuss issues relating to longer-term preservation and sustainability with researchers so as to help provide the support required to maximise the long-term value of key research datasets.
"
+ number: 1
+ section: wellcome_6
+ themes: preservation_plan, data_repository
+
+wellcome_7_1:
+ text: What resources will you require to deliver your plan?
+ guidance: "In preparing data management and sharing plans, researchers should consider carefully any resources they may need to deliver their plan.Where dedicated resources are required, these should be outlined and justified as part of the plan.
Issues to consider include:
People and skills - is there sufficient expertise and resource in the research team to manage, preserve and share the data effectively?Is additional specialist expertise (or training for existing staff) required? If so, how will this be sourced? Infrastructure - are there appropriate computational facilities to manage, store and analyse the data generated by the research? Tools - will additional computational facilities and resources need to be accessed, and what will be the costs associated with this? "
+ number: 1
+ section: wellcome_7
+ themes: resourcing_skills_and_training, resourcing_hardware_and_software, resourcing_preservation_and_data_sharing
diff --git a/test/fixtures/roles.yml b/test/fixtures/roles.yml
index add775b..8b97a65 100644
--- a/test/fixtures/roles.yml
+++ b/test/fixtures/roles.yml
@@ -1,4 +1,4 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-admin_role:
- name: "admin"
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+admin_role:
+ name: "admin"
diff --git a/test/fixtures/sections.yml b/test/fixtures/sections.yml
index 9adf97f..5a97476 100644
--- a/test/fixtures/sections.yml
+++ b/test/fixtures/sections.yml
@@ -1,442 +1,442 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-administrative_data:
- title: Administrative Data
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 1
- version: DCC_phase_1_version_1
- organisation: dcc
-
-data_collection:
- title: Data Collection
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 2
- version: DCC_phase_1_version_1
- organisation: dcc
-
-documentation_and_metadata:
- title: Documentation and Metadata
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 3
- version: DCC_phase_1_version_1
- organisation: dcc
-
-ethics_and_legal_compliance:
- title: Ethics and Legal Compliance
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 4
- version: DCC_phase_1_version_1
- organisation: dcc
-
-storage_and_backup:
- title: Storage and Backup
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 5
- version: DCC_phase_1_version_1
- organisation: dcc
-
-selection_and_preservation:
- title: Selection and Preservation
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 6
- version: DCC_phase_1_version_1
- organisation: dcc
-
-data_sharing:
- title: Data Sharing
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 7
- version: DCC_phase_1_version_1
- organisation: dcc
-
-responsibilities_and_resources:
- title: Responsibilities and Resources
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- number: 8
- version: DCC_phase_1_version_1
- organisation: dcc
-
-#multiple_choice:
-# title: Multiple Choice Examples
-# description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
-# number: 9
-# version: DCC_phase_1_version_1
-# organisation: dcc
-
-ahrc_1:
- title: Summary of Digital Outputs and Digital Technologies
- number: 1
- version: ahrc_template_1_version_1
- organisation: ahrc
-
-ahrc_2:
- title: Technical Methodology
- number: 2
- version: ahrc_template_1_version_1
- organisation: ahrc
-
-ahrc_3:
- title: Technical Support and Relevant Experience
- number: 3
- version: ahrc_template_1_version_1
- organisation: ahrc
-
-ahrc_4:
- title: Preservation, Sustainability and Use
- number: 4
- version: ahrc_template_1_version_1
- organisation: ahrc
-
-bbsrc_1:
- title: Data areas and data types
- number: 1
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_2:
- title: Standards and metadata
- number: 2
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_3:
- title: Relationship to other data available in public repositories
- number: 3
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_4:
- title: Secondary Use
- number: 4
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_5:
- title: Methods for data sharing
- number: 5
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_6:
- title: Proprietary data
- number: 6
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_7:
- title: Timeframes
- number: 7
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-bbsrc_8:
- title: Format of the final dataset
- number: 8
- version: bbsrc_template_1_version_1
- organisation: bbsrc
-
-cruk_1:
- title: Data volume, type, content and format
- number: 1
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_2:
- title: Data collection and management standards
- number: 2
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_3:
- title: Metadata, documentation and other supporting material
- number: 3
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_4:
- title: Sharing method
- number: 4
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_5:
- title: Release timescale
- number: 5
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_6:
- title: Preservation Plan
- number: 6
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_7:
- title: Data sharing agreement
- number: 7
- version: cruk_template_1_version_1
- organisation: cruk
-
-cruk_8:
- title: Sharing restrictions
- number: 8
- version: cruk_template_1_version_1
- organisation: cruk
-
-esrc_1:
- title: Existing data
- number: 1
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_2:
- title: Information on the data that will be produced
- number: 2
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_3:
- title: Planned quality assurance and back-up procedures (security/storage)
- number: 3
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_4:
- title: Management and archiving of collected data
- number: 4
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_5:
- title: Overcoming data sharing difficulties
- number: 5
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_6:
- title: Consent, confidentiality, anonymisation and other ethical considerations
- number: 6
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_7:
- title: Copyright and intellectual property ownership of the data
- number: 7
- version: esrc_template_1_version_1
- organisation: esrc
-
-esrc_8:
- title: Responsibilities for data management and curation
- number: 8
- version: esrc_template_1_version_1
- organisation: esrc
-
-nerc_1_1:
- title: Data management procedures to be followed during the lifetime of the grant or fellowship
- number: 1
- version: nerc_template_1_version_1
- organisation: nerc
-
-nerc_1_2:
- title: Existing datasets to be used by the grant or fellowship
- number: 2
- version: nerc_template_1_version_1
- organisation: nerc
-
-nerc_1_3:
- title: Datasets likely to be created by the grant or fellowship which will be made available to a NERC Environmental Data Centre at the end of the Grant
- number: 3
- version: nerc_template_1_version_1
- organisation: nerc
-
-nerc_2_1:
- title: Organisation
- number: 1
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_2:
- title: Roles and Responsibilities
- number: 2
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_3:
- title: Data Generation Activities
- number: 3
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_4:
- title: In-Project Data Management Approach
- number: 4
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_5:
- title: Metadata and Documentation
- number: 5
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_6:
- title: Data Quality
- number: 6
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_7:
- title: Exceptions or Additional Services
- number: 7
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_8:
- title: New Datasets
- number: 8
- version: nerc_template_2_version_1
- organisation: nerc
-
-nerc_2_9:
- title: Third Party/Existing Datasets
- number: 9
- version: nerc_template_2_version_1
- organisation: nerc
-
-mrc_1:
- title: Description of Data
- number: 1
- version: mrc_template_1_version_1
- organisation: mrc
-
-mrc_2:
- title: Data collection / generation
- number: 2
- version: mrc_template_1_version_1
- organisation: mrc
-
-mrc_3:
- title: Data management, documentation and curation
- number: 3
- version: mrc_template_1_version_1
- organisation: mrc
-
-mrc_4:
- title: Data security and confidentiality of potentially disclosive personal information
- number: 4
- version: mrc_template_1_version_1
- organisation: mrc
-
-mrc_5:
- title: Data sharing and access
- number: 5
- version: mrc_template_1_version_1
- organisation: mrc
-
-mrc_6:
- title: Policies and Responsibilities
- number: 6
- version: mrc_template_1_version_1
- organisation: mrc
-
-stfc_1:
- title: Data types
- number: 1
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_2:
- title: Which data will be preserved and how
- number: 2
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_3:
- title: Software and metadata implications
- number: 3
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_4:
- title: Preservation period
- number: 4
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_5:
- title: Which data will have value to others and should be shared
- number: 5
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_6:
- title: Proprietary period
- number: 6
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_7:
- title: How data will be shared
- number: 7
- version: stfc_template_1_version_1
- organisation: stfc
-
-stfc_8:
- title: Resources required to preserve and share data
- number: 8
- version: stfc_template_1_version_1
- organisation: stfc
-
-wellcome_1:
- title: Data outputs
- number: 1
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-wellcome_2:
- title: Data sharing timeframe
- number: 2
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-wellcome_3:
- title: Data sharing method
- number: 3
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-wellcome_4:
- title: Access for other researchers
- number: 4
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-wellcome_5:
- title: Data sharing limits
- number: 5
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-wellcome_6:
- title: Data preservation
- number: 6
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-wellcome_7:
- title: Required resources
- number: 7
- version: wellcome_template_1_version_1
- organisation: wellcome
-
-institution_parent_1:
- title: first section
- number: 1
- version: institution_child_version_1
- organisation: institution_parent
-
-institution_parent_2:
- title: seccond section
- number: 2
- version: institution_child_version_1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+administrative_data:
+ title: Administrative Data
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 1
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+data_collection:
+ title: Data Collection
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 2
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+documentation_and_metadata:
+ title: Documentation and Metadata
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 3
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+ethics_and_legal_compliance:
+ title: Ethics and Legal Compliance
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 4
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+storage_and_backup:
+ title: Storage and Backup
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 5
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+selection_and_preservation:
+ title: Selection and Preservation
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 6
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+data_sharing:
+ title: Data Sharing
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 7
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+responsibilities_and_resources:
+ title: Responsibilities and Resources
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ number: 8
+ version: DCC_phase_1_version_1
+ organisation: dcc
+
+#multiple_choice:
+# title: Multiple Choice Examples
+# description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+# number: 9
+# version: DCC_phase_1_version_1
+# organisation: dcc
+
+ahrc_1:
+ title: Summary of Digital Outputs and Digital Technologies
+ number: 1
+ version: ahrc_template_1_version_1
+ organisation: ahrc
+
+ahrc_2:
+ title: Technical Methodology
+ number: 2
+ version: ahrc_template_1_version_1
+ organisation: ahrc
+
+ahrc_3:
+ title: Technical Support and Relevant Experience
+ number: 3
+ version: ahrc_template_1_version_1
+ organisation: ahrc
+
+ahrc_4:
+ title: Preservation, Sustainability and Use
+ number: 4
+ version: ahrc_template_1_version_1
+ organisation: ahrc
+
+bbsrc_1:
+ title: Data areas and data types
+ number: 1
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_2:
+ title: Standards and metadata
+ number: 2
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_3:
+ title: Relationship to other data available in public repositories
+ number: 3
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_4:
+ title: Secondary Use
+ number: 4
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_5:
+ title: Methods for data sharing
+ number: 5
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_6:
+ title: Proprietary data
+ number: 6
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_7:
+ title: Timeframes
+ number: 7
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+bbsrc_8:
+ title: Format of the final dataset
+ number: 8
+ version: bbsrc_template_1_version_1
+ organisation: bbsrc
+
+cruk_1:
+ title: Data volume, type, content and format
+ number: 1
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_2:
+ title: Data collection and management standards
+ number: 2
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_3:
+ title: Metadata, documentation and other supporting material
+ number: 3
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_4:
+ title: Sharing method
+ number: 4
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_5:
+ title: Release timescale
+ number: 5
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_6:
+ title: Preservation Plan
+ number: 6
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_7:
+ title: Data sharing agreement
+ number: 7
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+cruk_8:
+ title: Sharing restrictions
+ number: 8
+ version: cruk_template_1_version_1
+ organisation: cruk
+
+esrc_1:
+ title: Existing data
+ number: 1
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_2:
+ title: Information on the data that will be produced
+ number: 2
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_3:
+ title: Planned quality assurance and back-up procedures (security/storage)
+ number: 3
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_4:
+ title: Management and archiving of collected data
+ number: 4
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_5:
+ title: Overcoming data sharing difficulties
+ number: 5
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_6:
+ title: Consent, confidentiality, anonymisation and other ethical considerations
+ number: 6
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_7:
+ title: Copyright and intellectual property ownership of the data
+ number: 7
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+esrc_8:
+ title: Responsibilities for data management and curation
+ number: 8
+ version: esrc_template_1_version_1
+ organisation: esrc
+
+nerc_1_1:
+ title: Data management procedures to be followed during the lifetime of the grant or fellowship
+ number: 1
+ version: nerc_template_1_version_1
+ organisation: nerc
+
+nerc_1_2:
+ title: Existing datasets to be used by the grant or fellowship
+ number: 2
+ version: nerc_template_1_version_1
+ organisation: nerc
+
+nerc_1_3:
+ title: Datasets likely to be created by the grant or fellowship which will be made available to a NERC Environmental Data Centre at the end of the Grant
+ number: 3
+ version: nerc_template_1_version_1
+ organisation: nerc
+
+nerc_2_1:
+ title: Organisation
+ number: 1
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_2:
+ title: Roles and Responsibilities
+ number: 2
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_3:
+ title: Data Generation Activities
+ number: 3
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_4:
+ title: In-Project Data Management Approach
+ number: 4
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_5:
+ title: Metadata and Documentation
+ number: 5
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_6:
+ title: Data Quality
+ number: 6
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_7:
+ title: Exceptions or Additional Services
+ number: 7
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_8:
+ title: New Datasets
+ number: 8
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+nerc_2_9:
+ title: Third Party/Existing Datasets
+ number: 9
+ version: nerc_template_2_version_1
+ organisation: nerc
+
+mrc_1:
+ title: Description of Data
+ number: 1
+ version: mrc_template_1_version_1
+ organisation: mrc
+
+mrc_2:
+ title: Data collection / generation
+ number: 2
+ version: mrc_template_1_version_1
+ organisation: mrc
+
+mrc_3:
+ title: Data management, documentation and curation
+ number: 3
+ version: mrc_template_1_version_1
+ organisation: mrc
+
+mrc_4:
+ title: Data security and confidentiality of potentially disclosive personal information
+ number: 4
+ version: mrc_template_1_version_1
+ organisation: mrc
+
+mrc_5:
+ title: Data sharing and access
+ number: 5
+ version: mrc_template_1_version_1
+ organisation: mrc
+
+mrc_6:
+ title: Policies and Responsibilities
+ number: 6
+ version: mrc_template_1_version_1
+ organisation: mrc
+
+stfc_1:
+ title: Data types
+ number: 1
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_2:
+ title: Which data will be preserved and how
+ number: 2
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_3:
+ title: Software and metadata implications
+ number: 3
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_4:
+ title: Preservation period
+ number: 4
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_5:
+ title: Which data will have value to others and should be shared
+ number: 5
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_6:
+ title: Proprietary period
+ number: 6
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_7:
+ title: How data will be shared
+ number: 7
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+stfc_8:
+ title: Resources required to preserve and share data
+ number: 8
+ version: stfc_template_1_version_1
+ organisation: stfc
+
+wellcome_1:
+ title: Data outputs
+ number: 1
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+wellcome_2:
+ title: Data sharing timeframe
+ number: 2
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+wellcome_3:
+ title: Data sharing method
+ number: 3
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+wellcome_4:
+ title: Access for other researchers
+ number: 4
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+wellcome_5:
+ title: Data sharing limits
+ number: 5
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+wellcome_6:
+ title: Data preservation
+ number: 6
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+wellcome_7:
+ title: Required resources
+ number: 7
+ version: wellcome_template_1_version_1
+ organisation: wellcome
+
+institution_parent_1:
+ title: first section
+ number: 1
+ version: institution_child_version_1
+ organisation: institution_parent
+
+institution_parent_2:
+ title: seccond section
+ number: 2
+ version: institution_child_version_1
organisation: institution_parent
\ No newline at end of file
diff --git a/test/fixtures/themes.yml b/test/fixtures/themes.yml
index 8bc2df6..d02ca85 100644
--- a/test/fixtures/themes.yml
+++ b/test/fixtures/themes.yml
@@ -1,176 +1,176 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-related_policies:
- title: Related Policies
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-existing_data:
- title: Existing Data
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-licensing_of_existing_data:
- title: Licensing of Existing Data
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-relationship_to_existing_data:
- title: Relationship to Existing Data
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-description_of_data_content:
- title: Description of Data Content
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_format:
- title: Data Format
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_volumes:
- title: Data Volumes
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_type:
- title: Data Type
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_capture_methods:
- title: Data Capture Methods
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_organisation:
- title: Data Organisation
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_quality:
- title: Data Quality
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-documentation:
- title: Documentation
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-metadata_capture:
- title: Metadata Capture
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-metadata_standards:
- title: Metadata Standards
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-discovery_by_users:
- title: Discovery by Users
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-ethical_issues:
- title: Ethical Issues
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-ipr_ownership_and_licencing:
- title: IPR Ownership and Licencing
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-active_data_storage:
- title: Active Data Storage
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-backup_procedures:
- title: Backup Procedures
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_security:
- title: Data Security
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_selection:
- title: Data Selection
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-preservation_plan:
- title: Preservation Plan
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-period_of_preservation:
- title: Period of Preservation
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-data_repository:
- title: Data Repository
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-audience:
- title: Audience
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-expected_reuse:
- title: Expected Reuse
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-method_for_data_sharing:
- title: Method For Data Sharing
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-timeframe_for_data_sharing:
- title: Timeframe For Data Sharing
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-embargo_period:
- title: Embargo Period
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-restrictions_on_sharing:
- title: Restrictions on Sharing
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-managed_access_procedures:
- title: Managed Access Procedures
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-responsibilities:
- title: Responsibilities
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-resourcing_skills_and_training:
- title: "Resourcing: Skills and Training"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-resourcing_hardware_and_software:
- title: "Resourcing: Hardware and Software"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
-
-resourcing_preservation_and_data_sharing:
- title: "Resourcing: Preservation and Data Sharing"
- description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- locale: en
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+related_policies:
+ title: Related Policies
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+existing_data:
+ title: Existing Data
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+licensing_of_existing_data:
+ title: Licensing of Existing Data
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+relationship_to_existing_data:
+ title: Relationship to Existing Data
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+description_of_data_content:
+ title: Description of Data Content
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_format:
+ title: Data Format
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_volumes:
+ title: Data Volumes
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_type:
+ title: Data Type
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_capture_methods:
+ title: Data Capture Methods
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_organisation:
+ title: Data Organisation
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_quality:
+ title: Data Quality
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+documentation:
+ title: Documentation
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+metadata_capture:
+ title: Metadata Capture
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+metadata_standards:
+ title: Metadata Standards
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+discovery_by_users:
+ title: Discovery by Users
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+ethical_issues:
+ title: Ethical Issues
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+ipr_ownership_and_licencing:
+ title: IPR Ownership and Licencing
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+active_data_storage:
+ title: Active Data Storage
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+backup_procedures:
+ title: Backup Procedures
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_security:
+ title: Data Security
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_selection:
+ title: Data Selection
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+preservation_plan:
+ title: Preservation Plan
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+period_of_preservation:
+ title: Period of Preservation
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+data_repository:
+ title: Data Repository
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+audience:
+ title: Audience
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+expected_reuse:
+ title: Expected Reuse
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+method_for_data_sharing:
+ title: Method For Data Sharing
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+timeframe_for_data_sharing:
+ title: Timeframe For Data Sharing
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+embargo_period:
+ title: Embargo Period
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+restrictions_on_sharing:
+ title: Restrictions on Sharing
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+managed_access_procedures:
+ title: Managed Access Procedures
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+responsibilities:
+ title: Responsibilities
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+resourcing_skills_and_training:
+ title: "Resourcing: Skills and Training"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+resourcing_hardware_and_software:
+ title: "Resourcing: Hardware and Software"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
+
+resourcing_preservation_and_data_sharing:
+ title: "Resourcing: Preservation and Data Sharing"
+ description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+ locale: en
diff --git a/test/fixtures/user_org_roles.yml b/test/fixtures/user_org_roles.yml
index a08038e..37f40d7 100644
--- a/test/fixtures/user_org_roles.yml
+++ b/test/fixtures/user_org_roles.yml
@@ -1,24 +1,29 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# user_id: 1
-# organisation_id: 1
-# user_role_type_id: 1
-#
-#two:
-# user_id: 1
-# organisation_id: 1
-# user_role_type_id: 1
-#
-
-one:
- user: user_one
- organisation: aru
-
-two:
- user: user_two
- organisation: au
-
-three:
- user: user_three
- organisation: bu
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# user_id: 1
+# organisation_id: 1
+# user_role_type_id: 1
+#
+#two:
+# user_id: 1
+# organisation_id: 1
+# user_role_type_id: 1
+#
+
+one:
+ user: user_one
+ organisation: aru
+
+two:
+ user: user_two
+ organisation: au
+
+three:
+ user: user_three
+ organisation: bu
+
+dcc_user_1:
+ user: user_dcc
+ organisation: dcc
+
diff --git a/test/fixtures/user_role_types.yml b/test/fixtures/user_role_types.yml
index b9c7d3b..3e0b793 100644
--- a/test/fixtures/user_role_types.yml
+++ b/test/fixtures/user_role_types.yml
@@ -1,10 +1,10 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-enduser:
- name: user
-
-
-#
-#two:
-# name: MyString
-# description: MyText
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+enduser:
+ name: user
+
+
+#
+#two:
+# name: MyString
+# description: MyText
diff --git a/test/fixtures/user_statuses.yml b/test/fixtures/user_statuses.yml
index 885632c..bae1aa9 100644
--- a/test/fixtures/user_statuses.yml
+++ b/test/fixtures/user_statuses.yml
@@ -1,9 +1,9 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# name: MyString
-# description: MyText
-#
-#two:
-# name: MyString
-# description: MyText
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# name: MyString
+# description: MyText
+#
+#two:
+# name: MyString
+# description: MyText
diff --git a/test/fixtures/user_types.yml b/test/fixtures/user_types.yml
index 885632c..bae1aa9 100644
--- a/test/fixtures/user_types.yml
+++ b/test/fixtures/user_types.yml
@@ -1,9 +1,9 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-#one:
-# name: MyString
-# description: MyText
-#
-#two:
-# name: MyString
-# description: MyText
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+#one:
+# name: MyString
+# description: MyText
+#
+#two:
+# name: MyString
+# description: MyText
diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml
index 4d9373a..3ad387b 100644
--- a/test/fixtures/users.yml
+++ b/test/fixtures/users.yml
@@ -1,48 +1,48 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-user_one:
- firstname: MyString
- surname: MyString
- email: MyString
- orcid_id: MyString
- shibboleth_id: MyString
- user_type_id: 1
- user_status_id: 1
- api_token: "guidances_api_token"
- #organisation: aru
-
-user_two:
- firstname: MyString
- surname: MyString
- email: "me@example.net"
- orcid_id: MyString
- shibboleth_id: MyString
- user_type_id: 1
- user_status_id: 1
- api_token: "plans_api_token"
- #organisation: au
-
-user_three:
- firstname: Mystring
- surname: Mystring
- email: "MyString@whousesyahoo.com"
- orcid_id: MyString
- shibboleth_id: MyString
- user_type_id: 1
- user_status_id: 1
- api_token: "plans_api_token"
- #organisation: bu
-
-
-with_many_projects:
- firstname: Many
- surname: Projects
- email: many.projects@example.com
-
-user_dcc:
- firstname: "john"
- surname: "doe"
- email: "me@dcc.net"
- user_type_id: 1
- user_status_id: 1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+user_one:
+ firstname: MyString
+ surname: MyString
+ email: MyString
+ orcid_id: MyString
+ shibboleth_id: MyString
+ user_type_id: 1
+ user_status_id: 1
+ api_token: "guidances_api_token"
+ #organisation: aru
+
+user_two:
+ firstname: MyString
+ surname: MyString
+ email: "me@example.net"
+ orcid_id: MyString
+ shibboleth_id: MyString
+ user_type_id: 1
+ user_status_id: 1
+ api_token: "plans_api_token"
+ #organisation: au
+
+user_three:
+ firstname: Mystring
+ surname: Mystring
+ email: "MyString@whousesyahoo.com"
+ orcid_id: MyString
+ shibboleth_id: MyString
+ user_type_id: 1
+ user_status_id: 1
+ api_token: "plans_api_token"
+ #organisation: bu
+
+
+with_many_projects:
+ firstname: Many
+ surname: Projects
+ email: many.projects@example.com
+
+user_dcc:
+ firstname: "john"
+ surname: "doe"
+ email: "me@dcc.net"
+ user_type_id: 1
+ user_status_id: 1
api_token: "wasd"
\ No newline at end of file
diff --git a/test/fixtures/versions.yml b/test/fixtures/versions.yml
index 5a8d2f1..2e7572d 100644
--- a/test/fixtures/versions.yml
+++ b/test/fixtures/versions.yml
@@ -1,67 +1,67 @@
-# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-
-DCC_phase_1_version_1:
- title: DCC Phase 1 Version 1
- published: 1
- number: 1
- phase: DCC_phase_1
-
-ahrc_template_1_version_1:
- title: "AHRC Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: ahrc_template_1
-
-bbsrc_template_1_version_1:
- title: "BBSRC Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: bbsrc_template_1
-
-cruk_template_1_version_1:
- title: "CRUK Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: cruk_template_1
-
-esrc_template_1_version_1:
- title: "ESRC Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: esrc_template_1
-
-nerc_template_1_version_1:
- title: "Outline for application (Version 1)"
- published: 1
- number: 1
- phase: nerc_template_1
-
-nerc_template_2_version_1:
- title: "Detail following award (Version 1)"
- published: 1
- number: 1
- phase: nerc_template_2
-
-mrc_template_1_version_1:
- title: "MRC Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: mrc_template_1
-
-stfc_template_1_version_1:
- title: "STFC Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: stfc_template_1
-
-wellcome_template_1_version_1:
- title: "Wellcome Trust Data Management Questions (Version 1)"
- published: 1
- number: 1
- phase: wellcome_template_1
-
-institution_child_version_1:
- title: DCC Phase 1 Version 1
- published: 1
- number: 1
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+DCC_phase_1_version_1:
+ title: DCC Phase 1 Version 1
+ published: 1
+ number: 1
+ phase: DCC_phase_1
+
+ahrc_template_1_version_1:
+ title: "AHRC Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: ahrc_template_1
+
+bbsrc_template_1_version_1:
+ title: "BBSRC Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: bbsrc_template_1
+
+cruk_template_1_version_1:
+ title: "CRUK Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: cruk_template_1
+
+esrc_template_1_version_1:
+ title: "ESRC Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: esrc_template_1
+
+nerc_template_1_version_1:
+ title: "Outline for application (Version 1)"
+ published: 1
+ number: 1
+ phase: nerc_template_1
+
+nerc_template_2_version_1:
+ title: "Detail following award (Version 1)"
+ published: 1
+ number: 1
+ phase: nerc_template_2
+
+mrc_template_1_version_1:
+ title: "MRC Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: mrc_template_1
+
+stfc_template_1_version_1:
+ title: "STFC Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: stfc_template_1
+
+wellcome_template_1_version_1:
+ title: "Wellcome Trust Data Management Questions (Version 1)"
+ published: 1
+ number: 1
+ phase: wellcome_template_1
+
+institution_child_version_1:
+ title: DCC Phase 1 Version 1
+ published: 1
+ number: 1
phase: DCC_phase_1
\ No newline at end of file
diff --git a/test/functional/answers_controller_test.rb b/test/functional/answers_controller_test.rb
index 96c9d91..9981abc 100644
--- a/test/functional/answers_controller_test.rb
+++ b/test/functional/answers_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class AnswersControllerTest < ActionController::TestCase
-=begin
- setup do
- @answer = answers(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:answers)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create answer" do
- assert_difference('Answer.count') do
- post :create, answer: { text: @answer.text, plan_id: @answer.plan_id, question_id: @answer.question_id, user_id: @answer.user_id }
- end
-
- assert_redirected_to answer_path(assigns(:answer))
- end
-
- test "should show answer" do
- get :show, id: @answer
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @answer
- assert_response :success
- end
-
- test "should update answer" do
- put :update, id: @answer, answer: { text: @answer.text, plan_id: @answer.plan_id, question_id: @answer.question_id, user_id: @answer.user_id }
- assert_redirected_to answer_path(assigns(:answer))
- end
-
- test "should destroy answer" do
- assert_difference('Answer.count', -1) do
- delete :destroy, id: @answer
- end
-
- assert_redirected_to answers_path
- end
-=end
-end
+require 'test_helper'
+
+class AnswersControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @answer = answers(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:answers)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create answer" do
+ assert_difference('Answer.count') do
+ post :create, answer: { text: @answer.text, plan_id: @answer.plan_id, question_id: @answer.question_id, user_id: @answer.user_id }
+ end
+
+ assert_redirected_to answer_path(assigns(:answer))
+ end
+
+ test "should show answer" do
+ get :show, id: @answer
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @answer
+ assert_response :success
+ end
+
+ test "should update answer" do
+ put :update, id: @answer, answer: { text: @answer.text, plan_id: @answer.plan_id, question_id: @answer.question_id, user_id: @answer.user_id }
+ assert_redirected_to answer_path(assigns(:answer))
+ end
+
+ test "should destroy answer" do
+ assert_difference('Answer.count', -1) do
+ delete :destroy, id: @answer
+ end
+
+ assert_redirected_to answers_path
+ end
+=end
+end
diff --git a/test/functional/api_projects_controller_test.rb b/test/functional/api_projects_controller_test.rb
index d47d190..eefc7a1 100644
--- a/test/functional/api_projects_controller_test.rb
+++ b/test/functional/api_projects_controller_test.rb
@@ -1,57 +1,57 @@
-require 'test_helper'
-require "rack/test"
-
-class ApiProjectsControllerTest < ActiveSupport::TestCase
- include Rack::Test::Methods
-
- def app
- MyApp.new
- end
-
- @controller = Api::V0::ProjectsController.new
-
- test "create validates that a user has plans auth" do
- # has auth for projects
- @user = users(:user_dcc)
- post :create, params: {template:{organisation: "Arts and Humanities Research Council"},project:{title:"my project", email:"org_admin@example.com"}}
- assert_response :success
-
- # has no auth for projects
- # @user = users(:user_three)
- # post :create, params: {template:{organisation: "Arts and Humanities Research Council"},project:{title:"my project", email:"org_admin@example.com"}}
- # assert_response 400
- end
-
- test "create validates that the passed organisation exists" do
- flunk
- end
-
- test "create validates that the passed organisation is a funder" do
- flunk
- end
-
- test "create validates that the passed organisation has only 1 template" do
- flunk
- end
-
- test "create validates that a passed organisation with more than one template specifies template" do
- flunk
- end
-
- test "create checks for a guidance and adds it if it exists" do
- flunk
- end
-
- test "create checks for guidances and adds them if they exist" do
- flunk
- end
-
- test "create invites is user email not already in system" do
- flunk
- end
-
- test "create creates a new project when params correct" do
- flunk
- end
-
+require 'test_helper'
+require "rack/test"
+
+class ApiProjectsControllerTest < ActiveSupport::TestCase
+ include Rack::Test::Methods
+
+ def app
+ MyApp.new
+ end
+
+ @controller = Api::V0::ProjectsController.new
+
+ test "create validates that a user has plans auth" do
+ # has auth for projects
+ @user = users(:user_dcc)
+ post :create, params: {template:{organisation: "Arts and Humanities Research Council"},project:{title:"my project", email:"org_admin@example.com"}}
+ assert_response :success
+
+ # has no auth for projects
+ # @user = users(:user_three)
+ # post :create, params: {template:{organisation: "Arts and Humanities Research Council"},project:{title:"my project", email:"org_admin@example.com"}}
+ # assert_response 400
+ end
+
+ test "create validates that the passed organisation exists" do
+ flunk
+ end
+
+ test "create validates that the passed organisation is a funder" do
+ flunk
+ end
+
+ test "create validates that the passed organisation has only 1 template" do
+ flunk
+ end
+
+ test "create validates that a passed organisation with more than one template specifies template" do
+ flunk
+ end
+
+ test "create checks for a guidance and adds it if it exists" do
+ flunk
+ end
+
+ test "create checks for guidances and adds them if they exist" do
+ flunk
+ end
+
+ test "create invites is user email not already in system" do
+ flunk
+ end
+
+ test "create creates a new project when params correct" do
+ flunk
+ end
+
end
\ No newline at end of file
diff --git a/test/functional/dmptemplates_controller_test.rb b/test/functional/dmptemplates_controller_test.rb
index 3cab074..a3a7521 100644
--- a/test/functional/dmptemplates_controller_test.rb
+++ b/test/functional/dmptemplates_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class DmptemplatesControllerTest < ActionController::TestCase
-=begin
- setup do
- @dmptemplate = dmptemplates(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:dmptemplates)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create dmptemplate" do
- assert_difference('Dmptemplate.count') do
- post :create, dmptemplate: { organisation_id: @dmptemplate.organisation_id, description: @dmptemplate.description, published: @dmptemplate.published, title: @dmptemplate.title, user_id: @dmptemplate.user_id }
- end
-
- assert_redirected_to dmptemplate_path(assigns(:dmptemplate))
- end
-
- test "should show dmptemplate" do
- get :show, id: @dmptemplate
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @dmptemplate
- assert_response :success
- end
-
- test "should update dmptemplate" do
- put :update, id: @dmptemplate, dmptemplate: { organisation_id: @dmptemplate.organisation_id, description: @dmptemplate.description, published: @dmptemplate.published, title: @dmptemplate.title, user_id: @dmptemplate.user_id }
- assert_redirected_to dmptemplate_path(assigns(:dmptemplate))
- end
-
- test "should destroy dmptemplate" do
- assert_difference('Dmptemplate.count', -1) do
- delete :destroy, id: @dmptemplate
- end
-
- assert_redirected_to dmptemplates_path
- end
-=end
-end
+require 'test_helper'
+
+class DmptemplatesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @dmptemplate = dmptemplates(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:dmptemplates)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create dmptemplate" do
+ assert_difference('Dmptemplate.count') do
+ post :create, dmptemplate: { organisation_id: @dmptemplate.organisation_id, description: @dmptemplate.description, published: @dmptemplate.published, title: @dmptemplate.title, user_id: @dmptemplate.user_id }
+ end
+
+ assert_redirected_to dmptemplate_path(assigns(:dmptemplate))
+ end
+
+ test "should show dmptemplate" do
+ get :show, id: @dmptemplate
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @dmptemplate
+ assert_response :success
+ end
+
+ test "should update dmptemplate" do
+ put :update, id: @dmptemplate, dmptemplate: { organisation_id: @dmptemplate.organisation_id, description: @dmptemplate.description, published: @dmptemplate.published, title: @dmptemplate.title, user_id: @dmptemplate.user_id }
+ assert_redirected_to dmptemplate_path(assigns(:dmptemplate))
+ end
+
+ test "should destroy dmptemplate" do
+ assert_difference('Dmptemplate.count', -1) do
+ delete :destroy, id: @dmptemplate
+ end
+
+ assert_redirected_to dmptemplates_path
+ end
+=end
+end
diff --git a/test/functional/file_types_controller_test.rb b/test/functional/file_types_controller_test.rb
index da6bc20..168c370 100644
--- a/test/functional/file_types_controller_test.rb
+++ b/test/functional/file_types_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class FileTypesControllerTest < ActionController::TestCase
-=begin
- setup do
- @file_type = file_types(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:file_types)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create file_type" do
- assert_difference('FileType.count') do
- post :create, file_type: { name: @file_type.name, icon_location: @file_type.icon_location, icon_name: @file_type.icon_name, icon_size: @file_type.icon_size }
- end
-
- assert_redirected_to file_type_path(assigns(:file_type))
- end
-
- test "should show file_type" do
- get :show, id: @file_type
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @file_type
- assert_response :success
- end
-
- test "should update file_type" do
- put :update, id: @file_type, file_type: { name: @file_type.name, icon_location: @file_type.icon_location, icon_name: @file_type.icon_name, icon_size: @file_type.icon_size }
- assert_redirected_to file_type_path(assigns(:file_type))
- end
-
- test "should destroy file_type" do
- assert_difference('FileType.count', -1) do
- delete :destroy, id: @file_type
- end
-
- assert_redirected_to file_types_path
- end
-=end
-end
+require 'test_helper'
+
+class FileTypesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @file_type = file_types(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:file_types)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create file_type" do
+ assert_difference('FileType.count') do
+ post :create, file_type: { name: @file_type.name, icon_location: @file_type.icon_location, icon_name: @file_type.icon_name, icon_size: @file_type.icon_size }
+ end
+
+ assert_redirected_to file_type_path(assigns(:file_type))
+ end
+
+ test "should show file_type" do
+ get :show, id: @file_type
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @file_type
+ assert_response :success
+ end
+
+ test "should update file_type" do
+ put :update, id: @file_type, file_type: { name: @file_type.name, icon_location: @file_type.icon_location, icon_name: @file_type.icon_name, icon_size: @file_type.icon_size }
+ assert_redirected_to file_type_path(assigns(:file_type))
+ end
+
+ test "should destroy file_type" do
+ assert_difference('FileType.count', -1) do
+ delete :destroy, id: @file_type
+ end
+
+ assert_redirected_to file_types_path
+ end
+=end
+end
diff --git a/test/functional/file_uploads_controller_test.rb b/test/functional/file_uploads_controller_test.rb
index 9c7a8b8..41a1a64 100644
--- a/test/functional/file_uploads_controller_test.rb
+++ b/test/functional/file_uploads_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class FileUploadsControllerTest < ActionController::TestCase
-=begin
- setup do
- @file_upload = file_uploads(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:file_uploads)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create file_upload" do
- assert_difference('FileUpload.count') do
- post :create, file_upload: { file_type_id: @file_upload.file_type_id, description: @file_upload.description, location: @file_upload.location, name: @file_upload.name, published: @file_upload.published, size: @file_upload.size, title: @file_upload.title }
- end
-
- assert_redirected_to file_upload_path(assigns(:file_upload))
- end
-
- test "should show file_upload" do
- get :show, id: @file_upload
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @file_upload
- assert_response :success
- end
-
- test "should update file_upload" do
- put :update, id: @file_upload, file_upload: { file_type_id: @file_upload.file_type_id, description: @file_upload.description, location: @file_upload.location, name: @file_upload.name, published: @file_upload.published, size: @file_upload.size, title: @file_upload.title }
- assert_redirected_to file_upload_path(assigns(:file_upload))
- end
-
- test "should destroy file_upload" do
- assert_difference('FileUpload.count', -1) do
- delete :destroy, id: @file_upload
- end
-
- assert_redirected_to file_uploads_path
- end
-=end
-end
+require 'test_helper'
+
+class FileUploadsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @file_upload = file_uploads(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:file_uploads)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create file_upload" do
+ assert_difference('FileUpload.count') do
+ post :create, file_upload: { file_type_id: @file_upload.file_type_id, description: @file_upload.description, location: @file_upload.location, name: @file_upload.name, published: @file_upload.published, size: @file_upload.size, title: @file_upload.title }
+ end
+
+ assert_redirected_to file_upload_path(assigns(:file_upload))
+ end
+
+ test "should show file_upload" do
+ get :show, id: @file_upload
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @file_upload
+ assert_response :success
+ end
+
+ test "should update file_upload" do
+ put :update, id: @file_upload, file_upload: { file_type_id: @file_upload.file_type_id, description: @file_upload.description, location: @file_upload.location, name: @file_upload.name, published: @file_upload.published, size: @file_upload.size, title: @file_upload.title }
+ assert_redirected_to file_upload_path(assigns(:file_upload))
+ end
+
+ test "should destroy file_upload" do
+ assert_difference('FileUpload.count', -1) do
+ delete :destroy, id: @file_upload
+ end
+
+ assert_redirected_to file_uploads_path
+ end
+=end
+end
diff --git a/test/functional/guidances_controller_test.rb b/test/functional/guidances_controller_test.rb
index c2c6da2..2dc60d1 100644
--- a/test/functional/guidances_controller_test.rb
+++ b/test/functional/guidances_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class GuidancesControllerTest < ActionController::TestCase
-=begin
- setup do
- @guidance = guidances(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:guidances)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create guidance" do
- assert_difference('Guidance.count') do
- post :create, guidance: { file_id: @guidance.file_id, text: @guidance.text, organisation_id: @guidance.organisation_id, theme_id: @guidance.theme_id }
- end
-
- assert_redirected_to guidance_path(assigns(:guidance))
- end
-
- test "should show guidance" do
- get :show, id: @guidance
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @guidance
- assert_response :success
- end
-
- test "should update guidance" do
- put :update, id: @guidance, guidance: { file_id: @guidance.file_id, text: @guidance.text, organisation_id: @guidance.organisation_id, theme_id: @guidance.theme_id }
- assert_redirected_to guidance_path(assigns(:guidance))
- end
-
- test "should destroy guidance" do
- assert_difference('Guidance.count', -1) do
- delete :destroy, id: @guidance
- end
-
- assert_redirected_to guidances_path
- end
-=end
-end
+require 'test_helper'
+
+class GuidancesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @guidance = guidances(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:guidances)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create guidance" do
+ assert_difference('Guidance.count') do
+ post :create, guidance: { file_id: @guidance.file_id, text: @guidance.text, organisation_id: @guidance.organisation_id, theme_id: @guidance.theme_id }
+ end
+
+ assert_redirected_to guidance_path(assigns(:guidance))
+ end
+
+ test "should show guidance" do
+ get :show, id: @guidance
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @guidance
+ assert_response :success
+ end
+
+ test "should update guidance" do
+ put :update, id: @guidance, guidance: { file_id: @guidance.file_id, text: @guidance.text, organisation_id: @guidance.organisation_id, theme_id: @guidance.theme_id }
+ assert_redirected_to guidance_path(assigns(:guidance))
+ end
+
+ test "should destroy guidance" do
+ assert_difference('Guidance.count', -1) do
+ delete :destroy, id: @guidance
+ end
+
+ assert_redirected_to guidances_path
+ end
+=end
+end
diff --git a/test/functional/home_controller_test.rb b/test/functional/home_controller_test.rb
index 583aca3..d088a29 100644
--- a/test/functional/home_controller_test.rb
+++ b/test/functional/home_controller_test.rb
@@ -1,10 +1,10 @@
-require 'test_helper'
-
-class HomeControllerTest < ActionController::TestCase
-=begin
- test "should get index" do
- get :index
- assert_response :success
- end
-=end
-end
+require 'test_helper'
+
+class HomeControllerTest < ActionController::TestCase
+=begin
+ test "should get index" do
+ get :index
+ assert_response :success
+ end
+=end
+end
diff --git a/test/functional/organisation_types_controller_test.rb b/test/functional/organisation_types_controller_test.rb
index e034e03..380dd88 100644
--- a/test/functional/organisation_types_controller_test.rb
+++ b/test/functional/organisation_types_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class OrganisationTypesControllerTest < ActionController::TestCase
-=begin
- setup do
- @organisation_type = organisation_types(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:organisation_types)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create organisation_type" do
- assert_difference('OrganisationType.count') do
- post :create, organisation_type: { description: @organisation_type.description, name: @organisation_type.name }
- end
-
- assert_redirected_to organisation_type_path(assigns(:organisation_type))
- end
-
- test "should show organisation_type" do
- get :show, id: @organisation_type
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @organisation_type
- assert_response :success
- end
-
- test "should update organisation_type" do
- put :update, id: @organisation_type, organisation_type: { description: @organisation_type.description, name: @organisation_type.name }
- assert_redirected_to organisation_type_path(assigns(:organisation_type))
- end
-
- test "should destroy organisation_type" do
- assert_difference('OrganisationType.count', -1) do
- delete :destroy, id: @organisation_type
- end
-
- assert_redirected_to organisation_types_path
- end
-=end
-end
+require 'test_helper'
+
+class OrganisationTypesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @organisation_type = organisation_types(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:organisation_types)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create organisation_type" do
+ assert_difference('OrganisationType.count') do
+ post :create, organisation_type: { description: @organisation_type.description, name: @organisation_type.name }
+ end
+
+ assert_redirected_to organisation_type_path(assigns(:organisation_type))
+ end
+
+ test "should show organisation_type" do
+ get :show, id: @organisation_type
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @organisation_type
+ assert_response :success
+ end
+
+ test "should update organisation_type" do
+ put :update, id: @organisation_type, organisation_type: { description: @organisation_type.description, name: @organisation_type.name }
+ assert_redirected_to organisation_type_path(assigns(:organisation_type))
+ end
+
+ test "should destroy organisation_type" do
+ assert_difference('OrganisationType.count', -1) do
+ delete :destroy, id: @organisation_type
+ end
+
+ assert_redirected_to organisation_types_path
+ end
+=end
+end
diff --git a/test/functional/organisations_controller_test.rb b/test/functional/organisations_controller_test.rb
index 0f70dc4..c43d4f4 100644
--- a/test/functional/organisations_controller_test.rb
+++ b/test/functional/organisations_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class OrganisationsControllerTest < ActionController::TestCase
-=begin
- setup do
- @organisation = organisations(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:organisations)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create organisation" do
- assert_difference('Organisation.count') do
- post :create, organisation: { abbreviation: @organisation.abbreviation, banner_file_id: @organisation.banner_file_id, description: @organisation.description, domain: @organisation.domain, logo_file_id: @organisation.logo_file_id, name: @organisation.name, stylesheet_file_id: @organisation.stylesheet_file_id, target_url: @organisation.target_url, type_id: @organisation.type_id, wayfless_entite: @organisation.wayfless_entite }
- end
-
- assert_redirected_to organisation_path(assigns(:organisation))
- end
-
- test "should show organisation" do
- get :show, id: @organisation
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @organisation
- assert_response :success
- end
-
- test "should update organisation" do
- put :update, id: @organisation, organisation: { abbreviation: @organisation.abbreviation, banner_file_id: @organisation.banner_file_id, description: @organisation.description, domain: @organisation.domain, logo_file_id: @organisation.logo_file_id, name: @organisation.name, stylesheet_file_id: @organisation.stylesheet_file_id, target_url: @organisation.target_url, type_id: @organisation.type_id, wayfless_entite: @organisation.wayfless_entite }
- assert_redirected_to organisation_path(assigns(:organisation))
- end
-
- test "should destroy organisation" do
- assert_difference('Organisation.count', -1) do
- delete :destroy, id: @organisation
- end
-
- assert_redirected_to organisations_path
- end
-=end
-end
+require 'test_helper'
+
+class OrganisationsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @organisation = organisations(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:organisations)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create organisation" do
+ assert_difference('Organisation.count') do
+ post :create, organisation: { abbreviation: @organisation.abbreviation, banner_file_id: @organisation.banner_file_id, description: @organisation.description, domain: @organisation.domain, logo_file_id: @organisation.logo_file_id, name: @organisation.name, stylesheet_file_id: @organisation.stylesheet_file_id, target_url: @organisation.target_url, type_id: @organisation.type_id, wayfless_entite: @organisation.wayfless_entite }
+ end
+
+ assert_redirected_to organisation_path(assigns(:organisation))
+ end
+
+ test "should show organisation" do
+ get :show, id: @organisation
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @organisation
+ assert_response :success
+ end
+
+ test "should update organisation" do
+ put :update, id: @organisation, organisation: { abbreviation: @organisation.abbreviation, banner_file_id: @organisation.banner_file_id, description: @organisation.description, domain: @organisation.domain, logo_file_id: @organisation.logo_file_id, name: @organisation.name, stylesheet_file_id: @organisation.stylesheet_file_id, target_url: @organisation.target_url, type_id: @organisation.type_id, wayfless_entite: @organisation.wayfless_entite }
+ assert_redirected_to organisation_path(assigns(:organisation))
+ end
+
+ test "should destroy organisation" do
+ assert_difference('Organisation.count', -1) do
+ delete :destroy, id: @organisation
+ end
+
+ assert_redirected_to organisations_path
+ end
+=end
+end
diff --git a/test/functional/pages_controller_test.rb b/test/functional/pages_controller_test.rb
index 8f56781..b525098 100644
--- a/test/functional/pages_controller_test.rb
+++ b/test/functional/pages_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class PagesControllerTest < ActionController::TestCase
-=begin
- setup do
- @page = pages(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:pages)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create page" do
- assert_difference('Page.count') do
- post :create, page: { organisation_id: @page.organisation_id, body_text: @page.body_text, location: @page.location, menu: @page.menu, menu_position: @page.menu_position, public: @page.public, slug: @page.slug, target_url: @page.target_url, title: @page.title }
- end
-
- assert_redirected_to page_path(assigns(:page))
- end
-
- test "should show page" do
- get :show, id: @page
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @page
- assert_response :success
- end
-
- test "should update page" do
- put :update, id: @page, page: { organisation_id: @page.organisation_id, body_text: @page.body_text, location: @page.location, menu: @page.menu, menu_position: @page.menu_position, public: @page.public, slug: @page.slug, target_url: @page.target_url, title: @page.title }
- assert_redirected_to page_path(assigns(:page))
- end
-
- test "should destroy page" do
- assert_difference('Page.count', -1) do
- delete :destroy, id: @page
- end
-
- assert_redirected_to pages_path
- end
-=end
-end
+require 'test_helper'
+
+class PagesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @page = pages(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:pages)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create page" do
+ assert_difference('Page.count') do
+ post :create, page: { organisation_id: @page.organisation_id, body_text: @page.body_text, location: @page.location, menu: @page.menu, menu_position: @page.menu_position, public: @page.public, slug: @page.slug, target_url: @page.target_url, title: @page.title }
+ end
+
+ assert_redirected_to page_path(assigns(:page))
+ end
+
+ test "should show page" do
+ get :show, id: @page
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @page
+ assert_response :success
+ end
+
+ test "should update page" do
+ put :update, id: @page, page: { organisation_id: @page.organisation_id, body_text: @page.body_text, location: @page.location, menu: @page.menu, menu_position: @page.menu_position, public: @page.public, slug: @page.slug, target_url: @page.target_url, title: @page.title }
+ assert_redirected_to page_path(assigns(:page))
+ end
+
+ test "should destroy page" do
+ assert_difference('Page.count', -1) do
+ delete :destroy, id: @page
+ end
+
+ assert_redirected_to pages_path
+ end
+=end
+end
diff --git a/test/functional/phases_controller_test.rb b/test/functional/phases_controller_test.rb
index 4ecf7f4..b392886 100644
--- a/test/functional/phases_controller_test.rb
+++ b/test/functional/phases_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class PhasesControllerTest < ActionController::TestCase
-=begin
- setup do
- @phase = phases(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:phases)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create phase" do
- assert_difference('Phase.count') do
- post :create, phase: { description: @phase.description, order: @phase.order, title: @phase.title }
- end
-
- assert_redirected_to phase_path(assigns(:phase))
- end
-
- test "should show phase" do
- get :show, id: @phase
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @phase
- assert_response :success
- end
-
- test "should update phase" do
- put :update, id: @phase, phase: { description: @phase.description, order: @phase.order, title: @phase.title }
- assert_redirected_to phase_path(assigns(:phase))
- end
-
- test "should destroy phase" do
- assert_difference('Phase.count', -1) do
- delete :destroy, id: @phase
- end
-
- assert_redirected_to phases_path
- end
-=end
-end
+require 'test_helper'
+
+class PhasesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @phase = phases(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:phases)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create phase" do
+ assert_difference('Phase.count') do
+ post :create, phase: { description: @phase.description, order: @phase.order, title: @phase.title }
+ end
+
+ assert_redirected_to phase_path(assigns(:phase))
+ end
+
+ test "should show phase" do
+ get :show, id: @phase
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @phase
+ assert_response :success
+ end
+
+ test "should update phase" do
+ put :update, id: @phase, phase: { description: @phase.description, order: @phase.order, title: @phase.title }
+ assert_redirected_to phase_path(assigns(:phase))
+ end
+
+ test "should destroy phase" do
+ assert_difference('Phase.count', -1) do
+ delete :destroy, id: @phase
+ end
+
+ assert_redirected_to phases_path
+ end
+=end
+end
diff --git a/test/functional/plan_sections_controller_test.rb b/test/functional/plan_sections_controller_test.rb
index cdf5d32..97bbe62 100644
--- a/test/functional/plan_sections_controller_test.rb
+++ b/test/functional/plan_sections_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class PlanSectionsControllerTest < ActionController::TestCase
-=begin
- setup do
- @plan_section = plan_sections(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:plan_sections)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create plan_section" do
- assert_difference('PlanSection.count') do
- post :create, plan_section: { plan_id: @plan_section.plan_id, at: @plan_section.at, edit: @plan_section.edit, section_id: @plan_section.section_id, user_editing_id: @plan_section.user_editing_id }
- end
-
- assert_redirected_to plan_section_path(assigns(:plan_section))
- end
-
- test "should show plan_section" do
- get :show, id: @plan_section
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @plan_section
- assert_response :success
- end
-
- test "should update plan_section" do
- put :update, id: @plan_section, plan_section: { plan_id: @plan_section.plan_id, at: @plan_section.at, edit: @plan_section.edit, section_id: @plan_section.section_id, user_editing_id: @plan_section.user_editing_id }
- assert_redirected_to plan_section_path(assigns(:plan_section))
- end
-
- test "should destroy plan_section" do
- assert_difference('PlanSection.count', -1) do
- delete :destroy, id: @plan_section
- end
-
- assert_redirected_to plan_sections_path
- end
-=end
-end
+require 'test_helper'
+
+class PlanSectionsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @plan_section = plan_sections(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:plan_sections)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create plan_section" do
+ assert_difference('PlanSection.count') do
+ post :create, plan_section: { plan_id: @plan_section.plan_id, at: @plan_section.at, edit: @plan_section.edit, section_id: @plan_section.section_id, user_editing_id: @plan_section.user_editing_id }
+ end
+
+ assert_redirected_to plan_section_path(assigns(:plan_section))
+ end
+
+ test "should show plan_section" do
+ get :show, id: @plan_section
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @plan_section
+ assert_response :success
+ end
+
+ test "should update plan_section" do
+ put :update, id: @plan_section, plan_section: { plan_id: @plan_section.plan_id, at: @plan_section.at, edit: @plan_section.edit, section_id: @plan_section.section_id, user_editing_id: @plan_section.user_editing_id }
+ assert_redirected_to plan_section_path(assigns(:plan_section))
+ end
+
+ test "should destroy plan_section" do
+ assert_difference('PlanSection.count', -1) do
+ delete :destroy, id: @plan_section
+ end
+
+ assert_redirected_to plan_sections_path
+ end
+=end
+end
diff --git a/test/functional/plans_controller_test.rb b/test/functional/plans_controller_test.rb
index 484e0b5..d2931bf 100644
--- a/test/functional/plans_controller_test.rb
+++ b/test/functional/plans_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class PlansControllerTest < ActionController::TestCase
-=begin
- setup do
- @plan = plans(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:plans)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create plan" do
- assert_difference('Plan.count') do
- post :create, plan: { locked: @plan.locked, project_id: @plan.project_id, version_id: @plan.version_id }
- end
-
- assert_redirected_to plan_path(assigns(:plan))
- end
-
- test "should show plan" do
- get :show, id: @plan
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @plan
- assert_response :success
- end
-
- test "should update plan" do
- put :update, id: @plan, plan: { locked: @plan.locked, project_id: @plan.project_id, version_id: @plan.version_id }
- assert_redirected_to plan_path(assigns(:plan))
- end
-
- test "should destroy plan" do
- assert_difference('Plan.count', -1) do
- delete :destroy, id: @plan
- end
-
- assert_redirected_to plans_path
- end
-=end
-end
+require 'test_helper'
+
+class PlansControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @plan = plans(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:plans)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create plan" do
+ assert_difference('Plan.count') do
+ post :create, plan: { locked: @plan.locked, project_id: @plan.project_id, version_id: @plan.version_id }
+ end
+
+ assert_redirected_to plan_path(assigns(:plan))
+ end
+
+ test "should show plan" do
+ get :show, id: @plan
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @plan
+ assert_response :success
+ end
+
+ test "should update plan" do
+ put :update, id: @plan, plan: { locked: @plan.locked, project_id: @plan.project_id, version_id: @plan.version_id }
+ assert_redirected_to plan_path(assigns(:plan))
+ end
+
+ test "should destroy plan" do
+ assert_difference('Plan.count', -1) do
+ delete :destroy, id: @plan
+ end
+
+ assert_redirected_to plans_path
+ end
+=end
+end
diff --git a/test/functional/project_groups_controller_test.rb b/test/functional/project_groups_controller_test.rb
index e07b85d..0e129f1 100644
--- a/test/functional/project_groups_controller_test.rb
+++ b/test/functional/project_groups_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class ProjectGroupsControllerTest < ActionController::TestCase
-=begin
- setup do
- @project_group = project_groups(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:project_groups)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create project_group" do
- assert_difference('ProjectGroup.count') do
- post :create, project_group: { project_creator: @project_group.project_creator, project_editor: @project_group.project_editor, project_id: @project_group.project_id, user_id: @project_group.user_id }
- end
-
- assert_redirected_to project_group_path(assigns(:project_group))
- end
-
- test "should show project_group" do
- get :show, id: @project_group
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @project_group
- assert_response :success
- end
-
- test "should update project_group" do
- put :update, id: @project_group, project_group: { project_creator: @project_group.project_creator, project_editor: @project_group.project_editor, project_id: @project_group.project_id, user_id: @project_group.user_id }
- assert_redirected_to project_group_path(assigns(:project_group))
- end
-
- test "should destroy project_group" do
- assert_difference('ProjectGroup.count', -1) do
- delete :destroy, id: @project_group
- end
-
- assert_redirected_to project_groups_path
- end
-=end
-end
+require 'test_helper'
+
+class ProjectGroupsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @project_group = project_groups(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:project_groups)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create project_group" do
+ assert_difference('ProjectGroup.count') do
+ post :create, project_group: { project_creator: @project_group.project_creator, project_editor: @project_group.project_editor, project_id: @project_group.project_id, user_id: @project_group.user_id }
+ end
+
+ assert_redirected_to project_group_path(assigns(:project_group))
+ end
+
+ test "should show project_group" do
+ get :show, id: @project_group
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @project_group
+ assert_response :success
+ end
+
+ test "should update project_group" do
+ put :update, id: @project_group, project_group: { project_creator: @project_group.project_creator, project_editor: @project_group.project_editor, project_id: @project_group.project_id, user_id: @project_group.user_id }
+ assert_redirected_to project_group_path(assigns(:project_group))
+ end
+
+ test "should destroy project_group" do
+ assert_difference('ProjectGroup.count', -1) do
+ delete :destroy, id: @project_group
+ end
+
+ assert_redirected_to project_groups_path
+ end
+=end
+end
diff --git a/test/functional/project_partners_controller_test.rb b/test/functional/project_partners_controller_test.rb
index d31c39b..c975fb2 100644
--- a/test/functional/project_partners_controller_test.rb
+++ b/test/functional/project_partners_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class ProjectPartnersControllerTest < ActionController::TestCase
-=begin
- setup do
- @project_partner = project_partners(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:project_partners)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create project_partner" do
- assert_difference('ProjectPartner.count') do
- post :create, project_partner: { leader_org: @project_partner.leader_org, organisation_id: @project_partner.organisation_id, project_id: @project_partner.project_id }
- end
-
- assert_redirected_to project_partner_path(assigns(:project_partner))
- end
-
- test "should show project_partner" do
- get :show, id: @project_partner
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @project_partner
- assert_response :success
- end
-
- test "should update project_partner" do
- put :update, id: @project_partner, project_partner: { leader_org: @project_partner.leader_org, organisation_id: @project_partner.organisation_id, project_id: @project_partner.project_id }
- assert_redirected_to project_partner_path(assigns(:project_partner))
- end
-
- test "should destroy project_partner" do
- assert_difference('ProjectPartner.count', -1) do
- delete :destroy, id: @project_partner
- end
-
- assert_redirected_to project_partners_path
- end
-=end
-end
+require 'test_helper'
+
+class ProjectPartnersControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @project_partner = project_partners(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:project_partners)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create project_partner" do
+ assert_difference('ProjectPartner.count') do
+ post :create, project_partner: { leader_org: @project_partner.leader_org, organisation_id: @project_partner.organisation_id, project_id: @project_partner.project_id }
+ end
+
+ assert_redirected_to project_partner_path(assigns(:project_partner))
+ end
+
+ test "should show project_partner" do
+ get :show, id: @project_partner
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @project_partner
+ assert_response :success
+ end
+
+ test "should update project_partner" do
+ put :update, id: @project_partner, project_partner: { leader_org: @project_partner.leader_org, organisation_id: @project_partner.organisation_id, project_id: @project_partner.project_id }
+ assert_redirected_to project_partner_path(assigns(:project_partner))
+ end
+
+ test "should destroy project_partner" do
+ assert_difference('ProjectPartner.count', -1) do
+ delete :destroy, id: @project_partner
+ end
+
+ assert_redirected_to project_partners_path
+ end
+=end
+end
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index d361c53..4238699 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class ProjectsControllerTest < ActionController::TestCase
-=begin
- setup do
- @project = projects(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:projects)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create project" do
- assert_difference('Project.count') do
- post :create, project: { dmptemplate_id: @project.dmptemplate_id, locked: @project.locked, note: @project.note, title: @project.title }
- end
-
- assert_redirected_to project_path(assigns(:project))
- end
-
- test "should show project" do
- get :show, id: @project
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @project
- assert_response :success
- end
-
- test "should update project" do
- put :update, id: @project, project: { dmptemplate_id: @project.dmptemplate_id, locked: @project.locked, note: @project.note, title: @project.title }
- assert_redirected_to project_path(assigns(:project))
- end
-
- test "should destroy project" do
- assert_difference('Project.count', -1) do
- delete :destroy, id: @project
- end
-
- assert_redirected_to projects_path
- end
-=end
-end
+require 'test_helper'
+
+class ProjectsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @project = projects(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:projects)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create project" do
+ assert_difference('Project.count') do
+ post :create, project: { dmptemplate_id: @project.dmptemplate_id, locked: @project.locked, note: @project.note, title: @project.title }
+ end
+
+ assert_redirected_to project_path(assigns(:project))
+ end
+
+ test "should show project" do
+ get :show, id: @project
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @project
+ assert_response :success
+ end
+
+ test "should update project" do
+ put :update, id: @project, project: { dmptemplate_id: @project.dmptemplate_id, locked: @project.locked, note: @project.note, title: @project.title }
+ assert_redirected_to project_path(assigns(:project))
+ end
+
+ test "should destroy project" do
+ assert_difference('Project.count', -1) do
+ delete :destroy, id: @project
+ end
+
+ assert_redirected_to projects_path
+ end
+=end
+end
diff --git a/test/functional/question_themes_controller_test.rb b/test/functional/question_themes_controller_test.rb
index 645fad1..e4d015f 100644
--- a/test/functional/question_themes_controller_test.rb
+++ b/test/functional/question_themes_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class QuestionThemesControllerTest < ActionController::TestCase
-=begin
- setup do
- @question_theme = question_themes(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:question_themes)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create question_theme" do
- assert_difference('QuestionTheme.count') do
- post :create, question_theme: { question_id: @question_theme.question_id, theme_id: @question_theme.theme_id }
- end
-
- assert_redirected_to question_theme_path(assigns(:question_theme))
- end
-
- test "should show question_theme" do
- get :show, id: @question_theme
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @question_theme
- assert_response :success
- end
-
- test "should update question_theme" do
- put :update, id: @question_theme, question_theme: { question_id: @question_theme.question_id, theme_id: @question_theme.theme_id }
- assert_redirected_to question_theme_path(assigns(:question_theme))
- end
-
- test "should destroy question_theme" do
- assert_difference('QuestionTheme.count', -1) do
- delete :destroy, id: @question_theme
- end
-
- assert_redirected_to question_themes_path
- end
-=end
-end
+require 'test_helper'
+
+class QuestionThemesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @question_theme = question_themes(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:question_themes)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create question_theme" do
+ assert_difference('QuestionTheme.count') do
+ post :create, question_theme: { question_id: @question_theme.question_id, theme_id: @question_theme.theme_id }
+ end
+
+ assert_redirected_to question_theme_path(assigns(:question_theme))
+ end
+
+ test "should show question_theme" do
+ get :show, id: @question_theme
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @question_theme
+ assert_response :success
+ end
+
+ test "should update question_theme" do
+ put :update, id: @question_theme, question_theme: { question_id: @question_theme.question_id, theme_id: @question_theme.theme_id }
+ assert_redirected_to question_theme_path(assigns(:question_theme))
+ end
+
+ test "should destroy question_theme" do
+ assert_difference('QuestionTheme.count', -1) do
+ delete :destroy, id: @question_theme
+ end
+
+ assert_redirected_to question_themes_path
+ end
+=end
+end
diff --git a/test/functional/questions_controller_test.rb b/test/functional/questions_controller_test.rb
index bdc7730..6ecfde8 100644
--- a/test/functional/questions_controller_test.rb
+++ b/test/functional/questions_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class QuestionsControllerTest < ActionController::TestCase
-=begin
- setup do
- @question = questions(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:questions)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create question" do
- assert_difference('Question.count') do
- post :create, question: { default_value: @question.default_value, dependency_id: @question.dependency_id, dependency_text: @question.dependency_text, guidance: @question.guidance, order: @question.order, parent_id: @question.parent_id, suggested_answer: @question.suggested_answer, text: @question.text, type: @question.type, section_id: @question.section_id }
- end
-
- assert_redirected_to question_path(assigns(:question))
- end
-
- test "should show question" do
- get :show, id: @question
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @question
- assert_response :success
- end
-
- test "should update question" do
- put :update, id: @question, question: { default_value: @question.default_value, dependency_id: @question.dependency_id, dependency_text: @question.dependency_text, guidance: @question.guidance, order: @question.order, parent_id: @question.parent_id, suggested_answer: @question.suggested_answer, text: @question.text, type: @question.type, section_id: @question.section_id }
- assert_redirected_to question_path(assigns(:question))
- end
-
- test "should destroy question" do
- assert_difference('Question.count', -1) do
- delete :destroy, id: @question
- end
-
- assert_redirected_to questions_path
- end
-=end
-end
+require 'test_helper'
+
+class QuestionsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @question = questions(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:questions)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create question" do
+ assert_difference('Question.count') do
+ post :create, question: { default_value: @question.default_value, dependency_id: @question.dependency_id, dependency_text: @question.dependency_text, guidance: @question.guidance, order: @question.order, parent_id: @question.parent_id, suggested_answer: @question.suggested_answer, text: @question.text, type: @question.type, section_id: @question.section_id }
+ end
+
+ assert_redirected_to question_path(assigns(:question))
+ end
+
+ test "should show question" do
+ get :show, id: @question
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @question
+ assert_response :success
+ end
+
+ test "should update question" do
+ put :update, id: @question, question: { default_value: @question.default_value, dependency_id: @question.dependency_id, dependency_text: @question.dependency_text, guidance: @question.guidance, order: @question.order, parent_id: @question.parent_id, suggested_answer: @question.suggested_answer, text: @question.text, type: @question.type, section_id: @question.section_id }
+ assert_redirected_to question_path(assigns(:question))
+ end
+
+ test "should destroy question" do
+ assert_difference('Question.count', -1) do
+ delete :destroy, id: @question
+ end
+
+ assert_redirected_to questions_path
+ end
+=end
+end
diff --git a/test/functional/sections_controller_test.rb b/test/functional/sections_controller_test.rb
index 2147cb2..a3847e3 100644
--- a/test/functional/sections_controller_test.rb
+++ b/test/functional/sections_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class SectionsControllerTest < ActionController::TestCase
-=begin
- setup do
- @section = sections(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:sections)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create section" do
- assert_difference('Section.count') do
- post :create, section: { organisation_id: @section.organisation_id, description: @section.description, order: @section.order, title: @section.title, version_id: @section.version_id }
- end
-
- assert_redirected_to section_path(assigns(:section))
- end
-
- test "should show section" do
- get :show, id: @section
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @section
- assert_response :success
- end
-
- test "should update section" do
- put :update, id: @section, section: { organisation_id: @section.organisation_id, description: @section.description, order: @section.order, title: @section.title, version_id: @section.version_id }
- assert_redirected_to section_path(assigns(:section))
- end
-
- test "should destroy section" do
- assert_difference('Section.count', -1) do
- delete :destroy, id: @section
- end
-
- assert_redirected_to sections_path
- end
-=end
-end
+require 'test_helper'
+
+class SectionsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @section = sections(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:sections)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create section" do
+ assert_difference('Section.count') do
+ post :create, section: { organisation_id: @section.organisation_id, description: @section.description, order: @section.order, title: @section.title, version_id: @section.version_id }
+ end
+
+ assert_redirected_to section_path(assigns(:section))
+ end
+
+ test "should show section" do
+ get :show, id: @section
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @section
+ assert_response :success
+ end
+
+ test "should update section" do
+ put :update, id: @section, section: { organisation_id: @section.organisation_id, description: @section.description, order: @section.order, title: @section.title, version_id: @section.version_id }
+ assert_redirected_to section_path(assigns(:section))
+ end
+
+ test "should destroy section" do
+ assert_difference('Section.count', -1) do
+ delete :destroy, id: @section
+ end
+
+ assert_redirected_to sections_path
+ end
+=end
+end
diff --git a/test/functional/themes_controller_test.rb b/test/functional/themes_controller_test.rb
index 2e522ef..3bae2d6 100644
--- a/test/functional/themes_controller_test.rb
+++ b/test/functional/themes_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class ThemesControllerTest < ActionController::TestCase
-=begin
- setup do
- @theme = themes(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:themes)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create theme" do
- assert_difference('Theme.count') do
- post :create, theme: { description: @theme.description, title: @theme.title }
- end
-
- assert_redirected_to theme_path(assigns(:theme))
- end
-
- test "should show theme" do
- get :show, id: @theme
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @theme
- assert_response :success
- end
-
- test "should update theme" do
- put :update, id: @theme, theme: { description: @theme.description, title: @theme.title }
- assert_redirected_to theme_path(assigns(:theme))
- end
-
- test "should destroy theme" do
- assert_difference('Theme.count', -1) do
- delete :destroy, id: @theme
- end
-
- assert_redirected_to themes_path
- end
-=end
-end
+require 'test_helper'
+
+class ThemesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @theme = themes(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:themes)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create theme" do
+ assert_difference('Theme.count') do
+ post :create, theme: { description: @theme.description, title: @theme.title }
+ end
+
+ assert_redirected_to theme_path(assigns(:theme))
+ end
+
+ test "should show theme" do
+ get :show, id: @theme
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @theme
+ assert_response :success
+ end
+
+ test "should update theme" do
+ put :update, id: @theme, theme: { description: @theme.description, title: @theme.title }
+ assert_redirected_to theme_path(assigns(:theme))
+ end
+
+ test "should destroy theme" do
+ assert_difference('Theme.count', -1) do
+ delete :destroy, id: @theme
+ end
+
+ assert_redirected_to themes_path
+ end
+=end
+end
diff --git a/test/functional/user_org_roles_controller_test.rb b/test/functional/user_org_roles_controller_test.rb
index faade51..8412e88 100644
--- a/test/functional/user_org_roles_controller_test.rb
+++ b/test/functional/user_org_roles_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class UserOrgRolesControllerTest < ActionController::TestCase
-=begin
- setup do
- @user_role = user_org_roles(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:user_org_roles)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create user_org_role" do
- assert_difference('UserOrgRole.count') do
- post :create, user_org_role: { organisation_id: @user_org_role.organisation_id, user_id: @user_org_role.user_id, user_role_type_id: @user_org_role.user_role_type_id }
- end
-
- assert_redirected_to user_org_role_path(assigns(:user_org_role))
- end
-
- test "should show user_org_role" do
- get :show, id: @user_org_role
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @user_org_role
- assert_response :success
- end
-
- test "should update user_org_role" do
- put :update, id: @user_org_role, user_org_role: { organisation_id: @user_org_role.organisation_id, user_id: @user_org_role.user_id, user_role_type_id: @user_org_role.user_role_type_id }
- assert_redirected_to user_org_role_path(assigns(:user_org_role))
- end
-
- test "should destroy user_org_role" do
- assert_difference('UserOrgRole.count', -1) do
- delete :destroy, id: @user_org_role
- end
-
- assert_redirected_to user_org_roles_path
- end
-=end
-end
+require 'test_helper'
+
+class UserOrgRolesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @user_role = user_org_roles(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:user_org_roles)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create user_org_role" do
+ assert_difference('UserOrgRole.count') do
+ post :create, user_org_role: { organisation_id: @user_org_role.organisation_id, user_id: @user_org_role.user_id, user_role_type_id: @user_org_role.user_role_type_id }
+ end
+
+ assert_redirected_to user_org_role_path(assigns(:user_org_role))
+ end
+
+ test "should show user_org_role" do
+ get :show, id: @user_org_role
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @user_org_role
+ assert_response :success
+ end
+
+ test "should update user_org_role" do
+ put :update, id: @user_org_role, user_org_role: { organisation_id: @user_org_role.organisation_id, user_id: @user_org_role.user_id, user_role_type_id: @user_org_role.user_role_type_id }
+ assert_redirected_to user_org_role_path(assigns(:user_org_role))
+ end
+
+ test "should destroy user_org_role" do
+ assert_difference('UserOrgRole.count', -1) do
+ delete :destroy, id: @user_org_role
+ end
+
+ assert_redirected_to user_org_roles_path
+ end
+=end
+end
diff --git a/test/functional/user_role_types_controller_test.rb b/test/functional/user_role_types_controller_test.rb
index 653018d..5686f79 100644
--- a/test/functional/user_role_types_controller_test.rb
+++ b/test/functional/user_role_types_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class UserRoleTypesControllerTest < ActionController::TestCase
-=begin
- setup do
- @user_role_type = user_role_types(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:user_role_types)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create user_role_type" do
- assert_difference('UserRoleType.count') do
- post :create, user_role_type: { description: @user_role_type.description, name: @user_role_type.name }
- end
-
- assert_redirected_to user_role_type_path(assigns(:user_role_type))
- end
-
- test "should show user_role_type" do
- get :show, id: @user_role_type
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @user_role_type
- assert_response :success
- end
-
- test "should update user_role_type" do
- put :update, id: @user_role_type, user_role_type: { description: @user_role_type.description, name: @user_role_type.name }
- assert_redirected_to user_role_type_path(assigns(:user_role_type))
- end
-
- test "should destroy user_role_type" do
- assert_difference('UserRoleType.count', -1) do
- delete :destroy, id: @user_role_type
- end
-
- assert_redirected_to user_role_types_path
- end
-=end
-end
+require 'test_helper'
+
+class UserRoleTypesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @user_role_type = user_role_types(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:user_role_types)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create user_role_type" do
+ assert_difference('UserRoleType.count') do
+ post :create, user_role_type: { description: @user_role_type.description, name: @user_role_type.name }
+ end
+
+ assert_redirected_to user_role_type_path(assigns(:user_role_type))
+ end
+
+ test "should show user_role_type" do
+ get :show, id: @user_role_type
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @user_role_type
+ assert_response :success
+ end
+
+ test "should update user_role_type" do
+ put :update, id: @user_role_type, user_role_type: { description: @user_role_type.description, name: @user_role_type.name }
+ assert_redirected_to user_role_type_path(assigns(:user_role_type))
+ end
+
+ test "should destroy user_role_type" do
+ assert_difference('UserRoleType.count', -1) do
+ delete :destroy, id: @user_role_type
+ end
+
+ assert_redirected_to user_role_types_path
+ end
+=end
+end
diff --git a/test/functional/user_statuses_controller_test.rb b/test/functional/user_statuses_controller_test.rb
index 8287d10..7487419 100644
--- a/test/functional/user_statuses_controller_test.rb
+++ b/test/functional/user_statuses_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class UserStatusesControllerTest < ActionController::TestCase
-=begin
- setup do
- @user_status = user_statuses(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:user_statuses)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create user_status" do
- assert_difference('UserStatus.count') do
- post :create, user_status: { description: @user_status.description, name: @user_status.name }
- end
-
- assert_redirected_to user_status_path(assigns(:user_status))
- end
-
- test "should show user_status" do
- get :show, id: @user_status
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @user_status
- assert_response :success
- end
-
- test "should update user_status" do
- put :update, id: @user_status, user_status: { description: @user_status.description, name: @user_status.name }
- assert_redirected_to user_status_path(assigns(:user_status))
- end
-
- test "should destroy user_status" do
- assert_difference('UserStatus.count', -1) do
- delete :destroy, id: @user_status
- end
-
- assert_redirected_to user_statuses_path
- end
-=end
-end
+require 'test_helper'
+
+class UserStatusesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @user_status = user_statuses(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:user_statuses)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create user_status" do
+ assert_difference('UserStatus.count') do
+ post :create, user_status: { description: @user_status.description, name: @user_status.name }
+ end
+
+ assert_redirected_to user_status_path(assigns(:user_status))
+ end
+
+ test "should show user_status" do
+ get :show, id: @user_status
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @user_status
+ assert_response :success
+ end
+
+ test "should update user_status" do
+ put :update, id: @user_status, user_status: { description: @user_status.description, name: @user_status.name }
+ assert_redirected_to user_status_path(assigns(:user_status))
+ end
+
+ test "should destroy user_status" do
+ assert_difference('UserStatus.count', -1) do
+ delete :destroy, id: @user_status
+ end
+
+ assert_redirected_to user_statuses_path
+ end
+=end
+end
diff --git a/test/functional/user_types_controller_test.rb b/test/functional/user_types_controller_test.rb
index 4819823..267ef27 100644
--- a/test/functional/user_types_controller_test.rb
+++ b/test/functional/user_types_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class UserTypesControllerTest < ActionController::TestCase
-=begin
- setup do
- @user_type = user_types(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:user_types)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create user_type" do
- assert_difference('UserType.count') do
- post :create, user_type: { description: @user_type.description, name: @user_type.name }
- end
-
- assert_redirected_to user_type_path(assigns(:user_type))
- end
-
- test "should show user_type" do
- get :show, id: @user_type
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @user_type
- assert_response :success
- end
-
- test "should update user_type" do
- put :update, id: @user_type, user_type: { description: @user_type.description, name: @user_type.name }
- assert_redirected_to user_type_path(assigns(:user_type))
- end
-
- test "should destroy user_type" do
- assert_difference('UserType.count', -1) do
- delete :destroy, id: @user_type
- end
-
- assert_redirected_to user_types_path
- end
-=end
-end
+require 'test_helper'
+
+class UserTypesControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @user_type = user_types(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:user_types)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create user_type" do
+ assert_difference('UserType.count') do
+ post :create, user_type: { description: @user_type.description, name: @user_type.name }
+ end
+
+ assert_redirected_to user_type_path(assigns(:user_type))
+ end
+
+ test "should show user_type" do
+ get :show, id: @user_type
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @user_type
+ assert_response :success
+ end
+
+ test "should update user_type" do
+ put :update, id: @user_type, user_type: { description: @user_type.description, name: @user_type.name }
+ assert_redirected_to user_type_path(assigns(:user_type))
+ end
+
+ test "should destroy user_type" do
+ assert_difference('UserType.count', -1) do
+ delete :destroy, id: @user_type
+ end
+
+ assert_redirected_to user_types_path
+ end
+=end
+end
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index a7a2719..42d26cf 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class UsersControllerTest < ActionController::TestCase
-=begin
- setup do
- @user = users(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:users)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create user" do
- assert_difference('User.count') do
- post :create, user: { email: @user.email, firstname: @user.firstname, last_login: @user.last_login, login_count: @user.login_count, orcid_id: @user.orcid_id, password: @user.password, shibboleth_id: @user.shibboleth_id, user_status_id: @user.user_status_id, surname: @user.surname, user_type_id: @user.user_type_id }
- end
-
- assert_redirected_to user_path(assigns(:user))
- end
-
- test "should show user" do
- get :show, id: @user
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @user
- assert_response :success
- end
-
- test "should update user" do
- put :update, id: @user, user: { email: @user.email, firstname: @user.firstname, last_login: @user.last_login, login_count: @user.login_count, orcid_id: @user.orcid_id, password: @user.password, shibboleth_id: @user.shibboleth_id, user_status_id: @user.user_status_id, surname: @user.surname, user_type_id: @user.user_type_id }
- assert_redirected_to user_path(assigns(:user))
- end
-
- test "should destroy user" do
- assert_difference('User.count', -1) do
- delete :destroy, id: @user
- end
-
- assert_redirected_to users_path
- end
-=end
-end
+require 'test_helper'
+
+class UsersControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @user = users(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:users)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create user" do
+ assert_difference('User.count') do
+ post :create, user: { email: @user.email, firstname: @user.firstname, last_login: @user.last_login, login_count: @user.login_count, orcid_id: @user.orcid_id, password: @user.password, shibboleth_id: @user.shibboleth_id, user_status_id: @user.user_status_id, surname: @user.surname, user_type_id: @user.user_type_id }
+ end
+
+ assert_redirected_to user_path(assigns(:user))
+ end
+
+ test "should show user" do
+ get :show, id: @user
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @user
+ assert_response :success
+ end
+
+ test "should update user" do
+ put :update, id: @user, user: { email: @user.email, firstname: @user.firstname, last_login: @user.last_login, login_count: @user.login_count, orcid_id: @user.orcid_id, password: @user.password, shibboleth_id: @user.shibboleth_id, user_status_id: @user.user_status_id, surname: @user.surname, user_type_id: @user.user_type_id }
+ assert_redirected_to user_path(assigns(:user))
+ end
+
+ test "should destroy user" do
+ assert_difference('User.count', -1) do
+ delete :destroy, id: @user
+ end
+
+ assert_redirected_to users_path
+ end
+=end
+end
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 8005f46..a3c4be7 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -1,51 +1,51 @@
-require 'test_helper'
-
-class VersionsControllerTest < ActionController::TestCase
-=begin
- setup do
- @version = versions(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:versions)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create version" do
- assert_difference('Version.count') do
- post :create, version: { description: @version.description, order: @version.order, published: @version.published, title: @version.title }
- end
-
- assert_redirected_to version_path(assigns(:version))
- end
-
- test "should show version" do
- get :show, id: @version
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @version
- assert_response :success
- end
-
- test "should update version" do
- put :update, id: @version, version: { description: @version.description, order: @version.order, published: @version.published, title: @version.title }
- assert_redirected_to version_path(assigns(:version))
- end
-
- test "should destroy version" do
- assert_difference('Version.count', -1) do
- delete :destroy, id: @version
- end
-
- assert_redirected_to versions_path
- end
-=end
-end
+require 'test_helper'
+
+class VersionsControllerTest < ActionController::TestCase
+=begin
+ setup do
+ @version = versions(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:versions)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create version" do
+ assert_difference('Version.count') do
+ post :create, version: { description: @version.description, order: @version.order, published: @version.published, title: @version.title }
+ end
+
+ assert_redirected_to version_path(assigns(:version))
+ end
+
+ test "should show version" do
+ get :show, id: @version
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @version
+ assert_response :success
+ end
+
+ test "should update version" do
+ put :update, id: @version, version: { description: @version.description, order: @version.order, published: @version.published, title: @version.title }
+ assert_redirected_to version_path(assigns(:version))
+ end
+
+ test "should destroy version" do
+ assert_difference('Version.count', -1) do
+ delete :destroy, id: @version
+ end
+
+ assert_redirected_to versions_path
+ end
+=end
+end
diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb
index 3d070d3..c1c6084 100644
--- a/test/performance/browsing_test.rb
+++ b/test/performance/browsing_test.rb
@@ -1,17 +1,17 @@
-require 'test_helper'
-
-# The performance test helper is no longer a part of Rails 4.x.
-# Just add the gem to the gemfile if you want use it in the future
-=begin
-require 'rails/performance_test_help'
-
-class BrowsingTest < ActionDispatch::PerformanceTest
- # Refer to the documentation for all available options
- # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
- # :output => 'tmp/performance', :formats => [:flat] }
-
- def test_homepage
- get '/'
- end
-end
+require 'test_helper'
+
+# The performance test helper is no longer a part of Rails 4.x.
+# Just add the gem to the gemfile if you want use it in the future
+=begin
+require 'rails/performance_test_help'
+
+class BrowsingTest < ActionDispatch::PerformanceTest
+ # Refer to the documentation for all available options
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
+ # :output => 'tmp/performance', :formats => [:flat] }
+
+ def test_homepage
+ get '/'
+ end
+end
=end
\ No newline at end of file
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 6418daa..5b9d5db 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,14 +1,14 @@
-ENV["RAILS_ENV"] = "test"
-
-require File.expand_path('../../config/environment', __FILE__)
-require 'rails/test_help'
-
-class ActiveSupport::TestCase
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
- #
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
- # -- they do not yet inherit this setting
- fixtures :all
-
- # Add more helper methods to be used by all tests here...
-end
+ENV["RAILS_ENV"] = "test"
+
+require File.expand_path('../../config/environment', __FILE__)
+require 'rails/test_help'
+
+class ActiveSupport::TestCase
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
+ #
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
+ # -- they do not yet inherit this setting
+ fixtures :all
+
+ # Add more helper methods to be used by all tests here...
+end
diff --git a/test/unit/admin_user_test.rb b/test/unit/admin_user_test.rb
index 6215c04..23a3cc8 100644
--- a/test/unit/admin_user_test.rb
+++ b/test/unit/admin_user_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class AdminUserTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class AdminUserTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/answer_test.rb b/test/unit/answer_test.rb
index c0af5c3..e2fad05 100644
--- a/test/unit/answer_test.rb
+++ b/test/unit/answer_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class AnswerTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class AnswerTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb
index b6d6131..9575e6c 100644
--- a/test/unit/comment_test.rb
+++ b/test/unit/comment_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class CommentTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class CommentTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/dmptemplate_test.rb b/test/unit/dmptemplate_test.rb
index 833a4be..ba89986 100644
--- a/test/unit/dmptemplate_test.rb
+++ b/test/unit/dmptemplate_test.rb
@@ -1,279 +1,279 @@
-require 'test_helper'
-
-class DmptemplateTest < ActiveSupport::TestCase
-
- def setup
- @template = dmptemplates(:ahrc_template)
- end
-
- def settings(extras = {})
- {
- margin: (@margin || { top: 10, bottom: 10, left: 10, right: 10 }),
- font_face: (@font_face || Settings::Dmptemplate::VALID_FONT_FACES.first),
- font_size: (@font_size || 11)
- }.merge(extras)
- end
-
- def default_formatting
- Settings::Dmptemplate::DEFAULT_SETTINGS[:formatting]
- end
-
- # ---------- settings ----------
-
- test "settings should use defaults if none defined" do
- assert(!@template.settings(:export).value?)
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "settings should use defined valid settings" do
- @template.settings(:export).formatting = settings
- @template.save!
-
- assert(@template.settings(:export).value?)
- assert_equal(settings, @template.settings(:export).formatting)
- assert_not_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting negative margin should not be valid" do
- @margin = { top: -10, bottom: 10, left: 10, right: 10 }
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.negative_margin'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting unknown margin should not be valid" do
- @margin = { top: 10, bottom: 10, left: 10, right: 10, top_left: 10 }
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.unknown_margin'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting negative font-size should not be valid" do
- @font_size = -11
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_size'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting unknown key should not be valid" do
- @template.settings(:export).formatting = settings(foo: :bar)
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.unknown_key'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "not setting font_face should not be valid" do
- @template.settings(:export).formatting = settings.reject {|k,v| k == :font_face }
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.missing_key'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "not setting font_size should not be valid" do
- @template.settings(:export).formatting = settings.reject {|k,v| k == :font_size }
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.missing_key'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "not setting margin should not be valid" do
- @template.settings(:export).formatting = settings.reject {|k,v| k == :margin }
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.missing_key'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting non-hash as margin should not be valid" do
- @margin = :foo
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.invalid_margin'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting non-integer as font_size should not be valid" do
- @font_size = "foo"
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_size'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting non-string as font_face should not be valid" do
- @font_face = 1
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_face'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- test "setting unknown string as font_face should not be valid" do
- @font_face = 'Monaco, Monospace, Sans-Serif'
-
- @template.settings(:export).formatting = settings
-
- assert(!@template.valid?)
- assert(!@template.save)
-
- assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_face'),
- @template.errors.messages[:'setting_objects.formatting'].first)
-
- @template.reload
-
- assert_equal(default_formatting, @template.settings(:export).formatting)
- end
-
- # ---------- templates_org_type ----------
- test "templates_org_type returns all published" do
- OrganisationType.find_each do |org_type|
- result_templates = Dmptemplate.templates_org_type(org_type.name)
- my_list = Array.new
- org_type.organisations.each do |org|
- my_list += org.dmptemplates
- end
- my_list.each do |template|
- if template.published
- assert_includes(result_templates, template, "Template: #{template.title}} of type #{org_type.name}, not returned by templates_org_type")
- end
- end
- end
- end
-
- # ---------- funders_templates ----------
- test "funders_templates returns all funder organisation templates" do
- result_templates = Dmptemplate.funders_templates
- funder_templates = OrganisationType.find_by(name: "funder").organisations do |org|
- org.dmptemplates.each do |template|
- assert_includes( result_templates, template, "Funder Template: #{template.title} not included in result of funders_templates")
- end
- end
- end
-
- # ---------- own_institutional_templates ----------
- test "own_institutional_templates returns all templates belonging to given org_id" do
- Organisation.find_each do |org|
- result_templates = Dmptemplate.own_institutional_templates(org.id)
- org.dmptemplates.each do |template|
- assert_includes(result_templates, template, "Template: #{template.title} not returned by own_institutional_templates")
- end
- end
- end
-
- # ---------- funders_and_own_templates ----------
- test "funders_and_own_templates returns all funder and own given org_id templates" do
- Organisation.find_each do |org|
- result_templates = Dmptemplate.funders_and_own_templates(org.id)
- org.dmptemplates.each do |template|
- assert_includes(result_templates, template, "Template #{template.title} not returned by funders and own templates")
- end
- end
- funder_templates = OrganisationType.find_by(name: "funder").organisations do |org|
- org.dmptemplates.each do |template|
- assert_includes( result_templates, template, "Funder Template: #{template.title} not included in result of funders_and_own_templates")
- end
- end
- end
-
- # ---------- org_type ----------
- test "org_type properly returns the name of the template's organisation's type" do
- Dmptemplate.find_each do |template|
- assert_equal( template.org_type, template.organisation.organisation_type.name, "Template: #{template.title} returned #{template.org_type}, instead of #{template.organisation.organisation_type.name}")
- end
- end
-
- # ---------- has_customisations? ----------
- test "has_customisations? correctly identifies if a given org has customised the template" do
- # TODO: Impliment after understanding has_customisations
- flunk
- end
-
- # ---------- has_published_versions? ----------
- test "has_published_versions? correctly identifies published versions" do
- Dmptemplate.find_each do |template|
- template.phases.each do |phase|
- unless phase.latest_published_version.nil?
- assert(template.has_published_versions? , "there was a published version of phase: #{phase.title}")
- end
- end
- end
- end
-
-
-end
+require 'test_helper'
+
+class DmptemplateTest < ActiveSupport::TestCase
+
+ def setup
+ @template = dmptemplates(:ahrc_template)
+ end
+
+ def settings(extras = {})
+ {
+ margin: (@margin || { top: 10, bottom: 10, left: 10, right: 10 }),
+ font_face: (@font_face || Settings::Dmptemplate::VALID_FONT_FACES.first),
+ font_size: (@font_size || 11)
+ }.merge(extras)
+ end
+
+ def default_formatting
+ Settings::Dmptemplate::DEFAULT_SETTINGS[:formatting]
+ end
+
+ # ---------- settings ----------
+
+ test "settings should use defaults if none defined" do
+ assert(!@template.settings(:export).value?)
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "settings should use defined valid settings" do
+ @template.settings(:export).formatting = settings
+ @template.save!
+
+ assert(@template.settings(:export).value?)
+ assert_equal(settings, @template.settings(:export).formatting)
+ assert_not_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting negative margin should not be valid" do
+ @margin = { top: -10, bottom: 10, left: 10, right: 10 }
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.negative_margin'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting unknown margin should not be valid" do
+ @margin = { top: 10, bottom: 10, left: 10, right: 10, top_left: 10 }
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.unknown_margin'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting negative font-size should not be valid" do
+ @font_size = -11
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_size'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting unknown key should not be valid" do
+ @template.settings(:export).formatting = settings(foo: :bar)
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.unknown_key'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "not setting font_face should not be valid" do
+ @template.settings(:export).formatting = settings.reject {|k,v| k == :font_face }
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.missing_key'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "not setting font_size should not be valid" do
+ @template.settings(:export).formatting = settings.reject {|k,v| k == :font_size }
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.missing_key'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "not setting margin should not be valid" do
+ @template.settings(:export).formatting = settings.reject {|k,v| k == :margin }
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.missing_key'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting non-hash as margin should not be valid" do
+ @margin = :foo
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.invalid_margin'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting non-integer as font_size should not be valid" do
+ @font_size = "foo"
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_size'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting non-string as font_face should not be valid" do
+ @font_face = 1
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_face'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ test "setting unknown string as font_face should not be valid" do
+ @font_face = 'Monaco, Monospace, Sans-Serif'
+
+ @template.settings(:export).formatting = settings
+
+ assert(!@template.valid?)
+ assert(!@template.save)
+
+ assert_equal(I18n.t('helpers.settings.plans.errors.invalid_font_face'),
+ @template.errors.messages[:'setting_objects.formatting'].first)
+
+ @template.reload
+
+ assert_equal(default_formatting, @template.settings(:export).formatting)
+ end
+
+ # ---------- templates_org_type ----------
+ test "templates_org_type returns all published" do
+ OrganisationType.find_each do |org_type|
+ result_templates = Dmptemplate.templates_org_type(org_type.name)
+ my_list = Array.new
+ org_type.organisations.each do |org|
+ my_list += org.dmptemplates
+ end
+ my_list.each do |template|
+ if template.published
+ assert_includes(result_templates, template, "Template: #{template.title}} of type #{org_type.name}, not returned by templates_org_type")
+ end
+ end
+ end
+ end
+
+ # ---------- funders_templates ----------
+ test "funders_templates returns all funder organisation templates" do
+ result_templates = Dmptemplate.funders_templates
+ funder_templates = OrganisationType.find_by(name: "funder").organisations do |org|
+ org.dmptemplates.each do |template|
+ assert_includes( result_templates, template, "Funder Template: #{template.title} not included in result of funders_templates")
+ end
+ end
+ end
+
+ # ---------- own_institutional_templates ----------
+ test "own_institutional_templates returns all templates belonging to given org_id" do
+ Organisation.find_each do |org|
+ result_templates = Dmptemplate.own_institutional_templates(org.id)
+ org.dmptemplates.each do |template|
+ assert_includes(result_templates, template, "Template: #{template.title} not returned by own_institutional_templates")
+ end
+ end
+ end
+
+ # ---------- funders_and_own_templates ----------
+ test "funders_and_own_templates returns all funder and own given org_id templates" do
+ Organisation.find_each do |org|
+ result_templates = Dmptemplate.funders_and_own_templates(org.id)
+ org.dmptemplates.each do |template|
+ assert_includes(result_templates, template, "Template #{template.title} not returned by funders and own templates")
+ end
+ end
+ funder_templates = OrganisationType.find_by(name: "funder").organisations do |org|
+ org.dmptemplates.each do |template|
+ assert_includes( result_templates, template, "Funder Template: #{template.title} not included in result of funders_and_own_templates")
+ end
+ end
+ end
+
+ # ---------- org_type ----------
+ test "org_type properly returns the name of the template's organisation's type" do
+ Dmptemplate.find_each do |template|
+ assert_equal( template.org_type, template.organisation.organisation_type.name, "Template: #{template.title} returned #{template.org_type}, instead of #{template.organisation.organisation_type.name}")
+ end
+ end
+
+ # ---------- has_customisations? ----------
+ test "has_customisations? correctly identifies if a given org has customised the template" do
+ # TODO: Impliment after understanding has_customisations
+ flunk
+ end
+
+ # ---------- has_published_versions? ----------
+ test "has_published_versions? correctly identifies published versions" do
+ Dmptemplate.find_each do |template|
+ template.phases.each do |phase|
+ unless phase.latest_published_version.nil?
+ assert(template.has_published_versions? , "there was a published version of phase: #{phase.title}")
+ end
+ end
+ end
+ end
+
+
+end
diff --git a/test/unit/file_type_test.rb b/test/unit/file_type_test.rb
index 7aa35b7..3f94955 100644
--- a/test/unit/file_type_test.rb
+++ b/test/unit/file_type_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class FileTypeTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class FileTypeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/file_upload_test.rb b/test/unit/file_upload_test.rb
index a3d1e00..900dac8 100644
--- a/test/unit/file_upload_test.rb
+++ b/test/unit/file_upload_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class FileUploadTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class FileUploadTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/guidance_group_test.rb b/test/unit/guidance_group_test.rb
index 45a8483..a4f7d07 100644
--- a/test/unit/guidance_group_test.rb
+++ b/test/unit/guidance_group_test.rb
@@ -1,156 +1,156 @@
-require 'test_helper'
-
-class GuidanceGroupTest < ActiveSupport::TestCase
- # ---------- can_view? ----------
- test "DCC guidance groups should be viewable" do
- assert GuidanceGroup.can_view?(users(:user_one), guidance_groups(:dcc_guidance_group_1))
- end
-
- test "Funder guidance groups should be viewable" do
- organisation_types(:funder).organisations.each do |org|
- org.guidance_groups.each do |funder_group|
- assert GuidanceGroup.can_view?(users(:user_one), funder_group)
- end
- end
- end
-
- test "User's organisation groups should be viewable" do
- assert GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_1).id) , "user_one cannot view aru_institution_guidance"
-
- assert GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_2).id), "user_two cannot view au_..._1"
-
- assert GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_3).id), "user_three cannot view bu_..._1"
- assert GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_4).id), "user_three cannot view bu_..._2"
- end
-
- test "No other organisations's groups should be viewable" do
- assert_not GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_2).id)
- assert_not GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_3).id)
- assert_not GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_4).id)
-
- assert_not GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_1).id)
- assert_not GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_3).id)
- assert_not GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_4).id)
-
- assert_not GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_1).id)
- assert_not GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_2).id)
- end
-
-
- # ---------- all_viewable ----------
- # ensure that the all_viewable function returns all viewable groups
- # should return true for groups owned by funders
- # should return true for groups owned by DCC
- # should return true for groups owned by the user's organisation
- # should not return true for an organisation outwith those above
- test "all_viewable returns all dcc groups" do
- all_viewable_groups = GuidanceGroup.all_viewable(users(:user_one))
- organisations(:dcc).guidance_groups.each do |group|
- assert_includes(all_viewable_groups, group)
- end
- end
-
- test "all_viewable returns all funder groups" do
- all_viewable_groups = GuidanceGroup.all_viewable(users(:user_one))
- organisation_types(:funder).organisations.each do |org|
- org.guidance_groups.each do |group|
- assert_includes(all_viewable_groups, group)
- end
- end
- end
-
- test "all_viewable returns all of a user's organisations's guidances" do
- all_viewable_groups_one = GuidanceGroup.all_viewable(users(:user_one))
- organisations(:aru).guidance_groups.each do |group|
- assert_includes(all_viewable_groups_one, group)
- end
-
- all_viewable_groups_two = GuidanceGroup.all_viewable(users(:user_two))
- organisations(:au).guidance_groups.each do |group|
- assert_includes(all_viewable_groups_two, group)
- end
-
- all_viewable_groups_three = GuidanceGroup.all_viewable(users(:user_three))
- organisations(:bu).guidance_groups.each do |group|
- assert_includes(all_viewable_groups_three, group)
- end
- end
-
- test "all_viewable does not return any other organisaition's guidance" do
- all_viewable_groups = GuidanceGroup.all_viewable(users(:user_one))
- all_viewable_groups.delete_if do |group|
- if group.organisation.id == organisations(:dcc).id
- true
- elsif group.organisation.organisation_type.id == organisation_types(:funder).id
- true
- elsif group.organisation.id == users(:user_one).organisations.first.id
- true
- else
- false
- end
- end
- assert_empty(all_viewable_groups)
- end
-
-
- # ---------- display_name ----------
- test "display_name should return an org name for an org with one guidance" do
- assert_equal(guidance_groups(:funder_guidance_group_1).display_name, "Arts and Humanities Research Council", "result of display_name for an org with one group should be the org name")
- end
-
- test "display_name should return an org and group name for an org with more than one guidance" do
- assert_equal(guidance_groups(:institution_guidance_group_4).display_name, "Bangor University: Bangor University guidance group 2", "result of display_name for an org with more than one group should be : ")
- end
-
- # ---------- self.guidance_groups_excluding ----------
- test "guidance_groups_excluding should not return a group belonging to specified single org" do
- # generate a list
- excluding_list = GuidanceGroup.guidance_groups_excluding([organisations(:dcc)])
- excluding_list.each do |group|
- refute_equal(group.organisation, organisations(:dcc), "#{group.name} is owned by dcc")
- end
- end
-
- test "guidance_groups_excluding should not return a group belonging to specified orgs" do
- org_list = [organisations(:ahrc), organisations(:bu)]
- excluding_list = GuidanceGroup.guidance_groups_excluding(org_list)
- excluding_list.each do |group|
- org_list.each do |org|
- refute_equal(group.organisation, org, "#{group.name} is owned by specified org: #{org.name}")
- end
- end
- end
-
- test "guidance_groups_excluding should return all groups not belonging to the specified org" do
- excluding_list = GuidanceGroup.guidance_groups_excluding([organisations(:dcc)])
- GuidanceGroup.all.each do |group|
- if group.organisation_id != organisations(:dcc).id
- assert_includes(excluding_list, group, "#{group.name} is not owned by dcc so should be included")
- end
- end
- end
-
- test "guidance_groups_excluding should return all groups not belonging to specified orgs" do
- excluded =false
- org_list = [organisations(:ahrc), organisations(:bu)]
- excluding_list = GuidanceGroup.guidance_groups_excluding(org_list)
- GuidanceGroup.all.each do |group|
- excluded = false
- org_list.each do |org|
- if group.organisation == org
- excluded = true
- end
- end
- unless excluded
- assert_includes(excluding_list, group, "#{group.name} is not owned by a specified org so should be included")
- end
- end
- end
-
-end
-
-
-
-
-
-
+require 'test_helper'
+
+class GuidanceGroupTest < ActiveSupport::TestCase
+ # ---------- can_view? ----------
+ test "DCC guidance groups should be viewable" do
+ assert GuidanceGroup.can_view?(users(:user_one), guidance_groups(:dcc_guidance_group_1))
+ end
+
+ test "Funder guidance groups should be viewable" do
+ organisation_types(:funder).organisations.each do |org|
+ org.guidance_groups.each do |funder_group|
+ assert GuidanceGroup.can_view?(users(:user_one), funder_group)
+ end
+ end
+ end
+
+ test "User's organisation groups should be viewable" do
+ assert GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_1).id) , "user_one cannot view aru_institution_guidance"
+
+ assert GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_2).id), "user_two cannot view au_..._1"
+
+ assert GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_3).id), "user_three cannot view bu_..._1"
+ assert GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_4).id), "user_three cannot view bu_..._2"
+ end
+
+ test "No other organisations's groups should be viewable" do
+ assert_not GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_2).id)
+ assert_not GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_3).id)
+ assert_not GuidanceGroup.can_view?(users(:user_one), guidance_groups(:institution_guidance_group_4).id)
+
+ assert_not GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_1).id)
+ assert_not GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_3).id)
+ assert_not GuidanceGroup.can_view?(users(:user_two), guidance_groups(:institution_guidance_group_4).id)
+
+ assert_not GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_1).id)
+ assert_not GuidanceGroup.can_view?(users(:user_three), guidance_groups(:institution_guidance_group_2).id)
+ end
+
+
+ # ---------- all_viewable ----------
+ # ensure that the all_viewable function returns all viewable groups
+ # should return true for groups owned by funders
+ # should return true for groups owned by DCC
+ # should return true for groups owned by the user's organisation
+ # should not return true for an organisation outwith those above
+ test "all_viewable returns all dcc groups" do
+ all_viewable_groups = GuidanceGroup.all_viewable(users(:user_one))
+ organisations(:dcc).guidance_groups.each do |group|
+ assert_includes(all_viewable_groups, group)
+ end
+ end
+
+ test "all_viewable returns all funder groups" do
+ all_viewable_groups = GuidanceGroup.all_viewable(users(:user_one))
+ organisation_types(:funder).organisations.each do |org|
+ org.guidance_groups.each do |group|
+ assert_includes(all_viewable_groups, group)
+ end
+ end
+ end
+
+ test "all_viewable returns all of a user's organisations's guidances" do
+ all_viewable_groups_one = GuidanceGroup.all_viewable(users(:user_one))
+ organisations(:aru).guidance_groups.each do |group|
+ assert_includes(all_viewable_groups_one, group)
+ end
+
+ all_viewable_groups_two = GuidanceGroup.all_viewable(users(:user_two))
+ organisations(:au).guidance_groups.each do |group|
+ assert_includes(all_viewable_groups_two, group)
+ end
+
+ all_viewable_groups_three = GuidanceGroup.all_viewable(users(:user_three))
+ organisations(:bu).guidance_groups.each do |group|
+ assert_includes(all_viewable_groups_three, group)
+ end
+ end
+
+ test "all_viewable does not return any other organisaition's guidance" do
+ all_viewable_groups = GuidanceGroup.all_viewable(users(:user_one))
+ all_viewable_groups.delete_if do |group|
+ if group.organisation.id == organisations(:dcc).id
+ true
+ elsif group.organisation.organisation_type.id == organisation_types(:funder).id
+ true
+ elsif group.organisation.id == users(:user_one).organisations.first.id
+ true
+ else
+ false
+ end
+ end
+ assert_empty(all_viewable_groups)
+ end
+
+
+ # ---------- display_name ----------
+ test "display_name should return an org name for an org with one guidance" do
+ assert_equal(guidance_groups(:funder_guidance_group_1).display_name, "Arts and Humanities Research Council", "result of display_name for an org with one group should be the org name")
+ end
+
+ test "display_name should return an org and group name for an org with more than one guidance" do
+ assert_equal(guidance_groups(:institution_guidance_group_4).display_name, "Bangor University: Bangor University guidance group 2", "result of display_name for an org with more than one group should be : ")
+ end
+
+ # ---------- self.guidance_groups_excluding ----------
+ test "guidance_groups_excluding should not return a group belonging to specified single org" do
+ # generate a list
+ excluding_list = GuidanceGroup.guidance_groups_excluding([organisations(:dcc)])
+ excluding_list.each do |group|
+ refute_equal(group.organisation, organisations(:dcc), "#{group.name} is owned by dcc")
+ end
+ end
+
+ test "guidance_groups_excluding should not return a group belonging to specified orgs" do
+ org_list = [organisations(:ahrc), organisations(:bu)]
+ excluding_list = GuidanceGroup.guidance_groups_excluding(org_list)
+ excluding_list.each do |group|
+ org_list.each do |org|
+ refute_equal(group.organisation, org, "#{group.name} is owned by specified org: #{org.name}")
+ end
+ end
+ end
+
+ test "guidance_groups_excluding should return all groups not belonging to the specified org" do
+ excluding_list = GuidanceGroup.guidance_groups_excluding([organisations(:dcc)])
+ GuidanceGroup.all.each do |group|
+ if group.organisation_id != organisations(:dcc).id
+ assert_includes(excluding_list, group, "#{group.name} is not owned by dcc so should be included")
+ end
+ end
+ end
+
+ test "guidance_groups_excluding should return all groups not belonging to specified orgs" do
+ excluded =false
+ org_list = [organisations(:ahrc), organisations(:bu)]
+ excluding_list = GuidanceGroup.guidance_groups_excluding(org_list)
+ GuidanceGroup.all.each do |group|
+ excluded = false
+ org_list.each do |org|
+ if group.organisation == org
+ excluded = true
+ end
+ end
+ unless excluded
+ assert_includes(excluding_list, group, "#{group.name} is not owned by a specified org so should be included")
+ end
+ end
+ end
+
+end
+
+
+
+
+
+
diff --git a/test/unit/guidance_test.rb b/test/unit/guidance_test.rb
index c2f3a5c..fcb522f 100644
--- a/test/unit/guidance_test.rb
+++ b/test/unit/guidance_test.rb
@@ -1,168 +1,168 @@
-require 'test_helper'
-
-class GuidanceTest < ActiveSupport::TestCase
- # ---------- can_view? ----------
- # ensure that the can_view? function returns true all viewable guidances
- # should return true for groups owned by funders
- # should return true for groups owned by DCC
- # should return true for groups owned by the user's organisation
- # should not return true for an organisation outwith those above
- test "DCC guidances should be viewable" do
- guidance_groups(:dcc_guidance_group_1).guidances.each do |guidance|
- assert Guidance.can_view?(users(:user_one), guidance.id)
- end
- end
-
- test "Funder guidances should be viewable" do
- assert Guidance.can_view?(users(:user_one), guidances(:ahrc_funder_guidance).id)
- assert Guidance.can_view?(users(:user_one), guidances(:bbsrc_funder_guidance).id)
- end
-
-
- test "User's organisation guidances should be viewable" do
- assert Guidance.can_view?(users(:user_one), guidances(:aru_institution_guidance).id) , "user_one cannot view aru_institution_guidance"
-
- assert Guidance.can_view?(users(:user_two), guidances(:au_institution_guidance_1).id), "user_two cannot view au_..._1"
- assert Guidance.can_view?(users(:user_two), guidances(:au_institution_guidance_2).id), "user_two cannot view au_..._2"
-
- assert Guidance.can_view?(users(:user_three), guidances(:bu_institution_guidance_1).id), "user_three cannot view bu_..._1"
- assert Guidance.can_view?(users(:user_three), guidances(:bu_institution_guidance_2).id), "user_three cannot view bu_..._2"
- end
-
- test "No other organisations's guidances should be viewable" do
- # TOOD: add more fixtures with new types of guidances(i.e. not institution)
- # and add test cases
- assert_not Guidance.can_view?(users(:user_one), guidances(:au_institution_guidance_1).id)
- assert_not Guidance.can_view?(users(:user_one), guidances(:au_institution_guidance_2).id)
- assert_not Guidance.can_view?(users(:user_one), guidances(:bu_institution_guidance_1).id)
- assert_not Guidance.can_view?(users(:user_one), guidances(:bu_institution_guidance_2).id)
-
- assert_not Guidance.can_view?(users(:user_two), guidances(:aru_institution_guidance).id)
- assert_not Guidance.can_view?(users(:user_two), guidances(:bu_institution_guidance_1).id)
- assert_not Guidance.can_view?(users(:user_two), guidances(:bu_institution_guidance_2).id)
-
- assert_not Guidance.can_view?(users(:user_three), guidances(:aru_institution_guidance).id)
- assert_not Guidance.can_view?(users(:user_three), guidances(:au_institution_guidance_1).id)
- assert_not Guidance.can_view?(users(:user_three), guidances(:au_institution_guidance_2).id)
- end
-
-# ---------- all_viewable ----------
- # ensure that the all_viewable function returns all viewable guidances
- # should return true for groups owned by funders
- # should return true for groups owned by DCC
- # should return true for groups owned by the user's organisation
- # should not return true for an organisation outwith those above
- test "all_viewable returns all DCC guidances" do
- all_viewable_guidances = Guidance.all_viewable(users(:user_one))
- organisations(:dcc).guidance_groups.each do |group|
- group.guidances.each do |guidance|
- assert_includes(all_viewable_guidances, guidance)
- end
- end
- end
-
- test "all_viewable returns all funder guidances" do
- all_viewable_guidances = Guidance.all_viewable(users(:user_one))
- guidance_groups(:funder_guidance_group_1).guidances.each do |guidance|
- assert_includes(all_viewable_guidances, guidance)
- end
- guidance_groups(:funder_guidance_group_2).guidances.each do |guidance|
- assert_includes(all_viewable_guidances, guidance)
- end
- end
-
- test "all_viewable returns all of a user's organisations's guidances" do
- all_viewable_guidances_one = Guidance.all_viewable(users(:user_one))
- organisations(:aru).guidance_groups.each do |group|
- group.guidances.each do |guidance|
- assert_includes(all_viewable_guidances_one, guidance)
- end
- end
-
- all_viewable_guidances_two = Guidance.all_viewable(users(:user_two))
- organisations(:au).guidance_groups.each do |group|
- group.guidances.each do |guidance|
- assert_includes(all_viewable_guidances_two, guidance)
- end
- end
-
- all_viewable_guidances_three = Guidance.all_viewable(users(:user_three))
- organisations(:bu).guidance_groups.each do |group|
- group.guidances.each do |guidance|
- assert_includes(all_viewable_guidances_three, guidance)
- end
- end
- end
-
-
- test "all_viewable does not return any other organisation's guidance" do
- # TODO: Add in a suitable test. should we check for non-institutions?
- all_viewable_guidances = Guidance.all_viewable(users(:user_one))
- # remove all of the user's organisation
- # remove all of each funder's organisations
- # remove each of the dcc's organisations
- # check if nill
- all_viewable_guidances.delete_if do |guidance|
- guidance.guidance_groups.each do |group|
- if group.organisation.id == organisations(:dcc).id
- true
- elsif group.organisation.organisation_type.id == organisation_types(:funder).id
- true
- elsif group.organisation.id == users(:user_one).organisations.first.id
- true
- else
- false
- end
- end
- end
- assert_empty(all_viewable_guidances, "there must not be any guidances which are not funders, DCC, or our own organisation")
- end
-
- # ---------- in_group_belonging_to? ----------
- test "in_group_belonging_to correctly identifies parent orgs" do
- # test that the association works for all correct usages
- Guidance.all.each do |guidance|
- guidance.guidance_groups.each do |group|
- assert(guidance.in_group_belonging_to?(group.organisation.id), "Guidance: #{guidance.text} should belong to organisation #{group.organisation.name}")
- end
- end
- end
-
- test "in_group_belonging_to rejects non-parent orgs" do
- # test that in_group_belonging_to rejects a few interesting organisation-guidance pairs
- assert_not(guidances(:related_policies).in_group_belonging_to?(organisations(:ahrc)), "Organisation ahrc does not own guidance: related policies")
- assert_not(guidances(:ahrc_funder_guidance).in_group_belonging_to?(organisations(:dcc)), "Organisation dcc does not own guidance: ahrc_funder_guidance")
- end
-
- # ---------- by_organisation ----------
- test "by_organisation correctly returns all guidance belonging to a given org" do
- Organisation.all.each do |org|
- org_guidance = Guidance.by_organisation(org)
- org.guidance_groups.each do |group|
- group.guidances.each do |guidance|
- assert_includes(org_guidance, guidance, "Guidance #{guidance.text} should belong to organisation: #{org.name}")
- end
- end
- end
- end
-
- # ---------- get_guidance_group_templates ----------
- ## the main function is completely bugged, so ask to remove it
- # test "get_guidance_group_templates retuns all templates belonging to a guidance group" do
- # GuidanceGroup.all.each do |group|
- # group_templates = guidances(:related_policies).get_guidance_group_templates?(group)
- # group.dmptemplates.each do |template|
- # assert_includes(group_templates, template, "group #{group.name} should include template #{template.title}")
- # end
- # end
- # end
-
-end
-
-
-
-
-
-
-
-
+require 'test_helper'
+
+class GuidanceTest < ActiveSupport::TestCase
+ # ---------- can_view? ----------
+ # ensure that the can_view? function returns true all viewable guidances
+ # should return true for groups owned by funders
+ # should return true for groups owned by DCC
+ # should return true for groups owned by the user's organisation
+ # should not return true for an organisation outwith those above
+ test "DCC guidances should be viewable" do
+ guidance_groups(:dcc_guidance_group_1).guidances.each do |guidance|
+ assert Guidance.can_view?(users(:user_one), guidance.id)
+ end
+ end
+
+ test "Funder guidances should be viewable" do
+ assert Guidance.can_view?(users(:user_one), guidances(:ahrc_funder_guidance).id)
+ assert Guidance.can_view?(users(:user_one), guidances(:bbsrc_funder_guidance).id)
+ end
+
+
+ test "User's organisation guidances should be viewable" do
+ assert Guidance.can_view?(users(:user_one), guidances(:aru_institution_guidance).id) , "user_one cannot view aru_institution_guidance"
+
+ assert Guidance.can_view?(users(:user_two), guidances(:au_institution_guidance_1).id), "user_two cannot view au_..._1"
+ assert Guidance.can_view?(users(:user_two), guidances(:au_institution_guidance_2).id), "user_two cannot view au_..._2"
+
+ assert Guidance.can_view?(users(:user_three), guidances(:bu_institution_guidance_1).id), "user_three cannot view bu_..._1"
+ assert Guidance.can_view?(users(:user_three), guidances(:bu_institution_guidance_2).id), "user_three cannot view bu_..._2"
+ end
+
+ test "No other organisations's guidances should be viewable" do
+ # TOOD: add more fixtures with new types of guidances(i.e. not institution)
+ # and add test cases
+ assert_not Guidance.can_view?(users(:user_one), guidances(:au_institution_guidance_1).id)
+ assert_not Guidance.can_view?(users(:user_one), guidances(:au_institution_guidance_2).id)
+ assert_not Guidance.can_view?(users(:user_one), guidances(:bu_institution_guidance_1).id)
+ assert_not Guidance.can_view?(users(:user_one), guidances(:bu_institution_guidance_2).id)
+
+ assert_not Guidance.can_view?(users(:user_two), guidances(:aru_institution_guidance).id)
+ assert_not Guidance.can_view?(users(:user_two), guidances(:bu_institution_guidance_1).id)
+ assert_not Guidance.can_view?(users(:user_two), guidances(:bu_institution_guidance_2).id)
+
+ assert_not Guidance.can_view?(users(:user_three), guidances(:aru_institution_guidance).id)
+ assert_not Guidance.can_view?(users(:user_three), guidances(:au_institution_guidance_1).id)
+ assert_not Guidance.can_view?(users(:user_three), guidances(:au_institution_guidance_2).id)
+ end
+
+# ---------- all_viewable ----------
+ # ensure that the all_viewable function returns all viewable guidances
+ # should return true for groups owned by funders
+ # should return true for groups owned by DCC
+ # should return true for groups owned by the user's organisation
+ # should not return true for an organisation outwith those above
+ test "all_viewable returns all DCC guidances" do
+ all_viewable_guidances = Guidance.all_viewable(users(:user_one))
+ organisations(:dcc).guidance_groups.each do |group|
+ group.guidances.each do |guidance|
+ assert_includes(all_viewable_guidances, guidance)
+ end
+ end
+ end
+
+ test "all_viewable returns all funder guidances" do
+ all_viewable_guidances = Guidance.all_viewable(users(:user_one))
+ guidance_groups(:funder_guidance_group_1).guidances.each do |guidance|
+ assert_includes(all_viewable_guidances, guidance)
+ end
+ guidance_groups(:funder_guidance_group_2).guidances.each do |guidance|
+ assert_includes(all_viewable_guidances, guidance)
+ end
+ end
+
+ test "all_viewable returns all of a user's organisations's guidances" do
+ all_viewable_guidances_one = Guidance.all_viewable(users(:user_one))
+ organisations(:aru).guidance_groups.each do |group|
+ group.guidances.each do |guidance|
+ assert_includes(all_viewable_guidances_one, guidance)
+ end
+ end
+
+ all_viewable_guidances_two = Guidance.all_viewable(users(:user_two))
+ organisations(:au).guidance_groups.each do |group|
+ group.guidances.each do |guidance|
+ assert_includes(all_viewable_guidances_two, guidance)
+ end
+ end
+
+ all_viewable_guidances_three = Guidance.all_viewable(users(:user_three))
+ organisations(:bu).guidance_groups.each do |group|
+ group.guidances.each do |guidance|
+ assert_includes(all_viewable_guidances_three, guidance)
+ end
+ end
+ end
+
+
+ test "all_viewable does not return any other organisation's guidance" do
+ # TODO: Add in a suitable test. should we check for non-institutions?
+ all_viewable_guidances = Guidance.all_viewable(users(:user_one))
+ # remove all of the user's organisation
+ # remove all of each funder's organisations
+ # remove each of the dcc's organisations
+ # check if nill
+ all_viewable_guidances.delete_if do |guidance|
+ guidance.guidance_groups.each do |group|
+ if group.organisation.id == organisations(:dcc).id
+ true
+ elsif group.organisation.organisation_type.id == organisation_types(:funder).id
+ true
+ elsif group.organisation.id == users(:user_one).organisations.first.id
+ true
+ else
+ false
+ end
+ end
+ end
+ assert_empty(all_viewable_guidances, "there must not be any guidances which are not funders, DCC, or our own organisation")
+ end
+
+ # ---------- in_group_belonging_to? ----------
+ test "in_group_belonging_to correctly identifies parent orgs" do
+ # test that the association works for all correct usages
+ Guidance.all.each do |guidance|
+ guidance.guidance_groups.each do |group|
+ assert(guidance.in_group_belonging_to?(group.organisation.id), "Guidance: #{guidance.text} should belong to organisation #{group.organisation.name}")
+ end
+ end
+ end
+
+ test "in_group_belonging_to rejects non-parent orgs" do
+ # test that in_group_belonging_to rejects a few interesting organisation-guidance pairs
+ assert_not(guidances(:related_policies).in_group_belonging_to?(organisations(:ahrc)), "Organisation ahrc does not own guidance: related policies")
+ assert_not(guidances(:ahrc_funder_guidance).in_group_belonging_to?(organisations(:dcc)), "Organisation dcc does not own guidance: ahrc_funder_guidance")
+ end
+
+ # ---------- by_organisation ----------
+ test "by_organisation correctly returns all guidance belonging to a given org" do
+ Organisation.all.each do |org|
+ org_guidance = Guidance.by_organisation(org)
+ org.guidance_groups.each do |group|
+ group.guidances.each do |guidance|
+ assert_includes(org_guidance, guidance, "Guidance #{guidance.text} should belong to organisation: #{org.name}")
+ end
+ end
+ end
+ end
+
+ # ---------- get_guidance_group_templates ----------
+ ## the main function is completely bugged, so ask to remove it
+ # test "get_guidance_group_templates retuns all templates belonging to a guidance group" do
+ # GuidanceGroup.all.each do |group|
+ # group_templates = guidances(:related_policies).get_guidance_group_templates?(group)
+ # group.dmptemplates.each do |template|
+ # assert_includes(group_templates, template, "group #{group.name} should include template #{template.title}")
+ # end
+ # end
+ # end
+
+end
+
+
+
+
+
+
+
+
diff --git a/test/unit/helpers/answers_helper_test.rb b/test/unit/helpers/answers_helper_test.rb
index a044015..ba3e2d9 100644
--- a/test/unit/helpers/answers_helper_test.rb
+++ b/test/unit/helpers/answers_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class AnswersHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class AnswersHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/dmptemplates_helper_test.rb b/test/unit/helpers/dmptemplates_helper_test.rb
index a6efb52..7703fda 100644
--- a/test/unit/helpers/dmptemplates_helper_test.rb
+++ b/test/unit/helpers/dmptemplates_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class DmptemplatesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class DmptemplatesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/file_types_helper_test.rb b/test/unit/helpers/file_types_helper_test.rb
index e04a1af..02fd16e 100644
--- a/test/unit/helpers/file_types_helper_test.rb
+++ b/test/unit/helpers/file_types_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class FileTypesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class FileTypesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/file_uploads_helper_test.rb b/test/unit/helpers/file_uploads_helper_test.rb
index bffc268..d6bb15e 100644
--- a/test/unit/helpers/file_uploads_helper_test.rb
+++ b/test/unit/helpers/file_uploads_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class FileUploadsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class FileUploadsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/guidances_helper_test.rb b/test/unit/helpers/guidances_helper_test.rb
index 04ca11c..397b066 100644
--- a/test/unit/helpers/guidances_helper_test.rb
+++ b/test/unit/helpers/guidances_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class GuidancesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class GuidancesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/home_helper_test.rb b/test/unit/helpers/home_helper_test.rb
index 4740a18..4e72d63 100644
--- a/test/unit/helpers/home_helper_test.rb
+++ b/test/unit/helpers/home_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class HomeHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class HomeHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/organisation_types_helper_test.rb b/test/unit/helpers/organisation_types_helper_test.rb
index 00e09fe..e355bde 100644
--- a/test/unit/helpers/organisation_types_helper_test.rb
+++ b/test/unit/helpers/organisation_types_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class OrganisationTypesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class OrganisationTypesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/organisations_helper_test.rb b/test/unit/helpers/organisations_helper_test.rb
index 8c4d907..ba9c1df 100644
--- a/test/unit/helpers/organisations_helper_test.rb
+++ b/test/unit/helpers/organisations_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class OrganisationsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class OrganisationsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/pages_helper_test.rb b/test/unit/helpers/pages_helper_test.rb
index 535dfe1..ec7d95a 100644
--- a/test/unit/helpers/pages_helper_test.rb
+++ b/test/unit/helpers/pages_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class PagesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class PagesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/phases_helper_test.rb b/test/unit/helpers/phases_helper_test.rb
index 568a8c5..5ea83b2 100644
--- a/test/unit/helpers/phases_helper_test.rb
+++ b/test/unit/helpers/phases_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class PhasesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class PhasesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/plan_sections_helper_test.rb b/test/unit/helpers/plan_sections_helper_test.rb
index 7b2f025..b196349 100644
--- a/test/unit/helpers/plan_sections_helper_test.rb
+++ b/test/unit/helpers/plan_sections_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class PlanSectionsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class PlanSectionsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/plans_helper_test.rb b/test/unit/helpers/plans_helper_test.rb
index db7b075..e440041 100644
--- a/test/unit/helpers/plans_helper_test.rb
+++ b/test/unit/helpers/plans_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class PlansHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class PlansHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/project_groups_helper_test.rb b/test/unit/helpers/project_groups_helper_test.rb
index 4f6c5da..00536a7 100644
--- a/test/unit/helpers/project_groups_helper_test.rb
+++ b/test/unit/helpers/project_groups_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class ProjectGroupsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class ProjectGroupsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/project_partners_helper_test.rb b/test/unit/helpers/project_partners_helper_test.rb
index 918cc6c..e34ac3f 100644
--- a/test/unit/helpers/project_partners_helper_test.rb
+++ b/test/unit/helpers/project_partners_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class ProjectPartnersHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class ProjectPartnersHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb
index a591e4e..2e6d5a7 100644
--- a/test/unit/helpers/projects_helper_test.rb
+++ b/test/unit/helpers/projects_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class ProjectsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class ProjectsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/question_themes_helper_test.rb b/test/unit/helpers/question_themes_helper_test.rb
index 0afaf4c..96a1dc7 100644
--- a/test/unit/helpers/question_themes_helper_test.rb
+++ b/test/unit/helpers/question_themes_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class QuestionThemesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class QuestionThemesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/questions_helper_test.rb b/test/unit/helpers/questions_helper_test.rb
index a190288..0c122f5 100644
--- a/test/unit/helpers/questions_helper_test.rb
+++ b/test/unit/helpers/questions_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class QuestionsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class QuestionsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/sections_helper_test.rb b/test/unit/helpers/sections_helper_test.rb
index 3ff6eac..aff16de 100644
--- a/test/unit/helpers/sections_helper_test.rb
+++ b/test/unit/helpers/sections_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class SectionsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class SectionsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/themes_helper_test.rb b/test/unit/helpers/themes_helper_test.rb
index b421fb2..0a5c987 100644
--- a/test/unit/helpers/themes_helper_test.rb
+++ b/test/unit/helpers/themes_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class ThemesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class ThemesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/user_org_roles_helper_test.rb b/test/unit/helpers/user_org_roles_helper_test.rb
index 2c188bb..c02d2f2 100644
--- a/test/unit/helpers/user_org_roles_helper_test.rb
+++ b/test/unit/helpers/user_org_roles_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class UserOrgRolesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class UserOrgRolesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/user_role_types_helper_test.rb b/test/unit/helpers/user_role_types_helper_test.rb
index 67a467a..a1c8e04 100644
--- a/test/unit/helpers/user_role_types_helper_test.rb
+++ b/test/unit/helpers/user_role_types_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class UserRoleTypesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class UserRoleTypesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/user_statuses_helper_test.rb b/test/unit/helpers/user_statuses_helper_test.rb
index fe9260b..3d39852 100644
--- a/test/unit/helpers/user_statuses_helper_test.rb
+++ b/test/unit/helpers/user_statuses_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class UserStatusesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class UserStatusesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/user_types_helper_test.rb b/test/unit/helpers/user_types_helper_test.rb
index eaecf63..7460858 100644
--- a/test/unit/helpers/user_types_helper_test.rb
+++ b/test/unit/helpers/user_types_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class UserTypesHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class UserTypesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/users_helper_test.rb b/test/unit/helpers/users_helper_test.rb
index 96af37a..c77b035 100644
--- a/test/unit/helpers/users_helper_test.rb
+++ b/test/unit/helpers/users_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class UsersHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class UsersHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/versions_helper_test.rb b/test/unit/helpers/versions_helper_test.rb
index 4974ea4..f12ea8a 100644
--- a/test/unit/helpers/versions_helper_test.rb
+++ b/test/unit/helpers/versions_helper_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
-
-class VersionsHelperTest < ActionView::TestCase
-end
+require 'test_helper'
+
+class VersionsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/organisation_test.rb b/test/unit/organisation_test.rb
index e503b4c..d42e615 100644
--- a/test/unit/organisation_test.rb
+++ b/test/unit/organisation_test.rb
@@ -1,85 +1,85 @@
-require 'test_helper'
-
-class OrganisationTest < ActiveSupport::TestCase
-
- # ---------- short_name ----------
- test "short_name should return the abbreviation if it exists" do
- assert_equal(organisations(:dcc).short_name, organisations(:dcc).abbreviation, "Org: DCC has an abreviation and should return it")
- end
-
- test "short_name should return the name if no abbreviation exists" do
- assert_equal(organisations(:aru).short_name, organisations(:aru).name, "Org: ARU has no abbreviation and should return it's full name")
- end
-
- # ---------- self.orgs_with_parent_of_type ----------
- test "self.orgs_with_parent_of_type correctly identifies organisation trees" do
- children = Organisation.orgs_with_parent_of_type("institution")
- assert_includes(children, organisations(:institution_child_one), "Org: institution_child_one is a child of an institution")
- end
-
- # ---------- self.other_organisations ----------
- test "self.other_organisations correctly returns ___" do
-
- end
-
- # ---------- all_sections ----------
- test "all_sections returns correct sections" do
- sections = organisations(:dcc).all_sections(versions(:DCC_phase_1_version_1).id)
- org_sections = Section.find_by(organisation: organisations(:dcc))
- org_sections.each do |section|
- if section.version_id == versions(:DCC_phase_1_version_1).id
- assert_includes(sections, section, "Section: #{section.title} should be included")
- end
- end
- end
-
- test "all_sections returns a parents sections" do
- sections = organisations(:institution_child_one).all_sections(versions(:institution_child_version_1).id)
- assert_includes( sections, sections(:institution_parent_1), "all_sections should return it's parent's sections")
- assert_includes( sections, sections(:institution_parent_2), "all_sections should return it's parent's sections")
- end
-
- test "all_sections returns [] if no sections are found" do
- sections = organisations(:dcc).all_sections(versions(:institution_child_version_1).id)
- assert_empty( sections, "no sections of that version exist")
- end
-
- # ---------- all_guidance_groups ----------
- test "all_guidance_groups returns all of the organisations guidance groups" do
- all_groups = organisations(:dcc).all_guidance_groups
- organisations(:dcc).guidance_groups.each do |group|
- assert_includes(all_groups, group, "group: #{group.name} belongs to the specified org")
- end
- end
-
- test "all_guidance_groups returns all of the organisations children's guidance groups" do
- all_groups = organisations(:institution_parent).all_guidance_groups
- organisations(:institution_child_one).guidance_groups.each do |group|
- assert_includes(all_groups, group, "group: #{group.name} belongs to the specified org")
- end
- end
-
- # ---------- root ----------
- test "root correctly identifies the parent organisation" do
- assert_equal(organisations(:institution_child_one).root, organizations(:institution_parent), "institution parent is the parent of institution child one")
- end
-
- test "root returns self if an organisation has no parents" do
- assert_equal(organisations(:dcc).root, organisations(:dcc), "dcc has no parent, so is root")
- end
-
- # ---------- warning ----------
- test "warning returns specified warning if not nil" do
- flunk
- end
-
- test "warning returns the parent's warning if nil" do
- flunk
- end
-
- # ---------- published_templates ----------
- test "published_templates returns all owned and published templates" do
- flunk
- end
-
-end
+require 'test_helper'
+
+class OrganisationTest < ActiveSupport::TestCase
+
+ # ---------- short_name ----------
+ test "short_name should return the abbreviation if it exists" do
+ assert_equal(organisations(:dcc).short_name, organisations(:dcc).abbreviation, "Org: DCC has an abreviation and should return it")
+ end
+
+ test "short_name should return the name if no abbreviation exists" do
+ assert_equal(organisations(:aru).short_name, organisations(:aru).name, "Org: ARU has no abbreviation and should return it's full name")
+ end
+
+ # ---------- self.orgs_with_parent_of_type ----------
+ test "self.orgs_with_parent_of_type correctly identifies organisation trees" do
+ children = Organisation.orgs_with_parent_of_type("institution")
+ assert_includes(children, organisations(:institution_child_one), "Org: institution_child_one is a child of an institution")
+ end
+
+ # ---------- self.other_organisations ----------
+ test "self.other_organisations correctly returns ___" do
+
+ end
+
+ # ---------- all_sections ----------
+ test "all_sections returns correct sections" do
+ sections = organisations(:dcc).all_sections(versions(:DCC_phase_1_version_1).id)
+ org_sections = Section.find_by(organisation: organisations(:dcc))
+ org_sections.each do |section|
+ if section.version_id == versions(:DCC_phase_1_version_1).id
+ assert_includes(sections, section, "Section: #{section.title} should be included")
+ end
+ end
+ end
+
+ test "all_sections returns a parents sections" do
+ sections = organisations(:institution_child_one).all_sections(versions(:institution_child_version_1).id)
+ assert_includes( sections, sections(:institution_parent_1), "all_sections should return it's parent's sections")
+ assert_includes( sections, sections(:institution_parent_2), "all_sections should return it's parent's sections")
+ end
+
+ test "all_sections returns [] if no sections are found" do
+ sections = organisations(:dcc).all_sections(versions(:institution_child_version_1).id)
+ assert_empty( sections, "no sections of that version exist")
+ end
+
+ # ---------- all_guidance_groups ----------
+ test "all_guidance_groups returns all of the organisations guidance groups" do
+ all_groups = organisations(:dcc).all_guidance_groups
+ organisations(:dcc).guidance_groups.each do |group|
+ assert_includes(all_groups, group, "group: #{group.name} belongs to the specified org")
+ end
+ end
+
+ test "all_guidance_groups returns all of the organisations children's guidance groups" do
+ all_groups = organisations(:institution_parent).all_guidance_groups
+ organisations(:institution_child_one).guidance_groups.each do |group|
+ assert_includes(all_groups, group, "group: #{group.name} belongs to the specified org")
+ end
+ end
+
+ # ---------- root ----------
+ test "root correctly identifies the parent organisation" do
+ assert_equal(organisations(:institution_child_one).root, organizations(:institution_parent), "institution parent is the parent of institution child one")
+ end
+
+ test "root returns self if an organisation has no parents" do
+ assert_equal(organisations(:dcc).root, organisations(:dcc), "dcc has no parent, so is root")
+ end
+
+ # ---------- warning ----------
+ test "warning returns specified warning if not nil" do
+ flunk
+ end
+
+ test "warning returns the parent's warning if nil" do
+ flunk
+ end
+
+ # ---------- published_templates ----------
+ test "published_templates returns all owned and published templates" do
+ flunk
+ end
+
+end
diff --git a/test/unit/organisation_type_test.rb b/test/unit/organisation_type_test.rb
index 67b9944..024d36f 100644
--- a/test/unit/organisation_type_test.rb
+++ b/test/unit/organisation_type_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class OrganisationTypeTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class OrganisationTypeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb
index e7400b9..ff943a7 100644
--- a/test/unit/page_test.rb
+++ b/test/unit/page_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class PageTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class PageTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/phase_test.rb b/test/unit/phase_test.rb
index 327fab8..65ecf3d 100644
--- a/test/unit/phase_test.rb
+++ b/test/unit/phase_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class PhaseTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class PhaseTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/plan_section_test.rb b/test/unit/plan_section_test.rb
index c8096b5..68788db 100644
--- a/test/unit/plan_section_test.rb
+++ b/test/unit/plan_section_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class PlanSectionTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class PlanSectionTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/plan_test.rb b/test/unit/plan_test.rb
index 32fdab0..2cbd092 100644
--- a/test/unit/plan_test.rb
+++ b/test/unit/plan_test.rb
@@ -1,87 +1,87 @@
-require 'test_helper'
-
-class PlanTest < ActiveSupport::TestCase
-=begin
- def setup
- @plan = Plan.new.tap do |p|
- p.project = Project.new
- end
- end
-
- def settings(extras = {})
- {
- margin: (@margin || { top: 10, bottom: 10, left: 10, right: 10 }),
- font_face: (@font_face || Settings::Dmptemplate::VALID_FONT_FACES.first),
- font_size: (@font_size || 11)
- }.merge(extras)
- end
-
- # settings
-
- test "no explicit settings should be Settings::Dmptemplate::DEFAULT_SETTINGS" do
- assert(!@plan.settings(:export).value?)
- assert_equal(Settings::Dmptemplate::DEFAULT_SETTINGS[:formatting], @plan.settings(:export).formatting)
- end
-
- test "no explicit settings with template settings should use template settings" do
- template = dmptemplates(:ahrc_template)
- template.settings(:export).update_attributes(formatting: settings)
-
- @plan.project.dmptemplate = template
-
- assert(!@plan.super_settings(:export).value?)
- assert(template.settings(:export).value?)
-
- assert_equal(settings, template.settings(:export).formatting)
- assert_equal(settings, @plan.settings(:export).formatting)
- end
-
- test "explicit settings with template settings should use plan settings" do
- template_settings = settings
- plan_settings = settings(font_size: 14)
-
- template = dmptemplates(:ahrc_template)
- template.settings(:export).update_attributes(formatting: template_settings)
-
- @plan.project.dmptemplate = template
- @plan.super_settings(:export).formatting = plan_settings
- @plan.save!
- @plan.reload
-
- assert(@plan.super_settings(:export).value?)
- assert(@plan.settings(:export).value?)
- assert(template.settings(:export).value?)
-
- assert_not_equal(plan_settings, template_settings)
- assert_equal(template_settings, template.settings(:export).formatting)
- assert_equal(plan_settings, @plan.settings(:export).formatting)
- end
-
- test "explicit settings should not affect other plans with same template" do
- template_settings = settings
- plan_settings = settings(font_size: 14)
-
- template = dmptemplates(:ahrc_template)
- template.settings(:export).update_attributes(formatting: template_settings)
-
- @plan.project.dmptemplate = template
- @plan.super_settings(:export).formatting = plan_settings
- @plan.save!
- @plan.reload
-
- other_plan = Plan.new.tap do |plan|
- plan.project = Project.new.tap {|p| p.dmptemplate = template }
- end
-
- other_plan.save!
- other_plan.reload
-
- assert(@plan.super_settings(:export).value?)
- assert(@plan.settings(:export).value?)
- assert(template.settings(:export).value?)
-
- assert_not_equal(plan_settings, other_plan.settings(:export).formatting)
- assert_equal(template_settings, other_plan.settings(:export).formatting)
- end
-=end
-end
+require 'test_helper'
+
+class PlanTest < ActiveSupport::TestCase
+=begin
+ def setup
+ @plan = Plan.new.tap do |p|
+ p.project = Project.new
+ end
+ end
+
+ def settings(extras = {})
+ {
+ margin: (@margin || { top: 10, bottom: 10, left: 10, right: 10 }),
+ font_face: (@font_face || Settings::Dmptemplate::VALID_FONT_FACES.first),
+ font_size: (@font_size || 11)
+ }.merge(extras)
+ end
+
+ # settings
+
+ test "no explicit settings should be Settings::Dmptemplate::DEFAULT_SETTINGS" do
+ assert(!@plan.settings(:export).value?)
+ assert_equal(Settings::Dmptemplate::DEFAULT_SETTINGS[:formatting], @plan.settings(:export).formatting)
+ end
+
+ test "no explicit settings with template settings should use template settings" do
+ template = dmptemplates(:ahrc_template)
+ template.settings(:export).update_attributes(formatting: settings)
+
+ @plan.project.dmptemplate = template
+
+ assert(!@plan.super_settings(:export).value?)
+ assert(template.settings(:export).value?)
+
+ assert_equal(settings, template.settings(:export).formatting)
+ assert_equal(settings, @plan.settings(:export).formatting)
+ end
+
+ test "explicit settings with template settings should use plan settings" do
+ template_settings = settings
+ plan_settings = settings(font_size: 14)
+
+ template = dmptemplates(:ahrc_template)
+ template.settings(:export).update_attributes(formatting: template_settings)
+
+ @plan.project.dmptemplate = template
+ @plan.super_settings(:export).formatting = plan_settings
+ @plan.save!
+ @plan.reload
+
+ assert(@plan.super_settings(:export).value?)
+ assert(@plan.settings(:export).value?)
+ assert(template.settings(:export).value?)
+
+ assert_not_equal(plan_settings, template_settings)
+ assert_equal(template_settings, template.settings(:export).formatting)
+ assert_equal(plan_settings, @plan.settings(:export).formatting)
+ end
+
+ test "explicit settings should not affect other plans with same template" do
+ template_settings = settings
+ plan_settings = settings(font_size: 14)
+
+ template = dmptemplates(:ahrc_template)
+ template.settings(:export).update_attributes(formatting: template_settings)
+
+ @plan.project.dmptemplate = template
+ @plan.super_settings(:export).formatting = plan_settings
+ @plan.save!
+ @plan.reload
+
+ other_plan = Plan.new.tap do |plan|
+ plan.project = Project.new.tap {|p| p.dmptemplate = template }
+ end
+
+ other_plan.save!
+ other_plan.reload
+
+ assert(@plan.super_settings(:export).value?)
+ assert(@plan.settings(:export).value?)
+ assert(template.settings(:export).value?)
+
+ assert_not_equal(plan_settings, other_plan.settings(:export).formatting)
+ assert_equal(template_settings, other_plan.settings(:export).formatting)
+ end
+=end
+end
diff --git a/test/unit/project_group_test.rb b/test/unit/project_group_test.rb
index 6f98351..891b697 100644
--- a/test/unit/project_group_test.rb
+++ b/test/unit/project_group_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class ProjectGroupTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class ProjectGroupTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/project_partner_test.rb b/test/unit/project_partner_test.rb
index f4cbfa3..7324b6c 100644
--- a/test/unit/project_partner_test.rb
+++ b/test/unit/project_partner_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class ProjectPartnerTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class ProjectPartnerTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 0821e1f..74dcab5 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class ProjectTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class ProjectTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/question_test.rb b/test/unit/question_test.rb
index 88f6ea7..f54eeaa 100644
--- a/test/unit/question_test.rb
+++ b/test/unit/question_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class QuestionTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class QuestionTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/section_test.rb b/test/unit/section_test.rb
index b8b5039..f21fdcf 100644
--- a/test/unit/section_test.rb
+++ b/test/unit/section_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class SectionTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class SectionTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/theme_test.rb b/test/unit/theme_test.rb
index 8bb174d..c61fe99 100644
--- a/test/unit/theme_test.rb
+++ b/test/unit/theme_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class ThemeTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class ThemeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/user_org_role_test.rb b/test/unit/user_org_role_test.rb
index 1e56359..b95c2ef 100644
--- a/test/unit/user_org_role_test.rb
+++ b/test/unit/user_org_role_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class UserOrgRoleTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class UserOrgRoleTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/user_role_type_test.rb b/test/unit/user_role_type_test.rb
index c730fba..eca639c 100644
--- a/test/unit/user_role_type_test.rb
+++ b/test/unit/user_role_type_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class UserRoleTypeTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class UserRoleTypeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/user_status_test.rb b/test/unit/user_status_test.rb
index 34b6956..cbe71f4 100644
--- a/test/unit/user_status_test.rb
+++ b/test/unit/user_status_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class UserStatusTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class UserStatusTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 44a729e..0c35c7c 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -1,43 +1,43 @@
-require 'test_helper'
-
-class UserTest < ActiveSupport::TestCase
-
- def setup
- @user = users(:with_many_projects)
- end
-
- test "User#projects behaves the same as Project.projects_for_user" do
- # FIXME: Is the ordering important? If so, don't mask the different orders here!
- user_projects = @user.projects.pluck(:id).sort
- projects_for_user = Project.projects_for_user(@user.id).collect {|p| p.id}.sort
-
- assert_not_empty(user_projects)
- assert_equal(user_projects, projects_for_user)
- end
-
- test "empty filter term returns all projects" do
- projects = @user.projects
- filtered = @user.projects.filter('')
-
- assert_not_empty(projects)
- assert_equal(projects, filtered)
- end
-
- test "nil filter term returns all projects" do
- projects = @user.projects
- filtered = @user.projects.filter(nil)
-
- assert_not_empty(projects)
- assert_equal(projects, filtered)
- end
-
- test "valid filter term only returns matching records" do
- projects = @user.projects
- filtered = @user.projects.filter('DCC')
-
- assert_equal(filtered.count, 1)
- assert_not_equal(filtered, projects)
- assert_equal(projects(:test_plan_3), filtered.first)
- end
-
-end
+require 'test_helper'
+
+class UserTest < ActiveSupport::TestCase
+
+ def setup
+ @user = users(:with_many_projects)
+ end
+
+ test "User#projects behaves the same as Project.projects_for_user" do
+ # FIXME: Is the ordering important? If so, don't mask the different orders here!
+ user_projects = @user.projects.pluck(:id).sort
+ projects_for_user = Project.projects_for_user(@user.id).collect {|p| p.id}.sort
+
+ assert_not_empty(user_projects)
+ assert_equal(user_projects, projects_for_user)
+ end
+
+ test "empty filter term returns all projects" do
+ projects = @user.projects
+ filtered = @user.projects.filter('')
+
+ assert_not_empty(projects)
+ assert_equal(projects, filtered)
+ end
+
+ test "nil filter term returns all projects" do
+ projects = @user.projects
+ filtered = @user.projects.filter(nil)
+
+ assert_not_empty(projects)
+ assert_equal(projects, filtered)
+ end
+
+ test "valid filter term only returns matching records" do
+ projects = @user.projects
+ filtered = @user.projects.filter('DCC')
+
+ assert_equal(filtered.count, 1)
+ assert_not_equal(filtered, projects)
+ assert_equal(projects(:test_plan_3), filtered.first)
+ end
+
+end
diff --git a/test/unit/user_type_test.rb b/test/unit/user_type_test.rb
index f09e0ac..40e4e4a 100644
--- a/test/unit/user_type_test.rb
+++ b/test/unit/user_type_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class UserTypeTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class UserTypeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/version_test.rb b/test/unit/version_test.rb
index d6d1a85..a1a033c 100644
--- a/test/unit/version_test.rb
+++ b/test/unit/version_test.rb
@@ -1,7 +1,7 @@
-require 'test_helper'
-
-class VersionTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
-end
+require 'test_helper'
+
+class VersionTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end