diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index e44ec67..9e7a7d5 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -39,8 +39,8 @@ @plan.data_contact = current_user.email @plan.funder_name = plan_params[:funder_name] - @plan_params.visibility = (plan_params[:visibility].blank? ? Rails.application.config.default_plan_visibility : - plan_params[:visibility]) + @plan.visibility = (plan_params['visibility'].blank? ? Rails.application.config.default_plan_visibility : + plan_params[:visibility]) # If a template hasn't been identified look for the available templates if plan_params[:template_id].blank? diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 62725b2..ba09b54 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -27,10 +27,10 @@
diff --git a/app/views/layouts/_navigation.html.erb b/app/views/layouts/_navigation.html.erb index 57bfe0b..c980f4f 100644 --- a/app/views/layouts/_navigation.html.erb +++ b/app/views/layouts/_navigation.html.erb @@ -27,7 +27,7 @@
  • > <%= link_to _('View plans'), plans_path %>
  • -
  • > +
  • > <%= link_to _('Create plan'), new_plan_path %>
  • <% else %> diff --git a/app/views/static_pages/about_us.html.erb b/app/views/static_pages/about_us.html.erb index c95e9c5..b0e80a9 100644 --- a/app/views/static_pages/about_us.html.erb +++ b/app/views/static_pages/about_us.html.erb @@ -1,67 +1,65 @@ - - +<% javascript 'static_pages/utils.js' %>

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

    - -
    -
    -
    - <%= raw _("

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

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


    How the tool works

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


    Getting Started

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

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

    Please visit the 'Help' page for guidance.


    Additional Information

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

    ") % { - :organisation_name => Rails.configuration.branding[:organisation][:name], - :organisation_abbreviation => Rails.configuration.branding[:organisation][:abbreviation], - :application_name => Rails.configuration.branding[:application][:name], - :application_url => Rails.configuration.branding[:application][:url] } %> -
    -
    - <%= raw _('

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


    ') % { - :organisation_abbreviation => Rails.configuration.branding[:organisation][:abbreviation], - :application_name => Rails.configuration.branding[:application][:name] } %> - <% news_left = @dcc_news_feed.entries.count %> - <% @dcc_news_feed.entries.each do |entry| %> -

    <%= entry.title.sanitize %>

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

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

    <%= raw summary.strip %>

    - <% author = entry.author.blank? ? 'anonymous' : entry.author %> -

    <%= _('By ') %> <%= author %> <%= _(' on ') %> <%= entry.published.strftime("%d/%m/%Y") %>

    -

    <%= _('Read more on the ') %><%= link_to 'DCC Website', entry.url %>

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

    <%= raw _("Funding bodies increasingly require their grant-holders to produce Data Management Plans(DMP), both during the bid-preparation stage and after funding has been secured. %{application_name} has been produced by the %{organisation_name} to help research teams respond to this requirement, and any expectations that their institution or others may apply.") % {:organisation_name => Rails.configuration.branding[:organisation][:name], + :organisation_abbreviation => Rails.configuration.branding[:organisation][:abbreviation], + :application_name => Rails.configuration.branding[:application][:name]} %>

    +

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


    +

    <%= _('How the tool works') %>

    +

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


    +

    <%= _('Getting Started') %>

    +

    <%= _("If you have an account please sign in and start creating or editing your DMP.") %>

    +

    <%= _("If you do not have a %{application_name} account, click on") % {:application_name => Rails.configuration.branding[:application][:name]} %> <%= _('Sign up') %> <%= _("on the homepage.") %>

    +

    <%= _("Please visit the") %> '<%= _('Help') %>' <%= _("page for guidance.") %>


    +

    <%= _("Additional Information") %>

    +

    <%= _("We are constantly improving the user interface and functionality of %{application_name}. If you would like to contribute with feedback and suggestions, please contact us by emailing") % {:application_name => Rails.configuration.branding[:application][:name]} %> <%= Rails.configuration.branding[:organisation][:email] %>. <%= _("You can also report bugs and request new features directly on") %> <%= _('GitHub') %>

    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/static_pages/roadmap.html.erb b/app/views/static_pages/roadmap.html.erb index 8ee60c7..9d9a0f2 100644 --- a/app/views/static_pages/roadmap.html.erb +++ b/app/views/static_pages/roadmap.html.erb @@ -1,32 +1,23 @@ - +<% javascript 'static_pages/utils.js' %>

    <%= _('Future plans')%>

    - -
    -
    -
    - <%= raw _("

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

    • - APIs to create plans, extract guidance and generate statistics from %{application_name}
    • - Multi-lingual support so foreign language versions can be presented
    • - Locales to provide a refined set of content for particular countries or other contexts
    • - A lifecycle to indicate the status of DMPs and allow institutional access to plans
    • - Support for reviewing Data Management Plans

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


    Current release

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

    The code is available on GitHub


    ") % { +
    + + +
    +
    +

    <%= raw _("The %{organisation_abbreviation} are now collaborating to develop a joint codebase for Data Management Planning called") %> <%= Rails.configuration.branding[:application][:name] %>. <%= _("Both of our tools will be delivered using this in the future. We've agreed what features need to be included and are planning a few sprints to deliver these. The initial release will include all of the main priorities we already had flagged, including:

    • - APIs to create plans, extract guidance and generate statistics from %{application_name}
    • - Multi-lingual support so foreign language versions can be presented
    • - Locales to provide a refined set of content for particular countries or other contexts
    • - A lifecycle to indicate the status of DMPs and allow institutional access to plans
    • - Support for reviewing Data Management Plans

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


    Current release

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

    The code is available on GitHub


    ") % { :organisation_email => Rails.configuration.branding[:organisation][:email], :organisation_abbreviation => Rails.configuration.branding[:organisation][:abbreviation], :application_name => Rails.configuration.branding[:application][:name], @@ -34,7 +25,8 @@ :application_version => Rails.configuration.branding[:application][:version], :application_release_notes_url => Rails.configuration.branding[:application][:release_notes_url] } %>
    -
    +
    <%= raw _("

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

    Join the user group

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

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

    Notes from previous user group sessions are provided below:

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


    Customise %{application_name}

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

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


    Contribute to the code

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

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

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

    The code is available on GitHub

    Support our work

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

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

    ") % { organisation_name: Rails.configuration.branding[:organisation][:name], organisation_email: Rails.configuration.branding[:organisation][:email], diff --git a/config/application.rb b/config/application.rb index 3b1c1d8..2999b56 100644 --- a/config/application.rb +++ b/config/application.rb @@ -94,7 +94,8 @@ plans/index.js plans/new.js shared/login_form.js - shared/register_form.js) + shared/register_form.js + static_pages/utils.js) config.autoload_paths += %W(#{config.root}/lib) config.action_controller.include_all_helpers = true diff --git a/lib/assets/javascripts/static_pages/utils.js b/lib/assets/javascripts/static_pages/utils.js new file mode 100644 index 0000000..5e99ca3 --- /dev/null +++ b/lib/assets/javascripts/static_pages/utils.js @@ -0,0 +1,19 @@ +$(document).ready(function(){ + $(".tab-panels div.tab-panel:not(.active)").hide(); + + $("li[role='tab'] a").click(function(e){ + e.preventDefault(); + + // Unselect the other tabs + $("li[role='tab']").removeClass('active').children('a').attr('aria-selected', 'false'); + // Select the current tab + $(this).attr('aria-selected', 'true').parent().addClass('active'); + + // Display the corresponding panel + let panel = $($(this).attr("href")); + panel.show().attr("aria-hidden", 'false'); + $.each($(panel).siblings(), function(i, p){ + $(p).hide().attr("aria-hidden", 'true'); + }); + }); +}); diff --git a/lib/assets/stylesheets/roadmap-hacks.scss b/lib/assets/stylesheets/roadmap-hacks.scss index 5a51f47..dd23cc9 100644 --- a/lib/assets/stylesheets/roadmap-hacks.scss +++ b/lib/assets/stylesheets/roadmap-hacks.scss @@ -62,4 +62,83 @@ overflow: hidden; padding-bottom: 45px; margin-bottom: 45px; -} \ No newline at end of file +} + +html.dmponline { + background: none; +} + +/* Override the color scheme settings in bootstrap_and_overrides and the admin css files */ +/* --------------------------------------------------------------------------------------------- */ +a:hover, +#create-test:hover, +.dmp_table_link:hover, +.signIn ul li a, .signIn ul li a:visited, .signIn ul li a:active, .signIn ul li a:hover, .signIn ul li a:link, +ul.tabs li a:hover, +.navbar { + color: $primary-color !important; +} + +#main-nav-tabs ul { + border-bottom: none; +} +#main-nav-tabs li a, +#project-tabs li a { + color: $white; + background-color: $primary-color; + border-bottom: 1px solid $primary-color; +} +#main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover, lang-dropdown-link:hover, +#project-tabs li.active a, #project-tabs li.active a:active, #project-tabs li a:hover { + color: $primary-color !important; + background: $white; + border-left: 1px solid $primary-color; + border-top: 1px solid $primary-color; + border-right: 1px solid $primary-color; + border-bottom: none; +} + +.caret, .caret-orange { + border-top: 4px solid $primary-color !important; + border-bottom-color: $primary-color !important; +} + +.question-divider, +#plan-guidance-accordion > .accordion-group > .accordion-heading { + border-bottom: 1px solid $primary-color; +} + +ul#signIn_dropdown { + background-color: $light-grey !important; +} + +body.dmponline { + .btn-primary, .btn-primary:focus, .btn-primary:active, .btn-primary:visited, .btn-primary:link, + .dmp_toolbar, + .dmp_table thead, + .accordion-heading, + .progress .bar, + .section-status { + background: $primary-color; + } + + .accordion-heading { + color: $white; + border: 1px solid $primary-color; + } + + table.dmp_table tbody td, { + border-bottom: 1px solid $light-grey; + } + + div.dmp_details_body, + div.roadmap-info-box, + .tab-panel, + #create_plan, #sign-in-panel, #create-account-panel { + border: 1px solid $primary-color; + border-radius: 5px; + } + table.dmp_details_table tr td.first { + border-right: 1px solid $primary-color; + } +} diff --git a/lib/assets/stylesheets/roadmap-tabs.scss b/lib/assets/stylesheets/roadmap-tabs.scss index 9913fd5..d5b7be6 100644 --- a/lib/assets/stylesheets/roadmap-tabs.scss +++ b/lib/assets/stylesheets/roadmap-tabs.scss @@ -18,6 +18,7 @@ left: 1px; color: $white; background-color: $primary-color; + border-bottom: 2px solid $primary-color; text-decoration: none; font-weight: bold; } @@ -27,6 +28,9 @@ li.active a:hover { color: $primary-color; background-color: $white; + border: 1px solid $primary-color; + border-bottom: 2px solid $white; + z-index: 1; } } .tabs:after { @@ -49,6 +53,11 @@ top: -1px; left: 0; width: 100%; + border: 1px solid $primary-color; + border-top-left-radius: 0; + border-top-right-radius: 5px; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; } .tab-panel div.active { z-index: 1; diff --git a/lib/assets/stylesheets/roadmap.scss b/lib/assets/stylesheets/roadmap.scss index a54c03e..0088f04 100644 --- a/lib/assets/stylesheets/roadmap.scss +++ b/lib/assets/stylesheets/roadmap.scss @@ -5,16 +5,16 @@ $black: #000; $white: #FFF; -$error-color: #CC0000; -$error-background: #FFE6E6; +$error-color: #FFF; +$error-background: #827D7E; $dark-grey: #333; $medium-grey: #827D7E; $light-grey: #CCC; -$primary-color: #F49700; -$primary-admin-color: #0057A7; +$primary-color: #36421A; +$primary-admin-color: #36421A; $disabled-button-color: #CCC; -$cancel-button-color: #827D7E; +$cancel-button-color: #36421A; $reverse-text: #FFF; /* See `.combobox-clear-button` for an example of this mixin in use */ @@ -23,6 +23,15 @@ @extend .fa-#{$icon}:before; } +html.dmponline { + background-color: $white; +} + +h1, h2, h3, h4, h5, +a, a:hover, a:visited, a:active, a:link { + color: $primary-color; +} + /* This class will ensure that the item is hidden for sighted users and that it does not take up space */ /* For example:

    <%= _('Create account') %>

    */ .aria-only {