show found submissions when searching on templates

This commit is contained in:
Alex Turchyn
2025-06-14 00:05:36 +03:00
committed by Pete Matsyburka
parent 6f0e7c0ca8
commit 36331bb993
4 changed files with 51 additions and 10 deletions
@@ -98,5 +98,14 @@
<%= t('templates_not_found') %>
</div>
</div>
<% if @related_submissions.present? %>
<h1 class="text-2xl md:text-3xl sm:text-4xl font-bold mt-8 md:mt-4">
<%= t('submissions') %>
</h1>
<div class="space-y-4 mt-4">
<%= render partial: 'templates/submission', collection: @related_submissions, locals: { with_template: true } %>
</div>
<%= render 'shared/pagination', pagy: @related_submissions_pagy, items_name: 'submissions', next_page_path: submissions_path(q: params[:q]) %>
<% end %>
<% end %>
<%= render 'shared/review_form' %>