diff --git a/.travis.yml b/.travis.yml index 104c6cb..d126eee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,15 @@ -language: ruby -rvm: - - 2.1.10 - -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;' -uroot - -script: - - bundle exec rake db:test:prepare - - bundle exec rake +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 9947167..355b329 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,11 @@ source 'https://rubygems.org' + +ruby '>= 2.2.2' + # # RAILS # -gem 'rails', '4.2.0' +gem 'rails', '4.2.7' # additional gems for rails 4 gem 'railties' diff --git a/Gemfile.lock b/Gemfile.lock index afb8242..b2194b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/activeadmin/activeadmin.git - revision: 3941e1550c4d5d8a6df51057d0517f1a51b609e4 + revision: cc178ad0ebe1b74729eeaa59d5c7ad9b82ed7837 specs: activeadmin (1.0.0.pre4) arbre (~> 1.0, >= 1.0.2) @@ -12,7 +12,7 @@ jquery-rails jquery-ui-rails kaminari (~> 0.15) - rails (>= 3.2, < 5.1) + railties (>= 3.2, < 5.1) ransack (~> 1.3) sass-rails sprockets (< 4.1) @@ -20,40 +20,40 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) + actionmailer (4.2.7) + actionpack (= 4.2.7) + actionview (= 4.2.7) + activejob (= 4.2.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) + actionpack (4.2.7) + actionview (= 4.2.7) + activesupport (= 4.2.7) + rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) + rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-action_caching (1.1.1) actionpack (>= 4.0.0, < 5.0) actionpack-page_caching (1.0.2) actionpack (>= 4.0.0, < 5) - actionview (4.2.0) - activesupport (= 4.2.0) + actionview (4.2.7) + activesupport (= 4.2.7) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.7) + activesupport (= 4.2.7) globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) + activemodel (4.2.7) + activesupport (= 4.2.7) builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) + activerecord (4.2.7) + activemodel (= 4.2.7) + activesupport (= 4.2.7) arel (~> 6.0) - activesupport (4.2.0) + activesupport (4.2.7) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -231,16 +231,16 @@ rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) + rails (4.2.7) + actionmailer (= 4.2.7) + actionpack (= 4.2.7) + actionview (= 4.2.7) + activejob (= 4.2.7) + activemodel (= 4.2.7) + activerecord (= 4.2.7) + activesupport (= 4.2.7) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) + railties (= 4.2.7) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -252,9 +252,9 @@ loofah (~> 2.0) rails-observers (0.1.2) activemodel (~> 4.0) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) + railties (4.2.7) + actionpack (= 4.2.7) + activesupport (= 4.2.7) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (11.2.2) @@ -288,9 +288,9 @@ actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - swagger-docs (0.2.8) - activesupport (>= 3, < 5) - rails (>= 3, < 5) + swagger-docs (0.2.9) + activesupport (>= 3) + rails (>= 3) therubyracer (0.12.2) libv8 (~> 3.16.14.0) ref @@ -366,7 +366,7 @@ omniauth-shibboleth protected_attributes rack-test - rails (= 4.2.0) + rails (= 4.2.7) rails-observers railties recaptcha @@ -386,5 +386,8 @@ wicked_pdf yard +RUBY VERSION + ruby 2.2.2p95 + BUNDLED WITH 1.12.5 diff --git a/app/admin/user_role_type.rb b/app/admin/user_role_type.rb index c5ce15d..e40f5ee 100644 --- a/app/admin/user_role_type.rb +++ b/app/admin/user_role_type.rb @@ -1,4 +1,3 @@ - # [+Project:+] DMPRoadmap # [+Description:+] # diff --git a/app/admin/user_status.rb b/app/admin/user_status.rb index 3c0977a..856577c 100644 --- a/app/admin/user_status.rb +++ b/app/admin/user_status.rb @@ -1,4 +1,3 @@ - # [+Project:+] DMPRoadmap # [+Description:+] # diff --git a/app/assets/stylesheets/admin.css.less b/app/assets/stylesheets/admin.css.less index 0bc94b4..48be624 100644 --- a/app/assets/stylesheets/admin.css.less +++ b/app/assets/stylesheets/admin.css.less @@ -1,1714 +1,1708 @@ -@import "twitter/bootstrap/bootstrap"; -@import "twitter/bootstrap/responsive"; - -// Set the correct sprite paths -@iconSpritePath: "assets/images/glyphicons-halflings"; -@iconWhiteSpritePath: "assets/images/glyphicons-halflings-white"; - -// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) -@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); -@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix"); -@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); -@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); -@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); - -// Font Awesome -@import "fontawesome/font-awesome"; - -// Glyphicons -//@import "twitter/bootstrap/sprites.less"; - -// Your custom LESS stylesheets goes here - -/******************************* - * DMPRoadmap stylesheet - * - * - * starting date: June 2013 - *******************************/ - -/**** font configuration ****/ -@font-face { - font-family: 'GillSansLight'; - src: font-url('GillSansLight.ttf') format('truetype'); - font-weight: normal; - } - -@header_font: "GillSansLight"; -@text_font: 'Helvetica Neue', Helvetica, Arial, sans-serif; -@font_size: 14px; -@font_size_medium: 13px; -@font_size_small: 11px; -@font_colour: #3e3c3c; -@orange_colour: #0057A7; -@orange_darker_colour: #004A8E; -@orange_lighter_colour: #005EB4; -@grey_colour: #656263; -@grey_lighter_colour: #827d7e; -@grey_very_light_colour: #cccccc; -@grey_darker_colour: #515151; -@background_lighter_colour: #f9f9f9; -@background_darker_colour: #d1d5d4; -@green_colour: #114b8b; -@red_colour: #ec563c; /*#e3000f*/ -@red_lighter_colour: #EE6B54; -@white_colour: #ffffff; - -/************************************************************/ -/* main structure of the t */ -/************************************************************/ -html.dmponline { - /* fallback */ - background-repeat:repeat-y; - min-height: 100%; - /* Safari 4-5, Chrome 1-9 */ - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, @background_darker_colour), color-stop(1, @background_lighter_colour)); - /* Firefox 3.6+ */ - background-image: -moz-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - /* Safari 5.1, Chrome 10+ */ - background-image: -webkit-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - /* Opera 11.10+ */ - background-image: -o-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - /* IE 10 */ - background-image: -ms-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1d5d4', endColorstr='#f9f9f9', gradientType='0')'; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#d1d5d4', endColorstr='#f9f9f9') ;/*For IE7-8-9*/ - /*For IE7*/ - *height: 1%; - min-width: 850px; -} - -body.dmponline { - font-family: @text_font; - color: @font_colour; - font-size: @font_size; - margin: 0 11% 0 11%; - line-height: 24px; - min-width: 540px; - padding:0 0 0 0; - background:none; - text-align: left; -} - -.main_header{ - height: 145px; - margin: 0 0 40px 0; - width:99%; - clear:both; - float:left; -} - -.main_page_container{ - clear: both; - float: left; - width: 99%; - margin:0 0 30px 0; -} - -footer { - clear:both; - padding: 30px 0 100px 0; - margin-top: 70px; - font-size: @font_size; -} - -/*********************************************/ -/**** header ****/ -/*********************************************/ -/* left side*/ -div.header_left{ - float: left; - clear:both; - width: 145px; - } - .home_logo{ - margin-right:0px; - } - - -/* right side*/ -div.header_right{ - margin-left: 146px; - height:145px; - position:relative; -} - -/*****************************/ -/****** Main Navigation ******/ -/*****************************/ -.navbar{ - border: none !important; - border-color: none !important; - box-shadow: 0 !important; - -webkit-box-shadow: none !important; - position: static; - filter:none !important; - overflow: visible; -} - -.main_nav_tabs{ - width: 500px; - float:left; - position:absolute; - bottom:0; -} - -#main-nav-tabs ul{ - margin-right :0px; - margin-bottom:0px; - float:left; - border-bottom: 2px solid @orange_colour; -} - -#main-nav-tabs li a{ - background-color: @grey_lighter_colour; - color: @white_colour; - font-weight: bold; - padding: 4px 15px 4px 15px; - margin-bottom: 1px; - text-decoration: none !important; -} - -#main-nav-tabs li a.main_nav_last_li{ - margin-right: 0px; -} - -#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover{ - background-color: @orange_colour; - color: @white_colour !important; - font-weight: bold; - border: 1px solid @orange_colour; - padding: 4px 15px 4px 15px; - text-decoration: none !important; -} - -/********************/ -/** top right menu **/ -/********************/ -.signIn { - float:right; - position:absolute; - top:0; - right:0; -} - -.signIn ul{ - list-style-type: none; - color: @orange_colour; - font-size: 100%; -} - -.signIn ul li a, .signIn ul li a.active, .signIn ul li a:visited { - color: @orange_colour; - text-decoration:underline; - background-color: none; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid @orange_colour; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown-menu { - position: absolute; - top: 100%; - right: 0; - left:45%; - z-index: 99; - display: none; - float: right; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - border: 1px solid @grey_very_light_colour; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -ul#signIn_dropdown{ - background: @grey_colour !important; -} - -ul#signIn_dropdown li , ul#signIn_dropdown li a.signIn_dropdown_link, - ul#signIn_dropdown li a.signIn_dropdown_link:link, - ul#signIn_dropdown li a.signIn_dropdown_link:active, - ul#signIn_dropdown li a.signIn_dropdown_link:visited{ - font-size:17px; - text-decoration:none; - font-weight:normal; - background: @grey_colour !important; - filter:none; - color: @white_colour; -} - -ul#signIn_dropdown li a.signIn_dropdown_link:hover, -ul#signIn_dropdown li a.signIn_dropdown_link:focus{ - text-decoration:underline; - background-color: @grey_colour !important; - background-image: none; - filter: none; - color: @white_colour !important; -} - -/********************/ -/*** Org Branding ***/ -/********************/ -.branding_container{ - width: 99%; -} - -.header_org_logo{ - padding:5px 0 0 5px; - float:left; - position:relative; - height:120px; - width: 25%; -} - -.header_org_logo_img{ - max-height: 110px; - max-width: 200px; - padding:0 5px 0 0; - position:absolute; - bottom: 20%; -} - -.header_org_banner_text{ - position:relative; - height:110px; - width: 99%; - } - -.header_org_banner_text_vertical_align{ - position:absolute; - text-align: center; - top:28%; -} - -/*********************************************/ -/**** footer ****/ -/*********************************************/ -footer .left_side_footer{ - float: left; - clear:both; - width: 45%; - } - footer .first_row{ - float:left; - - } - footer .second_row{ - clear:both; - float:left; - } - -footer .right_side_footer{ - float: right; - width: 45%; - - } - -footer .right_side_footer p{ - text-decoration: none; - text-align:center; - color: #999999; - float: right; - -} - -ul.footer-links { - margin-left:0px; -} - -ul.footer-links li { - display: inline; - padding: 0 2px; - line-height: 20px; -} - -ul.footer-links li:first-child { - padding-left: 0; -} - -ul.footer-links li a, ul.footer-links li a:active, ul.footer-links li a:visited { - color: @grey_colour; - text-decoration: none; -} - -ul.footer-links li a:hover, ul.footer-links li a:focus{ - color: @grey_darker_colour !important; - text-decoration:underline; -} - -#dcc_link{ - color: @grey_colour; -} - -#dcc_link a, #dcc_link a:active, #dcc_link a:visited{ - text-decoration: none; - color: @grey_colour; -} -#dcc_link a:hover, #dcc_link a:focus{ - color: @grey_darker_colour !important; - text-decoration:underline; - } - - -/*********************************************/ -/**** html tags ****/ -/*********************************************/ -h1, h2, h3, h4 { - font-family: @header_font; - color: @orange_colour; - font-weight: lighter; - font-style: normal; -} - -h1{ - font-size: 40px; - line-height:53px; -} - -h2{ - font-size: 32px; -} - -h3{ - font-size: 26px; -} - -h4{ - font-size: @font_size; -} - -p{ - font-size: @font_size; - font-family: @text_font; -} - -label.text_colour{ - font-size: @font_size; - font-family: @text_font; - color: @orange_colour; -} - -p a:hover, a.a-orange:hover, div.signIn a:hover, td a:hover, .question-guidance .accordion-inner a:hover, div a:hover{ - color: @orange_darker_colour !important; - background-color: none !important; -} - -a, a:active, a:focus { - color: @orange_colour; - text-decoration:underline; - font-family: @text_font; -} - -a.visited{ - background-color: none !important; - color: @orange_colour; -} - -a:hover, a.btn:hover, div.nav-project-tabs ul.nav-tabs li a:hover, div#sections-accordion a.accordion-toggle:hover{ - color: @white_colour !important; - background-color: none !important; -} - -ul{ - list-style-type: none; - margin-left:0px; -} - -hr.orange_break_line{ - clear: both; - margin-top: 40px; - border-top-color: @orange_lighter_colour; -} - - -/*************************/ -.formtastic{ - width:99%; -} - -.inputs ol{ - margin-left:0px; -} - -#send_btn { - width:100% !important; -} - -.tooltip_box{ - text-align:left; - z-index: 1000; -} - -.tooltip_box p{ - font-size: @font_size_small; -} -.tooltip_box ul{ - list-style-type: none; - margin-left:0px; -} - - -/**********************/ -/* Organisation admin */ -/**********************/ -.org_logo_admin_area{ - height: 120px; - float:right; -} - - -div.institution_login_link{ - padding-top: 15px; - font-size: @font_size_medium; -} - - -/** button colour **/ -ul.nav-pills li{ - margin: 0 2px 20px 0; - } - -ul.nav-pills li.last_li{ - margin: 0 0px 20px 0; -} - -ul.nav-pills li a.header_button{ - height: 18px; - padding: 4px 10px 2px 10px; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} - -ul.nav-pills li.last_li a.header_button{ - margin-right:0px; -} - -/*********************************************/ -/**** body ****/ -/*********************************************/ - -body.dmponline .btn-primary, body.dmponline .btn-primary:active, body.dmponline .btn-primary:visited, body.dmponline .btn-primary:focus { - background: @orange_colour; - background-image: none; - text-decoration:none; - color: @white_colour; - text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; - border-color: rgba(0, 0, 0, 0.247059); - border-color: @orange_colour @orange_colour @orange_lighter_colour; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - } - -body.dmponline .btn-primary:hover{ - background-image: -moz-linear-gradient(top, @orange_colour, @orange_lighter_colour 49px); - background-image: -webkit-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - background-image: -o-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - background-image: -ms-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - background-image: linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @orange_colour, endColorstr= @orange_lighter_colour, gradientType='0')'; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @orange_colour, endColorstr= @orange_lighter_colour) ;/*For IE7-8-9*/ - color: @white_colour; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} - -.btn-grey, .btn-grey:active, .btn-grey:visited, .btn-grey:focus { - background: @grey_colour; - background-image: none; - text-decoration:none; - color: @white_colour; - text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; - border-color: rgba(0, 0, 0, 0.247059); - border-color: @grey_colour @grey_colour @grey_lighter_colour; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - } - -.btn-grey:hover{ - background-image: -moz-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: -webkit-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: -o-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: -ms-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @grey_colour, endColorstr= @grey_lighter_colour , gradientType='0')'; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @grey_colour, endColorstr= @grey_lighter_colour ) ;/*For IE7-8-9*/ - color: @white_colour; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} - - - -/*********************************** - Home page -************************************/ - -.welcome-message { - float:left; - width: 45%; - margin:0 20px 0 0; -} - -.welcome-message p{ - color: @orange_colour; - background-color: none !important; - font-weight:lighter; - font-size:20px; - font-family: @header_font; - padding-bottom: 15px; - line-height: 34px; -} - -.welcome-message a, .welcome-message a:active, .welcome-message a:visited{ - color: @orange_colour; - background-color: none !important; - font-weight: bold; - text-decoration: none; - font-size:20px; - font-family: @header_font; - padding-bottom: 15px; - line-height: 34px; -} - -.welcome-message a:hover{ - background-color: none !important; - font-weight: bold; - text-decoration: none; - -} - -/** accordion **/ - -#homepage-accordion { - float:right; - width:48%; - margin:0 1% 0 1.5%; -} - -#homepage-accordion .accordion-group{ - background-color: @white_colour; - border: @white_colour; -} - -#homepage-accordion .accordion-heading{ - background-color: @white_colour; - border: @white_colour; - padding: 15px; -} - -#homepage-accordion .accordion-heading a.accordion-toggle{ - color: @orange_colour; - font-family: @header_font; - font-size: 51px; - font-weight: normal; - margin-bottom: 23px; - padding: 0; - background-color: transparent !important; - line-height: 51px; - } - - -#homepage-accordion .accordion-heading a.accordion-toggle:hover, - #homepage-accordion .accordion-heading a.accordion-toggle:focus{ - color: @orange_colour!important; - } - -#homepage-accordion .accordion-inner{ - border: @white_colour; - padding-top: 0px; -} - -.minus-laranja:before{ - content: "\2212"; - float:right; - background-color: transparent !important; - line-height: 13px; - padding-top:10px; -} -.plus-laranja:before{ - content: "+"; - float:right; - background-color: transparent !important; - padding-right:2px; - line-height: 13px; - padding-top: 10px; -} - -#new_user ul{ - margin-left: 0px; -} - -#new_user input{ - width: 80%; -} - -#new_user a.forgot_password, #new_user a.forgot_password:active, #new_user a.forgot_password:visited, #new_user a.forgot_password:hover{ - color: @orange_colour; - font-size: @font_size_medium; -} - -li.remember_me_li{ - margin-top:18px; -} - -li.remember_me_li label{ - font-size: @font_size_medium; -} - -#new_user ul li input.btn{ - padding: 4px 40px 2px 40px; - width:40%; - border-radius: 3px; -} - -label.remember_div{ - display: inline-block; - margin: 0 0 4px 12px; -} - -input#user_remember_me, input#user_accept_terms{ - float:left; - width:10px; - margin-top:4px; -} - -.sign_up_org_label{ - margin: 0 0 6px 0; - float:left; -} - -#s2id_user_organisation_id{ - min-width:84% !important; - clear:both; - float:left; - margin: 0 0 10px 0; -} -/****************************** - Project page -*******************************/ -/*** View projects table ***/ - -table.dmp_table thead{ - margin: 0px 4px 0px 0px; - background-color: @orange_colour; -} - -table.dmp_table thead th{ - color: @white_colour; - padding: 4px 4px 4px 15px; - font-weight:normal; - text-align: left; - } - -table.dmp_table tbody td{ - background-color: @white_colour; - color: @font_colour; - padding: 4px 4px 4px 15px; -} - -table.dmp_table tbody th.dmp_th_border{ - font-weight: normal; - text-align: left; - border-spacing: 4px; - border-bottom: 1px solid @grey_very_light_colour; - border-top: 10x solid @white_colour; -} - -table.dmp_table tbody th.dmp_th_border p{ - padding: 0px 0px 0px 5px; -} - -table.dmp_table tbody td.dmp_td_border{ - border-bottom: 1px solid @grey_very_light_colour; - border-left: 1px solid @grey_very_light_colour; -} - -table.dmp_table tbody td.dmp_td_no_border{ - border-bottom: 1px solid @grey_very_light_colour; -} - -table.dmp_table a.dmp_table_link, table.dmp_table a.dmp_table_link:active, table.dmp_table a.dmp_table_link:visited{ - text-decoration: none !important; - padding: 0px 5px 0px 0px; -} -table.dmp_table a.dmp_table_link:hover{ - text-decoration: underline !important; - color: @orange_colour; -} - - -/*****************************/ -/****** NEW TEMPLATE *********/ -/*****************************/ - -.blue_border{ - border: 1px solid @orange_colour; -} - -/*****************************/ -/*** phase creation/update ***/ -/*****************************/ - -div.phase_details{ - background-color: @orange_colour; - border-bottom: 2px solid @orange_colour; - min-height: 50px; - border-radius: 2px; - margin-bottom: 5px; - box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - padding-top:2px; - - div.phase_details_text{ - color: @white_colour; - float:left; - min-height: 20px; - line-height: 24px; - font-weight: bold; - padding: 0 0 8px 15px; - - } - - div.phase_details_body{ - background-color: @white_colour; - padding: 10px 15px 25px 15px; - margin: 0 2px 0 2px; - } -} - -.versions_display_table{ - padding: 30px 0 0 0; -} - -.dmp_details_table td.first_template{ - border-right: 1px solid @orange_colour; - padding-right: 15px; - vertical-align:top; - text-align: right; - width: 120px; -} - -table td.phase_table_last_column { - padding-bottom: 25px; -} - -table.dmp_details_table .phase .text_area{ - width: 100%; -} - -.number_field{ - width: 30px; -} -.number_field .option{ - padding:2px; -} - -.small_text_field{ - width: 80%; -} - -.ques_format_option{ - width: 99%; -} - -.ques_format div select{ - width:89%; -} - -.section_desc{ - color: @white_colour; - font-weight: normal; - padding: 10px 0 10px 15px; -} - -form.edit_section{ - margin: 0 0 8px 0; -} - -table.options_table{ - width: 100%; - tr { - width: 100%; - th{ - font-weight:normal; - - float:left; - padding: 2px; - text-align:left; - border-bottom: 1px solid @orange_colour; - } - } - tr th.small{ - width: 15.5%; - - a{ - float:right; - padding-left:2px; - } - } - - tr th.medium{ - width: 46.5%; - } - tr td.small{ - width:15%; - min-width: 15%; - float:left; - padding: 2px; - } - tr td.medium{ - width:47%; - min-width:47%; - float:left; - padding: 2px; - } - .question_options_popover{ - padding-left: 12px; - } - .remove-option { - color: @orange_colour; - text-decoration: underline; - cursor: pointer; - } -} - -.border_bottom{ - border-bottom: 1px solid @orange_colour; - width: 75%; - margin-bottom: 6px; -} - -.add_space{ - height: 10px; -} - -a.cancel, a.cancel:hover{ - color: @orange_colour !important; - text-decoration: none; -} - -/*** Project creation ***/ -.dropdowns{ - margin-top:20px; -} - -.control-group{ - width:95%; - background-color: @white_colour; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - padding: 20px 20px 20px 20px; -} - -#institution-control-group{ - display:none; -} - -#template-control-group{ - display:none; -} - -#guidance-control-group{ - display:none; -} - -li.select label, li.check_boxes .label{ - background-color: @white_colour; - color: @orange_colour; - font-weight: bold; - text-shadow: none; - border-bottom-color: @white_colour; -} -#project_guidance_groups_input legend.label{ - margin-bottom: 8px; -} - -#project_guidance_groups_input legend.label label{ - font-weight: bold; - font-size: 12px; - - } - -div.select2-container { - float:right; - min-width: 48%; -} - -#has_more_templates, #project_unit_id_input{ - height:30px; - margin: 10px 0 0 52%; - width:48%; -} - -#has_more_templates label, #project_unit_id_input label{ - color: #575656; - min-width: 20%; - display: inline-block; -} -#has_more_templates #s2id_project_dmptemplate_id, #project_unit_id_input #s2id_project_unit_id{ - min-width: 64%; -} - -div.create_project_question_descriptions{ - font-size: 12px; - padding: 0 15px 0 3px; -} - -fieldset.actions ol{ - margin:25px 0 0 0; -} - -li.choice label{ - font-size: 12px; -} - -li.choice label input{ - margin: 0 8px 2px 3px; -} - - -/*** project editing ***/ -.field-group{ - clear:both; -} - -.left-label{ - float:left; - width:25%; -} - -.left-field{ - padding:0 0 10px 10px; - float:left; -} - -.form-horizontal{ - margin-bottom:0px; -} - -#edit_project_853239759 .form-actions{ - margin:15px 0 0 0; - clear:both; - background-color: @white_colour; - padding-left: 0px; -} - -.project_description{ - padding: 25px 0 0 0; -} -/*** project progress bar ***/ -.progress{ - margin:20px 0 0 10%; - width: 45%; - float:right; - border-bottom-left-radius: 9px; - border-bottom-right-radius: 9px; - border-top-left-radius: 9px; - border-top-right-radius: 9px; - box-shadow: 4px 5px 20px 3px rgba(168, 168, 168, 0.73); - -moz-box-shadow: 4px 5px 20px 3px rgba(168, 168, 168, 0.73); - -webkit-box-shadow: 4px 5px 20px 3px rgba(168, 168, 168, 0.73); -} - -.progress .bar{ - background-color: @orange_colour; - padding-left: 1px; - background-image: -moz-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); - background-image: -webkit-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); - background-image: -o-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); - background-image: -ms-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); - background-image: linear-gradient(top , @orange_colour, @orange_darker_colour 49px); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr= @orange_colour, endColorstr= @orange_darker_colour , gradientType='0')"; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @orange_colour, endColorstr= @orange_darker_colour) ;/*For IE7-8-9*/ - -} - -.progress .color-text{ - color: @orange_colour; - padding-left: 15px; -} - - -/*** project nav tabs ***/ -.nav-project-tabs{ - clear:both; -} -.nav li a{ - border-top-left-radius: 0px; - border-top-right-radius: 0px; - -} - -#project-tabs ul{ - margin-bottom: 0px; -} - -#project-tabs li a{ - background-color: @white_colour; - color: @grey_very_light_colour; - font-weight: bold; - padding: 4px 20px 4px 20px; - text-decoration: none !important; -} - -#project-tabs li.active a, #project-tabs li.active a:active, #project-tabs li a:hover{ - background-color: @orange_colour; - color: @white_colour; - font-weight: bold; - border: 1px solid @orange_colour; - padding: 4px 20px 4px 20px; - text-decoration: none !important; -} - -/*** project details ***/ -.project-title-container{ - float: left; - width: 45%; - margin: 0 0 20px 0; -} - -.project-title{ - float: left; -} - -.project-title-edit{ - float: left; - margin: 14px 0 0 20px; - font-weight:normal; -} - -.project-title-edit h5{ - font-weight:normal; -} - - -.dmp_details_body{ - background-color: @white_colour; - border: 2px solid @orange_colour; - border-radius: 1px; - padding-bottom: 25px; - padding-left: 15px; - padding-right: 15px; - padding-top: 9px; - min-width: 410px; -} - -.dmp_details{ - padding: 0 0 5px 0; - clear: both; -} - -.edit-project ol{ - margin-bottom: 0px; -} - -.div_left{ - float:left; - width:70%; - padding:0 2px 10px 0; -} - -div.admin_left_smaller{ - width:48%; - -} - -.div_right{ - float:right; - width:25%; - padding:0 2px 10px 0; - - .btn{ - float:right; - margin:0 0 0 4px; - } -} - -div.admin_right_bigger{ - width:51%; - } - -.move_2_right{ - float:right; - padding:0 2px 10px 0; -} - - -table.dmp_details_table { - margin: 0 0 0 0; -} - -table.dmp_details_table tr td{ - padding-left: 15px; - min-width:150px; -} - -table.dmp_details_table tr td.first{ - border-right: 1px solid @orange_colour; - padding-right: 15px; - vertical-align:top; - text-align: right; - width: 250px; -} - -table.dmp_details_table .text_area{ - width: 90%; -} - -table.dmp_details_table .text_field{ - height: 17px; - margin-bottom:5px; -} - -.edit-project .actions{ - margin-top: 0px; -} - -.div_clear{ - clear:both; -} - -#project-accordion .accordion-group{ - background-color:@white_colour; - border-color: @white_colour; - border:none !important; - box-shadow:none !important; - -moz-box-shadow: none !important; - -webkit-box-shadow:none !important; -} - -#project-accordion .accordion-heading{ - background-color:@white_colour; - border-bottom: 1px solid @orange_colour !important; - min-height: 50px; -} - -#project-accordion .accordion-heading a{ - padding-left:0px; - padding-right:0px; -} - - #project-accordion .accordion-heading h3{ - float: left; - margin-top: 0px; - min-width:100%; -} - -#project-accordion .accordion-heading span{ - margin: 7px; -} - -#project-accordion .accordion-project{ - clear:both; -} - -#project-accordion .accordion-inner{ - border:none !important; - padding-right: 0px; - padding-left:0px; -} - -.project-hide { - display:none; -} -/*** ***/ - - - -.has_children{ - display:none; -} - -#has_more_templates{ - display:none; -} - -.new-line-tabs{ - margin: 5px 0 10px; - border-top: 2px solid #e9eaea; - -} - -ul.section_ul { - list-style-type: none; - margin-left:0px; -} - -ul.section_ul li{ - color: @orange_colour; - } - -ul.question_ul{ - list-style-type: none; - margin-bottom: 15px; - margin-left:0px; -} - -ul.question_ul li{ - color: @font_colour; -} - - -/*** Accordion css ***/ -.accordion-group{ - background-color: @orange_colour; - border-color:@orange_colour; - border-radius: 1px; - margin-bottom: 5px; - box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); -} - -.accordion-heading{ - background-color: @orange_colour; - -} - -.accordion-heading a, .accordion-heading a:hover, .accordion-heading a:active, .accordion-heading a:visited{ - color:@white_colour; - font-weight: bold; - text-decoration: none; - background-color: none; - min-height: 20px; -} - -div.accordion-heading span.icon-white{ - color:@white_colour; -} -div.accordion .make_div_longer{ - width:69%; - padding-right: 5px; -} - -div.accordion .make_div_smaller{ - width:27%; - padding-left: 11px; - padding-top: 8px; - padding-bottom: 6px; -} -//guidance accordion link too long -.accordion-guidance-link .accordion_heading_text{ - width:80%; - height: initial; - line-height: normal; - margin-bottom: 4px; -} - -.accordion-guidance-link .accordion-icon{ - margin-top:11px; -} - -//section accordion -.accordion_heading_text{ - width:90%; - float:left; - padding-left: 1px; - padding-top: 1px; - height: 35px; - } - -.accordion-icon{ - width:2%; - float:right; - padding-right: 10px; - padding-top:11px; - } - -.accordion-body{ - clear:both; -} -.section-status{ - background-color: @orange_colour; -} - -.accordion-inner{ - background-color: @white_colour; -} - - -#sections-accordion { - .question-div { - float:left; - width:55%; - } - .question-guidance { - padding-left:5px; - float:right; - width:40%; - } - label { - font-size: 14px; - font-weight:normal; - } - .guidance_header { - font-weight: bold; - } - .loading { - display:none; - } - #sections-accordion { - margin-bottom: 10px; - } - -} - -.div_left_icon{ - float:left; - width:88%; - padding:0 2px 10px 0; -} - -.div_right_icon{ - float:right; - width:10%; - padding:3px 2px 10px 0; -} - -.guidance_table tr td{ - width: 290px; -} -.div_left_icon_g{ - float:left; - width:87%; - padding:0 0px 10px 0; -} - -.div_right_icon_g{ - float:right; - width:10%; - padding: 0px 0px 10px 0; -} - -/*** suggested answers ***/ - -div.suggested-answer-div{ - position:relative; -} - -div.suggested-answer-border { - border: 1px solid @orange_colour; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - padding: 10px 10px 5px 10px; - margin-bottom:10px; - overflow-y: auto; - max-height: 200px; -} - -span.suggested-answer-intro{ - position:relative; - background-color: @white_colour; - padding: 2px 10px 2px 6px; - left:15px; - top:10px; -} - -/*** accordion guidance***/ -.question-guidance { - border:none !important; - float:right !important; - clear: none !important; -} - -.question-guidance .accordion-group{ - background-color:@white_colour; - border-color: @white_colour; - border:none !important; - box-shadow:none !important; - -moz-box-shadow: none !important; - -webkit-box-shadow:none !important; -} - - -.question-guidance .accordion-heading{ - background-color:@white_colour; - } - -.question-guidance .guidance-accordion-body { - border: 1px solid @orange_colour; - clear:both; -} - -.question-guidance .guidance-accordion-body ul{ - font-size: @font_size; - list-style:none; - margin-left:0; - padding-left:1em; -} -.question-guidance .guidance-accordion-body ul li:before{ - display:inline-block; - content:"\2212"; - width:1em; - margin-left:-1em; - } - - -.question-guidance .accordion-heading a, .question-guidance .accordion-heading a:hover{ - padding-left:0px; - padding-right: 0px; - color: @orange_colour !important; - font-weight: bold; -} - -.two-column-clear { - clear: both; -} - -.question-divider { - border-bottom-color: @orange_colour; - border-bottom-style: solid; - border-bottom-width: 1px; - padding-bottom: 5px; - margin-bottom: 10px; -} - - -/*** ***/ -.formtastic { - ol { list-style-type: none; } - fieldset { border: none; } -} - -.new_user { - ul { list-style-type: none; } - fieldset { border: none; } -} - -/*** rich text editor ***/ -.mce-panel{ - border: 1px solid #9E9E9E; - margin: 5px; -} - -.mce-panel i.mce-ico{ - font-size: @font_size; - font-weight:normal; -} - -div { - &.field, &.actions { - margin-bottom: 10px; - } -} - -#notice { - color: green; -} - -.field_with_errors input { - border-color: red; - -} - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0px; - background-color: #c00; - color: #fff; - } - ul li { - font-size: 12px; - list-style: square; - } -} - - -/************* Exporting *************/ -#export_font{ - font-family: @text_font; -} - -/************ Static pages **********/ - -.column_container{ - width:100%; - float:left; -} -.column_left{ - float:left; - width:50%; - margin: 2px 5px 0 0; - .white_background{ - min-height: 465px; - - table.dmp_details_table tr td{ - padding-left: 10px; - min-width:94px; - } - - table.dmp_details_table tr td.first{ - border-right: 1px solid @orange_colour; - padding-right: 15px; - vertical-align:top; - text-align: right; - width: 50px; - } - table.dmp_details_table input{ - width:60% - } - } -} - -.column_right{ - float:left; - width:48%; - - margin: 2px 0 0 5px; - - - .white_background{ - min-height: 465px; - - } -} - -.white_background{ - background-color: @white_colour; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - padding: 20px 20px 20px 20px; - - ul{ - list-style-type: none; - margin-left:0px; - } -} - -/* TinyMCE */ - -#tinymce,.mce-content-body { - background-color: @white_colour !important; - padding: 2px; -} - -.mce-item-table { - border-collapse: collapse; - font-size: 10pt; - max-width: 500px; -} - -.mce-item-table th, .mce-item-table td { - border: 1px solid black !important; - padding: 2px; - line-height: 18px; -} - -.mce-item-table th { - font-weight: normal; - background-color: @orange_colour; -} - -.mce-foot, .mce-tinymce { - margin-left: 0px; -} - -.mce-container iframe html{ - max-height:150px; - overflow-x:hidden !important; - overflow-y:scroll !important; -} - - - -/* css for sorting tables */ - - -table.tablesorter thead tr th{ - padding-right: 20px; -} -table.tablesorter thead tr .header { - background-image: url(bg.gif); - background-repeat: no-repeat; - background-position: center right; - background-color: @orange_lighter_colour; - cursor: pointer; -} - - -table.tablesorter thead tr .headerSortUp { - background-image: url(asc.gif); -} -table.tablesorter thead tr .headerSortDown { - background-image: url(desc.gif); -} - - - -/******* Guidance group style *********/ -div#add_guidance_group_button_div{ - float:right; - margin-right: 2px; -} - -div#add_guidance_group_form_div{ - float:right; - width: 380px; - margin-right: 2px; - - div#add_guid_gr_form{ - width: 58%; - float: left; - padding-top: 6px; - input.text_field{ - width: 200px; - } - } - - div#guidance_group_add_buttons{ - width: 140px; - float: right; - margin-left: 1px; - } - - - - - - -} +@import "twitter/bootstrap/bootstrap"; +@import "twitter/bootstrap/responsive"; + +// Set the correct sprite paths +@iconSpritePath: "assets/images/glyphicons-halflings"; +@iconWhiteSpritePath: "assets/images/glyphicons-halflings-white"; + +// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) +@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); +@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix"); +@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); +@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); +@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); + +// Font Awesome +@import "fontawesome/font-awesome"; + +// Glyphicons +//@import "twitter/bootstrap/sprites.less"; + +// Your custom LESS stylesheets goes here + +/******************************* + * DMPRoadmap stylesheet + * + * + * starting date: June 2013 + *******************************/ + +/**** font configuration ****/ +@font-face { + font-family: 'GillSansLight'; + src: font-url('GillSansLight.ttf') format('truetype'); + font-weight: normal; + } + +@header_font: "GillSansLight"; +@text_font: 'Helvetica Neue', Helvetica, Arial, sans-serif; +@font_size: 14px; +@font_size_medium: 13px; +@font_size_small: 11px; +@font_colour: #3e3c3c; +@orange_colour: #0057A7; +@orange_darker_colour: #004A8E; +@orange_lighter_colour: #005EB4; +@grey_colour: #656263; +@grey_lighter_colour: #827d7e; +@grey_very_light_colour: #cccccc; +@grey_darker_colour: #515151; +@background_lighter_colour: #f9f9f9; +@background_darker_colour: #d1d5d4; +@green_colour: #114b8b; +@red_colour: #ec563c; /*#e3000f*/ +@red_lighter_colour: #EE6B54; +@white_colour: #ffffff; + +/************************************************************/ +/* main structure of the t */ +/************************************************************/ +html.dmponline { + /* fallback */ + background-repeat:repeat-y; + min-height: 100%; + /* Safari 4-5, Chrome 1-9 */ + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, @background_darker_colour), color-stop(1, @background_lighter_colour)); + /* Firefox 3.6+ */ + background-image: -moz-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + /* Safari 5.1, Chrome 10+ */ + background-image: -webkit-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + /* Opera 11.10+ */ + background-image: -o-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + /* IE 10 */ + background-image: -ms-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1d5d4', endColorstr='#f9f9f9', gradientType='0')'; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#d1d5d4', endColorstr='#f9f9f9') ;/*For IE7-8-9*/ + /*For IE7*/ + *height: 1%; + min-width: 850px; +} + +body.dmponline { + font-family: @text_font; + color: @font_colour; + font-size: @font_size; + margin: 0 11% 0 11%; + line-height: 24px; + min-width: 540px; + padding:0 0 0 0; + background:none; + text-align: left; +} + +.main_header{ + height: 145px; + margin: 0 0 40px 0; + width:99%; + clear:both; + float:left; +} + +.main_page_container{ + clear: both; + float: left; + width: 99%; + margin:0 0 30px 0; +} + +footer { + clear:both; + padding: 30px 0 100px 0; + margin-top: 70px; + font-size: @font_size; +} + +/*********************************************/ +/**** header ****/ +/*********************************************/ +/* left side*/ +div.header_left{ + float: left; + clear:both; + width: 145px; + } + .home_logo{ + margin-right:0px; + } + + +/* right side*/ +div.header_right{ + margin-left: 146px; + height:145px; + position:relative; +} + +/*****************************/ +/****** Main Navigation ******/ +/*****************************/ +.navbar{ + border: none !important; + border-color: none !important; + box-shadow: 0 !important; + -webkit-box-shadow: none !important; + position: static; + filter:none !important; + overflow: visible; +} + +.main_nav_tabs{ + width: 500px; + float:left; + position:absolute; + bottom:0; +} + +#main-nav-tabs ul{ + margin-right :0px; + margin-bottom:0px; + float:left; + border-bottom: 2px solid @orange_colour; +} + +#main-nav-tabs li a{ + background-color: @grey_lighter_colour; + color: @white_colour; + font-weight: bold; + padding: 4px 15px 4px 15px; + margin-bottom: 1px; + text-decoration: none !important; +} + +#main-nav-tabs li a.main_nav_last_li{ + margin-right: 0px; +} + +#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover{ + background-color: @orange_colour; + color: @white_colour !important; + font-weight: bold; + border: 1px solid @orange_colour; + padding: 4px 15px 4px 15px; + text-decoration: none !important; +} + +/********************/ +/** top right menu **/ +/********************/ +.signIn { + float:right; + position:absolute; + top:0; + right:0; +} + +.signIn ul{ + list-style-type: none; + color: @orange_colour; + font-size: 100%; +} + +.signIn ul li a, .signIn ul li a.active, .signIn ul li a:visited { + color: @orange_colour; + text-decoration:underline; + background-color: none; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid @orange_colour; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + right: 0; + left:45%; + z-index: 99; + display: none; + float: right; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + border: 1px solid @grey_very_light_colour; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +ul#signIn_dropdown{ + background: @grey_colour !important; +} + +ul#signIn_dropdown li , ul#signIn_dropdown li a.signIn_dropdown_link, + ul#signIn_dropdown li a.signIn_dropdown_link:link, + ul#signIn_dropdown li a.signIn_dropdown_link:active, + ul#signIn_dropdown li a.signIn_dropdown_link:visited{ + font-size:17px; + text-decoration:none; + font-weight:normal; + background: @grey_colour !important; + filter:none; + color: @white_colour; +} + +ul#signIn_dropdown li a.signIn_dropdown_link:hover, +ul#signIn_dropdown li a.signIn_dropdown_link:focus{ + text-decoration:underline; + background-color: @grey_colour !important; + background-image: none; + filter: none; + color: @white_colour !important; +} + +/********************/ +/*** Org Branding ***/ +/********************/ +.branding_container{ + width: 99%; +} + +.header_org_logo{ + padding:5px 0 0 5px; + float:left; + position:relative; + height:120px; + width: 25%; +} + +.header_org_logo_img{ + max-height: 110px; + max-width: 200px; + padding:0 5px 0 0; + position:absolute; + bottom: 20%; +} + +.header_org_banner_text{ + position:relative; + height:110px; + width: 99%; + } + +.header_org_banner_text_vertical_align{ + position:absolute; + text-align: center; + top:28%; +} + +/*********************************************/ +/**** footer ****/ +/*********************************************/ +footer .left_side_footer{ + float: left; + clear:both; + width: 45%; + } + footer .first_row{ + float:left; + + } + footer .second_row{ + clear:both; + float:left; + } + +footer .right_side_footer{ + float: right; + width: 45%; + + } + +footer .right_side_footer p{ + text-decoration: none; + text-align:center; + color: #999999; + float: right; + +} + +ul.footer-links { + margin-left:0px; +} + +ul.footer-links li { + display: inline; + padding: 0 2px; + line-height: 20px; +} + +ul.footer-links li:first-child { + padding-left: 0; +} + +ul.footer-links li a, ul.footer-links li a:active, ul.footer-links li a:visited { + color: @grey_colour; + text-decoration: none; +} + +ul.footer-links li a:hover, ul.footer-links li a:focus{ + color: @grey_darker_colour !important; + text-decoration:underline; +} + +#dcc_link{ + color: @grey_colour; +} + +#dcc_link a, #dcc_link a:active, #dcc_link a:visited{ + text-decoration: none; + color: @grey_colour; +} +#dcc_link a:hover, #dcc_link a:focus{ + color: @grey_darker_colour !important; + text-decoration:underline; + } + + +/*********************************************/ +/**** html tags ****/ +/*********************************************/ +h1, h2, h3, h4 { + font-family: @header_font; + color: @orange_colour; + font-weight: lighter; + font-style: normal; +} + +h1{ + font-size: 40px; + line-height:53px; +} + +h2{ + font-size: 32px; +} + +h3{ + font-size: 26px; +} + +h4{ + font-size: @font_size; +} + +p{ + font-size: @font_size; + font-family: @text_font; +} + +label.text_colour{ + font-size: @font_size; + font-family: @text_font; + color: @orange_colour; +} + +p a:hover, a.a-orange:hover, div.signIn a:hover, td a:hover, .question-guidance .accordion-inner a:hover, div a:hover{ + color: @orange_darker_colour !important; + background-color: none !important; +} + +a, a:active, a:focus { + color: @orange_colour; + text-decoration:underline; + font-family: @text_font; +} + +a.visited{ + background-color: none !important; + color: @orange_colour; +} + +a:hover, a.btn:hover, div.nav-project-tabs ul.nav-tabs li a:hover, div#sections-accordion a.accordion-toggle:hover{ + color: @white_colour !important; + background-color: none !important; +} + +ul{ + list-style-type: none; + margin-left:0px; +} + +hr.orange_break_line{ + clear: both; + margin-top: 40px; + border-top-color: @orange_lighter_colour; +} + + +/*************************/ +.formtastic{ + width:99%; +} + +.inputs ol{ + margin-left:0px; +} + +#send_btn { + width:100% !important; +} + +.tooltip_box{ + text-align:left; + z-index: 1000; +} + +.tooltip_box p{ + font-size: @font_size_small; +} +.tooltip_box ul{ + list-style-type: none; + margin-left:0px; +} + + +/**********************/ +/* Organisation admin */ +/**********************/ +.org_logo_admin_area{ + height: 120px; + float:right; +} + + +div.institution_login_link{ + padding-top: 15px; + font-size: @font_size_medium; +} + + +/** button colour **/ +ul.nav-pills li{ + margin: 0 2px 20px 0; + } + +ul.nav-pills li.last_li{ + margin: 0 0px 20px 0; +} + +ul.nav-pills li a.header_button{ + height: 18px; + padding: 4px 10px 2px 10px; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} + +ul.nav-pills li.last_li a.header_button{ + margin-right:0px; +} + +/*********************************************/ +/**** body ****/ +/*********************************************/ + +body.dmponline .btn-primary, body.dmponline .btn-primary:active, body.dmponline .btn-primary:visited, body.dmponline .btn-primary:focus { + background: @orange_colour; + background-image: none; + text-decoration:none; + color: @white_colour; + text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; + border-color: rgba(0, 0, 0, 0.247059); + border-color: @orange_colour @orange_colour @orange_lighter_colour; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + } + +body.dmponline .btn-primary:hover{ + background-image: -moz-linear-gradient(top, @orange_colour, @orange_lighter_colour 49px); + background-image: -webkit-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + background-image: -o-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + background-image: -ms-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + background-image: linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @orange_colour, endColorstr= @orange_lighter_colour, gradientType='0')'; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @orange_colour, endColorstr= @orange_lighter_colour) ;/*For IE7-8-9*/ + color: @white_colour; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} + +.btn-grey, .btn-grey:active, .btn-grey:visited, .btn-grey:focus { + background: @grey_colour; + background-image: none; + text-decoration:none; + color: @white_colour; + text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; + border-color: rgba(0, 0, 0, 0.247059); + border-color: @grey_colour @grey_colour @grey_lighter_colour; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + } + +.btn-grey:hover{ + background-image: -moz-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: -webkit-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: -o-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: -ms-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @grey_colour, endColorstr= @grey_lighter_colour , gradientType='0')'; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @grey_colour, endColorstr= @grey_lighter_colour ) ;/*For IE7-8-9*/ + color: @white_colour; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} + + + +/*********************************** + Home page +************************************/ + +.welcome-message { + float:left; + width: 45%; + margin:0 20px 0 0; +} + +.welcome-message p{ + color: @orange_colour; + background-color: none !important; + font-weight:lighter; + font-size:20px; + font-family: @header_font; + padding-bottom: 15px; + line-height: 34px; +} + +.welcome-message a, .welcome-message a:active, .welcome-message a:visited{ + color: @orange_colour; + background-color: none !important; + font-weight: bold; + text-decoration: none; + font-size:20px; + font-family: @header_font; + padding-bottom: 15px; + line-height: 34px; +} + +.welcome-message a:hover{ + background-color: none !important; + font-weight: bold; + text-decoration: none; + +} + +/** accordion **/ + +#homepage-accordion { + float:right; + width:48%; + margin:0 1% 0 1.5%; +} + +#homepage-accordion .accordion-group{ + background-color: @white_colour; + border: @white_colour; +} + +#homepage-accordion .accordion-heading{ + background-color: @white_colour; + border: @white_colour; + padding: 15px; +} + +#homepage-accordion .accordion-heading a.accordion-toggle{ + color: @orange_colour; + font-family: @header_font; + font-size: 51px; + font-weight: normal; + margin-bottom: 23px; + padding: 0; + background-color: transparent !important; + line-height: 51px; + } + + +#homepage-accordion .accordion-heading a.accordion-toggle:hover, + #homepage-accordion .accordion-heading a.accordion-toggle:focus{ + color: @orange_colour!important; + } + +#homepage-accordion .accordion-inner{ + border: @white_colour; + padding-top: 0px; +} + +.minus-laranja:before{ + content: "\2212"; + float:right; + background-color: transparent !important; + line-height: 13px; + padding-top:10px; +} +.plus-laranja:before{ + content: "+"; + float:right; + background-color: transparent !important; + padding-right:2px; + line-height: 13px; + padding-top: 10px; +} + +#new_user ul{ + margin-left: 0px; +} + +#new_user input{ + width: 80%; +} + +#new_user a.forgot_password, #new_user a.forgot_password:active, #new_user a.forgot_password:visited, #new_user a.forgot_password:hover{ + color: @orange_colour; + font-size: @font_size_medium; +} + +li.remember_me_li{ + margin-top:18px; +} + +li.remember_me_li label{ + font-size: @font_size_medium; +} + +#new_user ul li input.btn{ + padding: 4px 40px 2px 40px; + width:40%; + border-radius: 3px; +} + +label.remember_div{ + display: inline-block; + margin: 0 0 4px 12px; +} + +input#user_remember_me, input#user_accept_terms{ + float:left; + width:10px; + margin-top:4px; +} + +.sign_up_org_label{ + margin: 0 0 6px 0; + float:left; +} + +#s2id_user_organisation_id{ + min-width:84% !important; + clear:both; + float:left; + margin: 0 0 10px 0; +} +/****************************** + Project page +*******************************/ +/*** View projects table ***/ + +table.dmp_table thead{ + margin: 0px 4px 0px 0px; + background-color: @orange_colour; +} + +table.dmp_table thead th{ + color: @white_colour; + padding: 4px 4px 4px 15px; + font-weight:normal; + text-align: left; + } + +table.dmp_table tbody td{ + background-color: @white_colour; + color: @font_colour; + padding: 4px 4px 4px 15px; +} + +table.dmp_table tbody th.dmp_th_border{ + font-weight: normal; + text-align: left; + border-spacing: 4px; + border-bottom: 1px solid @grey_very_light_colour; + border-top: 10x solid @white_colour; +} + +table.dmp_table tbody th.dmp_th_border p{ + padding: 0px 0px 0px 5px; +} + +table.dmp_table tbody td.dmp_td_border{ + border-bottom: 1px solid @grey_very_light_colour; + border-left: 1px solid @grey_very_light_colour; +} + +table.dmp_table tbody td.dmp_td_no_border{ + border-bottom: 1px solid @grey_very_light_colour; +} + +table.dmp_table a.dmp_table_link, table.dmp_table a.dmp_table_link:active, table.dmp_table a.dmp_table_link:visited{ + text-decoration: none !important; + padding: 0px 5px 0px 0px; +} +table.dmp_table a.dmp_table_link:hover{ + text-decoration: underline !important; + color: @orange_colour; +} + + +/*****************************/ +/****** NEW TEMPLATE *********/ +/*****************************/ + +.blue_border{ + border: 1px solid @orange_colour; +} + +/*****************************/ +/*** phase creation/update ***/ +/*****************************/ + +div.phase_details{ + background-color: @orange_colour; + border-bottom: 2px solid @orange_colour; + min-height: 50px; + border-radius: 2px; + margin-bottom: 5px; + box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + padding-top:2px; + + div.phase_details_text{ + color: @white_colour; + float:left; + min-height: 20px; + line-height: 24px; + font-weight: bold; + padding: 0 0 8px 15px; + + } + + div.phase_details_body{ + background-color: @white_colour; + padding: 10px 15px 25px 15px; + margin: 0 2px 0 2px; + } +} + +.versions_display_table{ + padding: 30px 0 0 0; +} + +.dmp_details_table td.first_template{ + border-right: 1px solid @orange_colour; + padding-right: 15px; + vertical-align:top; + text-align: right; + width: 120px; +} + +table td.phase_table_last_column { + padding-bottom: 25px; +} + +table.dmp_details_table .phase .text_area{ + width: 100%; +} + +.number_field{ + width: 30px; +} +.number_field .option{ + padding:2px; +} + +.small_text_field{ + width: 80%; +} + +.ques_format_option{ + width: 99%; +} + +.ques_format div select{ + width:89%; +} + +.section_desc{ + color: @white_colour; + font-weight: normal; + padding: 10px 0 10px 15px; +} + +form.edit_section{ + margin: 0 0 8px 0; +} + +table.options_table{ + width: 100%; + tr { + width: 100%; + th{ + font-weight:normal; + + float:left; + padding: 2px; + text-align:left; + border-bottom: 1px solid @orange_colour; + } + } + tr th.small{ + width: 15.5%; + + a{ + float:right; + padding-left:2px; + } + } + + tr th.medium{ + width: 46.5%; + } + tr td.small{ + width:15%; + min-width: 15%; + float:left; + padding: 2px; + } + tr td.medium{ + width:47%; + min-width:47%; + float:left; + padding: 2px; + } + .question_options_popover{ + padding-left: 12px; + } + .remove-option { + color: @orange_colour; + text-decoration: underline; + cursor: pointer; + } +} + +.border_bottom{ + border-bottom: 1px solid @orange_colour; + width: 75%; + margin-bottom: 6px; +} + +.add_space{ + height: 10px; +} + +a.cancel, a.cancel:hover{ + color: @orange_colour !important; + text-decoration: none; +} + +/*** Project creation ***/ +.dropdowns{ + margin-top:20px; +} + +.control-group{ + width:95%; + background-color: @white_colour; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + padding: 20px 20px 20px 20px; +} + +#institution-control-group{ + display:none; +} + +#template-control-group{ + display:none; +} + +#guidance-control-group{ + display:none; +} + +li.select label, li.check_boxes .label{ + background-color: @white_colour; + color: @orange_colour; + font-weight: bold; + text-shadow: none; + border-bottom-color: @white_colour; +} +#project_guidance_groups_input legend.label{ + margin-bottom: 8px; +} + +#project_guidance_groups_input legend.label label{ + font-weight: bold; + font-size: 12px; + + } + +div.select2-container { + float:right; + min-width: 48%; +} + +#has_more_templates, #project_unit_id_input{ + height:30px; + margin: 10px 0 0 52%; + width:48%; +} + +#has_more_templates label, #project_unit_id_input label{ + color: #575656; + min-width: 20%; + display: inline-block; +} +#has_more_templates #s2id_project_dmptemplate_id, #project_unit_id_input #s2id_project_unit_id{ + min-width: 64%; +} + +div.create_project_question_descriptions{ + font-size: 12px; + padding: 0 15px 0 3px; +} + +fieldset.actions ol{ + margin:25px 0 0 0; +} + +li.choice label{ + font-size: 12px; +} + +li.choice label input{ + margin: 0 8px 2px 3px; +} + + +/*** project editing ***/ +.field-group{ + clear:both; +} + +.left-label{ + float:left; + width:25%; +} + +.left-field{ + padding:0 0 10px 10px; + float:left; +} + +.form-horizontal{ + margin-bottom:0px; +} + +#edit_project_853239759 .form-actions{ + margin:15px 0 0 0; + clear:both; + background-color: @white_colour; + padding-left: 0px; +} + +.project_description{ + padding: 25px 0 0 0; +} +/*** project progress bar ***/ +.progress{ + margin:20px 0 0 10%; + width: 45%; + float:right; + border-bottom-left-radius: 9px; + border-bottom-right-radius: 9px; + border-top-left-radius: 9px; + border-top-right-radius: 9px; + box-shadow: 4px 5px 20px 3px rgba(168, 168, 168, 0.73); + -moz-box-shadow: 4px 5px 20px 3px rgba(168, 168, 168, 0.73); + -webkit-box-shadow: 4px 5px 20px 3px rgba(168, 168, 168, 0.73); +} + +.progress .bar{ + background-color: @orange_colour; + padding-left: 1px; + background-image: -moz-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); + background-image: -webkit-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); + background-image: -o-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); + background-image: -ms-linear-gradient(top , @orange_colour, @orange_darker_colour 49px); + background-image: linear-gradient(top , @orange_colour, @orange_darker_colour 49px); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr= @orange_colour, endColorstr= @orange_darker_colour , gradientType='0')"; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @orange_colour, endColorstr= @orange_darker_colour) ;/*For IE7-8-9*/ + +} + +.progress .color-text{ + color: @orange_colour; + padding-left: 15px; +} + + +/*** project nav tabs ***/ +.nav-project-tabs{ + clear:both; +} +.nav li a{ + border-top-left-radius: 0px; + border-top-right-radius: 0px; + +} + +#project-tabs ul{ + margin-bottom: 0px; +} + +#project-tabs li a{ + background-color: @white_colour; + color: @grey_very_light_colour; + font-weight: bold; + padding: 4px 20px 4px 20px; + text-decoration: none !important; +} + +#project-tabs li.active a, #project-tabs li.active a:active, #project-tabs li a:hover{ + background-color: @orange_colour; + color: @white_colour; + font-weight: bold; + border: 1px solid @orange_colour; + padding: 4px 20px 4px 20px; + text-decoration: none !important; +} + +/*** project details ***/ +.project-title-container{ + float: left; + width: 45%; + margin: 0 0 20px 0; +} + +.project-title{ + float: left; +} + +.project-title-edit{ + float: left; + margin: 14px 0 0 20px; + font-weight:normal; +} + +.project-title-edit h5{ + font-weight:normal; +} + + +.dmp_details_body{ + background-color: @white_colour; + border: 2px solid @orange_colour; + border-radius: 1px; + padding-bottom: 25px; + padding-left: 15px; + padding-right: 15px; + padding-top: 9px; + min-width: 410px; +} + +.dmp_details{ + padding: 0 0 5px 0; + clear: both; +} + +.edit-project ol{ + margin-bottom: 0px; +} + +.div_left{ + float:left; + width:70%; + padding:0 2px 10px 0; +} + +div.admin_left_smaller{ + width:48%; + +} + +.div_right{ + float:right; + width:25%; + padding:0 2px 10px 0; + + .btn{ + float:right; + margin:0 0 0 4px; + } +} + +div.admin_right_bigger{ + width:51%; + } + +.move_2_right{ + float:right; + padding:0 2px 10px 0; +} + + +table.dmp_details_table { + margin: 0 0 0 0; +} + +table.dmp_details_table tr td{ + padding-left: 15px; + min-width:150px; +} + +table.dmp_details_table tr td.first{ + border-right: 1px solid @orange_colour; + padding-right: 15px; + vertical-align:top; + text-align: right; + width: 250px; +} + +table.dmp_details_table .text_area{ + width: 90%; +} + +table.dmp_details_table .text_field{ + height: 17px; + margin-bottom:5px; +} + +.edit-project .actions{ + margin-top: 0px; +} + +.div_clear{ + clear:both; +} + +#project-accordion .accordion-group{ + background-color:@white_colour; + border-color: @white_colour; + border:none !important; + box-shadow:none !important; + -moz-box-shadow: none !important; + -webkit-box-shadow:none !important; +} + +#project-accordion .accordion-heading{ + background-color:@white_colour; + border-bottom: 1px solid @orange_colour !important; + min-height: 50px; +} + +#project-accordion .accordion-heading a{ + padding-left:0px; + padding-right:0px; +} + + #project-accordion .accordion-heading h3{ + float: left; + margin-top: 0px; + min-width:100%; +} + +#project-accordion .accordion-heading span{ + margin: 7px; +} + +#project-accordion .accordion-project{ + clear:both; +} + +#project-accordion .accordion-inner{ + border:none !important; + padding-right: 0px; + padding-left:0px; +} + +.project-hide { + display:none; +} +/*** ***/ + + + +.has_children{ + display:none; +} + +#has_more_templates{ + display:none; +} + +.new-line-tabs{ + margin: 5px 0 10px; + border-top: 2px solid #e9eaea; + +} + +ul.section_ul { + list-style-type: none; + margin-left:0px; +} + +ul.section_ul li{ + color: @orange_colour; + } + +ul.question_ul{ + list-style-type: none; + margin-bottom: 15px; + margin-left:0px; +} + +ul.question_ul li{ + color: @font_colour; +} + + +/*** Accordion css ***/ +.accordion-group{ + background-color: @orange_colour; + border-color:@orange_colour; + border-radius: 1px; + margin-bottom: 5px; + box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); +} + +.accordion-heading{ + background-color: @orange_colour; + +} + +.accordion-heading a, .accordion-heading a:hover, .accordion-heading a:active, .accordion-heading a:visited{ + color:@white_colour; + font-weight: bold; + text-decoration: none; + background-color: none; + min-height: 20px; +} + +div.accordion-heading span.icon-white{ + color:@white_colour; +} +div.accordion .make_div_longer{ + width:69%; + padding-right: 5px; +} + +div.accordion .make_div_smaller{ + width:27%; + padding-left: 11px; + padding-top: 8px; + padding-bottom: 6px; +} +//guidance accordion link too long +.accordion-guidance-link .accordion_heading_text{ + width:80%; + height: initial; + line-height: normal; + margin-bottom: 4px; +} + +.accordion-guidance-link .accordion-icon{ + margin-top:11px; +} + +//section accordion +.accordion_heading_text{ + width:90%; + float:left; + padding-left: 1px; + padding-top: 1px; + height: 35px; + } + +.accordion-icon{ + width:2%; + float:right; + padding-right: 10px; + padding-top:11px; + } + +.accordion-body{ + clear:both; +} +.section-status{ + background-color: @orange_colour; +} + +.accordion-inner{ + background-color: @white_colour; +} + + +#sections-accordion { + .question-div { + float:left; + width:55%; + } + .question-guidance { + padding-left:5px; + float:right; + width:40%; + } + label { + font-size: 14px; + font-weight:normal; + } + .guidance_header { + font-weight: bold; + } + .loading { + display:none; + } + #sections-accordion { + margin-bottom: 10px; + } + +} + +.div_left_icon{ + float:left; + width:88%; + padding:0 2px 10px 0; +} + +.div_right_icon{ + float:right; + width:10%; + padding:3px 2px 10px 0; +} + +.guidance_table tr td{ + width: 290px; +} +.div_left_icon_g{ + float:left; + width:87%; + padding:0 0px 10px 0; +} + +.div_right_icon_g{ + float:right; + width:10%; + padding: 0px 0px 10px 0; +} + +/*** suggested answers ***/ + +div.suggested-answer-div{ + position:relative; +} + +div.suggested-answer-border { + border: 1px solid @orange_colour; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + padding: 10px 10px 5px 10px; + margin-bottom:10px; + overflow-y: auto; + max-height: 200px; +} + +span.suggested-answer-intro{ + position:relative; + background-color: @white_colour; + padding: 2px 10px 2px 6px; + left:15px; + top:10px; +} + +/*** accordion guidance***/ +.question-guidance { + border:none !important; + float:right !important; + clear: none !important; +} + +.question-guidance .accordion-group{ + background-color:@white_colour; + border-color: @white_colour; + border:none !important; + box-shadow:none !important; + -moz-box-shadow: none !important; + -webkit-box-shadow:none !important; +} + + +.question-guidance .accordion-heading{ + background-color:@white_colour; + } + +.question-guidance .guidance-accordion-body { + border: 1px solid @orange_colour; + clear:both; +} + +.question-guidance .guidance-accordion-body ul{ + font-size: @font_size; + list-style:none; + margin-left:0; + padding-left:1em; +} +.question-guidance .guidance-accordion-body ul li:before{ + display:inline-block; + content:"\2212"; + width:1em; + margin-left:-1em; + } + + +.question-guidance .accordion-heading a, .question-guidance .accordion-heading a:hover{ + padding-left:0px; + padding-right: 0px; + color: @orange_colour !important; + font-weight: bold; +} + +.two-column-clear { + clear: both; +} + +.question-divider { + border-bottom-color: @orange_colour; + border-bottom-style: solid; + border-bottom-width: 1px; + padding-bottom: 5px; + margin-bottom: 10px; +} + + +/*** ***/ +.formtastic { + ol { list-style-type: none; } + fieldset { border: none; } +} + +.new_user { + ul { list-style-type: none; } + fieldset { border: none; } +} + +/*** rich text editor ***/ +.mce-panel{ + border: 1px solid #9E9E9E; + margin: 5px; +} + +.mce-panel i.mce-ico{ + font-size: @font_size; + font-weight:normal; +} + +div { + &.field, &.actions { + margin-bottom: 10px; + } +} + +#notice { + color: green; +} + +.field_with_errors input { + border-color: red; + +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; + h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0px; + background-color: #c00; + color: #fff; + } + ul li { + font-size: 12px; + list-style: square; + } +} + + +/************* Exporting *************/ +#export_font{ + font-family: @text_font; +} + +/************ Static pages **********/ + +.column_container{ + width:100%; + float:left; +} +.column_left{ + float:left; + width:50%; + margin: 2px 5px 0 0; + .white_background{ + min-height: 465px; + + table.dmp_details_table tr td{ + padding-left: 10px; + min-width:94px; + } + + table.dmp_details_table tr td.first{ + border-right: 1px solid @orange_colour; + padding-right: 15px; + vertical-align:top; + text-align: right; + width: 50px; + } + table.dmp_details_table input{ + width:60% + } + } +} + +.column_right{ + float:left; + width:48%; + + margin: 2px 0 0 5px; + + + .white_background{ + min-height: 465px; + + } +} + +.white_background{ + background-color: @white_colour; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + padding: 20px 20px 20px 20px; + + ul{ + list-style-type: none; + margin-left:0px; + } +} + +/* TinyMCE */ + +#tinymce,.mce-content-body { + background-color: @white_colour !important; + padding: 2px; +} + +.mce-item-table { + border-collapse: collapse; + font-size: 10pt; + max-width: 500px; +} + +.mce-item-table th, .mce-item-table td { + border: 1px solid black !important; + padding: 2px; + line-height: 18px; +} + +.mce-item-table th { + font-weight: normal; + background-color: @orange_colour; +} + +.mce-foot, .mce-tinymce { + margin-left: 0px; +} + +.mce-container iframe html{ + max-height:150px; + overflow-x:hidden !important; + overflow-y:scroll !important; +} + + + +/* css for sorting tables */ + + +table.tablesorter thead tr th{ + padding-right: 20px; +} +table.tablesorter thead tr .header { + background-image: url(bg.gif); + background-repeat: no-repeat; + background-position: center right; + background-color: @orange_lighter_colour; + cursor: pointer; +} + + +table.tablesorter thead tr .headerSortUp { + background-image: url(asc.gif); +} +table.tablesorter thead tr .headerSortDown { + background-image: url(desc.gif); +} + + + +/******* Guidance group style *********/ +div#add_guidance_group_button_div{ + float:right; + margin-right: 2px; +} + +div#add_guidance_group_form_div{ + float:right; + width: 380px; + margin-right: 2px; + + div#add_guid_gr_form{ + width: 58%; + float: left; + padding-top: 6px; + input.text_field{ + width: 200px; + } + } + + div#guidance_group_add_buttons{ + width: 140px; + float: right; + margin-left: 1px; + } +} diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less index 2e43862..08617ed 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -1,1903 +1,1903 @@ -@import "twitter/bootstrap/bootstrap"; -@import "twitter/bootstrap/responsive"; - -// Set the correct sprite paths -@iconSpritePath: "assets/images/glyphicons-halflings"; -@iconWhiteSpritePath: "assets/images/glyphicons-halflings-white"; - -// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) -@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); -@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix"); -@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); -@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); -@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); - -// Font Awesome -@import "fontawesome/font-awesome"; - -// Glyphicons -//@import "twitter/bootstrap/sprites.less"; - -// Your custom LESS stylesheets goes here - -/******************************* - * DMPRoadmap stylesheet - * - * - * starting date: June 2013 - *******************************/ - -/**** font configuration ****/ -@font-face { - font-family: 'GillSansLight'; - src: font-url('GillSansLight.ttf') format('truetype'); - font-weight: normal; - } - -@header_font: "GillSansLight"; -@text_font: 'Helvetica Neue', Helvetica, Arial, sans-serif; -@font_size: 14px; -@font_size_medium: 13px; -@font_size_small: 11px; -@font_colour: #3e3c3c; -@orange_colour: #F49700; -@orange_darker_colour: #f47900; -@orange_lighter_colour: #fbb400; -@grey_colour: #656263; -@grey_lighter_colour: #827d7e; -@grey_very_light_colour: #cccccc; -@grey_darker_colour: #515151; -@background_lighter_colour: #f9f9f9; -@background_darker_colour: #d1d5d4; -@green_colour: #114b8b; -@red_colour: #ec563c; -@red_lighter_colour: #EE6B54; -@white_colour: #ffffff; - -/************************************************************/ -/* main structure of the t */ -/************************************************************/ - -html.dmponline { - /* fallback */ - background-repeat:repeat-y; - min-height: 100%; - /* Safari 4-5, Chrome 1-9 */ - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, @background_darker_colour), color-stop(1, @background_lighter_colour)); - /* Firefox 3.6+ */ - background-image: -moz-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - /* Safari 5.1, Chrome 10+ */ - background-image: -webkit-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - /* Opera 11.10+ */ - background-image: -o-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - /* IE 10 */ - background-image: -ms-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); - -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1d5d4', endColorstr='#f9f9f9', gradientType='0')'; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#d1d5d4', endColorstr='#f9f9f9') ;/*For IE7-8-9*/ - /*For IE7*/ - *height: 1%; - min-width: 850px; -} - -body.dmponline { - font-family: @text_font; - color: @font_colour; - font-size: @font_size; - margin: 0 11% 0 11%; - line-height: 24px; - min-width: 540px; - padding:0 0 0 0; - background:none; -} - -.main_header{ - height: 145px; - margin: 0 0 40px 0; - width:99%; - clear:both; - float:left; -} - -.main_page_container{ - clear: both; - float: left; - width: 99%; - margin:0 0 30px 0; -} - -footer { - clear:both; - padding: 30px 0 100px 0; - margin-top: 70px; - font-size: @font_size; -} - -/*********************************************/ -/**** header ****/ -/*********************************************/ -/* left side*/ -div.header_left{ - float: left; - clear:both; - width: 145px; - } - .home_logo{ - margin-right:0px; - } - - -/* right side*/ -div.header_right{ - margin-left: 146px; - height:145px; - position:relative; -} - -/*****************************/ -/****** Main Navigation ******/ -/*****************************/ -.navbar{ - border: none !important; - border-color: none !important; - box-shadow: 0 !important; - -webkit-box-shadow: none !important; - position: static; - filter:none !important; - overflow: visible; -} - -.main_nav_tabs{ - width: 500px; - float:left; - position:absolute; - bottom:0; -} - -#main-nav-tabs ul{ - margin-right :0px; - margin-bottom:0px; - float:left; - border-bottom: 2px solid @orange_colour; -} - -#main-nav-tabs li a{ - background-color: @grey_lighter_colour; - color: @white_colour; - font-weight: bold; - padding: 4px 15px 4px 15px; - margin-bottom: 1px; - text-decoration: none !important; -} - -#main-nav-tabs li a.main_nav_last_li{ - margin-right: 0px; -} - -#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover, lang-dropdown-link:hover{ - background-color: @orange_colour; - color: @white_colour !important; - font-weight: bold; - border: 1px solid @orange_colour; - padding: 4px 15px 4px 15px; - text-decoration: none !important; -} - -.caret-orange { - border-top: 4px solid #f49700!important; - border-bottom-color: #f49700!important; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - color: #f49700; -} - -a.dropdown-toggle:hover .caret-orange { - border-top: 4px solid white!important; - border-bottom-color: white!important; -} - -.lang-dropdown-link { - margin-bottom: 0!important; -} - -/********************/ -/** top right menu **/ -/********************/ -.signIn { - float:right; - position:absolute; - top:0; - right:0; -} - -.signIn ul{ - list-style-type: none; - color: @orange_colour; - font-size: 100%; -} - -.signIn ul li a, .signIn ul li a.active, .signIn ul li a:visited { - color: @orange_colour; - text-decoration:underline; - background-color: none; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - vertical-align: top; - border-top: 4px solid @orange_colour; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - -.dropdown-menu { - position: absolute; - top: 100%; - right: 0; - left:45%; - z-index: 99; - display: none; - float: right; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - border: 1px solid @grey_very_light_colour; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -ul#signIn_dropdown{ - background: @grey_colour !important; -} - -ul#signIn_dropdown li , ul#signIn_dropdown li a.signIn_dropdown_link, - ul#signIn_dropdown li a.signIn_dropdown_link:link, - ul#signIn_dropdown li a.signIn_dropdown_link:active, - ul#signIn_dropdown li a.signIn_dropdown_link:visited{ - font-size:17px; - text-decoration:none; - font-weight:normal; - background: @grey_colour !important; - filter:none; - color: @white_colour; -} - -ul#signIn_dropdown li a.signIn_dropdown_link:hover, -ul#signIn_dropdown li a.signIn_dropdown_link:focus{ - text-decoration:underline; - background-color: @grey_colour !important; - background-image: none; - filter: none; - color: @white_colour !important; -} - - -/********************/ -/*** Org Branding ***/ -/********************/ -.branding_container{ - width: 99%; -} - -.header_org_logo{ - padding:5px 0 0 5px; - float:left; - position:relative; - height:120px; - width: 25%; -} - -.header_org_logo_img{ - max-height: 110px; - max-width: 200px; - padding:0 5px 0 0; - position:absolute; - bottom: 20%; -} - -.header_org_banner_text{ - position:relative; - height:110px; - width: 99%; - } - -.header_org_banner_text_vertical_align{ - position:absolute; - text-align: center; - top:28%; -} - -/*********************************************/ -/**** footer ****/ -/*********************************************/ -footer .left_side_footer{ - float: left; - clear:both; - width: 45%; - } - footer .first_row{ - float:left; - - } - footer .second_row{ - clear:both; - float:left; - } - -footer .right_side_footer{ - float: right; - width: 45%; - - } - -footer .right_side_footer p{ - text-decoration: none; - text-align:center; - color: #999999; - float: right; - -} - -ul.footer-links { - margin-left:0px; -} - -ul.footer-links li { - display: inline; - padding: 0 2px; - line-height: 20px; -} - -ul.footer-links li:first-child { - padding-left: 0; -} - -ul.footer-links li a, ul.footer-links li a:active, ul.footer-links li a:visited { - color: @grey_colour; - text-decoration: none; -} - -ul.footer-links li a:hover, ul.footer-links li a:focus{ - color: @grey_darker_colour !important; - text-decoration:underline; -} - -#dcc_link{ - color: @grey_colour; -} - -#dcc_link a, #dcc_link a:active, #dcc_link a:visited{ - text-decoration: none; - color: @grey_colour; -} -#dcc_link a:hover, #dcc_link a:focus{ - color: @grey_darker_colour !important; - text-decoration:underline; - } - - -/*********************************************/ -/**** html tags ****/ -/*********************************************/ -h1, h2, h3, h4 { - font-family: @header_font; - color: @orange_colour; - font-weight: lighter; - font-style: normal; -} - -h1{ - font-size: 40px; - line-height:53px; -} - -h2{ - font-size: 32px; -} - -h3{ - font-size: 26px; -} - -h4{ - font-size: @font_size; -} - -p{ - font-size: @font_size; - font-family: @text_font; -} - -label.text_colour{ - font-size: @font_size; - font-family: @text_font; - color: @orange_colour; -} - -p a:hover, a.a-orange:hover, div.signIn a:hover, td a:hover, .question-guidance .accordion-inner a:hover, div a:hover{ - color: @orange_darker_colour !important; - background-color: none !important; -} - -a, a:active, a:focus { - color: @orange_colour; - text-decoration:underline; - font-family: @text_font; -} - -a.visited{ - background-color: none !important; - color: @orange_colour; -} - -a:hover, a.btn:hover, div.nav-project-tabs ul.nav-tabs li a:hover, div#sections-accordion a.accordion-toggle:hover{ - color: @white_colour !important; - background-color: none !important; -} - -ul{ - list-style-type: none; - margin-left:0px; -} - -hr.orange_break_line{ - clear: both; - margin-top: 40px; - border-top-color: @orange_lighter_colour; -} - - -/*************************/ -.formtastic{ - width:99%; -} - -.inputs ol{ - margin-left:0px; -} - -#send_btn { - width:100% !important; -} - -.tooltip_box{ - text-align:left; - z-index: 1000; -} - -.tooltip_box p{ - font-size: @font_size_small; -} -.tooltip_box ul{ - list-style-type: none; - margin-left:0px; -} - - - - - - - - -/** button colour **/ -ul.nav-pills li{ - margin: 0 2px 20px 0; - } - -ul.nav-pills li.last_li{ - margin: 0 0px 20px 0; -} - -ul.nav-pills li a.header_button{ - height: 18px; - padding: 4px 10px 2px 10px; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} - -ul.nav-pills li.last_li a.header_button{ - margin-right:0px; -} - -body.dmponline .btn-primary, body.dmponline .btn-primary:active, body.dmponline .btn-primary:visited, body.dmponline .btn-primary:focus { - background: @orange_colour; - background-image: none; - text-decoration:none; - color: @white_colour; - text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; - border-color: rgba(0, 0, 0, 0.247059); - border-color: @orange_colour @orange_colour @orange_lighter_colour; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - } - -body.dmponline .btn-primary:hover{ - background-image: -moz-linear-gradient(top, @orange_colour, @orange_lighter_colour 49px); - background-image: -webkit-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - background-image: -o-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - background-image: -ms-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - background-image: linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); - -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @orange_colour, endColorstr= @orange_lighter_colour, gradientType='0')'; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @orange_colour, endColorstr= @orange_lighter_colour) ;/*For IE7-8-9*/ - color: @white_colour; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} - -.btn-grey, .btn-grey:active, .btn-grey:visited, .btn-grey:focus { - background: @grey_colour; - background-image: none; - text-decoration:none; - color: @white_colour; - text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; - border-color: rgba(0, 0, 0, 0.247059); - border-color: @grey_colour @grey_colour @grey_lighter_colour; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - } - -.btn-grey:hover{ - background-image: -moz-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: -webkit-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: -o-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: -ms-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - background-image: linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); - -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @grey_colour, endColorstr= @grey_lighter_colour , gradientType='0')'; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @grey_colour, endColorstr= @grey_lighter_colour ) ;/*For IE7-8-9*/ - color: @white_colour; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} - - - -/*********************************** - Home page -************************************/ - -.welcome-message { - float:left; - width: 45%; - margin:0 20px 0 0; -} - -.welcome-message p{ - color: @orange_colour; - background-color: none !important; - font-weight:lighter; - font-size:20px; - font-family: @header_font; - padding-bottom: 15px; - line-height: 34px; -} - -.welcome-message a, .welcome-message a:active, .welcome-message a:visited{ - color: @orange_colour; - background-color: none !important; - font-weight: bold; - text-decoration: none; - font-size:20px; - font-family: @header_font; - padding-bottom: 15px; - line-height: 34px; -} - -.welcome-message a:hover{ - background-color: none !important; - font-weight: bold; - text-decoration: none; -} - -.screencast_home_page{ - background-color:@white_colour; - border-color: @white_colour; - color: @orange_colour; - border-radius: 1px; - margin-bottom: 5px; - box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - padding: 15px; - min-height: 250px; - } - - -/** accordion **/ - -#homepage-accordion { - float:right; - width:48%; - margin:0 1% 0 1.5%; -} - -#homepage-accordion .accordion-group{ - background-color: @white_colour; - border: @white_colour; -} - -#homepage-accordion .accordion-heading{ - background-color: @white_colour; - border: @white_colour; - padding: 15px; -} - -#homepage-accordion .accordion-heading a.accordion-toggle{ - color: @orange_colour; - font-family: @header_font; - font-size: 51px; - font-weight: normal; - margin-bottom: 23px; - padding: 0; - background-color: transparent !important; - line-height: 51px; - } - -#homepage-accordion .accordion-heading a.accordion-toggle:hover, - #homepage-accordion .accordion-heading a.accordion-toggle:focus{ - color: @orange_colour!important; - } - -#homepage-accordion .accordion-inner{ - border: @white_colour; - padding-top: 0px; -} - -.minus-laranja:before{ - content: "\2212"; - float:right; - background-color: transparent !important; - line-height: 13px; - padding-top:0px; -} -.plus-laranja:before{ - content: "+"; - float:right; - background-color: transparent !important; - padding-right:2px; - line-height: 13px; -} - -#new_user ul{ - margin-left: 0px; -} - -#new_user input{ - width: 80%; -} - -#new_user a.forgot_password, #new_user a.forgot_password:active, #new_user a.forgot_password:visited, #new_user a.forgot_password:hover{ - color: @orange_colour; - font-size: @font_size_medium; -} - -li.remember_me_li{ - margin-top:18px; -} - -li.remember_me_li label{ - font-size: @font_size_medium; -} - -#new_user ul li input.btn{ - padding: 4px 40px 2px 40px; - width:40%; - border-radius: 3px; -} - -label.remember_div{ - display: inline-block; - margin: 0 0 4px 12px; -} - -input#user_remember_me, input#user_accept_terms{ - float:left; - width:10px; - margin-top:4px; -} - -.sign_up_org_label{ - margin: 0 0 6px 0; - float:left; -} - -#s2id_user_organisation_id, #s2id_user_language_id{ - min-width:84% !important; - clear:both; - float:left; - margin: 0 0 5px 0; -} - -#s2id__organisation_language_id { - float:none; -} - -#other-org-link { - clear:both; - padding-bottom:4px; -} - -/****************************** - Project page -*******************************/ -/*** View projects table ***/ -table.dmp_table{ - width: 100%; - border-collapse: separate; - border-spacing: 2px; - border-bottom: 0px; - margin-bottom: 20px; -} - -table.dmp_table thead{ - margin: 0px 4px 0px 0px; - background-color: @orange_colour; -} - -table.dmp_table thead th, table.dmp_table thead td{ - color: @white_colour; - padding: 4px 4px 4px 15px; - font-weight:normal; - text-align: left; - } - -table.dmp_table tbody td{ - background-color: @white_colour; - color: @font_colour; - padding: 4px 4px 4px 15px; -} - -table.dmp_table tbody td.dmp_td_big, table.dmp_table thead th.dmp_th_big{ - width: 32%; - min-width: 180px; -} - -table.dmp_table tbody td.dmp_td_medium, table.dmp_table thead th.dmp_th_medium{ - width: 24%; - min-width: 93px; -} - -table.dmp_table tbody td.dmp_td_small, table.dmp_table thead th.dmp_th_small{ - width: 14%; - min-width: 10px; - padding: 0 20px; -} - -table.dmp_table tbody th.dmp_th_border{ - font-weight: normal; - text-align: left; - border-spacing: 4px; - border-bottom: 1px solid @grey_very_light_colour; - border-top: 10x solid @white_colour; -} - -table.dmp_table tbody th.dmp_th_border p{ - padding: 0px 0px 0px 5px; -} - -table.dmp_table tbody td.dmp_td_border{ - border-bottom: 1px solid @grey_very_light_colour; - border-left: 1px solid @grey_very_light_colour; -} - -table.dmp_table tbody td.dmp_border_bottom{ - border-bottom: 1px solid @grey_very_light_colour; - padding: 0px 0px 0px 5px; - -} -table.dmp_table a.dmp_table_link, table.dmp_table a.dmp_table_link:active, table.dmp_table a.dmp_table_link:visited{ - text-decoration: none !important; - padding: 0px 5px 0px 0px; -} -table.dmp_table a.dmp_table_link:hover{ - text-decoration: underline !important; - color: @orange_colour; -} - - -/*** Project creation ***/ -.dropdowns{ - margin-top:20px; -} - -.control-group{ - width:95%; - background-color: @white_colour; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - padding: 20px 20px 20px 20px; -} - -#institution-control-group{ - display:none; -} - -#template-control-group{ - display:none; -} - -#guidance-control-group{ - display:none; -} - -li.select label, li.check_boxes .label{ - background-color: @white_colour; - color: @orange_colour; - font-weight: bold; - text-shadow: none; - border-bottom-color: @white_colour; -} -#project_guidance_groups_input legend.label{ - margin-bottom: 8px; -} - -#project_guidance_groups_input legend.label label{ - font-weight: bold; - font-size: 12px; - } - -.select2-container { - float:right; - min-width: 48%; -} - -#has_more_templates, #project_unit_id_input{ - height:30px; - margin: 10px 0 0 52%; - width:48%; -} - -#has_more_templates label, #project_unit_id_input label{ - color: #575656; - min-width: 20%; - display: inline-block; -} -#has_more_templates #s2id_project_dmptemplate_id, #project_unit_id_input #s2id_project_unit_id{ - min-width: 64%; -} - -div.create_project_question_descriptions{ - font-size: 12px; - padding: 0 15px 0 3px; -} - -fieldset.actions ol{ - margin:25px 0 0 0; -} - -li.choice label{ - font-size: 12px; -} - -li.choice label input{ - margin: 0 8px 2px 3px; -} - - -/*** project editing ***/ -.field-group{ - clear:both; -} - -.left-label{ - float:left; - width:25%; -} - -.left-field{ - padding:0 0 10px 10px; - float:left; -} - -.form-horizontal{ - margin-bottom:0px; -} - -#edit_project_853239759 .form-actions{ - margin:15px 0 0 0; - clear:both; - background-color: @white_colour; - padding-left: 0px; -} - -.project_description{ - padding: 25px 0 0 0; -} - -.choices .label{ - background-color: @white_colour; - color: @font_colour; - border: 0px; -} - -.choices ol{ - list-style-type: none; -} - -#answer_options_input{ - margin-left: 0px; - padding-left: 0px; -} - -#answer_options_input .label{ - padding-left: 0px; - margin-bottom: 10px; - text-shadow: none; -} - -ol .choices-group{ - padding-left: 20px; -} - -#other-funder-name .label { - background-color: @white_colour; - color: @orange_colour; - border: 0px; - text-shadow: none; -} - -#other-funder-name input { - float: right; - min-width: 386px; -} - -/*** progress bar mixin ***/ -.ProgressBar (@start_colour, @stop_colour) { - background-color: @start_colour; - background-image: -moz-linear-gradient(top , @start_colour, @stop_colour 49px); - background-image: -webkit-linear-gradient(top , @start_colour, @stop_colour 49px); - background-image: -o-linear-gradient(top , @start_colour, @stop_colour 49px); - background-image: -ms-linear-gradient(top , @start_colour, @stop_colour 49px); - background-image: linear-gradient(top , @start_colour, @stop_colour 49px); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr= @start_colour, endColorstr= @stop_colour , gradientType='0')"; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @start_colour, endColorstr= @stop_colour) ;/*For IE7-8-9*/ -} - -/*** project progress bar ***/ -.progress { - height: auto; - margin: 8px 0 20px 10%; - width: 45%; - float: right; - - box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - - .bar-container{ - background-color: @white_colour; - clear: both; - float: left; - height: 2em; - position: relative; - text-align: left; - width: 100%; - - - & > span:first-child { - height: 100%; - color: @grey_lighter_colour; - width: 100%; - z-index: 1000; - } - - & > span { - font-size: 12px; - padding-top: 2px; - overflow: auto; - left: 0; - text-indent: 1em; - position: absolute; - text-align: left !important; - top: 0; - z-index: 1; - } - } - - .bar { - .ProgressBar(@orange_colour, @orange_darker_colour); - } - - .bar.space { - .ProgressBar(@orange_lighter_colour, @orange_colour); - - } - - .bar.full { - .ProgressBar(@red_lighter_colour, @red_colour); - } - - .bar-full-text { - color: @white_colour !important; - } - - - hr { - float: left; - margin: 0 10px -1px 0; - width: 100%; - } - - .color-text{ - color: @orange_colour; - padding-left: 15px; - } -} - -/*** project nav tabs ***/ -.nav-project-tabs{ - clear:both; -} - -.nav li a{ - border-top-left-radius: 0px; - border-top-right-radius: 0px; -} - -#project-tabs ul{ - margin-bottom: 0px; -} - -#project-tabs li a{ - background-color: @white_colour; - color: @grey_very_light_colour; - font-weight: bold; - padding: 4px 20px 4px 20px; - text-decoration: none !important; -} - -#project-tabs li.active a, #project-tabs li.active a:active, #project-tabs li a:hover{ - background-color: @orange_colour; - color: @white_colour; - font-weight: bold; - border: 1px solid @orange_colour; - padding: 4px 20px 4px 20px; - text-decoration: none !important; -} - -/*** project details ***/ -.project-title-container{ - float: left; - width: 45%; - margin: 0 0 20px 0; -} - -.project-title{ - float: left; -} - -.project-title-edit{ - float: left; - margin: 14px 0 0 20px; - font-weight:normal; -} - -.project-title-edit h5{ - font-weight:normal; -} - -.dmp_details_body{ - background-color: @white_colour; - border: 2px solid @orange_colour; - border-radius: 1px; - padding-bottom: 25px; - padding-left: 15px; - padding-right: 15px; - padding-top: 9px; - min-width: 410px; -} - -.dmp_details{ - padding: 0 0 5px 0; - clear: both; -} - -.edit-project ol{ - margin-bottom: 0px; -} - -.div_left{ - float:left; - width:74%; - padding:0 2px 10px 0; -} - -.div_right{ - float:right; - width:25%; - padding:0 2px 10px 0; - - .btn{ - float:right; - margin:0 0 0 4px; - } -} - -.move_2_right{ - float:right; - padding:0 2px 10px 0; -} - - -table.dmp_details_table { - margin: 0 0 0 0; -} - -table.dmp_details_table tr td{ - padding-left: 15px; - min-width:150px; -} - -table.dmp_details_table tr td.first{ - border-right: 1px solid @orange_colour; - padding-right: 15px; - vertical-align:top; - text-align: right; - width: 250px; -} - -table.dmp_details_table .text_area{ - width: 90%; -} - -table.dmp_details_table .text_field{ - height: 17px; - margin-bottom:5px; -} - -.edit-project .actions{ - margin-top: 0px; -} - -.div_clear{ - clear:both; -} - -#project-accordion { - & > .accordion-group { - background-color:@white_colour; - border-color: @white_colour; - border:none !important; - box-shadow:none !important; - -moz-box-shadow: none !important; - -webkit-box-shadow:none !important; - - & > .accordion-heading { - background-color:@white_colour; - border-bottom: 1px solid @orange_colour; - min-height: 50px; - - a { - padding-left:0px; - padding-right:0px; - } - - h3 { - float: left; - margin-top: 0px; - min-width:100%; - } - - span { - margin: 7px; - } - } - } - - .accordion-project { - clear: both; - } - - .accordion-inner { - border:none !important; - padding-right: 0px; - padding-left:0px; - } - -} - -.project-hide { - display:none; -} - - -/*** ***/ -.has_children{ - display:none; -} - -#has_more_templates{ - display:none; -} - -.new-line-tabs{ - margin: 5px 0 10px; - border-top: 2px solid #e9eaea; - -} - -ul.section_ul { - list-style-type: none; - margin-left:0px; -} - -ul.section_ul li{ - color: @orange_colour; - } - -ul.question_ul{ - list-style-type: none; - margin-bottom: 15px; - margin-left:0px; -} - -ul.question_ul li{ - color: @font_colour; -} - - -/*** Accordion css ***/ -.accordion-group{ - background-color: @orange_colour; - border-color:@orange_colour; - border-radius: 1px; - margin-bottom: 5px; - box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); - -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); -} - -.accordion-heading{ - background-color: @orange_colour; - -} - -.accordion-heading a, .accordion-heading a:hover, .accordion-heading a:active, .accordion-heading a:visited{ - color:@white_colour; - font-weight: bold; - text-decoration: none; - background-color: none; - min-height: 20px; -} - -.accordion_heading_text{ - width:90%; - float:left; - } - -.accordion-icon{ - width:2%; - float:right; - padding-top:5px; - } - -.accordion-body{ - clear:both; -} -.section-status{ - background-color: @orange_colour; -} - -.accordion-inner{ - background-color: @white_colour; -} - -#sections-accordion { - .question-div { - float:left; - width:55%; - } - .question-area-right-column { - padding-left:5px; - float:right; - width:40%; - } - label { - font-size: 14px; - font-weight:normal; - } - .guidance_header { - font-weight: bold; - } - .loading { - display:none; - } -} - -.section_desc{ - color: @white_colour; - font-weight: normal; - padding: 10px 0 10px 15px; -} - - -/*** suggested answers ***/ -div.suggested-answer-div{ - position:relative; - } - -div.suggested-answer-border { - border: 1px solid @orange_colour; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - padding: 10px 10px 5px 10px; - margin-bottom:10px; - overflow-y: auto; - max-height: 200px; -} - -span.suggested-answer-intro{ - position:relative; - background-color: @white_colour; - padding: 2px 10px 2px 6px; - left:15px; - top:10px; -} - - -/*** accordion guidance***/ -.question-guidance .accordion-group{ - background-color:@white_colour; - border-color: @white_colour; - border:none !important; - box-shadow:none !important; - -moz-box-shadow: none !important; - -webkit-box-shadow:none !important; -} - -.question-guidance .accordion-heading{ - background-color:@white_colour; - } - -.question-guidance .guidance-accordion-body { - border: 1px solid @orange_colour; - clear:both; -} - -.question-guidance .guidance-accordion-body ul{ - font-size: @font_size; - list-style:none; - margin-left:0; - padding-left:1em; -} -.question-guidance .guidance-accordion-body ul li:before{ - display:inline-block; - content:"\2212"; - width:1em; - margin-left:-1em; - } - -.question-guidance .accordion-heading a, .question-guidance .accordion-heading a:hover{ - padding-left:0px; - padding-right: 0px; - color: @orange_colour !important; - font-weight: bold; -} - -.two-column-clear { - clear: both; -} - -.question-divider { - border-bottom-color: rgb(244, 151, 0); - border-bottom-style: solid; - border-bottom-width: 1px; - padding-bottom: 5px; - margin-bottom: 10px; -} - -/*******************************/ -/****** Questions NOTES *******/ -/*******************************/ -.question_right_column_nav{ - clear: both; -} - -.question_right_column_nav ul { - clear: both; -} - -ul.question_right_column_ul li { - float:left; -} - -ul.question_right_column_ul li a { - background-color: @grey_very_light_colour; - color: @white_colour; - font_size: 23px; - font-weight: bold; - padding: 4px 6px 2px 6px; - text-decoration: none !important; - border_top: 1px solid @white_colour; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border-bottom: 1px solid @orange_colour; - border-bottom-left-radius:0px; - border-bottom-right-radius:0px; -} - -ul.question_right_column_ul li a:hover { - background-color: @white_colour; - color: @grey_very_light_colour !important; - text-decoration: none !important; - font_size: 23px; - font-weight: bold; - padding: 4px 5px 2px 5px; - border: 1px solid @grey_very_light_colour; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border-bottom: 1px solid @orange_colour; - border-bottom-left-radius:0px; - border-bottom-right-radius:0px; -} - -ul.question_right_column_ul li.active a, -ul.question_right_column_ul li.active a:active, -ul.question_right_column_ul li.active a:hover, -ul.question_right_column_ul li.active a:focus { - background-color: @white_colour; - color: @orange_colour !important; - padding: 4px 5px 2px 5px; - text-decoration: none !important; - border: 1px solid @orange_colour; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border-bottom-color: transparent; - border-bottom-left-radius:0px; - border-bottom-right-radius:0px; -} - -/* being used in the accordion on the question right column */ -p.accordion_label{ - font_size: 23px; - color: @orange_colour; - font-weight: normal; - padding-bottom: 8px; - margin-bottom:0px; -} - -/* tabs content */ -.comment-area, .question-guidance{ - clear: both; - border: 1px solid @orange_colour; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border-top-left-radius:0px; - padding: 10px 10px 5px 10px; - margin-top: 0px; -} - - - -/*** ***/ -.formtastic { - ol { list-style-type: none; } - fieldset { border: none; } -} - -.new_user { - ul { list-style-type: none; } - fieldset { border: none; } -} - -/*** rich text editor ***/ -.mce-panel{ - border: 1px solid #9E9E9E; - margin: 5px; -} - -.mce-panel i.mce-ico{ - font-size: @font_size; - font-weight:normal; -} - -div { - &.field, &.actions { - margin-bottom: 10px; - } -} - -#notice { - color: green; -} - -.field_with_errors input { - border-color: red; - -} - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0px; - background-color: #c00; - color: #fff; - } - ul li { - font-size: 12px; - list-style: square; - } -} - -/*******************************/ -/********* Exporting **********/ -/*******************************/ -#export_font{ - font-family: @text_font; -} - -ul.export_list li{ - padding-bottom: 5px; - - ul.export_sub_list { - list-style:none; - margin-left: 14px; - - li:before { - display:inline-block; - color: @orange_colour; - content:"-"; - width:1em; - margin-left:-1em; - } - - li { - padding-bottom: 5px; - } - } -} - -/*******************************/ -/********* Static pages ********/ -/*******************************/ -// help page - -ul.help_ul li{ - padding-bottom:12px; -} - -.column_container{ - width:100%; - float:left; -} -.column_left{ - float:left; - width:50%; - margin: 2px 5px 0 0; - .white_background{ - min-height: 465px; - - table.dmp_details_table tr td{ - padding-left: 10px; - min-width:94px; - } - - table.dmp_details_table tr td.first{ - border-right: 1px solid @orange_colour; - padding-right: 15px; - vertical-align:top; - text-align: right; - width: 50px; - } - } -} - -.column_right{ - float:left; - width:48%; - margin: 2px 0 0 5px; - - .white_background{ - min-height: 465px; - - } -} - -.white_background{ - background-color: @white_colour; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - padding: 20px 20px 20px 20px; - - ul{ - list-style-type: none; - margin-left:0px; - } -} - - -/*******************************/ -/********** TinyMCE ************/ -/*******************************/ -#tinymce,.mce-content-body { - background-color: @white_colour !important; - padding: 2px; - width: 100%; - ul { - list-style: disc outside; - margin: 0 0 10px 25px; - } -} - -.mce-item-table { - border-collapse: collapse; - font-size: 10pt; - max-width: 500px; -} - -.mce-item-table th, .mce-item-table td { - border: 1px solid black !important; - padding: 2px; - line-height: 18px; -} - -.mce-item-table th { - font-weight: normal; - background-color: @orange_colour; -} - - -/*******************************/ -/****** My plans toolbar *******/ -/*******************************/ -.dmp_toolbar { - background-color: @orange_colour; - height: 34px; - margin-left: 2px; - margin-right:2px; - padding: 4px 2px 4px 2px; - text-align: right; - border-spacing: 2px; - vertical-align: center; - - form#filter_form { - background-color: @white_colour; - border-radius: 3px; - display: inline-block; - height: auto; - overflow: hidden; - padding: 2px; - width: 50%; - - #filter { - border: none; - border-radius: 0; - box-shadow: none; - -webkit-box-shadow: none; - margin: 0; - outline: none; - padding: 4px 0 0 4px; - float: left; - width: 70%; - } - } - - .btn-configure { - color: @white_colour; - float: right; - height: 100%; - line-height: 250%; - margin-left: @font_size / 2; - margin-right:4px; - width:15px; - text-decoration: none !important; - - &:hover { - color: @white_colour !important;} - } - a:focus, - a:active, - a:hover { - text-decoration: none !important; - } -} - -@media screen and (-webkit-min-device-pixel-ratio:0) { - .dmp_toolbar{ - margin-right:3px; - } -} - -/*******************************/ -/********* tablesorter *********/ -/*******************************/ -table.tablesorter thead { - th.header { - cursor: pointer; - background: url('/assets/bg.gif') no-repeat center right; - } - - th.headerSortDown { - background: @orange_lighter_colour url('/assets/desc.gif') no-repeat center right; - } - - th.headerSortUp { - background: @orange_lighter_colour url('/assets/asc.gif') no-repeat center right; - } -} - - -/********************************/ -/* export format selection form */ -/********************************/ -form#select-form-format { - input { - margin-bottom:10px; - } -} - -/*********************************/ -/*export formatting settings form*/ -/*********************************/ -form.new_export, -form.edit_export { - background-color: @white_colour; - border-radius: 5px; - padding: 1em; - - & > fieldset > legend { - - label { - display: inline-block; - width: 90%; - font-size: 21px; - line-height: 40px; - color: #333; - } - - input[type=checkbox] { margin-left: 0 !important; } - } - - - fieldset { - display: inline-block; - width: 47.5%; - vertical-align: top; - - div { - display: inline-block; - width: auto; - - label { - font-size: 0.8em; - text-align: center; - } - - select { - text-align: center; - width: auto; - } - } - - ol { - margin: 0 5% 0 0; - - li { - display: block; - list-style-type: none; - line-height: 1em; - margin: 0; - padding: 0; - position: relative; - width: 100%; - - & > fieldset { - display: block; - width: 100%; - - legend { - border: none; - font-size: 1em; - line-height: 1em; - height: 1.5em; - margin: 0; - padding: 0; - - label { font-weight: bold; } - } - - ol { - border-bottom: 1px solid @grey_very_light_colour; - margin: 0 0 0.5em 0; - padding: 0 0 0.5em 0; - } - - li { - height: auto; - label { text-indent: 5%; } - } - } - - &:last-child fieldset ol { border-bottom: none; } - } - - label { - display: inline-block; - margin: 0; - overflow: hidden; - position: absolute; - text-overflow: ellipsis; - white-space: nowrap; - width: 90%; - top: 0; left: 0; - } - - } - - input[type=checkbox] { margin-left: 95%; } - - h4 { - margin-top: 0; - text-align: center; - } - - &.font { - & > div { - width: 82.5%; - - select { width: 100%; } - } - - & > div:nth-child(2n + 1) { width: 15%; } - } - - &.margins { - div { - width: 24%; - - select { width: 100%; } - } - } - } - - input[type=submit] { margin-top: 1em; } -} - -.modal form.new_export fieldset, -.modal form.edit_export fieldset { width: 100%; } - -.settings-accordion span.plus-laranja:before, -.settings-accordion span.minus-laranja:before { line-height: inherit; } - -tr.new_option_before { - display: none; +@import "twitter/bootstrap/bootstrap"; +@import "twitter/bootstrap/responsive"; + +// Set the correct sprite paths +@iconSpritePath: "assets/images/glyphicons-halflings"; +@iconWhiteSpritePath: "assets/images/glyphicons-halflings-white"; + +// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) +@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); +@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix"); +@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); +@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); +@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); + +// Font Awesome +@import "fontawesome/font-awesome"; + +// Glyphicons +//@import "twitter/bootstrap/sprites.less"; + +// Your custom LESS stylesheets goes here + +/******************************* + * DMPRoadmap stylesheet + * + * + * starting date: June 2013 + *******************************/ + +/**** font configuration ****/ +@font-face { + font-family: 'GillSansLight'; + src: font-url('GillSansLight.ttf') format('truetype'); + font-weight: normal; + } + +@header_font: "GillSansLight"; +@text_font: 'Helvetica Neue', Helvetica, Arial, sans-serif; +@font_size: 14px; +@font_size_medium: 13px; +@font_size_small: 11px; +@font_colour: #3e3c3c; +@orange_colour: #F49700; +@orange_darker_colour: #f47900; +@orange_lighter_colour: #fbb400; +@grey_colour: #656263; +@grey_lighter_colour: #827d7e; +@grey_very_light_colour: #cccccc; +@grey_darker_colour: #515151; +@background_lighter_colour: #f9f9f9; +@background_darker_colour: #d1d5d4; +@green_colour: #114b8b; +@red_colour: #ec563c; +@red_lighter_colour: #EE6B54; +@white_colour: #ffffff; + +/************************************************************/ +/* main structure of the t */ +/************************************************************/ + +html.dmponline { + /* fallback */ + background-repeat:repeat-y; + min-height: 100%; + /* Safari 4-5, Chrome 1-9 */ + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, @background_darker_colour), color-stop(1, @background_lighter_colour)); + /* Firefox 3.6+ */ + background-image: -moz-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + /* Safari 5.1, Chrome 10+ */ + background-image: -webkit-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + /* Opera 11.10+ */ + background-image: -o-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + /* IE 10 */ + background-image: -ms-linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + background-image: linear-gradient(top ,@background_darker_colour , @background_lighter_colour 100% ); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1d5d4', endColorstr='#f9f9f9', gradientType='0')'; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#d1d5d4', endColorstr='#f9f9f9') ;/*For IE7-8-9*/ + /*For IE7*/ + *height: 1%; + min-width: 850px; +} + +body.dmponline { + font-family: @text_font; + color: @font_colour; + font-size: @font_size; + margin: 0 11% 0 11%; + line-height: 24px; + min-width: 540px; + padding:0 0 0 0; + background:none; +} + +.main_header{ + height: 145px; + margin: 0 0 40px 0; + width:99%; + clear:both; + float:left; +} + +.main_page_container{ + clear: both; + float: left; + width: 99%; + margin:0 0 30px 0; +} + +footer { + clear:both; + padding: 30px 0 100px 0; + margin-top: 70px; + font-size: @font_size; +} + +/*********************************************/ +/**** header ****/ +/*********************************************/ +/* left side*/ +div.header_left{ + float: left; + clear:both; + width: 145px; + } + .home_logo{ + margin-right:0px; + } + + +/* right side*/ +div.header_right{ + margin-left: 146px; + height:145px; + position:relative; +} + +/*****************************/ +/****** Main Navigation ******/ +/*****************************/ +.navbar{ + border: none !important; + border-color: none !important; + box-shadow: 0 !important; + -webkit-box-shadow: none !important; + position: static; + filter:none !important; + overflow: visible; +} + +.main_nav_tabs{ + width: 500px; + float:left; + position:absolute; + bottom:0; +} + +#main-nav-tabs ul{ + margin-right :0px; + margin-bottom:0px; + float:left; + border-bottom: 2px solid @orange_colour; +} + +#main-nav-tabs li a{ + background-color: @grey_lighter_colour; + color: @white_colour; + font-weight: bold; + padding: 4px 15px 4px 15px; + margin-bottom: 1px; + text-decoration: none !important; +} + +#main-nav-tabs li a.main_nav_last_li{ + margin-right: 0px; +} + +#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover, lang-dropdown-link:hover{ + background-color: @orange_colour; + color: @white_colour !important; + font-weight: bold; + border: 1px solid @orange_colour; + padding: 4px 15px 4px 15px; + text-decoration: none !important; +} + +.caret-orange { + border-top: 4px solid #f49700!important; + border-bottom-color: #f49700!important; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + color: #f49700; +} + +a.dropdown-toggle:hover .caret-orange { + border-top: 4px solid white!important; + border-bottom-color: white!important; +} + +.lang-dropdown-link { + margin-bottom: 0!important; +} + +/********************/ +/** top right menu **/ +/********************/ +.signIn { + float:right; + position:absolute; + top:0; + right:0; +} + +.signIn ul{ + list-style-type: none; + color: @orange_colour; + font-size: 100%; +} + +.signIn ul li a, .signIn ul li a.active, .signIn ul li a:visited { + color: @orange_colour; + text-decoration:underline; + background-color: none; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid @orange_colour; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + right: 0; + left:45%; + z-index: 99; + display: none; + float: right; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + border: 1px solid @grey_very_light_colour; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +ul#signIn_dropdown{ + background: @grey_colour !important; +} + +ul#signIn_dropdown li , ul#signIn_dropdown li a.signIn_dropdown_link, + ul#signIn_dropdown li a.signIn_dropdown_link:link, + ul#signIn_dropdown li a.signIn_dropdown_link:active, + ul#signIn_dropdown li a.signIn_dropdown_link:visited{ + font-size:17px; + text-decoration:none; + font-weight:normal; + background: @grey_colour !important; + filter:none; + color: @white_colour; +} + +ul#signIn_dropdown li a.signIn_dropdown_link:hover, +ul#signIn_dropdown li a.signIn_dropdown_link:focus{ + text-decoration:underline; + background-color: @grey_colour !important; + background-image: none; + filter: none; + color: @white_colour !important; +} + + +/********************/ +/*** Org Branding ***/ +/********************/ +.branding_container{ + width: 99%; +} + +.header_org_logo{ + padding:5px 0 0 5px; + float:left; + position:relative; + height:120px; + width: 25%; +} + +.header_org_logo_img{ + max-height: 110px; + max-width: 200px; + padding:0 5px 0 0; + position:absolute; + bottom: 20%; +} + +.header_org_banner_text{ + position:relative; + height:110px; + width: 99%; + } + +.header_org_banner_text_vertical_align{ + position:absolute; + text-align: center; + top:28%; +} + +/*********************************************/ +/**** footer ****/ +/*********************************************/ +footer .left_side_footer{ + float: left; + clear:both; + width: 45%; + } + footer .first_row{ + float:left; + + } + footer .second_row{ + clear:both; + float:left; + } + +footer .right_side_footer{ + float: right; + width: 45%; + + } + +footer .right_side_footer p{ + text-decoration: none; + text-align:center; + color: #999999; + float: right; + +} + +ul.footer-links { + margin-left:0px; +} + +ul.footer-links li { + display: inline; + padding: 0 2px; + line-height: 20px; +} + +ul.footer-links li:first-child { + padding-left: 0; +} + +ul.footer-links li a, ul.footer-links li a:active, ul.footer-links li a:visited { + color: @grey_colour; + text-decoration: none; +} + +ul.footer-links li a:hover, ul.footer-links li a:focus{ + color: @grey_darker_colour !important; + text-decoration:underline; +} + +#dcc_link{ + color: @grey_colour; +} + +#dcc_link a, #dcc_link a:active, #dcc_link a:visited{ + text-decoration: none; + color: @grey_colour; +} +#dcc_link a:hover, #dcc_link a:focus{ + color: @grey_darker_colour !important; + text-decoration:underline; + } + + +/*********************************************/ +/**** html tags ****/ +/*********************************************/ +h1, h2, h3, h4 { + font-family: @header_font; + color: @orange_colour; + font-weight: lighter; + font-style: normal; +} + +h1{ + font-size: 40px; + line-height:53px; +} + +h2{ + font-size: 32px; +} + +h3{ + font-size: 26px; +} + +h4{ + font-size: @font_size; +} + +p{ + font-size: @font_size; + font-family: @text_font; +} + +label.text_colour{ + font-size: @font_size; + font-family: @text_font; + color: @orange_colour; +} + +p a:hover, a.a-orange:hover, div.signIn a:hover, td a:hover, .question-guidance .accordion-inner a:hover, div a:hover{ + color: @orange_darker_colour !important; + background-color: none !important; +} + +a, a:active, a:focus { + color: @orange_colour; + text-decoration:underline; + font-family: @text_font; +} + +a.visited{ + background-color: none !important; + color: @orange_colour; +} + +a:hover, a.btn:hover, div.nav-project-tabs ul.nav-tabs li a:hover, div#sections-accordion a.accordion-toggle:hover{ + color: @white_colour !important; + background-color: none !important; +} + +ul{ + list-style-type: none; + margin-left:0px; +} + +hr.orange_break_line{ + clear: both; + margin-top: 40px; + border-top-color: @orange_lighter_colour; +} + + +/*************************/ +.formtastic{ + width:99%; +} + +.inputs ol{ + margin-left:0px; +} + +#send_btn { + width:100% !important; +} + +.tooltip_box{ + text-align:left; + z-index: 1000; +} + +.tooltip_box p{ + font-size: @font_size_small; +} +.tooltip_box ul{ + list-style-type: none; + margin-left:0px; +} + + + + + + + + +/** button colour **/ +ul.nav-pills li{ + margin: 0 2px 20px 0; + } + +ul.nav-pills li.last_li{ + margin: 0 0px 20px 0; +} + +ul.nav-pills li a.header_button{ + height: 18px; + padding: 4px 10px 2px 10px; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} + +ul.nav-pills li.last_li a.header_button{ + margin-right:0px; +} + +body.dmponline .btn-primary, body.dmponline .btn-primary:active, body.dmponline .btn-primary:visited, body.dmponline .btn-primary:focus { + background: @orange_colour; + background-image: none; + text-decoration:none; + color: @white_colour; + text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; + border-color: rgba(0, 0, 0, 0.247059); + border-color: @orange_colour @orange_colour @orange_lighter_colour; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + } + +body.dmponline .btn-primary:hover{ + background-image: -moz-linear-gradient(top, @orange_colour, @orange_lighter_colour 49px); + background-image: -webkit-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + background-image: -o-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + background-image: -ms-linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + background-image: linear-gradient(top , @orange_colour, @orange_lighter_colour 49px); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @orange_colour, endColorstr= @orange_lighter_colour, gradientType='0')'; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @orange_colour, endColorstr= @orange_lighter_colour) ;/*For IE7-8-9*/ + color: @white_colour; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} + +.btn-grey, .btn-grey:active, .btn-grey:visited, .btn-grey:focus { + background: @grey_colour; + background-image: none; + text-decoration:none; + color: @white_colour; + text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px; + border-color: rgba(0, 0, 0, 0.247059); + border-color: @grey_colour @grey_colour @grey_lighter_colour; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + } + +.btn-grey:hover{ + background-image: -moz-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: -webkit-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: -o-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: -ms-linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + background-image: linear-gradient(top ,@grey_colour , @grey_lighter_colour 49px); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr= @grey_colour, endColorstr= @grey_lighter_colour , gradientType='0')'; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @grey_colour, endColorstr= @grey_lighter_colour ) ;/*For IE7-8-9*/ + color: @white_colour; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} + + + +/*********************************** + Home page +************************************/ + +.welcome-message { + float:left; + width: 45%; + margin:0 20px 0 0; +} + +.welcome-message p{ + color: @orange_colour; + background-color: none !important; + font-weight:lighter; + font-size:20px; + font-family: @header_font; + padding-bottom: 15px; + line-height: 34px; +} + +.welcome-message a, .welcome-message a:active, .welcome-message a:visited{ + color: @orange_colour; + background-color: none !important; + font-weight: bold; + text-decoration: none; + font-size:20px; + font-family: @header_font; + padding-bottom: 15px; + line-height: 34px; +} + +.welcome-message a:hover{ + background-color: none !important; + font-weight: bold; + text-decoration: none; +} + +.screencast_home_page{ + background-color:@white_colour; + border-color: @white_colour; + color: @orange_colour; + border-radius: 1px; + margin-bottom: 5px; + box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + padding: 15px; + min-height: 250px; + } + + +/** accordion **/ + +#homepage-accordion { + float:right; + width:48%; + margin:0 1% 0 1.5%; +} + +#homepage-accordion .accordion-group{ + background-color: @white_colour; + border: @white_colour; +} + +#homepage-accordion .accordion-heading{ + background-color: @white_colour; + border: @white_colour; + padding: 15px; +} + +#homepage-accordion .accordion-heading a.accordion-toggle{ + color: @orange_colour; + font-family: @header_font; + font-size: 51px; + font-weight: normal; + margin-bottom: 23px; + padding: 0; + background-color: transparent !important; + line-height: 51px; + } + +#homepage-accordion .accordion-heading a.accordion-toggle:hover, + #homepage-accordion .accordion-heading a.accordion-toggle:focus{ + color: @orange_colour!important; + } + +#homepage-accordion .accordion-inner{ + border: @white_colour; + padding-top: 0px; +} + +.minus-laranja:before{ + content: "\2212"; + float:right; + background-color: transparent !important; + line-height: 13px; + padding-top:0px; +} +.plus-laranja:before{ + content: "+"; + float:right; + background-color: transparent !important; + padding-right:2px; + line-height: 13px; +} + +#new_user ul{ + margin-left: 0px; +} + +#new_user input{ + width: 80%; +} + +#new_user a.forgot_password, #new_user a.forgot_password:active, #new_user a.forgot_password:visited, #new_user a.forgot_password:hover{ + color: @orange_colour; + font-size: @font_size_medium; +} + +li.remember_me_li{ + margin-top:18px; +} + +li.remember_me_li label{ + font-size: @font_size_medium; +} + +#new_user ul li input.btn{ + padding: 4px 40px 2px 40px; + width:40%; + border-radius: 3px; +} + +label.remember_div{ + display: inline-block; + margin: 0 0 4px 12px; +} + +input#user_remember_me, input#user_accept_terms{ + float:left; + width:10px; + margin-top:4px; +} + +.sign_up_org_label{ + margin: 0 0 6px 0; + float:left; +} + +#s2id_user_organisation_id, #s2id_user_language_id{ + min-width:84% !important; + clear:both; + float:left; + margin: 0 0 5px 0; +} + +#s2id__organisation_language_id { + float:none; +} + +#other-org-link { + clear:both; + padding-bottom:4px; +} + +/****************************** + Project page +*******************************/ +/*** View projects table ***/ +table.dmp_table{ + width: 100%; + border-collapse: separate; + border-spacing: 2px; + border-bottom: 0px; + margin-bottom: 20px; +} + +table.dmp_table thead{ + margin: 0px 4px 0px 0px; + background-color: @orange_colour; +} + +table.dmp_table thead th, table.dmp_table thead td{ + color: @white_colour; + padding: 4px 4px 4px 15px; + font-weight:normal; + text-align: left; + } + +table.dmp_table tbody td{ + background-color: @white_colour; + color: @font_colour; + padding: 4px 4px 4px 15px; +} + +table.dmp_table tbody td.dmp_td_big, table.dmp_table thead th.dmp_th_big{ + width: 32%; + min-width: 180px; +} + +table.dmp_table tbody td.dmp_td_medium, table.dmp_table thead th.dmp_th_medium{ + width: 24%; + min-width: 93px; +} + +table.dmp_table tbody td.dmp_td_small, table.dmp_table thead th.dmp_th_small{ + width: 14%; + min-width: 10px; + padding: 0 20px; +} + +table.dmp_table tbody th.dmp_th_border{ + font-weight: normal; + text-align: left; + border-spacing: 4px; + border-bottom: 1px solid @grey_very_light_colour; + border-top: 10x solid @white_colour; +} + +table.dmp_table tbody th.dmp_th_border p{ + padding: 0px 0px 0px 5px; +} + +table.dmp_table tbody td.dmp_td_border{ + border-bottom: 1px solid @grey_very_light_colour; + border-left: 1px solid @grey_very_light_colour; +} + +table.dmp_table tbody td.dmp_border_bottom{ + border-bottom: 1px solid @grey_very_light_colour; + padding: 0px 0px 0px 5px; + +} +table.dmp_table a.dmp_table_link, table.dmp_table a.dmp_table_link:active, table.dmp_table a.dmp_table_link:visited{ + text-decoration: none !important; + padding: 0px 5px 0px 0px; +} +table.dmp_table a.dmp_table_link:hover{ + text-decoration: underline !important; + color: @orange_colour; +} + + +/*** Project creation ***/ +.dropdowns{ + margin-top:20px; +} + +.control-group{ + width:95%; + background-color: @white_colour; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + padding: 20px 20px 20px 20px; +} + +#institution-control-group{ + display:none; +} + +#template-control-group{ + display:none; +} + +#guidance-control-group{ + display:none; +} + +li.select label, li.check_boxes .label{ + background-color: @white_colour; + color: @orange_colour; + font-weight: bold; + text-shadow: none; + border-bottom-color: @white_colour; +} +#project_guidance_groups_input legend.label{ + margin-bottom: 8px; +} + +#project_guidance_groups_input legend.label label{ + font-weight: bold; + font-size: 12px; + } + +.select2-container { + float:right; + min-width: 48%; +} + +#has_more_templates, #project_unit_id_input{ + height:30px; + margin: 10px 0 0 52%; + width:48%; +} + +#has_more_templates label, #project_unit_id_input label{ + color: #575656; + min-width: 20%; + display: inline-block; +} +#has_more_templates #s2id_project_dmptemplate_id, #project_unit_id_input #s2id_project_unit_id{ + min-width: 64%; +} + +div.create_project_question_descriptions{ + font-size: 12px; + padding: 0 15px 0 3px; +} + +fieldset.actions ol{ + margin:25px 0 0 0; +} + +li.choice label{ + font-size: 12px; +} + +li.choice label input{ + margin: 0 8px 2px 3px; +} + + +/*** project editing ***/ +.field-group{ + clear:both; +} + +.left-label{ + float:left; + width:25%; +} + +.left-field{ + padding:0 0 10px 10px; + float:left; +} + +.form-horizontal{ + margin-bottom:0px; +} + +#edit_project_853239759 .form-actions{ + margin:15px 0 0 0; + clear:both; + background-color: @white_colour; + padding-left: 0px; +} + +.project_description{ + padding: 25px 0 0 0; +} + +.choices .label{ + background-color: @white_colour; + color: @font_colour; + border: 0px; +} + +.choices ol{ + list-style-type: none; +} + +#answer_options_input{ + margin-left: 0px; + padding-left: 0px; +} + +#answer_options_input .label{ + padding-left: 0px; + margin-bottom: 10px; + text-shadow: none; +} + +ol .choices-group{ + padding-left: 20px; +} + +#other-funder-name .label { + background-color: @white_colour; + color: @orange_colour; + border: 0px; + text-shadow: none; +} + +#other-funder-name input { + float: right; + min-width: 386px; +} + +/*** progress bar mixin ***/ +.ProgressBar (@start_colour, @stop_colour) { + background-color: @start_colour; + background-image: -moz-linear-gradient(top , @start_colour, @stop_colour 49px); + background-image: -webkit-linear-gradient(top , @start_colour, @stop_colour 49px); + background-image: -o-linear-gradient(top , @start_colour, @stop_colour 49px); + background-image: -ms-linear-gradient(top , @start_colour, @stop_colour 49px); + background-image: linear-gradient(top , @start_colour, @stop_colour 49px); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr= @start_colour, endColorstr= @stop_colour , gradientType='0')"; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr= @start_colour, endColorstr= @stop_colour) ;/*For IE7-8-9*/ +} + +/*** project progress bar ***/ +.progress { + height: auto; + margin: 8px 0 20px 10%; + width: 45%; + float: right; + + box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + + .bar-container{ + background-color: @white_colour; + clear: both; + float: left; + height: 2em; + position: relative; + text-align: left; + width: 100%; + + + & > span:first-child { + height: 100%; + color: @grey_lighter_colour; + width: 100%; + z-index: 1000; + } + + & > span { + font-size: 12px; + padding-top: 2px; + overflow: auto; + left: 0; + text-indent: 1em; + position: absolute; + text-align: left !important; + top: 0; + z-index: 1; + } + } + + .bar { + .ProgressBar(@orange_colour, @orange_darker_colour); + } + + .bar.space { + .ProgressBar(@orange_lighter_colour, @orange_colour); + + } + + .bar.full { + .ProgressBar(@red_lighter_colour, @red_colour); + } + + .bar-full-text { + color: @white_colour !important; + } + + + hr { + float: left; + margin: 0 10px -1px 0; + width: 100%; + } + + .color-text{ + color: @orange_colour; + padding-left: 15px; + } +} + +/*** project nav tabs ***/ +.nav-project-tabs{ + clear:both; +} + +.nav li a{ + border-top-left-radius: 0px; + border-top-right-radius: 0px; +} + +#project-tabs ul{ + margin-bottom: 0px; +} + +#project-tabs li a{ + background-color: @white_colour; + color: @grey_very_light_colour; + font-weight: bold; + padding: 4px 20px 4px 20px; + text-decoration: none !important; +} + +#project-tabs li.active a, #project-tabs li.active a:active, #project-tabs li a:hover{ + background-color: @orange_colour; + color: @white_colour; + font-weight: bold; + border: 1px solid @orange_colour; + padding: 4px 20px 4px 20px; + text-decoration: none !important; +} + +/*** project details ***/ +.project-title-container{ + float: left; + width: 45%; + margin: 0 0 20px 0; +} + +.project-title{ + float: left; +} + +.project-title-edit{ + float: left; + margin: 14px 0 0 20px; + font-weight:normal; +} + +.project-title-edit h5{ + font-weight:normal; +} + +.dmp_details_body{ + background-color: @white_colour; + border: 2px solid @orange_colour; + border-radius: 1px; + padding-bottom: 25px; + padding-left: 15px; + padding-right: 15px; + padding-top: 9px; + min-width: 410px; +} + +.dmp_details{ + padding: 0 0 5px 0; + clear: both; +} + +.edit-project ol{ + margin-bottom: 0px; +} + +.div_left{ + float:left; + width:74%; + padding:0 2px 10px 0; +} + +.div_right{ + float:right; + width:25%; + padding:0 2px 10px 0; + + .btn{ + float:right; + margin:0 0 0 4px; + } +} + +.move_2_right{ + float:right; + padding:0 2px 10px 0; +} + + +table.dmp_details_table { + margin: 0 0 0 0; +} + +table.dmp_details_table tr td{ + padding-left: 15px; + min-width:150px; +} + +table.dmp_details_table tr td.first{ + border-right: 1px solid @orange_colour; + padding-right: 15px; + vertical-align:top; + text-align: right; + width: 250px; +} + +table.dmp_details_table .text_area{ + width: 90%; +} + +table.dmp_details_table .text_field{ + height: 17px; + margin-bottom:5px; +} + +.edit-project .actions{ + margin-top: 0px; +} + +.div_clear{ + clear:both; +} + +#project-accordion { + & > .accordion-group { + background-color:@white_colour; + border-color: @white_colour; + border:none !important; + box-shadow:none !important; + -moz-box-shadow: none !important; + -webkit-box-shadow:none !important; + + & > .accordion-heading { + background-color:@white_colour; + border-bottom: 1px solid @orange_colour; + min-height: 50px; + + a { + padding-left:0px; + padding-right:0px; + } + + h3 { + float: left; + margin-top: 0px; + min-width:100%; + } + + span { + margin: 7px; + } + } + } + + .accordion-project { + clear: both; + } + + .accordion-inner { + border:none !important; + padding-right: 0px; + padding-left:0px; + } + +} + +.project-hide { + display:none; +} + + +/*** ***/ +.has_children{ + display:none; +} + +#has_more_templates{ + display:none; +} + +.new-line-tabs{ + margin: 5px 0 10px; + border-top: 2px solid #e9eaea; + +} + +ul.section_ul { + list-style-type: none; + margin-left:0px; +} + +ul.section_ul li{ + color: @orange_colour; + } + +ul.question_ul{ + list-style-type: none; + margin-bottom: 15px; + margin-left:0px; +} + +ul.question_ul li{ + color: @font_colour; +} + + +/*** Accordion css ***/ +.accordion-group{ + background-color: @orange_colour; + border-color:@orange_colour; + border-radius: 1px; + margin-bottom: 5px; + box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -moz-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); + -webkit-box-shadow: 7px 7px 2px 0px rgba(168, 168, 168, 0.5); +} + +.accordion-heading{ + background-color: @orange_colour; + +} + +.accordion-heading a, .accordion-heading a:hover, .accordion-heading a:active, .accordion-heading a:visited{ + color:@white_colour; + font-weight: bold; + text-decoration: none; + background-color: none; + min-height: 20px; +} + +.accordion_heading_text{ + width:90%; + float:left; + } + +.accordion-icon{ + width:2%; + float:right; + padding-top:5px; + } + +.accordion-body{ + clear:both; +} +.section-status{ + background-color: @orange_colour; +} + +.accordion-inner{ + background-color: @white_colour; +} + +#sections-accordion { + .question-div { + float:left; + width:55%; + } + .question-area-right-column { + padding-left:5px; + float:right; + width:40%; + } + label { + font-size: 14px; + font-weight:normal; + } + .guidance_header { + font-weight: bold; + } + .loading { + display:none; + } +} + +.section_desc{ + color: @white_colour; + font-weight: normal; + padding: 10px 0 10px 15px; +} + + +/*** suggested answers ***/ +div.suggested-answer-div{ + position:relative; + } + +div.suggested-answer-border { + border: 1px solid @orange_colour; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + padding: 10px 10px 5px 10px; + margin-bottom:10px; + overflow-y: auto; + max-height: 200px; +} + +span.suggested-answer-intro{ + position:relative; + background-color: @white_colour; + padding: 2px 10px 2px 6px; + left:15px; + top:10px; +} + + +/*** accordion guidance***/ +.question-guidance .accordion-group{ + background-color:@white_colour; + border-color: @white_colour; + border:none !important; + box-shadow:none !important; + -moz-box-shadow: none !important; + -webkit-box-shadow:none !important; +} + +.question-guidance .accordion-heading{ + background-color:@white_colour; + } + +.question-guidance .guidance-accordion-body { + border: 1px solid @orange_colour; + clear:both; +} + +.question-guidance .guidance-accordion-body ul{ + font-size: @font_size; + list-style:none; + margin-left:0; + padding-left:1em; +} +.question-guidance .guidance-accordion-body ul li:before{ + display:inline-block; + content:"\2212"; + width:1em; + margin-left:-1em; + } + +.question-guidance .accordion-heading a, .question-guidance .accordion-heading a:hover{ + padding-left:0px; + padding-right: 0px; + color: @orange_colour !important; + font-weight: bold; +} + +.two-column-clear { + clear: both; +} + +.question-divider { + border-bottom-color: rgb(244, 151, 0); + border-bottom-style: solid; + border-bottom-width: 1px; + padding-bottom: 5px; + margin-bottom: 10px; +} + +/*******************************/ +/****** Questions NOTES *******/ +/*******************************/ +.question_right_column_nav{ + clear: both; +} + +.question_right_column_nav ul { + clear: both; +} + +ul.question_right_column_ul li { + float:left; +} + +ul.question_right_column_ul li a { + background-color: @grey_very_light_colour; + color: @white_colour; + font_size: 23px; + font-weight: bold; + padding: 4px 6px 2px 6px; + text-decoration: none !important; + border_top: 1px solid @white_colour; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border-bottom: 1px solid @orange_colour; + border-bottom-left-radius:0px; + border-bottom-right-radius:0px; +} + +ul.question_right_column_ul li a:hover { + background-color: @white_colour; + color: @grey_very_light_colour !important; + text-decoration: none !important; + font_size: 23px; + font-weight: bold; + padding: 4px 5px 2px 5px; + border: 1px solid @grey_very_light_colour; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border-bottom: 1px solid @orange_colour; + border-bottom-left-radius:0px; + border-bottom-right-radius:0px; +} + +ul.question_right_column_ul li.active a, +ul.question_right_column_ul li.active a:active, +ul.question_right_column_ul li.active a:hover, +ul.question_right_column_ul li.active a:focus { + background-color: @white_colour; + color: @orange_colour !important; + padding: 4px 5px 2px 5px; + text-decoration: none !important; + border: 1px solid @orange_colour; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border-bottom-color: transparent; + border-bottom-left-radius:0px; + border-bottom-right-radius:0px; +} + +/* being used in the accordion on the question right column */ +p.accordion_label{ + font_size: 23px; + color: @orange_colour; + font-weight: normal; + padding-bottom: 8px; + margin-bottom:0px; +} + +/* tabs content */ +.comment-area, .question-guidance{ + clear: both; + border: 1px solid @orange_colour; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border-top-left-radius:0px; + padding: 10px 10px 5px 10px; + margin-top: 0px; +} + + + +/*** ***/ +.formtastic { + ol { list-style-type: none; } + fieldset { border: none; } +} + +.new_user { + ul { list-style-type: none; } + fieldset { border: none; } +} + +/*** rich text editor ***/ +.mce-panel{ + border: 1px solid #9E9E9E; + margin: 5px; +} + +.mce-panel i.mce-ico{ + font-size: @font_size; + font-weight:normal; +} + +div { + &.field, &.actions { + margin-bottom: 10px; + } +} + +#notice { + color: green; +} + +.field_with_errors input { + border-color: red; + +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; + h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0px; + background-color: #c00; + color: #fff; + } + ul li { + font-size: 12px; + list-style: square; + } +} + +/*******************************/ +/********* Exporting **********/ +/*******************************/ +#export_font{ + font-family: @text_font; +} + +ul.export_list li{ + padding-bottom: 5px; + + ul.export_sub_list { + list-style:none; + margin-left: 14px; + + li:before { + display:inline-block; + color: @orange_colour; + content:"-"; + width:1em; + margin-left:-1em; + } + + li { + padding-bottom: 5px; + } + } +} + +/*******************************/ +/********* Static pages ********/ +/*******************************/ +// help page + +ul.help_ul li{ + padding-bottom:12px; +} + +.column_container{ + width:100%; + float:left; +} +.column_left{ + float:left; + width:50%; + margin: 2px 5px 0 0; + .white_background{ + min-height: 465px; + + table.dmp_details_table tr td{ + padding-left: 10px; + min-width:94px; + } + + table.dmp_details_table tr td.first{ + border-right: 1px solid @orange_colour; + padding-right: 15px; + vertical-align:top; + text-align: right; + width: 50px; + } + } +} + +.column_right{ + float:left; + width:48%; + margin: 2px 0 0 5px; + + .white_background{ + min-height: 465px; + + } +} + +.white_background{ + background-color: @white_colour; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + padding: 20px 20px 20px 20px; + + ul{ + list-style-type: none; + margin-left:0px; + } +} + + +/*******************************/ +/********** TinyMCE ************/ +/*******************************/ +#tinymce,.mce-content-body { + background-color: @white_colour !important; + padding: 2px; + width: 100%; + ul { + list-style: disc outside; + margin: 0 0 10px 25px; + } +} + +.mce-item-table { + border-collapse: collapse; + font-size: 10pt; + max-width: 500px; +} + +.mce-item-table th, .mce-item-table td { + border: 1px solid black !important; + padding: 2px; + line-height: 18px; +} + +.mce-item-table th { + font-weight: normal; + background-color: @orange_colour; +} + + +/*******************************/ +/****** My plans toolbar *******/ +/*******************************/ +.dmp_toolbar { + background-color: @orange_colour; + height: 34px; + margin-left: 2px; + margin-right:2px; + padding: 4px 2px 4px 2px; + text-align: right; + border-spacing: 2px; + vertical-align: center; + + form#filter_form { + background-color: @white_colour; + border-radius: 3px; + display: inline-block; + height: auto; + overflow: hidden; + padding: 2px; + width: 50%; + + #filter { + border: none; + border-radius: 0; + box-shadow: none; + -webkit-box-shadow: none; + margin: 0; + outline: none; + padding: 4px 0 0 4px; + float: left; + width: 70%; + } + } + + .btn-configure { + color: @white_colour; + float: right; + height: 100%; + line-height: 250%; + margin-left: @font_size / 2; + margin-right:4px; + width:15px; + text-decoration: none !important; + + &:hover { + color: @white_colour !important;} + } + a:focus, + a:active, + a:hover { + text-decoration: none !important; + } +} + +@media screen and (-webkit-min-device-pixel-ratio:0) { + .dmp_toolbar{ + margin-right:3px; + } +} + +/*******************************/ +/********* tablesorter *********/ +/*******************************/ +table.tablesorter thead { + th.header { + cursor: pointer; + background: url('/assets/bg.gif') no-repeat center right; + } + + th.headerSortDown { + background: @orange_lighter_colour url('/assets/desc.gif') no-repeat center right; + } + + th.headerSortUp { + background: @orange_lighter_colour url('/assets/asc.gif') no-repeat center right; + } +} + + +/********************************/ +/* export format selection form */ +/********************************/ +form#select-form-format { + input { + margin-bottom:10px; + } +} + +/*********************************/ +/*export formatting settings form*/ +/*********************************/ +form.new_export, +form.edit_export { + background-color: @white_colour; + border-radius: 5px; + padding: 1em; + + & > fieldset > legend { + + label { + display: inline-block; + width: 90%; + font-size: 21px; + line-height: 40px; + color: #333; + } + + input[type=checkbox] { margin-left: 0 !important; } + } + + + fieldset { + display: inline-block; + width: 47.5%; + vertical-align: top; + + div { + display: inline-block; + width: auto; + + label { + font-size: 0.8em; + text-align: center; + } + + select { + text-align: center; + width: auto; + } + } + + ol { + margin: 0 5% 0 0; + + li { + display: block; + list-style-type: none; + line-height: 1em; + margin: 0; + padding: 0; + position: relative; + width: 100%; + + & > fieldset { + display: block; + width: 100%; + + legend { + border: none; + font-size: 1em; + line-height: 1em; + height: 1.5em; + margin: 0; + padding: 0; + + label { font-weight: bold; } + } + + ol { + border-bottom: 1px solid @grey_very_light_colour; + margin: 0 0 0.5em 0; + padding: 0 0 0.5em 0; + } + + li { + height: auto; + label { text-indent: 5%; } + } + } + + &:last-child fieldset ol { border-bottom: none; } + } + + label { + display: inline-block; + margin: 0; + overflow: hidden; + position: absolute; + text-overflow: ellipsis; + white-space: nowrap; + width: 90%; + top: 0; left: 0; + } + + } + + input[type=checkbox] { margin-left: 95%; } + + h4 { + margin-top: 0; + text-align: center; + } + + &.font { + & > div { + width: 82.5%; + + select { width: 100%; } + } + + & > div:nth-child(2n + 1) { width: 15%; } + } + + &.margins { + div { + width: 24%; + + select { width: 100%; } + } + } + } + + input[type=submit] { margin-top: 1em; } +} + +.modal form.new_export fieldset, +.modal form.edit_export fieldset { width: 100%; } + +.settings-accordion span.plus-laranja:before, +.settings-accordion span.minus-laranja:before { line-height: inherit; } + +tr.new_option_before { + display: none; } \ No newline at end of file diff --git a/app/controllers/dmptemplates_controller.rb b/app/controllers/dmptemplates_controller.rb index c4e7a9a..f80d93f 100644 --- a/app/controllers/dmptemplates_controller.rb +++ b/app/controllers/dmptemplates_controller.rb @@ -1,570 +1,570 @@ -# [+Project:+] DMPRoadmap -# [+Description:+] This controller is responsible for all the actions in the admin interface under templates (e.g. phases, versions, sections, questions, suggested answer) (index; show; create; edit; delete) -# [+Copyright:+] Digital Curation Centre and University of California Curation Center - -class DmptemplatesController < ApplicationController - - # GET /dmptemplates - # GET /dmptemplates.json - def admin_index - if user_signed_in? && current_user.is_org_admin? then - #institutional templates - @dmptemplates_own = Dmptemplate.own_institutional_templates(current_user.organisation_id) - - #funders templates - @dmptemplates_funders = Dmptemplate.funders_templates - - respond_to do |format| - format.html # index.html.erb - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - # GET /dmptemplates/1 - # GET /dmptemplates/1.json - def admin_template - if user_signed_in? && current_user.is_org_admin? then - @dmptemplate = Dmptemplate.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @dmptemplate } - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - - - # PUT /dmptemplates/1 - # PUT /dmptemplates/1.json - def admin_update - if user_signed_in? && current_user.is_org_admin? then - @dmptemplate = Dmptemplate.find(params[:id]) - @dmptemplate.description = params["template-desc"] - - respond_to do |format| - if @dmptemplate.update_attributes(params[:dmptemplate]) - format.html { redirect_to admin_template_dmptemplate_path(params[:dmptemplate]), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "edit" } - format.json { render json: @dmptemplate.errors, status: :unprocessable_entity } - end - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - - # GET /dmptemplates/new - # GET /dmptemplates/new.json - def admin_new - if user_signed_in? && current_user.is_org_admin? then - @dmptemplate = Dmptemplate.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @dmptemplate } - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - # POST /dmptemplates - # POST /dmptemplates.json - def admin_create - if user_signed_in? && current_user.is_org_admin? then - @dmptemplate = Dmptemplate.new(params[:dmptemplate]) - @dmptemplate.organisation_id = current_user.organisation.id - @dmptemplate.description = params['template-desc'] - - respond_to do |format| - if @dmptemplate.save - format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.created_message') } - format.json { render json: @dmptemplate, status: :created, location: @dmptemplate } - else - format.html { render action: "admin_new" } - format.json { render json: @dmptemplate.errors, status: :unprocessable_entity } - end - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - - - # DELETE /dmptemplates/1 - # DELETE /dmptemplates/1.json - def admin_destroy - if user_signed_in? && current_user.is_org_admin? then - @dmptemplate = Dmptemplate.find(params[:id]) - @dmptemplate.destroy - - respond_to do |format| - format.html { redirect_to admin_index_dmptemplate_path } - format.json { head :no_content } - end - else - render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) - end - end - - - - # PHASES - - #show and edit a phase of the template - def admin_phase - if user_signed_in? && current_user.is_org_admin? then - - @phase = Phase.find(params[:id]) - - if !params.has_key?(:version_id) then - @edit = 'false' - #check for the most recent published version, if none is available then return the most recent one - versions = @phase.versions.where('published = ?', true).order('updated_at DESC') - if versions.any?() then - @version = versions.first - else - @version = @phase.versions.order('updated_at DESC').first - end - # When the version_id is passed as an argument - else - @edit = params[:edit] - @version = Version.find(params[:version_id]) - end - - #verify if there are any sections if not create one - @sections = @version.sections - if !@sections.any?() || @sections.count == 0 then - @section = @version.sections.build - @section.title = '' - @section.version_id = params[:version_id] - @section.number = 1 - @section.organisation_id = current_user.organisation.id - @section.published = true - @section.save - @new_sec = true - end - - #verify if section_id has been passed, if so then open that section - if params.has_key?(:section_id) then - @open = true - @section_id = params[:section_id].to_i - end - - if params.has_key?(:question_id) then - @question_id = params[:question_id].to_i - end - - respond_to do |format| - format.html - end - end - end - - #preview a phase - def admin_previewphase - if user_signed_in? && current_user.is_org_admin? then - - @version = Version.find(params[:id]) - - - respond_to do |format| - format.html - end - end - end - - - #add a new phase to a template - def admin_addphase - if user_signed_in? && current_user.is_org_admin? then - @dmptemplate = Dmptemplate.find(params[:id]) - @phase = Phase.new - if @dmptemplate.phases.count == 0 then - @phase.number = '1' - else - @phase.number = @dmptemplate.phases.count + 1 - end - - respond_to do |format| - format.html - end - end - end - - #create a phase - def admin_createphase - if user_signed_in? && current_user.is_org_admin? then - @phase = Phase.new(params[:phase]) - @phase.description = params["phase-desc"] - @version = @phase.versions.build - @version.title = "#{@phase.title} v.1" - @version.phase_id = @phase.id - @version.number = 1 - @version.published = false - - respond_to do |format| - if @phase.save - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @phase.errors, status: :unprocessable_entity } - end - end - end - end - - - #update a phase of a template - def admin_updatephase - if user_signed_in? && current_user.is_org_admin? then - @phase = Phase.find(params[:id]) - @phase.description = params["phase-desc"] - - respond_to do |format| - if @phase.update_attributes(params[:phase]) - format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @phase.errors, status: :unprocessable_entity } - end - end - end - end - - #delete a version, sections and questions - def admin_destroyphase - if user_signed_in? && current_user.is_org_admin? then - @phase = Phase.find(params[:phase_id]) - @dmptemplate = @phase.dmptemplate - @phase.destroy - - respond_to do |format| - format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.destroyed_message') } - format.json { head :no_content } - end - end - end - -# VERSIONS - - #update a version of a template - def admin_updateversion - if user_signed_in? && current_user.is_org_admin? then - @version = Version.find(params[:id]) - @version.description = params["version-desc"] - @phase = @version.phase - - if @version.published && !@phase.dmptemplate.published then - @phase.dmptemplate.published = true - end - - if @version.published == true then - @all_versions = @phase.versions.where('published = ?', true) - @all_versions.each do |v| - if v.id != @version.id && v.published == true then - v.published = false - v.save - end - end - end - - respond_to do |format| - if @version.update_attributes(params[:version]) - format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id => @version.id, :edit => 'false'), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @version.errors, status: :unprocessable_entity } - end - end - end - end - - #clone a version of a template - def admin_cloneversion - if user_signed_in? && current_user.is_org_admin? then - @old_version = Version.find(params[:version_id]) - @version = @old_version.amoeba_dup - @phase = @version.phase - - respond_to do |format| - - if @version.save - format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @version.errors, status: :unprocessable_entity } - end - end - end - end - - #delete a version, sections and questions - def admin_destroyversion - if user_signed_in? && current_user.is_org_admin? then - @version = Version.find(params[:version_id]) - @phase = @version.phase - @version.destroy - - respond_to do |format| - format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.destroyed_message') } - format.json { head :no_content } - end - end - end - -# SECTIONS - - #create a section - def admin_createsection - if user_signed_in? && current_user.is_org_admin? then - @section = Section.new(params[:section]) - @section.description = params["section-desc"] - - respond_to do |format| - if @section.save - format.html { redirect_to admin_phase_dmptemplate_path(:id => @section.version.phase_id, :version_id => @section.version_id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @section.errors, status: :unprocessable_entity } - end - end - end - end - - - #update a section of a template - def admin_updatesection - if user_signed_in? && current_user.is_org_admin? then - @section = Section.find(params[:id]) - @section.description = params["section-desc-#{params[:id]}"] - @version = @section.version - @phase = @version.phase - - respond_to do |format| - if @section.update_attributes(params[:section]) - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id , :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @section.errors, status: :unprocessable_entity } - end - end - end - end - - - #delete a section and questions - def admin_destroysection - if user_signed_in? && current_user.is_org_admin? then - @section = Section.find(params[:section_id]) - @version = @section.version - @phase = @version.phase - @section.destroy - - respond_to do |format| - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :edit => 'true' ), notice: I18n.t('org_admin.templates.destroyed_message') } - format.json { head :no_content } - end - end - end - - -# QUESTIONS - - #create a question - def admin_createquestion - if user_signed_in? && current_user.is_org_admin? then - @question = Question.new(params[:question]) - @question.guidance = params["new-question-guidance"] - @question.default_value = params["new-question-default-value"] - - respond_to do |format| - if @question.save - format.html { redirect_to admin_phase_dmptemplate_path(:id => @question.section.version.phase_id, :version_id => @question.section.version_id, :section_id => @question.section_id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @question.errors, status: :unprocessable_entity } - end - end - end - end - - #update a question of a template - def admin_updatequestion - if user_signed_in? && current_user.is_org_admin? then - @question = Question.find(params[:id]) - @question.guidance = params["question-guidance-#{params[:id]}"] - @question.default_value = params["question-default-value-#{params[:id]}"] - @section = @question.section - @version = @section.version - @phase = @version.phase - - respond_to do |format| - - -puts "PARAMS: #{params[:question]}" - - if @question.update_attributes(params[:question]) - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @question.errors, status: :unprocessable_entity } - end - end - end - end - - #delete a version, sections and questions - def admin_destroyquestion - if user_signed_in? && current_user.is_org_admin? then - @question = Question.find(params[:question_id]) - @section = @question.section - @version = @section.version - @phase = @version.phase - @question.destroy - - respond_to do |format| - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') } - format.json { head :no_content } - end - end - end - - - #SUGGESTED ANSWERS - #create suggested answers - def admin_createsuggestedanswer - if user_signed_in? && current_user.is_org_admin? then - @suggested_answer = SuggestedAnswer.new(params[:suggested_answer]) - - respond_to do |format| - if @suggested_answer.save - format.html { redirect_to admin_phase_dmptemplate_path(:id => @suggested_answer.question.section.version.phase_id, :version_id => @suggested_answer.question.section.version_id, :section_id => @suggested_answer.question.section_id, :question_id => @suggested_answer.question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @suggested_answer.errors, status: :unprocessable_entity } - end - end - end - end - - #update a suggested answer of a template - def admin_updatesuggestedanswer - if user_signed_in? && current_user.is_org_admin? then - @suggested_answer = SuggestedAnswer.find(params[:id]) - @question = @suggested_answer.question - @section = @question.section - @version = @section.version - @phase = @version.phase - - respond_to do |format| - if @suggested_answer.update_attributes(params[:suggested_answer]) - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @suggested_answer.errors, status: :unprocessable_entity } - end - end - end - end - - #delete a suggested answer - def admin_destroysuggestedanswer - if user_signed_in? && current_user.is_org_admin? then - @suggested_answer = SuggestedAnswer.find(params[:suggested_answer]) - @question = @suggested_answer.question - @section = @question.section - @version = @section.version - @phase = @version.phase - @suggested_answer.destroy - - respond_to do |format| - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') } - format.json { head :no_content } - end - end - end - -# GUIDANCES - - #create a guidance - def admin_createguidance - if user_signed_in? && current_user.is_org_admin? then - @question = Question.find(params[:question][:id]) - @guidance = Guidance.new(params[:guidance]) - @guidance.question_id = @question.id - #@question.guidance = params["new-question-guidance"] - #@question.default_value = params["new-question-default-value"] - - - respond_to do |format| - if @guidance.save - format.html { redirect_to admin_phase_dmptemplate_path(:id => @question.section.version.phase_id, :version_id => @question.section.version_id, :section_id => @question.section_id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @guidance.errors, status: :unprocessable_entity } - end - end - end - end - - #update a guidance of a template - def admin_updateguidance - if user_signed_in? && current_user.is_org_admin? then - @question = Question.find(params[:id]) - @question.guidance = params["question-guidance-#{params[:id]}"] - @question.default_value = params["question-default-value-#{params[:id]}"] - @section = @question.section - @version = @section.version - @phase = @version.phase - - respond_to do |format| - if @question.update_attributes(params[:question]) - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } - format.json { head :no_content } - else - format.html { render action: "admin_phase" } - format.json { render json: @question.errors, status: :unprocessable_entity } - end - end - end - end - - #delete a version, sections and guidance - def admin_destroyguidance - if user_signed_in? && current_user.is_org_admin? then - @question = Question.find(params[:question_id]) - @section = @question.section - @version = @section.version - @phase = @version.phase - @question.destroy - - respond_to do |format| - format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') } - format.json { head :no_content } - end - end - end - - -end +# [+Project:+] DMPRoadmap +# [+Description:+] This controller is responsible for all the actions in the admin interface under templates (e.g. phases, versions, sections, questions, suggested answer) (index; show; create; edit; delete) +# [+Copyright:+] Digital Curation Centre and University of California Curation Center + +class DmptemplatesController < ApplicationController + + # GET /dmptemplates + # GET /dmptemplates.json + def admin_index + if user_signed_in? && current_user.is_org_admin? then + #institutional templates + @dmptemplates_own = Dmptemplate.own_institutional_templates(current_user.organisation_id) + + #funders templates + @dmptemplates_funders = Dmptemplate.funders_templates + + respond_to do |format| + format.html # index.html.erb + end + else + render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) + end + end + + # GET /dmptemplates/1 + # GET /dmptemplates/1.json + def admin_template + if user_signed_in? && current_user.is_org_admin? then + @dmptemplate = Dmptemplate.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @dmptemplate } + end + else + render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) + end + end + + + + # PUT /dmptemplates/1 + # PUT /dmptemplates/1.json + def admin_update + if user_signed_in? && current_user.is_org_admin? then + @dmptemplate = Dmptemplate.find(params[:id]) + @dmptemplate.description = params["template-desc"] + + respond_to do |format| + if @dmptemplate.update_attributes(params[:dmptemplate]) + format.html { redirect_to admin_template_dmptemplate_path(params[:dmptemplate]), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @dmptemplate.errors, status: :unprocessable_entity } + end + end + else + render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) + end + end + + + # GET /dmptemplates/new + # GET /dmptemplates/new.json + def admin_new + if user_signed_in? && current_user.is_org_admin? then + @dmptemplate = Dmptemplate.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @dmptemplate } + end + else + render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) + end + end + + # POST /dmptemplates + # POST /dmptemplates.json + def admin_create + if user_signed_in? && current_user.is_org_admin? then + @dmptemplate = Dmptemplate.new(params[:dmptemplate]) + @dmptemplate.organisation_id = current_user.organisation.id + @dmptemplate.description = params['template-desc'] + + respond_to do |format| + if @dmptemplate.save + format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.created_message') } + format.json { render json: @dmptemplate, status: :created, location: @dmptemplate } + else + format.html { render action: "admin_new" } + format.json { render json: @dmptemplate.errors, status: :unprocessable_entity } + end + end + else + render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) + end + end + + + + # DELETE /dmptemplates/1 + # DELETE /dmptemplates/1.json + def admin_destroy + if user_signed_in? && current_user.is_org_admin? then + @dmptemplate = Dmptemplate.find(params[:id]) + @dmptemplate.destroy + + respond_to do |format| + format.html { redirect_to admin_index_dmptemplate_path } + format.json { head :no_content } + end + else + render(:file => File.join(Rails.root, 'public/403.html'), :status => 403, :layout => false) + end + end + + + + # PHASES + + #show and edit a phase of the template + def admin_phase + if user_signed_in? && current_user.is_org_admin? then + + @phase = Phase.find(params[:id]) + + if !params.has_key?(:version_id) then + @edit = 'false' + #check for the most recent published version, if none is available then return the most recent one + versions = @phase.versions.where('published = ?', true).order('updated_at DESC') + if versions.any?() then + @version = versions.first + else + @version = @phase.versions.order('updated_at DESC').first + end + # When the version_id is passed as an argument + else + @edit = params[:edit] + @version = Version.find(params[:version_id]) + end + + #verify if there are any sections if not create one + @sections = @version.sections + if !@sections.any?() || @sections.count == 0 then + @section = @version.sections.build + @section.title = '' + @section.version_id = params[:version_id] + @section.number = 1 + @section.organisation_id = current_user.organisation.id + @section.published = true + @section.save + @new_sec = true + end + + #verify if section_id has been passed, if so then open that section + if params.has_key?(:section_id) then + @open = true + @section_id = params[:section_id].to_i + end + + if params.has_key?(:question_id) then + @question_id = params[:question_id].to_i + end + + respond_to do |format| + format.html + end + end + end + + #preview a phase + def admin_previewphase + if user_signed_in? && current_user.is_org_admin? then + + @version = Version.find(params[:id]) + + + respond_to do |format| + format.html + end + end + end + + + #add a new phase to a template + def admin_addphase + if user_signed_in? && current_user.is_org_admin? then + @dmptemplate = Dmptemplate.find(params[:id]) + @phase = Phase.new + if @dmptemplate.phases.count == 0 then + @phase.number = '1' + else + @phase.number = @dmptemplate.phases.count + 1 + end + + respond_to do |format| + format.html + end + end + end + + #create a phase + def admin_createphase + if user_signed_in? && current_user.is_org_admin? then + @phase = Phase.new(params[:phase]) + @phase.description = params["phase-desc"] + @version = @phase.versions.build + @version.title = "#{@phase.title} v.1" + @version.phase_id = @phase.id + @version.number = 1 + @version.published = false + + respond_to do |format| + if @phase.save + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @phase.errors, status: :unprocessable_entity } + end + end + end + end + + + #update a phase of a template + def admin_updatephase + if user_signed_in? && current_user.is_org_admin? then + @phase = Phase.find(params[:id]) + @phase.description = params["phase-desc"] + + respond_to do |format| + if @phase.update_attributes(params[:phase]) + format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @phase.errors, status: :unprocessable_entity } + end + end + end + end + + #delete a version, sections and questions + def admin_destroyphase + if user_signed_in? && current_user.is_org_admin? then + @phase = Phase.find(params[:phase_id]) + @dmptemplate = @phase.dmptemplate + @phase.destroy + + respond_to do |format| + format.html { redirect_to admin_template_dmptemplate_path(@dmptemplate), notice: I18n.t('org_admin.templates.destroyed_message') } + format.json { head :no_content } + end + end + end + +# VERSIONS + + #update a version of a template + def admin_updateversion + if user_signed_in? && current_user.is_org_admin? then + @version = Version.find(params[:id]) + @version.description = params["version-desc"] + @phase = @version.phase + + if @version.published && !@phase.dmptemplate.published then + @phase.dmptemplate.published = true + end + + if @version.published == true then + @all_versions = @phase.versions.where('published = ?', true) + @all_versions.each do |v| + if v.id != @version.id && v.published == true then + v.published = false + v.save + end + end + end + + respond_to do |format| + if @version.update_attributes(params[:version]) + format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id => @version.id, :edit => 'false'), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @version.errors, status: :unprocessable_entity } + end + end + end + end + + #clone a version of a template + def admin_cloneversion + if user_signed_in? && current_user.is_org_admin? then + @old_version = Version.find(params[:version_id]) + @version = @old_version.amoeba_dup + @phase = @version.phase + + respond_to do |format| + + if @version.save + format.html { redirect_to admin_phase_dmptemplate_path(@phase, :version_id => @version.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @version.errors, status: :unprocessable_entity } + end + end + end + end + + #delete a version, sections and questions + def admin_destroyversion + if user_signed_in? && current_user.is_org_admin? then + @version = Version.find(params[:version_id]) + @phase = @version.phase + @version.destroy + + respond_to do |format| + format.html { redirect_to admin_phase_dmptemplate_path(@phase), notice: I18n.t('org_admin.templates.destroyed_message') } + format.json { head :no_content } + end + end + end + +# SECTIONS + + #create a section + def admin_createsection + if user_signed_in? && current_user.is_org_admin? then + @section = Section.new(params[:section]) + @section.description = params["section-desc"] + + respond_to do |format| + if @section.save + format.html { redirect_to admin_phase_dmptemplate_path(:id => @section.version.phase_id, :version_id => @section.version_id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @section.errors, status: :unprocessable_entity } + end + end + end + end + + + #update a section of a template + def admin_updatesection + if user_signed_in? && current_user.is_org_admin? then + @section = Section.find(params[:id]) + @section.description = params["section-desc-#{params[:id]}"] + @version = @section.version + @phase = @version.phase + + respond_to do |format| + if @section.update_attributes(params[:section]) + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id , :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @section.errors, status: :unprocessable_entity } + end + end + end + end + + + #delete a section and questions + def admin_destroysection + if user_signed_in? && current_user.is_org_admin? then + @section = Section.find(params[:section_id]) + @version = @section.version + @phase = @version.phase + @section.destroy + + respond_to do |format| + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :edit => 'true' ), notice: I18n.t('org_admin.templates.destroyed_message') } + format.json { head :no_content } + end + end + end + + +# QUESTIONS + + #create a question + def admin_createquestion + if user_signed_in? && current_user.is_org_admin? then + @question = Question.new(params[:question]) + @question.guidance = params["new-question-guidance"] + @question.default_value = params["new-question-default-value"] + + respond_to do |format| + if @question.save + format.html { redirect_to admin_phase_dmptemplate_path(:id => @question.section.version.phase_id, :version_id => @question.section.version_id, :section_id => @question.section_id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @question.errors, status: :unprocessable_entity } + end + end + end + end + + #update a question of a template + def admin_updatequestion + if user_signed_in? && current_user.is_org_admin? then + @question = Question.find(params[:id]) + @question.guidance = params["question-guidance-#{params[:id]}"] + @question.default_value = params["question-default-value-#{params[:id]}"] + @section = @question.section + @version = @section.version + @phase = @version.phase + + respond_to do |format| + + +puts "PARAMS: #{params[:question]}" + + if @question.update_attributes(params[:question]) + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @question.errors, status: :unprocessable_entity } + end + end + end + end + + #delete a version, sections and questions + def admin_destroyquestion + if user_signed_in? && current_user.is_org_admin? then + @question = Question.find(params[:question_id]) + @section = @question.section + @version = @section.version + @phase = @version.phase + @question.destroy + + respond_to do |format| + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') } + format.json { head :no_content } + end + end + end + + + #SUGGESTED ANSWERS + #create suggested answers + def admin_createsuggestedanswer + if user_signed_in? && current_user.is_org_admin? then + @suggested_answer = SuggestedAnswer.new(params[:suggested_answer]) + + respond_to do |format| + if @suggested_answer.save + format.html { redirect_to admin_phase_dmptemplate_path(:id => @suggested_answer.question.section.version.phase_id, :version_id => @suggested_answer.question.section.version_id, :section_id => @suggested_answer.question.section_id, :question_id => @suggested_answer.question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @suggested_answer.errors, status: :unprocessable_entity } + end + end + end + end + + #update a suggested answer of a template + def admin_updatesuggestedanswer + if user_signed_in? && current_user.is_org_admin? then + @suggested_answer = SuggestedAnswer.find(params[:id]) + @question = @suggested_answer.question + @section = @question.section + @version = @section.version + @phase = @version.phase + + respond_to do |format| + if @suggested_answer.update_attributes(params[:suggested_answer]) + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @suggested_answer.errors, status: :unprocessable_entity } + end + end + end + end + + #delete a suggested answer + def admin_destroysuggestedanswer + if user_signed_in? && current_user.is_org_admin? then + @suggested_answer = SuggestedAnswer.find(params[:suggested_answer]) + @question = @suggested_answer.question + @section = @question.section + @version = @section.version + @phase = @version.phase + @suggested_answer.destroy + + respond_to do |format| + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') } + format.json { head :no_content } + end + end + end + +# GUIDANCES + + #create a guidance + def admin_createguidance + if user_signed_in? && current_user.is_org_admin? then + @question = Question.find(params[:question][:id]) + @guidance = Guidance.new(params[:guidance]) + @guidance.question_id = @question.id + #@question.guidance = params["new-question-guidance"] + #@question.default_value = params["new-question-default-value"] + + + respond_to do |format| + if @guidance.save + format.html { redirect_to admin_phase_dmptemplate_path(:id => @question.section.version.phase_id, :version_id => @question.section.version_id, :section_id => @question.section_id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.created_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @guidance.errors, status: :unprocessable_entity } + end + end + end + end + + #update a guidance of a template + def admin_updateguidance + if user_signed_in? && current_user.is_org_admin? then + @question = Question.find(params[:id]) + @question.guidance = params["question-guidance-#{params[:id]}"] + @question.default_value = params["question-default-value-#{params[:id]}"] + @section = @question.section + @version = @section.version + @phase = @version.phase + + respond_to do |format| + if @question.update_attributes(params[:question]) + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :question_id => @question.id, :edit => 'true'), notice: I18n.t('org_admin.templates.updated_message') } + format.json { head :no_content } + else + format.html { render action: "admin_phase" } + format.json { render json: @question.errors, status: :unprocessable_entity } + end + end + end + end + + #delete a version, sections and guidance + def admin_destroyguidance + if user_signed_in? && current_user.is_org_admin? then + @question = Question.find(params[:question_id]) + @section = @question.section + @version = @section.version + @phase = @version.phase + @question.destroy + + respond_to do |format| + format.html { redirect_to admin_phase_dmptemplate_path(:id => @phase.id, :version_id => @version.id, :section_id => @section.id, :edit => 'true'), notice: I18n.t('org_admin.templates.destroyed_message') } + format.json { head :no_content } + end + end + end + + +end diff --git a/config/environments/development.rb b/config/environments/development.rb index f7e72fc..7abb30e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -48,11 +48,7 @@ config.action_mailer.perform_deliveries = false # Load Branded terminology (e.g. organization name, application name, etc.) - config.branding = config_for(:branding).deep_symbolize_keys - puts "YAML: #{config_for(:branding)}" - - BetterErrors::Midleware.allow_ip! "10.0.2.2" if defined?(BetterErrors) && Rails.env == :development end diff --git a/config/environments/test.rb b/config/environments/test.rb index 7dcd3a6..20f8f5a 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -40,4 +40,4 @@ # Raises error for missing translations # config.action_view.raise_on_missing_translations = true - +end diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index 261f930..850d282 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -10,8 +10,16 @@ # set default locale to something other than :en # initializers are run before migrations, languages table might not be present - if ActiveRecord::Base.connection.tables.include?('languages') - config.i18n.default_locale = Language.where(default_language: true).first.abbreviation + if ActiveRecord::Base.connection.tables.include?('languages') && + ActiveRecord::Base.connection.column_exists?(:languages, :default_language) + + # If a default language is not defined in the DB use en-UK + if Language.where(default_language: true).empty? + config.i18n.default_locale = 'en-UK' + else + config.i18n.default_locale = Language.where(default_language: true).first.abbreviation + end + else config.i18n.default_locale = 'en-UK' # if this is not set then admin area is not working, which is required to change the default_language end diff --git a/db/migrate/20130903123015_create_friendly_id_slugs.rb b/db/migrate/20130903123015_create_friendly_id_slugs.rb index 91772b0..d8577c3 100644 --- a/db/migrate/20130903123015_create_friendly_id_slugs.rb +++ b/db/migrate/20130903123015_create_friendly_id_slugs.rb @@ -1,19 +1,19 @@ -class CreateFriendlyIdSlugs < ActiveRecord::Migration - - def self.up - create_table :friendly_id_slugs do |t| - t.string :slug, :null => false - t.integer :sluggable_id, :null => false - t.string :sluggable_type, :limit => 40 - t.datetime :created_at - end - add_index :friendly_id_slugs, :sluggable_id - add_index :friendly_id_slugs, [:slug, :sluggable_type], :unique => true - add_index :friendly_id_slugs, :sluggable_type - end - - def self.down - drop_table :friendly_id_slugs - end -end - +class CreateFriendlyIdSlugs < ActiveRecord::Migration + + def self.up + create_table :friendly_id_slugs do |t| + t.string :slug, :null => false + t.integer :sluggable_id, :null => false + t.string :sluggable_type, :limit => 40 + t.datetime :created_at + end + add_index :friendly_id_slugs, :sluggable_id + add_index :friendly_id_slugs, [:slug, :sluggable_type], :unique => true + add_index :friendly_id_slugs, :sluggable_type + end + + def self.down + drop_table :friendly_id_slugs + end +end + diff --git a/db/migrate/20140604092907_rails_settings_migration.rb b/db/migrate/20140604092907_rails_settings_migration.rb index 3f7d041..6a41dd2 100644 --- a/db/migrate/20140604092907_rails_settings_migration.rb +++ b/db/migrate/20140604092907_rails_settings_migration.rb @@ -1,15 +1,15 @@ -class RailsSettingsMigration < ActiveRecord::Migration - def self.up - create_table :settings do |t| - t.string :var, :null => false - t.text :value - t.references :target, :null => false, :polymorphic => true - t.timestamps - end - add_index :settings, [ :target_type, :target_id, :var ], :unique => true - end - - def self.down - drop_table :settings - end -end +class RailsSettingsMigration < ActiveRecord::Migration + def self.up + create_table :settings do |t| + t.string :var, :null => false + t.text :value + t.references :target, :null => false, :polymorphic => true + t.timestamps + end + add_index :settings, [ :target_type, :target_id, :var ], :unique => true + end + + def self.down + drop_table :settings + end +end diff --git a/db/schema.rb b/db/schema.rb index 22e68cf..11c49c5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,9 +10,7 @@ # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. - ActiveRecord::Schema.define(version: 20160810193149) do - create_table "answers", force: :cascade do |t| t.text "text", limit: 65535 t.integer "plan_id", limit: 4 @@ -35,7 +33,7 @@ t.text "text", limit: 65535 t.datetime "created_at" t.datetime "updated_at" - t.boolean "archived", limit: 1 + t.boolean "archived" t.integer "plan_id", limit: 4 t.integer "archived_by", limit: 4 end @@ -43,13 +41,13 @@ create_table "dmptemplates", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.boolean "published", limit: 1 + t.boolean "published" t.integer "user_id", limit: 4 t.integer "organisation_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" t.string "locale", limit: 255 - t.boolean "is_default", limit: 1 + t.boolean "is_default" end create_table "dmptemplates_guidance_groups", id: false, force: :cascade do |t| @@ -79,7 +77,7 @@ t.string "title", limit: 255 t.text "description", limit: 65535 t.integer "size", limit: 4 - t.boolean "published", limit: 1 + t.boolean "published" t.string "location", limit: 255 t.integer "file_type_id", limit: 4 t.datetime "created_at" @@ -87,7 +85,7 @@ end create_table "friendly_id_slugs", force: :cascade do |t| - t.string "slug", limit: 255, null: false + t.string "slug", limit: 191, null: false t.integer "sluggable_id", limit: 4, null: false t.string "sluggable_type", limit: 40 t.datetime "created_at" @@ -102,8 +100,8 @@ t.integer "organisation_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" - t.boolean "optional_subset", limit: 1 - t.boolean "published", limit: 1 + t.boolean "optional_subset" + t.boolean "published" end create_table "guidance_in_group", id: false, force: :cascade do |t| @@ -119,14 +117,14 @@ t.datetime "created_at" t.datetime "updated_at" t.integer "question_id", limit: 4 - t.boolean "published", limit: 1 + t.boolean "published" end create_table "languages", force: :cascade do |t| t.string "abbreviation", limit: 255 t.string "description", limit: 255 t.string "name", limit: 255 - t.boolean "default_language", limit: 1 + t.boolean "default_language" end create_table "option_warnings", force: :cascade do |t| @@ -141,7 +139,7 @@ t.integer "question_id", limit: 4 t.string "text", limit: 255 t.integer "number", limit: 4 - t.boolean "is_default", limit: 1 + t.boolean "is_default" t.datetime "created_at" t.datetime "updated_at" end @@ -172,7 +170,7 @@ t.datetime "created_at" t.datetime "updated_at" t.integer "parent_id", limit: 4 - t.boolean "is_other", limit: 1 + t.boolean "is_other" t.string "sort_name", limit: 255 t.text "banner_text", limit: 65535 t.string "logo_file_name", limit: 255 @@ -189,7 +187,7 @@ t.integer "dmptemplate_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" - t.string "slug", limit: 255 + t.string "slug", limit: 191 end add_index "phases", ["dmptemplate_id"], name: "index_phases_on_dmptemplate_id", using: :btree @@ -205,7 +203,7 @@ end create_table "plans", force: :cascade do |t| - t.boolean "locked", limit: 1 + t.boolean "locked" t.integer "project_id", limit: 4 t.integer "version_id", limit: 4 t.datetime "created_at" @@ -213,13 +211,13 @@ end create_table "project_groups", force: :cascade do |t| - t.boolean "project_creator", limit: 1 - t.boolean "project_editor", limit: 1 + t.boolean "project_creator" + t.boolean "project_editor" t.integer "user_id", limit: 4 t.integer "project_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" - t.boolean "project_administrator", limit: 1 + t.boolean "project_administrator" end create_table "project_guidance", id: false, force: :cascade do |t| @@ -234,7 +232,7 @@ t.integer "dmptemplate_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" - t.string "slug", limit: 255 + t.string "slug", limit: 191 t.integer "organisation_id", limit: 4 t.string "grant_number", limit: 255 t.string "identifier", limit: 255 @@ -266,7 +264,7 @@ t.datetime "created_at" t.datetime "updated_at" t.integer "question_format_id", limit: 4 - t.boolean "option_comment_display", limit: 1, default: true + t.boolean "option_comment_display", default: true end create_table "questions_themes", id: false, force: :cascade do |t| @@ -288,10 +286,10 @@ end create_table "roles", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name", limit: 191 t.datetime "created_at" t.datetime "updated_at" - t.boolean "role_in_plans", limit: 1 + t.boolean "role_in_plans" t.integer "resource_id", limit: 4 t.string "resource_type", limit: 255 end @@ -307,14 +305,14 @@ t.integer "organisation_id", limit: 4 t.datetime "created_at" t.datetime "updated_at" - t.boolean "published", limit: 1 + t.boolean "published" end create_table "settings", force: :cascade do |t| - t.string "var", limit: 255, null: false + t.string "var", limit: 191, null: false t.text "value", limit: 65535 t.integer "target_id", limit: 4, null: false - t.string "target_type", limit: 255, null: false + t.string "target_type", limit: 191, null: false t.datetime "created_at" t.datetime "updated_at" end @@ -333,7 +331,7 @@ t.text "text", limit: 65535 t.datetime "created_at" t.datetime "updated_at" - t.boolean "is_example", limit: 1 + t.boolean "is_example" end create_table "themes", force: :cascade do |t| @@ -388,7 +386,7 @@ create_table "users", force: :cascade do |t| t.string "firstname", limit: 255 t.string "surname", limit: 255 - t.string "email", limit: 255, default: "", null: false + t.string "email", limit: 191, default: "", null: false t.string "orcid_id", limit: 255 t.string "shibboleth_id", limit: 255 t.integer "user_type_id", limit: 4 @@ -396,7 +394,7 @@ t.datetime "created_at" t.datetime "updated_at" t.string "encrypted_password", limit: 255, default: "" - t.string "reset_password_token", limit: 255 + t.string "reset_password_token", limit: 191 t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", limit: 4, default: 0 @@ -404,16 +402,16 @@ t.datetime "last_sign_in_at" t.string "current_sign_in_ip", limit: 255 t.string "last_sign_in_ip", limit: 255 - t.string "confirmation_token", limit: 255 + t.string "confirmation_token", limit: 191 t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.string "invitation_token", limit: 255 + t.string "invitation_token", limit: 191 t.datetime "invitation_created_at" t.datetime "invitation_sent_at" t.datetime "invitation_accepted_at" t.string "other_organisation", limit: 255 - t.boolean "dmponline3", limit: 1 - t.boolean "accept_terms", limit: 1 + t.boolean "dmponline3" + t.boolean "accept_terms" t.integer "organisation_id", limit: 4 t.string "api_token", limit: 255 t.integer "invited_by_id", limit: 4 @@ -436,7 +434,7 @@ create_table "versions", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.boolean "published", limit: 1 + t.boolean "published" t.integer "number", limit: 4 t.integer "phase_id", limit: 4 t.datetime "created_at" diff --git a/db/seeds.rb b/db/seeds.rb index 8cde5a0..6109e2a 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -614,7 +614,7 @@ section: "Data Collection", number: 1, guidance: "

