Browse Source

fixed new title for no support tabs

pull/639/head
JG 3 years ago
parent
commit
f9811c9c7f
  1. 4
      app/views/case_logs/index.html.erb
  2. 2
      app/views/users/index.html.erb
  3. 2
      spec/requests/case_logs_controller_spec.rb

4
app/views/case_logs/index.html.erb

@ -2,13 +2,13 @@
<% if @searched.present? %> <% if @searched.present? %>
<% title = "#{current_user.support? ? 'Logs' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’)" %> <% title = "#{current_user.support? ? 'Logs' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’)" %>
<% else %> <% else %>
<% title = "#{current_user.support? ? 'Logs' : current_user.organisation.name}" %> <% title = current_user.support? ? "Logs" : "#{current_user.organisation.name} (Logs)" %>
<% end %> <% end %>
<% content_for :title, title %> <% content_for :title, title %>
<h1 class="govuk-heading-l"> <h1 class="govuk-heading-l">
<% if !current_user.support? %> <% unless current_user.support? %>
<span class="govuk-caption-l"><%= current_user.organisation.name %></span> <span class="govuk-caption-l"><%= current_user.organisation.name %></span>
<% end %> <% end %>
Logs Logs

2
app/views/users/index.html.erb

@ -2,7 +2,7 @@
<% if @searched.present? %> <% if @searched.present? %>
<% title = "#{current_user.support? ? 'Users' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’" %> <% title = "#{current_user.support? ? 'Users' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’" %>
<% else %> <% else %>
<% title = "#{current_user.support? ? 'Users' : current_user.organisation.name}" %> <% title = current_user.support? ? "Users" : "#{current_user.organisation.name} (Users)" %>
<% end %> <% end %>
<% content_for :title, title %> <% content_for :title, title %>

2
spec/requests/case_logs_controller_spec.rb

@ -466,7 +466,7 @@ RSpec.describe CaseLogsController, type: :request do
end end
it "does not have pagination in the title" do it "does not have pagination in the title" do
expect(page).to have_title("#{user.organisation.name} - Submit social housing lettings and sales data (CORE) - GOV.UK") expect(page).to have_title("#{user.organisation.name} (Logs) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end end
it "shows the download csv link" do it "shows the download csv link" do

Loading…
Cancel
Save