diff --git a/app/controllers/annotations_controller.rb b/app/controllers/annotations_controller.rb index dd87dbc..0558760 100644 --- a/app/controllers/annotations_controller.rb +++ b/app/controllers/annotations_controller.rb @@ -16,6 +16,7 @@ # if they dont exist, no requirement for them to be saved ex_save = example_answer.present? ? example_answer.save : true guid_save = guidance.present? ? guidance.save : true + @question.section.phase.template.dirty = true if ex_save && guid_save typ = (example_answer.present? && guidance.present? ? 'example answer and guidance' : (guidance.present? ? 'guidance' : 'example answer')) @@ -74,6 +75,8 @@ @section = @question.section @phase = @section.phase + @phase.template.dirty = true + if ex_save && guid_save typ = (example_answer.present? && guidance.present? ? 'example answer and guidance' : (guidance.present? ? 'guidance' : 'example answer')) redirect_to admin_show_phase_path(id: @phase.id, section_id: @section.id, question_id: @question.id, edit: 'true'), notice: success_message(typ, _('saved')) @@ -97,6 +100,7 @@ @question = @example_answer.question @section = @question.section @phase = @section.phase + @phase.template.dirty = true if @example_answer.destroy redirect_to admin_show_phase_path(id: @phase.id, section_id: @section.id, edit: 'true'), notice: success_message(_('information'), _('deleted')) else @@ -115,4 +119,4 @@ return annotation end -end \ No newline at end of file +end diff --git a/app/controllers/phases_controller.rb b/app/controllers/phases_controller.rb index 668742e..6275b15 100644 --- a/app/controllers/phases_controller.rb +++ b/app/controllers/phases_controller.rb @@ -29,17 +29,19 @@ # where guidance is a hash with the text and the org name theme_guidance = {} - guidance_groups.each do |guidance_group| - guidance_group.guidances.where(published: true).each do |guidance| - guidance.themes.each do |theme| - title = theme.title - if !theme_guidance.has_key?(title) - theme_guidance[title] = Array.new + guidance_groups.includes(guidances:[:themes]).each do |guidance_group| + guidance_group.guidances.each do |guidance| + if guidance.published + guidance.themes.each do |theme| + title = theme.title + if !theme_guidance.has_key?(title) + theme_guidance[title] = Array.new + end + theme_guidance[title] << { + text: guidance.text, + org: guidance_group.name + ':' + } end - theme_guidance[title] << { - text: guidance.text, - org: guidance_group.name + ':' - } end end end diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 5a8687c..93b9508 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -423,10 +423,10 @@ def template_options(org_id, funder_id) @templates = [] - if !org_id.blank? || !funder_id.blank? + if org_id.present? || funder_id.present? if funder_id.blank? # Load the org's template(s) - unless org_id.nil? + if org_id.present? org = Org.find(org_id) @templates = Template.valid.where(published: true, org: org, customization_of: nil).to_a @msg = _("We found multiple DMP templates corresponding to the research organisation.") if @templates.count > 1 @@ -437,20 +437,20 @@ # Load the funder's template(s) @templates = Template.valid.where(published: true, org: funder).to_a - unless org_id.blank? + if org_id.present? org = Org.find(org_id) # Swap out any organisational cusotmizations of a funder template @templates.each do |tmplt| customization = Template.valid.find_by(published: true, org: org, customization_of: tmplt.dmptemplate_id) - unless customization.nil? + if customization.present? && tmplt.updated_at < customization.created_at @templates.delete(tmplt) @templates << customization end end end - msg = _("We found multiple DMP templates corresponding to the funder.") if @templates.count > 1 + @msg = _("We found multiple DMP templates corresponding to the funder.") if @templates.count > 1 end end diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 4001bbe..696a8de 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -11,7 +11,7 @@ def admin_index authorize Template - funder_templates, org_templates, customizations = [], [], [] + funder_templates, org_templates = [], [] # Get all of the unique template family ids (dmptemplate_id) for each funder and the current org funder_ids = Org.funders.includes(:templates).collect{|f| f.templates.where(published: true).valid.collect{|ft| ft.dmptemplate_id } }.flatten.uniq @@ -55,6 +55,7 @@ random = rand 2147483647 break random unless Template.exists?(dmptemplate_id: random) end + customisation.dirty = true customisation.save customisation.phases.includes(:sections, :questions).each do |phase| @@ -131,7 +132,7 @@ # find corresponding question in new template customization_question = customization_section.questions.where(number: question.number).first # apply annotations - question.annotations.each do |annotation| + question.annotations.where(org_id: current_user.org_id).each do |annotation| annotation_copy = Annotation.deep_copy(annotation) annotation_copy.question_id = customization_question.id annotation_copy.save! @@ -213,7 +214,7 @@ new_version.save @template = new_version # @current = Template.current(@template.dmptemplate_id) - end + end else flash[:notice] = _('You are viewing a historical version of this template. You will not be able to make changes.') end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1915dc5..1aa751c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -44,7 +44,7 @@ else if perms.include? perm @user.perms << perm - if perm.name == Perm.use_api.id + if perm.id == Perm.use_api.id @user.keep_or_generate_token! end end diff --git a/app/dashboards/exported_plan_dashboard.rb b/app/dashboards/exported_plan_dashboard.rb index 47b352e..ec618cf 100644 --- a/app/dashboards/exported_plan_dashboard.rb +++ b/app/dashboards/exported_plan_dashboard.rb @@ -15,6 +15,7 @@ format: Field::String, created_at: Field::DateTime, updated_at: Field::DateTime, + phase_id: Field::Number, }.freeze # COLLECTION_ATTRIBUTES @@ -39,6 +40,7 @@ :format, :created_at, :updated_at, + :phase_id, ].freeze # FORM_ATTRIBUTES @@ -49,6 +51,7 @@ :user, :setting_objects, :format, + :phase_id, ].freeze # Overwrite this method to customize how exported plans are displayed diff --git a/app/dashboards/guidance_dashboard.rb b/app/dashboards/guidance_dashboard.rb index 8e6427f..c76c41b 100644 --- a/app/dashboards/guidance_dashboard.rb +++ b/app/dashboards/guidance_dashboard.rb @@ -10,7 +10,6 @@ ATTRIBUTE_TYPES = { guidance_group: Field::BelongsTo, themes: Field::HasMany, - guidance_groups: Field::HasMany, id: Field::Number, text: Field::Text, created_at: Field::DateTime, @@ -27,8 +26,8 @@ COLLECTION_ATTRIBUTES = [ :guidance_group, :themes, - :guidance_groups, :id, + :text, ].freeze # SHOW_PAGE_ATTRIBUTES @@ -36,7 +35,6 @@ SHOW_PAGE_ATTRIBUTES = [ :guidance_group, :themes, - :guidance_groups, :id, :text, :created_at, @@ -51,7 +49,6 @@ FORM_ATTRIBUTES = [ :guidance_group, :themes, - :guidance_groups, :text, :question_id, :published, diff --git a/app/dashboards/guidance_group_dashboard.rb b/app/dashboards/guidance_group_dashboard.rb index a8a83cc..76e2f09 100644 --- a/app/dashboards/guidance_group_dashboard.rb +++ b/app/dashboards/guidance_group_dashboard.rb @@ -10,6 +10,7 @@ ATTRIBUTE_TYPES = { org: Field::BelongsTo, guidances: Field::HasMany, + plans: Field::HasMany, id: Field::Number, name: Field::String, created_at: Field::DateTime, @@ -24,10 +25,11 @@ # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ + :name, :org, :guidances, +# :plans, :id, - :name, ].freeze # SHOW_PAGE_ATTRIBUTES @@ -35,6 +37,7 @@ SHOW_PAGE_ATTRIBUTES = [ :org, :guidances, +# :plans, :id, :name, :created_at, @@ -49,6 +52,7 @@ FORM_ATTRIBUTES = [ :org, :guidances, +# :plans, :name, :optional_subset, :published, @@ -60,7 +64,6 @@ # def display_resource(guidance_group) # "GuidanceGroup ##{guidance_group.id}" # end - def display_resource(guidance_group) guidance_group.name end diff --git a/app/dashboards/org_dashboard.rb b/app/dashboards/org_dashboard.rb index c00db7b..72f8962 100644 --- a/app/dashboards/org_dashboard.rb +++ b/app/dashboards/org_dashboard.rb @@ -43,7 +43,7 @@ :abbreviation, :language, :guidance_groups, - :templates, +# :templates, :contact_email, :org_type, ].freeze @@ -55,7 +55,7 @@ :abbreviation, :language, :guidance_groups, - :templates, +# :templates, :contact_email, :org_type, :users, diff --git a/app/dashboards/plan_dashboard.rb b/app/dashboards/plan_dashboard.rb index cb3b724..e22c30f 100644 --- a/app/dashboards/plan_dashboard.rb +++ b/app/dashboards/plan_dashboard.rb @@ -17,12 +17,10 @@ notes: Field::HasMany, roles: Field::HasMany, users: Field::HasMany, - plans_guidance_groups: Field::HasMany, guidance_groups: Field::HasMany, exported_plans: Field::HasMany, setting_objects: Field::HasMany.with_options(class_name: "Settings::Template"), id: Field::Number, - project_id: Field::Number, title: Field::String, created_at: Field::DateTime, updated_at: Field::DateTime, @@ -61,12 +59,10 @@ :notes, :roles, :users, - :plans_guidance_groups, :guidance_groups, :exported_plans, :setting_objects, :id, - :project_id, :title, :created_at, :updated_at, @@ -94,11 +90,9 @@ :notes, :roles, :users, - :plans_guidance_groups, :guidance_groups, :exported_plans, :setting_objects, - :project_id, :title, :slug, :grant_number, diff --git a/app/dashboards/question_dashboard.rb b/app/dashboards/question_dashboard.rb index af3d8bb..cda2c4c 100644 --- a/app/dashboards/question_dashboard.rb +++ b/app/dashboards/question_dashboard.rb @@ -17,7 +17,6 @@ id: Field::Number, text: Field::Text, default_value: Field::Text, - guidance: Field::Text, number: Field::Number, created_at: Field::DateTime, updated_at: Field::DateTime, @@ -49,7 +48,6 @@ :id, :text, :default_value, - :guidance, :number, :created_at, :updated_at, @@ -69,7 +67,6 @@ :question_format, :text, :default_value, - :guidance, :number, :option_comment_display, :modifiable, diff --git a/app/dashboards/template_dashboard.rb b/app/dashboards/template_dashboard.rb index cfaa8e0..7a5a313 100644 --- a/app/dashboards/template_dashboard.rb +++ b/app/dashboards/template_dashboard.rb @@ -28,6 +28,8 @@ visibility: Field::Number, customization_of: Field::Number, dmptemplate_id: Field::Number, + migrated: Field::Boolean, + dirty: Field::Boolean, }.freeze # COLLECTION_ATTRIBUTES @@ -67,6 +69,8 @@ :visibility, :customization_of, :dmptemplate_id, + :migrated, + :dirty, ].freeze # FORM_ATTRIBUTES @@ -90,6 +94,8 @@ :visibility, :customization_of, :dmptemplate_id, + :migrated, + :dirty, ].freeze # Overwrite this method to customize how templates are displayed diff --git a/app/dashboards/theme_dashboard.rb b/app/dashboards/theme_dashboard.rb index 40f8b3d..2be7c8d 100644 --- a/app/dashboards/theme_dashboard.rb +++ b/app/dashboards/theme_dashboard.rb @@ -60,4 +60,7 @@ # def display_resource(theme) # "Theme ##{theme.id}" # end + def display_resource(theme) + "Theme: #{theme.title} (##{theme.id})" + end end diff --git a/app/models/plan.rb b/app/models/plan.rb index fd828e4..84f2a76 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -160,7 +160,7 @@ # find all the themes in this plan # and get the guidance groups they belong to ggroups = [] - self.template.phases.each do |phase| + Template.includes(phases: [sections: [questions: [themes: [guidances: [guidance_group: :org]]]]]).find(self.template_id).phases.each do |phase| phase.sections.each do |section| section.questions.each do |question| question.themes.each do |theme| diff --git a/app/models/user.rb b/app/models/user.rb index 94918ec..d4e0543 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -46,7 +46,7 @@ ## # Scopes - default_scope { includes(:org, :perms, :plans) } + default_scope { includes(:org, :perms) } diff --git a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb index 1a33004..65ca8fb 100644 --- a/app/views/devise/registrations/_external_identifier_shibboleth.html.erb +++ b/app/views/devise/registrations/_external_identifier_shibboleth.html.erb @@ -16,7 +16,6 @@ <% title = _("Unlink your account from #{scheme.description}. You can link again at any time.") %> <%= link_to ''.html_safe, destroy_user_identifier_path(id), method: :delete, title: title, 'aria-label': title, - 'data-toggle': "modal", 'dialog-width': "450px", data: {confirm: _("Are you sure you want to unlink #{scheme.description} ID?")} %> <% end %> \ No newline at end of file diff --git a/app/views/devise/registrations/_personal_details.html.erb b/app/views/devise/registrations/_personal_details.html.erb index 692c43c..5ed5eb3 100644 --- a/app/views/devise/registrations/_personal_details.html.erb +++ b/app/views/devise/registrations/_personal_details.html.erb @@ -119,10 +119,3 @@ <% end %> - - - diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index d9242fa..cbf6238 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -4,13 +4,12 @@ <% unless session["devise.shibboleth_data"].nil? %>