Questions to consider:

Guidance:

Give a brief description of the data, including any existing data or third-party sources that will be used, in each case noting its content, type and coverage. Outline and justify your choice of format and consider the implications of data format and data volumes in terms of storage, backup and access.

", - themes: ["Theme 1", "Theme 2"] + themes: ["Theme 2"] }, "How will the data be collected or created?" => { text: "How will the data be collected or created?", @@ -628,7 +628,7 @@ section: "Documentation and Metadata", number: 1, guidance: "

Questions to consider:

Guidance:

Describe the types of documentation that will accompany the data to help secondary users to understand and reuse it. This should at least include basic details that will help people to find the data, including who created or contributed to the data, its title, date of creation and under what conditions it can be accessed.

Documentation may also include details on the methodology used, analytical and procedural information, definitions of variables, vocabularies, units of measurement, any assumptions made, and the format and file type of the data. Consider how you will capture this information and where it will be recorded. Wherever possible you should identify and use existing community standards.

", - themes: ["Theme 1", "Theme 4"] + themes: ["Theme 1"] }, "Data Overview" => { text: "Overview of the Data", @@ -729,5 +729,21 @@ token_permission_type.save! end +languages = { + 'en-UK': { + abbreviation: 'en-UK', name: 'en-UK', description: 'English - UK', default_language: 0 + }, + 'en-US': { + abbreviation: 'en-US', name: 'en-US', description: 'English - US', default_language: 1 + }, + 'fr': { + abbreviation: 'fr', name: 'fr', description: 'French', default_language: 0 + }, + 'de': { + abbreviation: 'de', name: 'de', description: 'German', default_language: 0 + } +} - +languages.each do |title,settings| + Language.new(settings).save! +end