From 081842db79b91ff391f491c9e9404026ba7a50ab Mon Sep 17 00:00:00 2001 From: JG Date: Tue, 7 Jun 2022 16:48:19 +0100 Subject: [PATCH] switched users to using helper --- app/views/organisations/logs.html.erb | 2 +- app/views/users/index.html.erb | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/organisations/logs.html.erb b/app/views/organisations/logs.html.erb index e330817da..659f9b121 100644 --- a/app/views/organisations/logs.html.erb +++ b/app/views/organisations/logs.html.erb @@ -1,5 +1,5 @@ <% item_label = format_label(@pagy.count, "log") %> -<% title = format_title(request.path, @searched, "Logs", current_user, item_label, @pagy.count, nil) %> +<% title = format_title(request.path, @searched, "Logs", current_user, item_label, @pagy.count, @organisation.name) %> <% content_for :title, title %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 0c7b65202..a9b6cf67d 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,9 +1,5 @@ <% item_label = format_label(@pagy.count, "user") %> -<% if @searched.present? %> - <% title = "#{current_user.support? ? 'Users' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’" %> -<% else %> - <% title = "Users" %> -<% end %> +<% title = format_title(request.path, @searched, "Users", current_user, item_label, @pagy.count, nil) %> <% content_for :title, title %>