diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js index e1e0f97..0b5dcdd 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -234,7 +234,7 @@ $('.new_question_save_button').click(function(e){ var s_id = $(this).prev(".section_id").val(); if ($('#new_question_text_'+ s_id).val() == ''){ - alert(I18n.t("question_text_empty")); + alert(I18n.t("js.question_text_empty")); return false; } }); @@ -327,24 +327,24 @@ //verify if text area is not nil var editorContent = tinyMCE.get('guidance-text').getContent(); if (editorContent == ''){ - alert_message.push(I18n.t("add_guidance_text")); + alert_message.push(I18n.t("js.add_guidance_text")); } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '2') { if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ - alert_message.push(I18n.t("select_question")); + alert_message.push(I18n.t("js.select_question")); } } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '1' ){ if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ - alert_message.push(I18n.t("select_at_least_one_theme")); + alert_message.push(I18n.t("js.select_at_least_one_theme")); } } //verify if guidance group is selected if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { - alert_message.push(I18n.t("select_guidance_group")); + alert_message.push(I18n.t("js.select_guidance_group")); } if(alert_message.length == 0){ //clear dropdowns before submission @@ -389,23 +389,23 @@ //verify if text area is not nil var editorContent = tinyMCE.get('guidance-text').getContent(); if (editorContent == ''){ - alert_message.push(I18n.t("add_guidance_text")); + alert_message.push(I18n.t("js.add_guidance_text")); } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '2') { if ($('#questions_select').val() == '' || isNaN($('#questions_select').val())){ - alert_message.push(I18n.t("select_question")); + alert_message.push(I18n.t("js.select_question")); } } //verify dropdown with questions has a selected option if guidance for a question being used if ($('#g_options').val() == '1' ){ if($('#guidance_theme_ids').val() == undefined || $('#guidance_theme_ids').val() == ''){ - alert_message.push(I18n.t("select_at_least_one_theme")); + alert_message.push(I18n.t("js.select_at_least_one_theme")); } } //verify if guidance group is selected if ( ($('#guidance_guidance_group_ids').val() == '') || $('#guidance_guidance_group_ids').val() == undefined ) { - alert_message.push(I18n.t("select_guidance_group")); + alert_message.push(I18n.t("js.select_guidance_group")); } if(alert_message.length == 0){ @@ -437,7 +437,7 @@ //Validate banner_text area for less than 165 character $("form#edit_org_details").submit(function(){ if (getStats('org_banner_text').chars > 165) { - alert(I18n.t("enter_up_to") + " " + getStats('org_banner_text').chars + ". " + I18n.t("if_using_url_try")); + alert(I18n.t("js.enter_up_to") + " " + getStats('org_banner_text').chars + ". " + I18n.t("js.if_using_url_try")); return false; } }); diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index bfb06f6..d5cc21d 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -1,4 +1,4 @@ -

<% t('custom_devise.resend_confirmation') %>

+

<%= t('custom_devise.resend_confirmation') %>

<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> <%= devise_error_messages! %> diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index 8411996..08c61ba 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -1,5 +1,5 @@ -

<% t('custom_devise.welcome_to_DMP') %>, <%= @email %>!

+

<%= t('custom_devise.welcome_to_DMP') %>, <%= @email %>!

-

<% t('custom_devise.thank_you_and_confirm') %>

+

<%= t('custom_devise.thank_you_and_confirm') %>

-

<%= link_to t('custom_devise.click_to_confirm'), confirmation_url(@resource, :confirmation_token => @token) %> <% t('custom_devise.1st_part_copy') %> <%= confirmation_url(@resource, :confirmation_token => @token) %> <% t('custom_devise.2nd_part_copy') %>

\ No newline at end of file +

<%= link_to t('custom_devise.click_to_confirm'), confirmation_url(@resource, :confirmation_token => @token) %> <%= t('custom_devise.1st_part_copy') %> <%= confirmation_url(@resource, :confirmation_token => @token) %> <%= t('custom_devise.2nd_part_copy') %>

\ No newline at end of file diff --git a/app/views/devise/mailer/invitation_instructions.html.erb b/app/views/devise/mailer/invitation_instructions.html.erb index 1215d1b..2828329 100644 --- a/app/views/devise/mailer/invitation_instructions.html.erb +++ b/app/views/devise/mailer/invitation_instructions.html.erb @@ -1,7 +1,7 @@ -

<% t('custom_devise.hello') %> <%= @resource.email %>!

