diff --git a/.gitignore b/.gitignore index 38887bb..ee170d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,22 @@ + +# Ignore rbenv files +.ruby-version + # Ignore bundler config /.bundle -# Ignore all logfiles, tempfiles, public assets, +# Ignore all logfiles, tempfiles, public assets, /log/*.log /tmp +public/system/* public/assets/* +public/apidocs/* # Ignore gemfile.lock -Gemfile.lock +#Gemfile.lock # Ignore db schema.rb -#db/schema.rb +# db/schema.rb # Ignore database configuration and token secrets config/database.yml @@ -18,13 +24,22 @@ # Ignore some of the initializers config/initializers/recaptcha.rb -config/initializers/devise.rb -config/initializers/contact_us.rb +#config/initializers/devise.rb +#config/initializers/contact_us.rb # Ignore enviroments settings -config/environments/development.rb -config/environments/production.rb -config/environments/test.rb +#config/environments/development.rb +#config/environments/production.rb +#config/environments/test.rb +#config/initializers/contact_us.rb +# ignore IDE files +.idea/* +# ignore yard doc files +.yardoc/* + +# ignore yard generated documents +/doc/* +!/doc/README_FOR_APP diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d126eee --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: ruby +rvm: + - 2.2.2 + +services: + - mysql + +before_script: + - cp config/database_example.yml config/database.yml + - cp config/secrets_example.yml config/secrets.yml + - mysql -e 'create database IF NOT EXISTS roadmap_test;' -u root + +script: + - bundle exec rake db:test:prepare + - bundle exec rake diff --git a/Gemfile b/Gemfile index c8a57bf..02c57ef 100644 --- a/Gemfile +++ b/Gemfile @@ -1,54 +1,45 @@ source 'https://rubygems.org' -# -# RAILS -# -gem 'rails', '4.0.0' -# additional gems for rails 4 -gem 'turbolinks' -gem 'railties', '= 4.0.0' -# add these gems to help with the transition: -gem 'protected_attributes' -gem 'rails-observers' -gem 'actionpack-page_caching' -gem 'actionpack-action_caching' +ruby '>= 2.2.2' -gem 'uglifier', '>= 1.3.0' +# --------------------------------------------------------------------------------------------- +# RAILS +gem 'rails', '4.2.7' +gem 'railties' -# Gems used only for assets and not required in production environments by default. -#group :assets do - # gem 'coffee-rails' -#end -# Use SCSS for stylesheets -gem 'sass-rails' -#gem 'sass' +# GEMS ADDED TO HELP HANDLE RAILS MIGRATION FROM 3.x to 4.2 +# THESE GEMS HELP SUPPORT DEPRACATED FUNCTIONALITY AND WILL LOSE SUPPORT IN FUTURE VERSIONS +# WE SHOULD CONSIDER BRINGING THE CODE UP TO DATE INSTEAD +gem 'protected_attributes' # Provides attr_accessor functions +gem 'responders', '~> 2.0' # Allows use of respond_with and respond_to in controllers +# --------------------------------------------------------------------------------------------- +# DATABASE/SERVER +gem 'mysql2', '~> 0.3.18' -# Use SCSS for stylesheets -gem 'less-rails' -gem 'twitter-bootstrap-rails', '2.2.8' -gem 'therubyracer', '0.11.4', platforms: :ruby - +# --------------------------------------------------------------------------------------------- +# JS <-> RUBY BRIDGE gem 'libv8' +gem 'therubyracer', '>=0.11.4', platforms: :ruby -# To use debugger -gem 'ledermann-rails-settings' +# --------------------------------------------------------------------------------------------- +# JSON DSL - USED BY API gem 'jbuilder' -#to notify admin of errors -gem 'exception_notification' -#to allow cloning of objects +# --------------------------------------------------------------------------------------------- +# CLONE ACTIVERECORD MODELS AND ASSOCIATIONS gem 'amoeba' -group :development do - gem 'web-console', '~>2.0' - gem "better_errors" - gem "binding_of_caller" -end +# --------------------------------------------------------------------------------------------- +# SLUGS/PERMALINKS +gem 'friendly_id' -# -# USERS -# +# --------------------------------------------------------------------------------------------- +# SUPER ADMIN SECTION +gem 'activeadmin', github: 'activeadmin' + +# --------------------------------------------------------------------------------------------- +# USERS # devise for user authentication gem 'devise' gem 'devise_invitable' @@ -57,39 +48,75 @@ #rolify for roles gem 'rolify' # Gems for repository integration -gem 'email_validator' -gem 'validate_url' - -# -# DATABASE/SERVER -# -gem 'mysql2', '~> 0.3.10' -# Use unicorn as the app server -# gem 'unicorn' -#cancan for usergroups gem 'cancancan' -# -# VIEWS -# -gem 'jquery-rails' -gem 'tinymce-rails' -gem 'friendly_id', '~> 5.0.1' -gem 'contact_us' -gem 'recaptcha' -gem 'turbolinks' -#implementation of forms -gem 'activeadmin', github: 'activeadmin' +# --------------------------------------------------------------------------------------------- +# SETTINGS FOR TEMPLATES AND PLANS (FONTS, COLUMN LAYOUTS, ETC) +gem 'ledermann-rails-settings' -# -# EXPORTING PLANS -# +# --------------------------------------------------------------------------------------------- +# VIEWS +gem 'sass-rails' +gem 'less-rails' # WE SHOULD PROBABLY USE SASS OR LESS NOT BOTH +gem 'jquery-rails' +gem 'twitter-bootstrap-rails', '2.2.8' +gem 'tinymce-rails' # WYSIWYG EDITOR +gem 'contact_us', '>= 1.2.0' # COULD BE EASILY REPLACED WITH OUR OWN CODE +gem 'recaptcha' +gem 'dragonfly' # LOGO UPLOAD + +# --------------------------------------------------------------------------------------------- +# EXPORTING gem 'thin' gem 'wicked_pdf' gem 'htmltoword' gem 'feedjira' -# WORD DOC EXPORTING -gem 'caracal' +gem 'caracal' # WORD DOC EXPORTING gem 'caracal-rails' +# --------------------------------------------------------------------------------------------- +# INTERNATIONALIZATION +gem "i18n-js", ">= 3.0.0.rc11" #damodar added TODO: explain +# --------------------------------------------------------------------------------------------- +# API +gem 'swagger-docs' + +# --------------------------------------------------------------------------------------------- +# CODE DOCUMENTATION +gem 'yard' +gem 'redcarpet' + + +# --------------------------------------------------------------------------------------------- +# ENVIRONMENT SPECIFIC DEPENDENCIES + +group :development, :test do + gem "byebug" +end + +group :test do + gem 'minitest-rails-capybara' + gem 'minitest-reporters' + gem 'rack-test' +end + +group :development do + gem "better_errors" + gem "binding_of_caller" + gem 'web-console', '~>2.0' +end + +group :production do + gem 'uglifier' # JS minifier +end + +# --------------------------------------------------------------------------------------------- +# GEMS THAT ARE NO LONGER IN USE +# gem 'rails-observers' # UNUSED OBSERVERS FOR ACTIVERECORD ... PHASED OUT IN RAILS 5.0 +# gem 'actionpack-page_caching' # UNUSED BUT LOOKS PROMISING FOR STATIC PAGES +# gem 'actionpack-action_caching' # UNUSED BUT LOOKS PROMISING FOR FAIRLY STATIC PAGES BEHIND AUTH +# gem 'exception_notification' # UNUSED BUT COULD BE USEFUL FOR ERROR MSG BEING SENT TO ADMINS FROM PROD SYS +# gem 'email_validator' # UNUSED ACTIVERECORD VALIDATOR +# gem 'validate_url' # UNUSED ACTIVERECORD VALIDATOR +# gem 'turbolinks' # IS NOW A CORE PART OF RAILS >= 4.0 \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..39a0c98 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,369 @@ +GIT + remote: git://github.com/activeadmin/activeadmin.git + revision: cc178ad0ebe1b74729eeaa59d5c7ad9b82ed7837 + specs: + activeadmin (1.0.0.pre4) + arbre (~> 1.0, >= 1.0.2) + bourbon + coffee-rails + formtastic (~> 3.1) + formtastic_i18n + inherited_resources (~> 1.6) + jquery-rails + jquery-ui-rails + kaminari (~> 0.15) + railties (>= 3.2, < 5.1) + ransack (~> 1.3) + sass-rails + sprockets (< 4.1) + +GEM + remote: https://rubygems.org/ + specs: + 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.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.2) + 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.2) + activejob (4.2.7) + activesupport (= 4.2.7) + globalid (>= 0.3.0) + activemodel (4.2.7) + activesupport (= 4.2.7) + builder (~> 3.1) + activerecord (4.2.7) + activemodel (= 4.2.7) + activesupport (= 4.2.7) + arel (~> 6.0) + activesupport (4.2.7) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.4.0) + amoeba (3.0.0) + activerecord (>= 3.2.6) + ansi (1.5.0) + arbre (1.1.1) + activesupport (>= 3.0.0) + arel (6.0.3) + bcrypt (3.1.11) + better_errors (2.1.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bourbon (4.2.7) + sass (~> 3.4) + thor (~> 0.19) + builder (3.2.2) + byebug (9.0.5) + cancancan (1.15.0) + capybara (2.8.0) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + caracal (1.0.6) + nokogiri (~> 1.6) + rubyzip (~> 1.1) + tilt (>= 1.4) + caracal-rails (1.0.1) + caracal (~> 1.0) + rails (>= 3.2) + coderay (1.1.1) + coffee-rails (4.2.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + commonjs (0.2.7) + concurrent-ruby (1.0.2) + contact_us (1.2.0) + rails (>= 4.2.0) + daemons (1.2.4) + debug_inspector (0.0.2) + devise (4.2.0) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise_invitable (1.7.0) + actionmailer (>= 4.0.0) + devise (>= 4.0.0) + dragonfly (1.0.12) + addressable (~> 2.3) + multi_json (~> 1.0) + rack (>= 1.3.0) + erubis (2.7.0) + eventmachine (1.2.0.1) + execjs (2.7.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + feedjira (2.0.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + loofah (~> 2.0) + sax-machine (~> 1.0) + formtastic (3.1.4) + actionpack (>= 3.2.13) + formtastic_i18n (0.6.0) + friendly_id (5.1.0) + activerecord (>= 4.0.0) + globalid (0.3.7) + activesupport (>= 4.1.0) + has_scope (0.6.0) + actionpack (>= 3.2, < 5) + activesupport (>= 3.2, < 5) + hashie (3.4.4) + htmltoword (0.5.1) + actionpack + nokogiri + rubyzip (>= 1.0) + i18n (0.7.0) + i18n-js (3.0.0.rc13) + i18n (~> 0.6, >= 0.6.6) + inherited_resources (1.6.0) + actionpack (>= 3.2, < 5) + has_scope (~> 0.6.0.rc) + railties (>= 3.2, < 5) + responders + jbuilder (2.6.0) + activesupport (>= 3.0.0, < 5.1) + multi_json (~> 1.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + ledermann-rails-settings (2.4.2) + activerecord (>= 3.1) + less (2.6.0) + commonjs (~> 0.2.7) + less-rails (2.7.1) + actionpack (>= 4.0) + less (~> 2.6.0) + sprockets (> 2, < 4) + tilt + libv8 (3.16.14.15) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (5.9.0) + minitest-capybara (0.8.2) + capybara (~> 2.2) + minitest (~> 5.0) + rake + minitest-metadata (0.6.0) + minitest (>= 4.7, < 6.0) + minitest-rails (2.2.1) + minitest (~> 5.7) + railties (~> 4.1) + minitest-rails-capybara (2.1.2) + capybara (~> 2.7) + minitest-capybara (~> 0.8) + minitest-metadata (~> 0.6) + minitest-rails (~> 2.1) + minitest-reporters (1.1.11) + ansi + builder + minitest (>= 5.0) + ruby-progressbar + multi_json (1.12.1) + multipart-post (2.0.0) + mysql2 (0.3.21) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + orm_adapter (0.5.0) + pkg-config (1.1.7) + polyamorous (1.3.1) + activerecord (>= 3.0) + protected_attributes (1.1.3) + activemodel (>= 4.0.1, < 5.0) + rack (1.6.4) + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.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.7) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + 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) + ransack (1.8.2) + actionpack (>= 3.0) + activerecord (>= 3.0) + activesupport (>= 3.0) + i18n + polyamorous (~> 1.3) + recaptcha (3.3.0) + json + redcarpet (3.3.4) + ref (2.0.0) + responders (2.3.0) + railties (>= 4.2.0, < 5.1) + rolify (5.1.0) + ruby-progressbar (1.8.1) + rubyzip (1.2.0) + sass (3.4.22) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sax-machine (1.3.2) + sprockets (3.7.0) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + swagger-docs (0.2.9) + activesupport (>= 3) + rails (>= 3) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) + ref + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + tinymce-rails (4.4.1) + railties (>= 3.1.1) + twitter-bootstrap-rails (2.2.8) + actionpack (>= 3.1) + execjs + rails (>= 3.1) + railties (>= 3.1) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (3.0.1) + execjs (>= 0.3.0, < 3) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + wicked_pdf (1.0.6) + xpath (2.0.0) + nokogiri (~> 1.3) + yard (0.9.5) + +PLATFORMS + ruby + +DEPENDENCIES + activeadmin! + amoeba + better_errors + binding_of_caller + byebug + cancancan + caracal + caracal-rails + contact_us (>= 1.2.0) + devise + devise_invitable + dragonfly + feedjira + friendly_id + htmltoword + i18n-js (>= 3.0.0.rc11) + jbuilder + jquery-rails + ledermann-rails-settings + less-rails + libv8 + minitest-rails-capybara + minitest-reporters + mysql2 (~> 0.3.18) + omniauth + omniauth-shibboleth + protected_attributes + rack-test + rails (= 4.2.7) + railties + recaptcha + redcarpet + responders (~> 2.0) + rolify + sass-rails + swagger-docs + therubyracer (>= 0.11.4) + thin + tinymce-rails + twitter-bootstrap-rails (= 2.2.8) + uglifier + web-console (~> 2.0) + wicked_pdf + yard + +RUBY VERSION + ruby 2.2.2p95 + +BUNDLED WITH + 1.12.5 diff --git a/LICENSE.md b/LICENSE.md index 2898f15..abce7d2 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,18 +1,18 @@ -The MIT License (MIT) - -Copyright (c) 2016 University of Edinburgh & 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 eae0ba3..13ddc72 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,103 @@ -## DMP Roadmap - -#### Current Release -v.0.1.0 - -#### Summary - -#### Installation -Clone the repository and build from the latest tag - -#### Troubleshooting - -#### Become a contributor -Fork the repository. - -#### 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 +[![Build Status](https://travis-ci.org/DMPRoadmap/roadmap.svg)](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 3ca4a88..8f67343 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,43 +1,36 @@ -= DMPonline v4 - -DMPonline is the DCC's data management planning tool, available at https://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 https://dmponline.dcc.ac.uk is not included. - -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, dmponline@dcc.ac.uk, but we can only provide limited support for your installation - -== Bugs & Feature Requests - -* Bug Reports & Feature Requests: https://github.com/DigitalCurationCentre/DMPonline_v4/issues - -== 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, 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 - -Copyright (c) 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 http://www.gnu.org/licenses. += 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/Rakefile b/Rakefile old mode 100644 new mode 100755 index 04c8372..df102db --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,12 @@ #!/usr/bin/env rake # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - +require 'rake/testtask' require File.expand_path('../config/application', __FILE__) -DMPonline4::Application.load_tasks +DMPRoadmap::Application.load_tasks + +# TODO: destroy rdoc rake task once finished with new documentation RDoc::Task.new :rdoc do |rdoc| rdoc.main = "README.rdoc" @@ -12,6 +14,8 @@ rdoc.rdoc_files.include("README.rdoc", "doc/*.rdoc", "app/**/*.rb", "lib/*.rb", "config/**/*.rb") #change above to fit needs - rdoc.title = "DMPonline4 Documentation" + rdoc.title = "DMPRoadmap Documentation" rdoc.options << "--all" -end \ No newline at end of file +end + +task default: :test diff --git a/app/admin/dashboard.rb b/app/admin/dashboard.rb index 30e55c2..3aa2b89 100644 --- a/app/admin/dashboard.rb +++ b/app/admin/dashboard.rb @@ -1,7 +1,7 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register_page "Dashboard" do diff --git a/app/admin/dmptemplate.rb b/app/admin/dmptemplate.rb index e3f39b0..e0cd394 100644 --- a/app/admin/dmptemplate.rb +++ b/app/admin/dmptemplate.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Dmptemplate do permit_params :title, :description, :organisation_id, :published, :is_default @@ -30,7 +30,7 @@ end if settings.save - redirect_to(action: :show, flash: { notice: 'Settings updated successfully' }) + redirect_to(action: :show, flash: { notice: I18n.t('admin.settings_updated') }) else settings.formatting = nil @template = resource @@ -39,7 +39,7 @@ end end - action_item only: %i( show edit ) do + action_item(:edit) do link_to(I18n.t('helpers.settings.title'), settings_admin_dmptemplate_path(resource.id)) end diff --git a/app/admin/guidance.rb b/app/admin/guidance.rb index fbcc315..f4400e9 100644 --- a/app/admin/guidance.rb +++ b/app/admin/guidance.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Guidance do permit_params :text, :guidance_group_id, :question_id @@ -61,12 +61,12 @@ end f.inputs "Themes" do - f.input :theme_ids, :label => "Selected themes", + f.input :theme_ids, :label => I18n.t('admin.selected_themes'), :as => :select, - :include_blank => "All themes", + :include_blank => I18n.t('admin.all_themes'), :multiple => true, :collection => Theme.order('title').map{|the| [the.title, the.id]}, - :hint => 'Choose all themes that apply.' + :hint => I18n.t('admin.choose_themes') end f.actions diff --git a/app/admin/guidance_group.rb b/app/admin/guidance_group.rb index 839be8a..76667f7 100644 --- a/app/admin/guidance_group.rb +++ b/app/admin/guidance_group.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register GuidanceGroup do permit_params :organisation_id, :name, :published, :optional_subset @@ -62,12 +62,12 @@ end f.inputs "Templates" do - f.input :dmptemplate_ids, :label => "Selected templates", + f.input :dmptemplate_ids, :label => I18n.t('admin.selected_templates'), :as => :select, - :include_blank => "All Templates", + :include_blank => I18n.t('admin.all_templates'), :multiple => true, :collection => Dmptemplate.order('title').map{|the| [the.title, the.id]}, - :hint => 'Choose all templates that apply.' + :hint => I18n.t('admin.choose_templates') end f.actions end 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/option.rb b/app/admin/option.rb index c7553e8..ce44cfc 100644 --- a/app/admin/option.rb +++ b/app/admin/option.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Option do permit_params :question_id, :text, :number, :is_default diff --git a/app/admin/org_token_permission.rb b/app/admin/org_token_permission.rb new file mode 100644 index 0000000..4075d5cf --- /dev/null +++ b/app/admin/org_token_permission.rb @@ -0,0 +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 diff --git a/app/admin/organisation.rb b/app/admin/organisation.rb index 8b4afbc..07f1bb8 100644 --- a/app/admin/organisation.rb +++ b/app/admin/organisation.rb @@ -1,15 +1,15 @@ -# [+Project:+] DMPonline -# [+Description:+] -# +# [+Project:+] DMPRoadmap +# [+Description:+] +# # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Organisation do permit_params :abbreviation, :banner_file_id, :description, :domain, :logo_file_id, :name, :stylesheet_file_id, :target_url, :organisation_type_id, :wayfless_entity, :parent_id - + menu :priority => 14, :label => proc{I18n.t('admin.org')}, :parent => "Organisations management" - index do + index do column I18n.t('admin.org_title'), :sortable => :name do |ggn| link_to ggn.name, [:admin, ggn] end @@ -23,15 +23,16 @@ column I18n.t('admin.org_type'), :sortable => :organisation_type_id do |org_type| if !org_type.organisation_type_id.nil? then link_to org_type.organisation_type.name, [:admin, org_type] - end + end end - + actions end - - + + #show details of an organisation - show do + show do + resource.check_api_credentials attributes_table do row I18n.t('admin.org_title'), :sortable => :name do |gn| if !gn.name.nil? then @@ -45,12 +46,12 @@ '-' end end - row :sort_name + row :sort_name row I18n.t('admin.org_type'), :organisation_type_id do |org_type| if !org_type.organisation_type_id.nil? then link_to org_type.organisation_type.name, [:admin, org_type] - end - end + end + end row :description do |descr| if !descr.description.nil? then descr.description.html_safe @@ -65,18 +66,21 @@ row :logo_file_name row :domain row :wayfless_entity + row I18n.t('admin.token_permission_type') do + (organisation.token_permission_types.map{|tpt| link_to tpt.token_type, [:admin, tpt]}).join(', ').html_safe + end # row I18n.t('admin.org_parent'), :parent_id do |org_parent| # if !org_parent.parent_id.nil? then # parent_org = Organisation.find(org_parent.parent_id) # link_to parent_org.name, [:admin, parent_org] - # end + # end # end # row :stylesheet_file_id row :created_at row :updated_at end - end - + end + #templates sidebar sidebar I18n.t('admin.templates'), :only => :show, :if => proc { organisation.dmptemplates.count >= 1} do table_for organisation.dmptemplates.order("title asc") do |temp| @@ -87,7 +91,7 @@ end end - #form + #form form do |f| f.inputs "Details" do f.input :name @@ -100,18 +104,22 @@ f.input :logo_file_name f.input :domain f.input :wayfless_entity + f.input :token_permission_types, label: I18n.t('admin.token_permission_type'), + as: :select, multiple: true, include_blank: I18n.t('helpers.none'), + collection: TokenPermissionType.order(:token_type).map{|token| [token.token_type, token.id]}, + hint: I18n.t('admin.choose_api_permissions') # f.input :parent_id, :label => I18n.t('admin.org_parent'), :as => :select, :collection => Organisation.find(:all, :order => 'name ASC').map{|orgp|[orgp.name, orgp.id]} # f.input :stylesheet_file_id end - f.actions - end + f.actions + end controller do def permitted_params params.permit! end - end - - + end + + end diff --git a/app/admin/organisation_type.rb b/app/admin/organisation_type.rb index 2c9c4de..4575f54 100644 --- a/app/admin/organisation_type.rb +++ b/app/admin/organisation_type.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register OrganisationType do permit_params :organisation_id, :name diff --git a/app/admin/phase.rb b/app/admin/phase.rb index 0da6ca1..d7d061e 100644 --- a/app/admin/phase.rb +++ b/app/admin/phase.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Phase do permit_params :description, :number, :title, :dmptemplate_id diff --git a/app/admin/project.rb b/app/admin/project.rb index b410c71..2028428 100644 --- a/app/admin/project.rb +++ b/app/admin/project.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Project do permit_params :dmptemplate_id, :title, :organisation_id, :unit_id, :guidance_group_ids, :project_group_ids, :funder_id, :institution_id, :grant_number,:identifier, :description, :principal_investigator, :principal_investigator_identifier, :data_contact diff --git a/app/admin/project_group.rb b/app/admin/project_group.rb index 2ec7a0c..67c681c 100644 --- a/app/admin/project_group.rb +++ b/app/admin/project_group.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register ProjectGroup do menu false diff --git a/app/admin/question.rb b/app/admin/question.rb index 6d70ccd..8d46df1 100644 --- a/app/admin/question.rb +++ b/app/admin/question.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Question do permit_params :default_value, :dependency_id, :dependency_text, :guidance, :number, :parent_id, :suggested_answer, :text, :question_type, :section_id @@ -106,17 +106,17 @@ end f.inputs "Question Format" do - f.input :question_format_id, :label => "Select question format", + f.input :question_format_id, :label => I18n.t('admin.select_question_format'), :as => :select, - :collection => QuestionFormat.order('title').map{|format| [format.title, format.id]} + :collection => QuestionFormat.order('title').map{|format| [format.title, format.id]} end f.inputs "Themes" do - f.input :theme_ids, :label => "Selected themes", + f.input :theme_ids, :label => I18n.t('admin.selected_themes'), :as => :select, :multiple => true, - :include_blank => "None", + :include_blank => I18n.t('helpers.none'), :collection => Theme.order('title').map{|the| [the.title, the.id]} , - :hint => 'Choose all themes that apply.' + :hint => I18n.t('admin.choose_themes') end f.actions diff --git a/app/admin/question_format.rb b/app/admin/question_format.rb index 14bb8eb..a5b9523 100644 --- a/app/admin/question_format.rb +++ b/app/admin/question_format.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register QuestionFormat do permit_params :description, :title diff --git a/app/admin/role.rb b/app/admin/role.rb index 824eb47..dc386de 100644 --- a/app/admin/role.rb +++ b/app/admin/role.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Role do permit_params :name, :role_in_plans diff --git a/app/admin/section.rb b/app/admin/section.rb index 9252bf8..c8ceab8 100644 --- a/app/admin/section.rb +++ b/app/admin/section.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Section do permit_params :organisation_id, :description, :number, :title, :version_id diff --git a/app/admin/suggested_answer.rb b/app/admin/suggested_answer.rb index 555044b..ab957eb 100644 --- a/app/admin/suggested_answer.rb +++ b/app/admin/suggested_answer.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register SuggestedAnswer do permit_params :question_id, :organisation_id diff --git a/app/admin/theme.rb b/app/admin/theme.rb index de9b562..913f32e 100644 --- a/app/admin/theme.rb +++ b/app/admin/theme.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Theme do permit_params :description, :title, :locale @@ -41,16 +41,16 @@ if !question.section.version.phase.dmptemplate.nil? then link_to question.section.version.phase.dmptemplate.title, [:admin, question.section.version.phase.dmptemplate] else - 'No template' + I18n.t('admin.no_template') end else - 'No phase' + I18n.t('admin.no_phase') end else - 'No version' + I18n.t('admin.no_version') end else - 'No section' + I18n.t('admin.no_section') end } end diff --git a/app/admin/token_permission_type.rb b/app/admin/token_permission_type.rb new file mode 100644 index 0000000..cd6e05c --- /dev/null +++ b/app/admin/token_permission_type.rb @@ -0,0 +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 diff --git a/app/admin/user.rb b/app/admin/user.rb index 8fd09cf..3e80251 100644 --- a/app/admin/user.rb +++ b/app/admin/user.rb @@ -1,25 +1,25 @@ -# [+Project:+] DMPonline -# [+Description:+] -# +# [+Project:+] DMPRoadmap +# [+Description:+] +# # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center -ActiveAdmin.register User do - permit_params :password_confirmation, :encrypted_password, :remember_me, :id, :email, :firstname, :orcid_id, :shibboleth_id, :user_status_id, :surname, :user_type_id, :organisation_id, :skip_invitation, :other_organisation, :accept_terms, :role_ids - +ActiveAdmin.register User do + permit_params :api_token, :password_confirmation, :encrypted_password, :remember_me, :id, :email, :firstname, :orcid_id, :shibboleth_id, :user_status_id, :surname, :user_type_id, :organisation_id, :skip_invitation, :other_organisation, :accept_terms, :role_ids + menu :priority => 15, :label => proc{ I18n.t('admin.user')}, :parent => "User management" - + filter :firstname filter :surname filter :email filter :organisations - filter :other_organisation + filter :other_organisation filter :created_at filter :updated_at - - - - index do + + + + index do column I18n.t('admin.user_name'), :sortable => :email do |user_email| link_to user_email.email, [:admin, user_email] @@ -30,21 +30,21 @@ column I18n.t('admin.surname'), :sortable => :surname do |user| link_to user.surname, [:admin, user] end - column I18n.t('admin.last_logged_in'), :last_sign_in_at + column I18n.t('admin.last_logged_in'), :last_sign_in_at column I18n.t('admin.org_title'), :sortable => 'organisations.name' do |org_title| if !org_title.organisation.nil? then if org_title.other_organisation.nil? || org_title.other_organisation == "" then link_to org_title.organisation.name, [:admin, org_title.organisation] else I18n.t('helpers.org_type.org_name') + ' - ' + org_title.other_organisation - - end + + end end end - + actions end - + show do attributes_table do row :firstname @@ -53,72 +53,75 @@ row :orcid_id row I18n.t('admin.org_title'), :organisation_id do |org_title| if !org_title.organisation_id.nil? then - link_to org_title.organisation.name, [:admin, org_title.organisation] - end + link_to org_title.organisation.name, [:admin, org_title.organisation] + end end - row :other_organisation + row :other_organisation # row I18n.t('admin.user_status'), :user_status_id do |us| # if !us.user_status.nil? then # link_to us.user_status.name, [:admin, us.user_status] - # end + # end # end # row I18n.t('admin.user_type'), :user_type_id do |ut| # if !ut.user_type.nil? then # link_to ut.user_type.name, [:admin, ut.user_type] # else # '-' - # end + # end # end - row I18n.t('admin.user_role') do + row I18n.t('admin.user_role') do (user.roles.map{|ro| link_to ro.name, [:admin, ro]}).join(', ').html_safe end # row :shibboleth_id row :last_sign_in_at - row :sign_in_count + row :sign_in_count + row :api_token end end - - + + form do |f| f.inputs "Details" do f.input :firstname f.input :surname f.input :email f.input :orcid_id + f.input :api_token # f.input :shibboleth_id - f.input :organisation_id ,:label => I18n.t('admin.org_title'), - :as => :select, + f.input :organisation_id ,:label => I18n.t('admin.org_title'), + :as => :select, :collection => Organisation.order('name').map{|orgp|[orgp.name, orgp.id]} - f.input :other_organisation - # f.input :user_status_id, :label => I18n.t('admin.user_status'), - # :as => :select, + f.input :other_organisation + # f.input :user_status_id, :label => I18n.t('admin.user_status'), + # :as => :select, # :collection => UserStatus.find(:all, :order => 'name ASC').map{|us|[us.name, us.id]} - # f.input :user_type_id, :label => I18n.t('admin.user_type'), - # :as => :select, - # :collection => UserType.find(:all, :order => 'name ASC').map{|ut|[ut.name, ut.id]} - f.input :role_ids, :label => "User role", - :as => :select, + # f.input :user_type_id, :label => I18n.t('admin.user_type'), + # :as => :select, + # :collection => UserType.find(:all, :order => 'name ASC').map{|ut|[ut.name, ut.id]} + f.input :role_ids, :label => I18n.t('admin.user_role'), + :as => :select, :multiple => true, - :include_blank => 'None', + :include_blank => I18n.t('helpers.none'), :collection => Role.order('name').map{|ro| [ro.name, ro.id]} - + + f.input :api_token end - - f.actions + + f.actions end - - - + + + controller do def scoped_collection resource_class.includes(:organisations) # prevents N+1 queries to your database end - + def permitted_params params.permit! end - + end - + end diff --git a/app/admin/user_org_role.rb b/app/admin/user_org_role.rb index 9164eda..e5d9793 100644 --- a/app/admin/user_org_role.rb +++ b/app/admin/user_org_role.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register UserOrgRole do permit_params :user_id, :organisation_id, :user_role_type_id diff --git a/app/admin/user_role_type.rb b/app/admin/user_role_type.rb index 4e02387..e40f5ee 100644 --- a/app/admin/user_role_type.rb +++ b/app/admin/user_role_type.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register UserRoleType do permit_params :description, :name diff --git a/app/admin/user_status.rb b/app/admin/user_status.rb index 5cfeb45..856577c 100644 --- a/app/admin/user_status.rb +++ b/app/admin/user_status.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register UserStatus do permit_params :description, :name diff --git a/app/admin/user_type.rb b/app/admin/user_type.rb index 9074f5e..7836401 100644 --- a/app/admin/user_type.rb +++ b/app/admin/user_type.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register UserType do permit_params :description, :name diff --git a/app/admin/version.rb b/app/admin/version.rb index 2b6a1fd..7dbed51 100644 --- a/app/admin/version.rb +++ b/app/admin/version.rb @@ -1,8 +1,8 @@ -# [+Project:+] DMPonline +# [+Project:+] DMPRoadmap # [+Description:+] # # [+Created:+] 03/09/2014 -# [+Copyright:+] Digital Curation Centre +# [+Copyright:+] Digital Curation Centre and University of California Curation Center ActiveAdmin.register Version do permit_params :description, :number, :published, :title, :phase_id diff --git a/app/assets/fonts/fontawesome-webfont.woff b/app/assets/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..6e7483c --- /dev/null +++ b/app/assets/fonts/fontawesome-webfont.woff Binary files differ diff --git a/app/assets/images/bournemouth_logo.png b/app/assets/images/bournemouth_logo.png new file mode 100644 index 0000000..3a4ecc2 --- /dev/null +++ b/app/assets/images/bournemouth_logo.png Binary files differ diff --git a/app/assets/images/logo.jpg b/app/assets/images/logo.jpg index 58be19e..b45a9a3 100644 --- a/app/assets/images/logo.jpg +++ b/app/assets/images/logo.jpg Binary files differ diff --git a/app/assets/images/salford_logo.png b/app/assets/images/salford_logo.png new file mode 100644 index 0000000..e58c553 --- /dev/null +++ b/app/assets/images/salford_logo.png Binary files differ diff --git a/app/assets/images/uc3_logo.jpg b/app/assets/images/uc3_logo.jpg new file mode 100644 index 0000000..46ac993 --- /dev/null +++ b/app/assets/images/uc3_logo.jpg Binary files differ diff --git a/app/assets/javascripts/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/admin.js b/app/assets/javascripts/admin.js index 51ff7d2..c0aac55 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -1,8 +1,8 @@ //= require tinymce /* -**Project: DMPonline v4 +**Project: DMPRoadmap **Description: This file include all javascript regarding admin interface -**Copyright: Digital Curation Centre +**Copyright: Digital Curation Centre and University of California Curation Center */ @@ -179,20 +179,24 @@ //action for show or hide template editing display - $('#edit_template_button').click(function(){ + $('#edit_template_button').click(function(e){ + e.preventDefault(); + $('#edit_template_div').show(); $('#show_template_div').hide(); }); //action for show or hide phase display - $('#edit_phase_button').click(function(){ + $('#edit_phase_button').click(function(e){ + e.preventDefault(); $('#edit_phase_div').show(); $('#show_phase_div').hide(); }); //action to hide the alert to edit a version - $("#edit-version-confirmed").click(function (){ + $("#edit-version-confirmed").click(function (e){ + e.preventDefault(); $("#version_edit_alert").modal("hide"); }); @@ -230,7 +234,7 @@ $('.new_question_save_button').click(function(e){ var s_id = $(this).prev(".section_id").val(); if ($('#new_question_text_'+ s_id).val() == ''){ - alert('Question text is empty, please enter your question.'); + alert(I18n.t("js.question_text_empty")); return false; } }); @@ -323,24 +327,24 @@ //verify if text area is not nil var editorContent = tinyMCE.get('guidance-text').getContent(); if (editorContent == ''){ - alert_message.push("add guidance text"); + alert_message.push(I18n.t("js.add_guidance_text")); } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '2') { if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ - alert_message.push("select a question"); + alert_message.push(I18n.t("js.select_question")); } } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '1' ){ if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ - alert_message.push("select at least one theme"); + alert_message.push(I18n.t("js.select_at_least_one_theme")); } } //verify if guidance group is selected if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { - alert_message.push("select a guidance group"); + alert_message.push(I18n.t("js.select_guidance_group")); } if(alert_message.length == 0){ //clear dropdowns before submission @@ -385,23 +389,23 @@ //verify if text area is not nil var editorContent = tinyMCE.get('guidance-text').getContent(); if (editorContent == ''){ - alert_message.push("add guidance text"); + alert_message.push(I18n.t("js.add_guidance_text")); } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '2') { if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ - alert_message.push("select a question"); + alert_message.push(I18n.t("js.select_question")); } } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '1' ){ if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ - alert_message.push("select at least one theme"); + alert_message.push(I18n.t("js.select_at_least_one_theme")); } } //verify if guidance group is selected if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { - alert_message.push("select a guidance group"); + alert_message.push(I18n.t("js.select_guidance_group")); } if(alert_message.length == 0){ @@ -432,12 +436,10 @@ //Validate banner_text area for less than 165 character $("form#edit_org_details").submit(function(){ - if (getStats('org_banner_text').chars > 165) { - alert("Please only enter up to 165 characters, you have used "+getStats('org_banner_text').chars+". If you are entering an URL try to use something like http://tinyurl.com/ to make it smaller."); + alert(I18n.t("js.enter_up_to") + " " + getStats('org_banner_text').chars + ". " + I18n.t("js.if_using_url_try")); return false; } - }); @@ -452,18 +454,15 @@ $(link).closest(".options_content").hide(); } - - function add_object(link, association, content) { var new_id = new Date().getTime(); - var regexp = new RegExp("new_" + association, "g") + var regexp = new RegExp("new_" + association, "g"); if (association == 'options') { $(link).parent().children('.options_table').children('.options_tbody').children('.new_option_before').before(content.replace(regexp, new_id)); } } - // Returns text statistics for the specified editor by id function getStats(id) { var body = tinymce.get(id).getBody(), text = tinymce.trim(body.innerText || body.textContent); diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 2dfb897..68c3667 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,158 +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 bootstrap -//= require v1.js -//= require select2.min.js -//= require jquery.placeholder.js -//= require turbolinks - - - -$( 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 () { - $(".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(); - - }); - - - /*$('#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.js b/app/assets/javascripts/bootstrap.js deleted file mode 100644 index 643e71c..0000000 --- a/app/assets/javascripts/bootstrap.js +++ /dev/null @@ -1,2280 +0,0 @@ -/* =================================================== - * bootstrap-transition.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - - $(function () { - - $.support.transition = (function () { - - var transitionEnd = (function () { - - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - , name - - for (name in transEndEventNames){ - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } - - }()) - - return transitionEnd && { - end: transitionEnd - } - - })() - - }) - -}(window.jQuery);/* ========================================================== - * bootstrap-alert.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* ALERT CLASS DEFINITION - * ====================== */ - - var dismiss = '[data-dismiss="alert"]' - , Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent.trigger(e = $.Event('close')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent - .trigger('closed') - .remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() - } - - - /* ALERT PLUGIN DEFINITION - * ======================= */ - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - /* ALERT NO CONFLICT - * ================= */ - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - /* ALERT DATA-API - * ============== */ - - $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) - -}(window.jQuery);/* ============================================================ - * bootstrap-button.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - Button.prototype.toggle = function () { - var $parent = this.$element.closest('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } - - - /* BUTTON PLUGIN DEFINITION - * ======================== */ - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.defaults = { - loadingText: 'loading...' - } - - $.fn.button.Constructor = Button - - - /* BUTTON NO CONFLICT - * ================== */ - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - /* BUTTON DATA-API - * =============== */ - - $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) - -}(window.jQuery);/* ========================================================== - * bootstrap-carousel.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#carousel - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CAROUSEL CLASS DEFINITION - * ========================= */ - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.prototype = { - - cycle: function (e) { - if (!e) this.paused = false - if (this.interval) clearInterval(this.interval); - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - return this - } - - , getActiveIndex: function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children() - return this.$items.index(this.$active) - } - - , to: function (pos) { - var activeIndex = this.getActiveIndex() - , that = this - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) { - return this.$element.one('slid', function () { - that.to(pos) - }) - } - - if (activeIndex == pos) { - return this.pause().cycle() - } - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - } - - , pause: function (e) { - if (!e) this.paused = true - if (this.$element.find('.next, .prev').length && $.support.transition.end) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - clearInterval(this.interval) - this.interval = null - return this - } - - , next: function () { - if (this.sliding) return - return this.slide('next') - } - - , prev: function () { - if (this.sliding) return - return this.slide('prev') - } - - , slide: function (type, next) { - var $active = this.$element.find('.item.active') - , $next = next || $active[type]() - , isCycling = this.interval - , direction = type == 'next' ? 'left' : 'right' - , fallback = type == 'next' ? 'first' : 'last' - , that = this - , e - - this.sliding = true - - isCycling && this.pause() - - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - - e = $.Event('slide', { - relatedTarget: $next[0] - , direction: direction - }) - - if ($next.hasClass('active')) return - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - this.$element.one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) - }) - } else { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } - - isCycling && this.cycle() - - return this - } - - } - - - /* CAROUSEL PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('carousel') - , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) - , action = typeof option == 'string' ? option : options.slide - if (!data) $this.data('carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.defaults = { - interval: 5000 - , pause: 'hover' - } - - $.fn.carousel.Constructor = Carousel - - - /* CAROUSEL NO CONFLICT - * ==================== */ - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - /* CAROUSEL DATA-API - * ================= */ - - $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = $.extend({}, $target.data(), $this.data()) - , slideIndex - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('carousel').pause().to(slideIndex).cycle() - } - - e.preventDefault() - }) - -}(window.jQuery);/* ============================================================= - * bootstrap-collapse.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* COLLAPSE PUBLIC CLASS DEFINITION - * ================================ */ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) - - if (this.options.parent) { - this.$parent = $(this.options.parent) - } - - this.options.toggle && this.toggle() - } - - Collapse.prototype = { - - constructor: Collapse - - , dimension: function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - , show: function () { - var dimension - , scroll - , actives - , hasData - - if (this.transitioning || this.$element.hasClass('in')) return - - dimension = this.dimension() - scroll = $.camelCase(['scroll', dimension].join('-')) - actives = this.$parent && this.$parent.find('> .accordion-group > .in') - - if (actives && actives.length) { - hasData = actives.data('collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', $.Event('show'), 'shown') - $.support.transition && this.$element[dimension](this.$element[0][scroll]) - } - - , hide: function () { - var dimension - if (this.transitioning || !this.$element.hasClass('in')) return - dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', $.Event('hide'), 'hidden') - this.$element[dimension](0) - } - - , reset: function (size) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') - - return this - } - - , transition: function (method, startEvent, completeEvent) { - var that = this - , complete = function () { - if (startEvent.type == 'show') that.reset() - that.transitioning = 0 - that.$element.trigger(completeEvent) - } - - this.$element.trigger(startEvent) - - if (startEvent.isDefaultPrevented()) return - - this.transitioning = 1 - - this.$element[method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - } - - , toggle: function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - } - - - /* COLLAPSE PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.defaults = { - toggle: true - } - - $.fn.collapse.Constructor = Collapse - - - /* COLLAPSE NO CONFLICT - * ==================== */ - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - /* COLLAPSE DATA-API - * ================= */ - - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) - -}(window.jQuery);/* ============================================================ - * bootstrap-dropdown.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle=dropdown]' - , Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor: Dropdown - - , toggle: function (e) { - var $this = $(this) - , $parent - , isActive - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement) { - // if mobile we we use a backdrop because click events don't delegate - $(' + + <%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 61c3ccd..2ea27f8 100644 --- a/app/views/guidance_groups/admin_edit.html.erb +++ b/app/views/guidance_groups/admin_edit.html.erb @@ -1,93 +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| %> - - - - - - - - - - - - <% if @guidance_group.published == true then%> - - - - - <%end%> - - - - - - -
<%= t('org_admin.guidance.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'))%> -
- -
<%= t('org_admin.guidance_group.published') %>
- <%= f.check_box :published %> -
-
- -
-
<%= 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.save_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| %> + + + + + + + + + + + + <% if @guidance_group.published == true then %> + + + + + <% end %> + + + + + + +
<%= 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')) %> +
+ +
<%= t('org_admin.templates.published_label') %> +
+ <%= f.check_box :published %> +
+
+ +
+
<%= 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 5317891..4bd3367 100644 --- a/app/views/guidance_groups/admin_new.html.erb +++ b/app/views/guidance_groups/admin_new.html.erb @@ -1,72 +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.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" %> - <%= f.submit t("helpers.submit.save_publish"), :name => "save_publish", :class => "btn btn-primary" %> - <%= 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 => {: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 729fc49..a5998ec 100644 --- a/app/views/guidance_groups/admin_show.html.erb +++ b/app/views/guidance_groups/admin_show.html.erb @@ -1,89 +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.guidance_group.published") %><%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")%> - <%else%> - <%= t("helpers.yes")%> - <%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 fd8c295..e6a47f9 100644 --- a/app/views/guidances/admin_edit.html.erb +++ b/app/views/guidances/admin_edit.html.erb @@ -1,155 +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'))%> -
-
- - - - -
<%= 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'))%> -
-
- -
- - - -
- <%= t('helpers.submit.save')%> - <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn cancel' %> -
- -
- <%= 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'))%> +
+
+ + + + +
<%= 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'))%> +
+
+ +
+ + + +
+ <%= t('helpers.submit.save')%> + <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn cancel' %> +
+ +
+ <%= 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 4aad663..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%> - - - - - - - - - - - - - <% !@guidance_groups.each do |guidance_gr| %> - - - <% guidance_group_temp = guidance_gr.dmptemplate_ids %> - <% if guidance_group_temp != [] then %> - - <%else%> - - <%end%> - - - - - - - - <%end%> - -
<%= 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_gr.name %> - - <% 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%> - - <%= t("org_admin.guidance_group.all_temp")%> - - <%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%> - -
-
- -

