diff --git a/app/views/templates/_edit_template.html.erb b/app/views/templates/_edit_template.html.erb index 0675243..8077da0 100644 --- a/app/views/templates/_edit_template.html.erb +++ b/app/views/templates/_edit_template.html.erb @@ -4,34 +4,34 @@
- + + class: 'text_field has-tooltip', 'data-toggle' => "tooltip", title: _('Please enter a title for your template.') %> - + - + - + - + @@ -40,8 +40,8 @@
- <%= f.submit t('helpers.submit.save'), class: 'btn btn-primary' %> - <%= link_to t('helpers.submit.cancel'), admin_template_template_path(template), class: 'btn cancel' %> + <%= f.submit _('Save'), class: 'btn btn-primary' %> + <%= link_to _('Cancel'), admin_template_template_path(template), class: 'btn cancel' %>

diff --git a/app/views/templates/_show_phases_sections.html.erb b/app/views/templates/_show_phases_sections.html.erb index 33f29df..ec0a5df 100644 --- a/app/views/templates/_show_phases_sections.html.erb +++ b/app/views/templates/_show_phases_sections.html.erb @@ -12,26 +12,26 @@ <% if phase.sections.length > 0 %> - <%= link_to t("helpers.preview"), admin_preview_phase_path(id: phase.id), class: 'btn btn-primary'%> + <%= link_to _('Preview'), admin_preview_phase_path(id: phase.id), class: 'btn btn-primary'%> <% end %> <% if !phase.template.published? %> - <%= link_to t("helpers.submit.delete"), admin_destroy_phase_path(phase_id: phase.id), - confirm: t("org_admin.templates.phase_delete_message", phase_title: phase.title ), method: :delete, class: "btn btn-primary"%> + <%= link_to _('Delete'), admin_destroy_phase_path(phase_id: phase.id), + confirm: _('You are about to delete '%{phase_title}'. This will affect versions, sections and questions linked to this phase. Are you sure?') % { :phase_title => phase.title }, method: :delete, class: "btn btn-primary"%> <% end %> <% if !phase.modifiable %> - <% b_label = t('org_admin.templates.view_phase_label')%> + <% b_label = _('View phase')%> <% else %> - <% b_label = t('org_admin.templates.edit_phase_label')%> + <% b_label = _('Edit phase')%> <% end %> - <%= link_to b_label, admin_show_phase_path(id: phase.id, edit: (b_label == t('org_admin.templates.edit_phase_label'))), class: "btn btn-primary" %> + <%= link_to b_label, admin_show_phase_path(id: phase.id, edit: (b_label == _('org_admin.templates.edit_phase_label'))), class: "btn btn-primary" %> <% if phase.sections.any? %>
<%= t('org_admin.templates.title_label') %><%= _('Title') %> <%= f.text_field :title, as: :string, - class: 'text_field has-tooltip', 'data-toggle' => "tooltip", title: t('org_admin.templates.title_help_text') %>
<%= t('org_admin.templates.desc_label') %><%= _('Description') %>
<%= text_area_tag("template-desc", template.description, class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'template_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.desc_help_text_html'))%> + <%= link_to( image_tag('help_button.png'), '#', class: 'template_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences'))%>
<%= t('org_admin.templates.published_label') %><%= _('Published') %> <%= f.check_box :published, as: :check_boxes %>
<%= t('org_admin.templates.created') %><%= _('Created at') %> <%= l template.created_at.to_date, formats: :short %>
<%= t('org_admin.templates.last_updated') %><%= _('Last updated') %> <%= l template.updated_at.to_date, formats: :short %>
- - + + diff --git a/app/views/templates/_show_template.html.erb b/app/views/templates/_show_template.html.erb index 6bc7aa4..6e5b583 100644 --- a/app/views/templates/_show_template.html.erb +++ b/app/views/templates/_show_template.html.erb @@ -3,7 +3,7 @@ <% if template.org.not_funder? || current_user.org.funder? then %>

- <%= link_to t("org_admin.templates.edit_details"), '# ', class: "btn btn-primary", id: "edit_template_button"%> + <%= link_to _('Edit template details'), '# ', class: "btn btn-primary", id: "edit_template_button"%>

<% end %> @@ -11,11 +11,11 @@
<%= t('helpers.sections_label')%><%= t('helpers.questions_label')%><%= _('Sections')%><%= _('Questions')%>
- + - + - + - + - +
<%= t('org_admin.templates.title_label') %><%= _('Title') %> <%= template.title %>
<%= t('org_admin.templates.desc_label') %><%= _('Description') %> <% if !template.description.nil? && template.description != "" then %> <%= raw template.description %> <% else %> @@ -24,17 +24,17 @@
<%= t('org_admin.templates.published_label') %><%= _('Published') %> <%= template.published %>
<%= t('org_admin.templates.created') %><%= _('Created at') %> <%= l template.created_at.to_date, formats: :short %>
<%= t('org_admin.templates.last_updated') %><%= _('Last updated') %> <%= l template.updated_at.to_date, formats: :short %>
diff --git a/app/views/templates/admin_index.html.erb b/app/views/templates/admin_index.html.erb index 4baaed4..67e75f6 100644 --- a/app/views/templates/admin_index.html.erb +++ b/app/views/templates/admin_index.html.erb @@ -1,20 +1,20 @@ <%= stylesheet_link_tag "admin" %>

