Browse Source

Add clear search link

pull/607/head
baarkerlounger 3 years ago
parent
commit
9601a87c54
  1. 2
      app/views/users/index.html.erb

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

@ -15,7 +15,7 @@
<span class="govuk-!-margin-right-4"> <span class="govuk-!-margin-right-4">
<% if @searched %> <% if @searched %>
<% item_label = @pagy.count > 1 ? "users" : "user" %> <% item_label = @pagy.count > 1 ? "users" : "user" %>
<strong><%= @pagy.count %></strong> <%= item_label %> found matching ‘<%= @searched %>’ of <strong><%= User.count %></strong> total users. <strong><%= @pagy.count %></strong> <%= item_label %> found matching ‘<%= @searched %>’ of <strong><%= User.count %></strong> total users. <%= govuk_link_to("Clear search", request.path) %>
<% else %> <% else %>
<strong><%= @pagy.count %></strong> total users. <strong><%= @pagy.count %></strong> total users.
<% end %> <% end %>

Loading…
Cancel
Save