You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.3 KiB
28 lines
1.3 KiB
<h2 class="govuk-body"> |
|
<div class="govuk-grid-row app-search__caption"> |
|
<div class="govuk-grid-column-three-quarters"> |
|
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "log", filters_count: applied_filters_count(@filter_type))) %> |
|
<% if logs&.any? %> |
|
<%= govuk_link_to "Download (CSV)", csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> |
|
<% if @current_user.support? %> |
|
<%= govuk_link_to "Download (CSV, codes only)", csv_codes_only_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> |
|
<% end %> |
|
<% end %> |
|
</div> |
|
<div class="govuk-grid-column-one-quarter govuk-!-text-align-right"> |
|
<% if searched || applied_filters_count(@filter_type).positive? %> |
|
<br> |
|
<% end %> |
|
<% if logs&.any? && (display_delete_logs?(@current_user, searched, filter_type) || in_organisations_tab?) %> |
|
<%= govuk_link_to "Delete logs", delete_logs_path, class: "app-!-colour-red" %> |
|
<% end %> |
|
</div> |
|
</div> |
|
</h2> |
|
<% logs.map do |log| %> |
|
<% if log.sales? %> |
|
<%= render SalesLogSummaryComponent.new(current_user:, log:) %> |
|
<% else %> |
|
<%= render LettingsLogSummaryComponent.new(current_user:, log:) %> |
|
<% end %> |
|
<% end %>
|
|
|