- <%= 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%> - - - - - - - - - - - - - <% @guidances.each do |guidance| %> - <% if guidance.in_group_belonging_to?(current_user.organisation_id) then %> - - - <% if guidance.themes != [] then %> - - <%else%> - - <%end%> - <% if !guidance.question_id.nil? then %> - - <%else%> - - <%end%> - <% if guidance.guidance_groups != [] then %> - - <%else%> - - <%end%> - - - - <%end%> - <%end%> - -
<%= 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") %>
- <%= guidance.text.html_safe%> - - <% guidance.themes.each do |th| %> - <%= th.title %> - <%end%> - - - - - <%= raw guidance.question.text.truncate(70, omission: "... (continued)") %> - - - - - <% guidance.guidance_groups.each do |p|%> - <%= p.name %> - <%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 => "...(continued)") ), :method => :delete, :class => "dmp_table_link"%> -
-<%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%> + + + + + + + + + + + + + <% !@guidance_groups.each do |guidance_gr| %> + + + <% guidance_group_temp = guidance_gr.dmptemplate_ids %> + <% if guidance_group_temp != [] then %> + + <%else%> + + <%end%> + + + + + + + + <%end%> + +
<%= 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_gr.name %> + + <% 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%> + + <%= t("org_admin.guidance_group.all_temp")%> + + <%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%> + +
+
+ +

+ <%= 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%> + + + + + + + + + + + + + <% @guidances.each do |guidance| %> + <% if guidance.in_group_belonging_to?(current_user.organisation_id) then %> + + + <% if guidance.themes != [] then %> + + <%else%> + + <%end%> + <% if !guidance.question_id.nil? then %> + + <%else%> + + <%end%> + <% if guidance.guidance_groups != [] then %> + + <%else%> + + <%end%> + + + + <%end%> + <%end%> + +
<%= 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") %>
+ <%= guidance.text.html_safe%> + + <% guidance.themes.each do |th| %> + <%= th.title %> + <%end%> + + - + + <%= raw guidance.question.text.truncate(70, omission: t('helpers.truncate_continued')) %> + + - + + <% guidance.guidance_groups.each do |p|%> + <%= p.name %> + <%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%> + diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index dd503b0..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'))%> -
-
- - - -
<%= 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'))%> -
-
- -
- - - -
- <%= t("helpers.submit.save")%> - - <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn cancel' %> -
- -
- <%= tinymce :content_css => asset_path('application.css') %> - <%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%> -
- - <%= raw current_user.organisation.banner_text %> - -
- - <%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%> +
+ + <%= raw current_user.organisation.banner_text %> + +
+ + <%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 @@ - -