Browse Source

Merge pull request #502 from communitiesuk/tag-component-link-helper

Use tag component and link helper
pull/503/head
Paul Robert Lloyd 3 years ago committed by GitHub
parent
commit
893b613ed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/views/case_logs/_log_list.html.erb
  2. 6
      app/views/case_logs/edit.html.erb
  3. 2
      app/views/errors/not_found.html.erb
  4. 4
      app/views/layouts/application.html.erb

2
app/views/case_logs/_log_list.html.erb

@ -3,7 +3,7 @@
<span class="govuk-!-margin-right-4"> <span class="govuk-!-margin-right-4">
<strong><%= pagy.count %></strong> total <%= title.downcase %> <strong><%= pagy.count %></strong> total <%= title.downcase %>
</span> </span>
<a class="govuk-link" download href="/logs.csv" type="text/csv">Download (CSV)</a> <%= govuk_link_to "Download (CSV)", "/logs.csv", type: "text/csv" %>
</figcaption> </figcaption>
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>"> <section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<table class="govuk-table"> <table class="govuk-table">

6
app/views/case_logs/edit.html.erb

@ -25,9 +25,11 @@
<% elsif @case_log.status == "not_started" %> <% elsif @case_log.status == "not_started" %>
<p class="govuk-body">This log has not been started.</p> <p class="govuk-body">This log has not been started.</p>
<% elsif @case_log.status == "completed" %> <% elsif @case_log.status == "completed" %>
<strong class="govuk-tag">Completed</strong>
<p class="govuk-body"> <p class="govuk-body">
You can <a class="govuk-link" href="<%="/logs/#{@case_log.id}/review" %>">review and make changes to this log</a> up to 3 months after the end of the current collection year, which closes on 31 March <%= @case_log.collection_start_year.present? ? @case_log.collection_start_year + 1 : "" %>. <%= govuk_tag(text: "Completed") %>
</p>
<p class="govuk-body">
You can <%= govuk_link_to "review and make changes to this log", "/logs/#{@case_log.id}/review" %> up to 3 months after the end of the current collection year, which closes on 31 March <%= @case_log.collection_start_year.present? ? @case_log.collection_start_year + 1 : "" %>.
</p> </p>
<% end %> <% end %>
<%= render "tasklist" %> <%= render "tasklist" %>

2
app/views/errors/not_found.html.erb

@ -5,6 +5,6 @@
<h1 class="govuk-heading-l"><%= content_for(:title) %></h1> <h1 class="govuk-heading-l"><%= content_for(:title) %></h1>
<p class="govuk-body">If you typed the web address, check it is correct.</p> <p class="govuk-body">If you typed the web address, check it is correct.</p>
<p class="govuk-body">If you pasted the web address, check you copied the entire address.</p> <p class="govuk-body">If you pasted the web address, check you copied the entire address.</p>
<p class="govuk-body"><a class="govuk-link" href="https://digital.dclg.gov.uk/jira/servicedesk/customer/portal/4/group/21">Get help</a> if the web address is correct and not working.</p> <p class="govuk-body"><%= govuk_link_to "Get help", "https://digital.dclg.gov.uk/jira/servicedesk/customer/portal/4/group/21" %> if the web address is correct and not working.</p>
</div> </div>
</div> </div>

4
app/views/layouts/application.html.erb

@ -56,10 +56,12 @@
end end
end %> end %>
<% feedback_link = govuk_link_to "giving us your feedback (opens in a new tab)", t("feedback_form"), rel: "noreferrer noopener", target: "_blank" %>
<%= govuk_phase_banner( <%= govuk_phase_banner(
classes: "govuk-width-container", classes: "govuk-width-container",
tag: { text: "Beta" }, tag: { text: "Beta" },
text: "This is a new service – help us improve it by <a class=\"govuk-link\" href=\"#{t('feedback_form')}\" rel=\"noreferrer noopener\" target=\"_blank\">giving us your feedback (opens in a new tab)</a>".html_safe, text: "This is a new service – help us improve it by #{feedback_link}".html_safe,
) %> ) %>
<% if !current_user.nil? %> <% if !current_user.nil? %>

Loading…
Cancel
Save