- <%= (_("%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
* If you do not have an account with %{application_name}, please complete the form below.
* If you have an account with %{application_name}, please Sign in so we can link your account to your institutional credentials.
Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly.") % { :application_name => Rails.configuration.branding[:application][:name] }).html_safe %> + <%= (_("%{application_name} doesn't recognise your institutional credentials - either you haven't created an account with us or you haven't linked these details to your existing account.
* If you do not have an account with %{application_name}, please complete the form below.
* If you have an account with %{application_name}, please so we can link your account to your institutional credentials.
Once you have created and/or linked your account, you'll be able to sign in with your institutional credentials directly.") % { :application_name => Rails.configuration.branding[:application][:name] }).html_safe %>

<% cookies[:show_shib_link] = { value: 'show_shib_link', expires: 3.hours.from_now } %> <% end %> -
diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb index bd1d437..c3f2604 100644 --- a/app/views/guidance_groups/admin_edit.html.erb +++ b/app/views/guidance_groups/admin_edit.html.erb @@ -20,19 +20,16 @@
- - <% if @guidance_group.published == true then %> -
- <%= f.label _('Published'), for: :published %> - <%= f.check_box :published %> -
- <% lbl = _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %> - - -
+
+ <%= f.label _('Published'), for: :published %> + <%= f.check_box :published %> +
+ <% lbl = _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %> + +
- <% end %> +
<%= f.label _('Optional Subset'), for: :optional_subset %> diff --git a/app/views/guidances/_DELETE_add_guidance.html.erb b/app/views/guidances/_DELETE_add_guidance.html.erb deleted file mode 100644 index c0586f3..0000000 --- a/app/views/guidances/_DELETE_add_guidance.html.erb +++ /dev/null @@ -1,87 +0,0 @@ - -
- <%= form_for :guidance, url: {action: "admin_create"}, html: {id: "new_guidance_form"} do |f| %> - - - - - - - - - - - - - - - - - -
<%= _('Text') %> -
- <%= text_area_tag("guidance-text", "", class: "tinymce") %> -
-
- - -
-
-
<%= _('Should this guidance apply:') %> - -
<%= _('Published') %> -
- <%= f.check_box :published , as: :check_boxes %> -
-
<%= _('Guidance group') %> -
- <%= f.collection_select(:guidance_group_ids, - GuidanceGroup.where(org_id: current_user.org_id).order("name ASC"), - :id, :name, {prompt: false, include_blank: _('None')}, {multiple: false})%> -
-
- - -
-
-
- - - -
- <%= _('Save')%> - - <%= link_to _('Cancel'), :back, class: "btn cancel" %> -
-
- <% end %> -
- - - - - \ No newline at end of file diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb index 57097a1..952f800 100644 --- a/app/views/guidances/admin_edit.html.erb +++ b/app/views/guidances/admin_edit.html.erb @@ -1,11 +1,8 @@ -<% javascript 'views/guidances/admin_edit.js' %> -

<%= _('Guidance') %>

-
<%= form_for(@guidance, url: admin_update_guidance_path(@guidance), html: { method: :put , id: 'edit_guidance_form', class: 'roadmap-form bordered'}) do |f| %> @@ -46,7 +43,7 @@
- + \ No newline at end of file diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index b2d68de..42240e7 100644 --- a/app/views/guidances/admin_new.html.erb +++ b/app/views/guidances/admin_new.html.erb @@ -47,7 +47,7 @@
- + \ No newline at end of file diff --git a/app/views/layouts/_branding.html.erb b/app/views/layouts/_branding.html.erb index 1870dc0..62ec0d1 100644 --- a/app/views/layouts/_branding.html.erb +++ b/app/views/layouts/_branding.html.erb @@ -1,16 +1,95 @@ - -
- <% if user_signed_in? %> - <% if !current_user.org.nil? %> - - <% if current_user.org.banner_text.present? %> -
- - <%= raw current_user.org.banner_text %> - -
- <%end%> - - <%end%> - <%end%> -
\ No newline at end of file + diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 44cb3a6..d9ebf63 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,18 +1,24 @@ - -
-
- diff --git a/app/views/layouts/_signin_signout.html.erb b/app/views/layouts/_signin_signout.html.erb index 613520d..22f189c 100644 --- a/app/views/layouts/_signin_signout.html.erb +++ b/app/views/layouts/_signin_signout.html.erb @@ -1,38 +1,48 @@ + +<% if MANY_LANGUAGES %> + +<% end %> + <% if user_signed_in? %> - - <%= _('Signed in as') %> <%= current_user.name(false) %> - - | - - <%= link_to _('Logout'), destroy_user_session_path, method: :delete, class: "left-indent right-indent" %> - | - + <% else %> <% if !isActivePage(root_path) %> - - <%= _('Sign in')%> - - | +
  • + + + <%= _('Sign in') %> + +
  • + <%= render partial: 'shared/login_form', layout: 'shared/modal', locals: { id: "header-signin", title: _('Sign in')} %> + <% end %> <% end %> - -<% if MANY_LANGUAGES %> - - - <%= _('Choose your language') %> - - -<% end %> - -<% if !user_signed_in? && !isActivePage(root_path) then %> - -<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index bc4213e..7cb9508 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,13 +8,13 @@ - + <%= stylesheet_link_tag "application" %> - + <%= javascript_include_tag "application"%> - + - + <%= yield(:head) %> <%= csrf_meta_tags %> @@ -49,44 +49,47 @@ - + -
    - - -
    - <%= render "layouts/header" %> + +
    + <%= render partial: "layouts/header" %>
    - <% + <% has_alert = (alert || flash[:alert] || flash[:error]) has_notice = (notice || flash[:notice]) %> -
    > - - <%= has_alert ? _('Error:') : _('Notice:') %> - <%= raw (has_alert ? alert : notice) %> -
    - -
    + +
    +
    + + <%= has_alert ? _('Error:') : _('Notice:') %> + <%= raw (has_alert ? alert : notice) %> +
    <%= yield %>
    -
    +
    <%= render "layouts/footer" %>
    + + + + -
    + diff --git a/app/views/orgs/shibboleth_ds.html.erb b/app/views/orgs/shibboleth_ds.html.erb index 638d43f..4d6ee9d 100644 --- a/app/views/orgs/shibboleth_ds.html.erb +++ b/app/views/orgs/shibboleth_ds.html.erb @@ -82,7 +82,11 @@

    - <%= _('Institution not in the list?') %> <%= _('Create an account with any email address')%> + <%= _('Institution not in the list?') %>  +

    + <%= render partial: 'shared/signin' %>
    diff --git a/app/views/phases/edit.html.erb b/app/views/phases/edit.html.erb index 22f8293..9debccc 100644 --- a/app/views/phases/edit.html.erb +++ b/app/views/phases/edit.html.erb @@ -1,4 +1,3 @@ -<% javascript('views/answers/status.js') %> - - @@ -160,11 +132,4 @@ - - - -
    -<%= render :partial => "plans/export", locals: {plan: @plan, plan_data: @plan_data, phase: @phase } %> -
    \ No newline at end of file + \ No newline at end of file diff --git a/app/views/plans/_guidance_settings.html.erb b/app/views/plans/_guidance_settings.html.erb deleted file mode 100644 index 562f421..0000000 --- a/app/views/plans/_guidance_settings.html.erb +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/app/views/public_pages/plan_index.html.erb b/app/views/public_pages/plan_index.html.erb index 3ea9622..f8fb614 100644 --- a/app/views/public_pages/plan_index.html.erb +++ b/app/views/public_pages/plan_index.html.erb @@ -3,11 +3,6 @@

    <%= raw _('Public DMPs') %>

    -
    -
    - -
    -
    <% if @plans.count > 0 %>

    @@ -18,25 +13,29 @@ <%= _("There are currently no public DMPs.")%>

    <% end %> +
    +
    +
    +
    <% if @plans.count > 0 %> -
    - +
    +
    <% if @plans.count > TABLE_FILTER_MIN_ROWS %> - <% end %> - - - - - + + + + + @@ -46,10 +45,8 @@ - <% end %> diff --git a/app/views/public_pages/template_index.html.erb b/app/views/public_pages/template_index.html.erb index e49f7a1..b081e20 100644 --- a/app/views/public_pages/template_index.html.erb +++ b/app/views/public_pages/template_index.html.erb @@ -1,41 +1,41 @@

    <%= raw _('DMP Templates') %>

    + + <% if @templates.count > 0 %> +

    <%= _('Templates are provided by a funder, an institution, or a trusted party.') %>

    + <% else %> +

    <%= _('There are currently no public Templates.')%>

    + <% end %>
    <% if @templates.count > 0 %> -

    <%= _('Templates are provided by a funder, an institution, or a trusted party.') %>

    - <% else %> -

    <%= _('There are currently no public Templates.')%>

    - <% end %> - - <% if @templates.count > 0 %> -
    -
    + <%= render(partial: "shared/table_filter", locals: {path: public_plans_path, placeholder: _('Filter plans')}) %> - +
    <%= _('Project Title') %><%= _('Template') %><%= _('Institution') %><%= _('Owner') %><%= _('Download') %><%= _('Project Title') %><%= _('Template') %><%= _('Institution') %><%= _('Owner') %><%= _('Download') %>
    <%= plan.template.title %> <%= (plan.owner.nil? || plan.owner.org.nil? ? _('Not Applicable') : plan.owner.org.name) %> <%= (plan.owner.nil? ? _('Unknown') : plan.owner.name(false)) %> - <%= link_to _('PDF'), - plan_export_path(plan, format: :pdf), - class: "dmp_table_link" %> + + <%= link_to _('PDF'), plan_export_path(plan, format: :pdf), class: "dmp_table_link" %>
    +
    +
    <% if @templates.count > TABLE_FILTER_MIN_ROWS %> - <% end %> - - - + + + <% @templates.each do |template| %> - + - diff --git a/app/views/shared/_login_form.html.erb b/app/views/shared/_login_form.html.erb index eabb69f..18a4b52 100644 --- a/app/views/shared/_login_form.html.erb +++ b/app/views/shared/_login_form.html.erb @@ -12,42 +12,42 @@ <%else%> <%= f.hidden_field :shibboleth_id, :value => session[:shibboleth_data][:uid] %> - <%end%> + <%end%> - +

    - <%= _('or') %> -

    <% end %> - - + +
    <%= f.label(:email, _('Email'), class: 'required') %> <%= f.email_field(:email, class: 'left-indent required') %> - +
    <%= f.label :remember_me, _('Remember email'), class: "remember_div checkbox-label" %> <%= f.check_box :remember_me %>
    - +
    <%= f.label(:password, _('Password'), class: 'required') %> <%= f.password_field(:password, class: 'left-indent required') %> - +
    <%= label_tag(:password_show, _('Show password'), class: 'checkbox-label') %> <%= check_box_tag(:password_show, "1", false) %>
    - +
    <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'sign-in-button', - val: _('Sign In'), + locals: {id: 'sign-in-button', + val: _('Sign In'), disabled_initially: true, classes: 'small-input-button left-indent', tooltip: _('Enter your email and password.')} %> @@ -57,4 +57,4 @@
    -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/shared/_modal.html.erb b/app/views/shared/_modal.html.erb new file mode 100644 index 0000000..f0787c4 --- /dev/null +++ b/app/views/shared/_modal.html.erb @@ -0,0 +1,23 @@ + + \ No newline at end of file diff --git a/app/views/shared/_register_form.html.erb b/app/views/shared/_register_form.html.erb index d2f1862..f5bac37 100644 --- a/app/views/shared/_register_form.html.erb +++ b/app/views/shared/_register_form.html.erb @@ -36,7 +36,7 @@ <%= _("My organisation isn't listed.") %> <% other_organisations = Org.where("parent_id IS ? AND is_other = ?", nil, true).pluck(:id) %> -
    + <%= render(partial: "shared/table_filter", - locals: {path: public_templates_path, placeholder: _('Filter templates')}) %> - + locals: {path: public_templates_path, placeholder: _('Filter templates')}) %> +
    <%= _('Template Name') %><%= _('Organisation Name') %><%= _('Download') %><%= _('Template Name') %><%= _('Organisation Name') %><%= _('Download') %>
    <%= template.title %> <%= template.org.name %> + <%= link_to _('DOCX'), template_export_path(template.dmptemplate_id, format: :docx) %> <%= link_to _('PDF'), template_export_path(template.dmptemplate_id, format: :pdf) %>