+

<%= t('custom_devise.hello') %> <%= @resource.email %>!

-

<% t('custom_devise.colleague_invited_you') %> <%= link_to t('tool_title'), root_url %>

+

<%= t('custom_devise.colleague_invited_you') %> <%= link_to t('tool_title'), root_url %>

-

<%= link_to t('custom_devise.click_to_accept'), accept_invitation_url(@resource, :invitation_token => @token) %> <% t('custom_devise.1st_part_copy') %> <%= accept_invitation_url(@resource, :invitation_token => @token) %> <% t('custom_devise.2nd_part_copy') %>

+

<%= link_to t('custom_devise.click_to_accept'), accept_invitation_url(@resource, :invitation_token => @token) %> <%= t('custom_devise.1st_part_copy') %> <%= accept_invitation_url(@resource, :invitation_token => @token) %> <%= t('custom_devise.2nd_part_copy') %>

-<% t('custom_devise.ignore_wont_be_created') %> \ No newline at end of file +<%= t('custom_devise.ignore_wont_be_created') %> \ No newline at end of file diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb index 23df47b..1638d2e 100644 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -1,7 +1,7 @@ -

<% t('custom_devise.hello') %> <%= @resource.email %>!

+

<%= t('custom_devise.hello') %> <%= @resource.email %>!

-

<% t('custom_devise.1st_part_change_password') %> <%= link_to t('tool_title'), root_url %> <% t('custom_devise.2nd_part_change_password') %>

+

<%= t('custom_devise.1st_part_change_password') %> <%= link_to t('tool_title'), root_url %> <%= t('custom_devise.2nd_part_change_password') %>

<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %>

-<% t('custom_devise.1st_part_change_password') %> +<%= t('custom_devise.1st_part_change_password') %> diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb index 8730474..955c0c7 100644 --- a/app/views/devise/mailer/unlock_instructions.html.erb +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -1,7 +1,7 @@ -

<% t('custom_devise.hello') %> <%= @resource.email %>!

+

<%= t('custom_devise.hello') %> <%= @resource.email %>!

-

<% t('custom_devise.1st_part_locked') %><%= link_to t('tool_title'), root_url %><% t('custom_devise.2nd_part_locked') %>

+

<%= t('custom_devise.1st_part_locked') %><%= link_to t('tool_title'), root_url %><%= t('custom_devise.2nd_part_locked') %>

-

<% t('custom_devise.click_to_unlock') %>

+

<%= t('custom_devise.click_to_unlock') %>

<%= link_to t('custom_devise.unlock'), unlock_url(@resource, :unlock_token => @token) %>

\ No newline at end of file diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index fb692c8..dffb99f 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -80,7 +80,7 @@

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -
<% t('custom_devise.waiting_for_confirmation') %><%= resource.unconfirmed_email %>
+
<%= t('custom_devise.waiting_for_confirmation') %><%= resource.unconfirmed_email %>
<% end %> diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index d7c8019..b632e4f 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb @@ -1,4 +1,4 @@ -

<% t('custom_devise.resend_unlock') %>

+

<%= t('custom_devise.resend_unlock') %>

<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> <%= devise_error_messages! %> diff --git a/app/views/dmptemplates/_add_guidance.html.erb b/app/views/dmptemplates/_add_guidance.html.erb index 936ffa1..2364908 100644 --- a/app/views/dmptemplates/_add_guidance.html.erb +++ b/app/views/dmptemplates/_add_guidance.html.erb @@ -82,12 +82,12 @@ \ No newline at end of file diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb index 5317891..a2cccb1 100644 --- a/app/views/guidance_groups/admin_new.html.erb +++ b/app/views/guidance_groups/admin_new.html.erb @@ -62,8 +62,7 @@
<%= f.submit t("helpers.submit.save"), :name => "draft", :class => "btn btn-primary" %> - <%= f.submit t("helpers.submit.save_publish"), :name => "save_publish", :class => "btn btn-primary" %> - <%= link_to t("helpers.submit.cancel"), :back, :class => "btn cancel" %> + <%= link_to t("helpers.submit.cancel"), :back, :class => "btn cancel btn-secondary" %>

diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb index bb64cb6..dc44f0d 100644 --- a/app/views/guidances/admin_edit.html.erb +++ b/app/views/guidances/admin_edit.html.erb @@ -144,12 +144,12 @@ diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index 8e27227..7741454 100644 --- a/app/views/guidances/admin_new.html.erb +++ b/app/views/guidances/admin_new.html.erb @@ -116,12 +116,12 @@ \ No newline at end of file diff --git a/app/views/plans/_export.html.erb b/app/views/plans/_export.html.erb index 72714dd..73425c0 100644 --- a/app/views/plans/_export.html.erb +++ b/app/views/plans/_export.html.erb @@ -1,7 +1,7 @@
<%= t("helpers.current_password") %>
diff --git a/app/views/settings/plans/_export_formatting_form.html.erb b/app/views/settings/plans/_export_formatting_form.html.erb index 99b48cf..b6eca1c 100644 --- a/app/views/settings/plans/_export_formatting_form.html.erb +++ b/app/views/settings/plans/_export_formatting_form.html.erb @@ -44,7 +44,7 @@
- +
    <% plan.sections.each do |section| %>
  1. diff --git a/app/views/static_pages/about_us.html.erb b/app/views/static_pages/about_us.html.erb index 70f2584..d17df58 100644 --- a/app/views/static_pages/about_us.html.erb +++ b/app/views/static_pages/about_us.html.erb @@ -43,8 +43,8 @@ <% summary = summary.gsub(/\A.*div>/, "") %> <% summary = summary.gsub(/

    .*\z/, "") %>

    <%= raw summary.strip %>

    -

    <% t('helpers.about.by') %><%= entry.author %><% t('helpers.about.on') %><%= entry.published.strftime("%d/%m/%Y") %>

    -

    <% t('helpers.about.read_more') %><%= link_to "DCC Website", entry.url %>

    +

    <%= t('helpers.about.by') %><%= entry.author %><%= t('helpers.about.on') %><%= entry.published.strftime("%d/%m/%Y") %>

    +

    <%= t('helpers.about.read_more') %><%= link_to "DCC Website", entry.url %>


    <%if news_left.to_i > 1 then %> diff --git a/app/views/user_mailer/permissions_change_notification.html.erb b/app/views/user_mailer/permissions_change_notification.html.erb index 933a004..2ca98f5 100644 --- a/app/views/user_mailer/permissions_change_notification.html.erb +++ b/app/views/user_mailer/permissions_change_notification.html.erb @@ -1,4 +1,4 @@ -

    <% t('custom_devise.hello') %><%= @project_group.user.name %>

    +

    <%= t('custom_devise.hello') %><%= @project_group.user.name %>

    <% access_level = "read-only" @@ -9,4 +9,4 @@ end %> -

    <% t('helpers.mailer.permission_relating') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>"<% t('helpers.mailer.changed') %><%= access_level %><% t('helpers.mailer.access') %>

    +

    <%= t('helpers.mailer.permission_relating') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>"<%= t('helpers.mailer.changed') %><%= access_level %><%= t('helpers.mailer.access') %>

    diff --git a/app/views/user_mailer/project_access_removed_notification.html.erb b/app/views/user_mailer/project_access_removed_notification.html.erb index 84c8ff5..3f64022 100644 --- a/app/views/user_mailer/project_access_removed_notification.html.erb +++ b/app/views/user_mailer/project_access_removed_notification.html.erb @@ -1,3 +1,3 @@ -

    <% t('custom_devise.hello') %><%= @user.name %>

    +

    <%= t('custom_devise.hello') %><%= @user.name %>

    -

    <% t('helpers.mailer.access_to') %>"<%= @project.title %>"<% t('helpers.mailer.removed') %>

    +

    <%= t('helpers.mailer.access_to') %>"<%= @project.title %>"<%= t('helpers.mailer.removed') %>

    diff --git a/app/views/user_mailer/sharing_notification.html.erb b/app/views/user_mailer/sharing_notification.html.erb index 5e2ad0a..6c41933 100644 --- a/app/views/user_mailer/sharing_notification.html.erb +++ b/app/views/user_mailer/sharing_notification.html.erb @@ -1,4 +1,4 @@ -

    <% t('custom_devise.hello') %><%= @project_group.user.name %>

    +

    <%= t('custom_devise.hello') %><%= @project_group.user.name %>

    <% access_level = "read-only" @@ -9,4 +9,4 @@ end %> -

    <% t('helpers.mailer.given') %><%= access_level %><% t('helpers.mailer.access_two') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>".

    +

    <%= t('helpers.mailer.given') %><%= access_level %><%= t('helpers.mailer.access_two') %>"<%= link_to @project_group.project.title, project_path(@project_group.project, :only_path => false) %>".