- <%= t('org_admin.templates_label') %> + <%= _('Templates') %>

- <%= t('org_admin.templates.own_temp') %> + <%= _('Own templates') %>

- <%= raw t('org_admin.templates.create_own_template_text_html')%> + <%= raw _("

If you wish to add an institutional template for a Data Management Plan, use the 'create template' button. You can create more than one template if desired e.g. one for researchers and one for PhD students.

Your template will be presented to users within your institution when no funder templates apply. If you want to add questions to funder templates use the 'customise template' options below.

")%>
- <%= link_to t("org_admin.templates.create_template"), + <%= link_to _('Create a template'), admin_new_template_path, class: 'btn btn-primary' %>
@@ -26,11 +26,11 @@ - - - - - + + + + + @@ -41,21 +41,21 @@ <%= org_template.title%> <% end %> @@ -85,7 +85,7 @@ <% if !current_user.org.funder? then %>

- <%= t("org_admin.templates.funders_temp") %> + <%= _('Funders templates') %>

@@ -93,11 +93,11 @@
<%= t('org_admin.templates.title_label') %><%= t('org_admin.templates.desc_label') %><%= t('org_admin.templates.published_label') %><%= t('org_admin.templates.last_updated') %><%= t('org_admin.templates.actions') %><%= _('Title') %><%= _('Description') %><%= _('Published') %><%= _('Last updated') %><%= _('Actions') %>
- <%= raw org_template.description.truncate(90, omission: t('helpers.truncate_continued')) %> + <%= raw org_template.description.truncate(90, omission: _('... (continued)')) %> <% #Yes if published version exists, Yes[Unpublished changes] if newer version modified, No otherwise%> <% if org_template.published %> - <%= t("helpers.yes_label") %> + <%= _('Yes') %> <% elsif org_template.version > 0 && @other_published_version[org_template.dmptemplate_id] %> <% #there is a published version, but this version is not (data access in view TODO: clean) %> <% if org_template.created_at < org_template.updated_at %> - <%= t("helpers.yes_label") + " " + t("org_admin.templates.unpublished_changes") %> + <%= _('Yes') + " " + _('[Unpublished Changes]') %> <% else %> - <%= t("helpers.yes_label") %> + <%= _('Yes') %> <% end %> <% else %> - <%= t("helpers.no_label") %> + <%= _('No') %> <% end %> @@ -68,9 +68,9 @@ <%= l last_temp_updated.to_date, formats: :short %> - <%= link_to t('helpers.submit.edit'), admin_template_template_path(id: org_template.id, edit: "true"), class: "dmp_table_link" %> - <%= link_to t('helpers.view'), admin_template_template_path(id: org_template), class: "dmp_table_link"%> - <%= link_to t('helpers.history'), admin_template_history_template_path(id: org_template.id), class: "dmp_table_link" %> + <%= link_to _('Edit'), admin_template_template_path(id: org_template.id, edit: "true"), class: "dmp_table_link" %> + <%= link_to _('View'), admin_template_template_path(id: org_template), class: "dmp_table_link"%> + <%= link_to _('History'), admin_template_history_template_path(id: org_template.id), class: "dmp_table_link" %>
- - - - - + + + + + @@ -107,28 +107,28 @@ <%= org_template.title%> diff --git a/app/views/templates/admin_new.html.erb b/app/views/templates/admin_new.html.erb index 0fdf7cc..ed39d22 100644 --- a/app/views/templates/admin_new.html.erb +++ b/app/views/templates/admin_new.html.erb @@ -2,10 +2,10 @@ <% javascript "admin.js" %>

- <%= t("org_admin.templates.new_label") %> + <%= _('New template') %>
- <%= link_to t("org_admin.templates.view_all_templates"), + <%= link_to _('View all templates'), admin_index_template_path, class: "btn btn-primary" %>

@@ -14,22 +14,22 @@
- <%= raw t("org_admin.templates.create_new_template_text_html")%> + <%= raw _('

To create a new template, first enter a title and description. Once you have saved this you will be presented with options to add one or more phases.

')%>
<%= form_for :template, url: {action: "admin_create"} do |f| %>
<%= t('org_admin.templates.title_label') %><%= t('org_admin.templates.desc_label') %><%= t('org_admin.templates.customise_label') %><%= t('org_admin.templates.last_updated') %><%= t('org_admin.templates.actions') %><%= _('Title') %><%= _('Description') %><%= _('Customised') %><%= _('Last updated') %><%= _('Actions') %>
- <%= raw org_template.description.truncate(90, omission: t('helpers.truncate_continued')) %> + <%= raw org_template.description.truncate(90, omission: _('... (continued)')) %> <% customized = 0 %> <% template = org_template # template to be edited%> <% if @templates_customizations[org_template.dmptemplate_id].present? %> <% if @templates_customizations[org_template.dmptemplate_id][:temp].updated_at < org_template.updated_at %> - <%= t("org_admin.templates.original_changed") %> + <%= _('Yes [Original Template Has Changed]') %> <% customized = 3 %> <% else %> <% template = @templates_customizations[org_template.dmptemplate_id][:temp] %> <% if !@templates_customizations[org_template.dmptemplate_id][:temp].published %> - <%= @templates_customizations[org_template.dmptemplate_id][:published] ? t("helpers.yes_label") : t("helpers.no_label")%> - <%= " " + t("org_admin.templates.unpublished_changes") %> + <%= @templates_customizations[org_template.dmptemplate_id][:published] ? _('Yes') : _('No')%> + <%= " " + _('[Unpublished Changes]') %> <% customized = 2 %> <% else %> - <%= t("helpers.yes_label") %> + <%= _('Yes') %> <% customized = 1 %> <% end %> <% end %> <% else %> - <%= t("helpers.no_label") %> + <%= _('No') %> <% end %> @@ -137,11 +137,11 @@ <% if customized == 0 %> - <% b_label = t("org_admin.templates.customise") %> + <% b_label = _('Customise') %> <% elsif customized == 1 || customized == 2 %> - <% b_label = t("org_admin.templates.edit_customisation") %> + <% b_label = _('Edit customisation') %> <% elsif customized == 3 %> - <% b_label = t("org_admin.templates.update_customisation") %> + <% b_label = _('Update Customisation') %> <% end %> <%= link_to b_label, admin_template_template_path(template), class: "dmp_table_link" %>
- + + class: "text_field has-tooltip", "data-toggle" => "tooltip", title: _('Please enter a title for your template.') %> - + @@ -37,8 +37,8 @@
<%= t("org_admin.templates.title_label") %><%= _('Title') %> <%= f.text_field :title, as: :string, - class: "text_field has-tooltip", "data-toggle" => "tooltip", title: t("org_admin.templates.title_help_text") %>
<%= t("org_admin.templates.desc_label") %><%= _('Description') %>
<%= text_area_tag("template-desc", "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "template_desc_popover", rel: "popover", "data-html" => "true", "data-content" => t("org_admin.template_desc_help_text_html"))%> + <%= link_to( image_tag("help_button.png"), "#", class: "template_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.
"))%>
- <%= f.submit t("helpers.submit.save"), class: "btn btn-primary" %> - <%= link_to t("helpers.submit.cancel"), admin_index_template_path, class: "btn cancel" %> + <%= f.submit _('Save'), class: "btn btn-primary" %> + <%= link_to _('Cancel'), admin_index_template_path, class: "btn cancel" %>

<% end %> diff --git a/app/views/templates/admin_template.html.erb b/app/views/templates/admin_template.html.erb index 7316afa..6558be2 100644 --- a/app/views/templates/admin_template.html.erb +++ b/app/views/templates/admin_template.html.erb @@ -5,7 +5,7 @@ <%= @template.title %>
- <%= link_to t("org_admin.templates.view_all_templates"), + <%= link_to _('View all templates'), admin_index_template_path, class: 'btn btn-primary' %>
diff --git a/app/views/templates/admin_template_history.html.erb b/app/views/templates/admin_template_history.html.erb index c8c5a82..34bb175 100644 --- a/app/views/templates/admin_template_history.html.erb +++ b/app/views/templates/admin_template_history.html.erb @@ -5,14 +5,14 @@

- <%= t('org_admin.templates.template_history') %> + <%= _('Template History') %>

- <%= raw t('org_admin.templates.template_history_text_html')%> + <%= raw _('

Here you can view previously published versions of your template. These can no longer be modified.

')%>
- <%= link_to t("org_admin.templates.view_all_templates"), + <%= link_to _('View all templates'), admin_index_template_path, class: 'btn btn-primary' %>
@@ -24,11 +24,11 @@ - - - - - + + + + + @@ -53,7 +53,7 @@ <%= l last_temp_updated.to_date, formats: :short %> <%end%>
<%= t('org_admin.templates.title_label') %><%= "Version" %><%= t('org_admin.templates.published_label') %><%= t('org_admin.templates.last_updated') %><%= t('org_admin.templates.actions') %><%= _('Title') %><%= _('Version') %> <%= _('Published') %><%= _('Last updated') %><%= _('Actions') %>
- <%= link_to t('helpers.view'), admin_template_template_path(id: org_template), class: "dmp_table_link"%> + <%= link_to _('View'), admin_template_template_path(id: org_template), class: "dmp_table_link"%>