Files
docuseal/app/views/templates_archived_submissions/index.html.erb
T

44 lines
2.2 KiB
Plaintext
Raw Normal View History

2024-11-23 01:45:10 +02:00
<% filter_params = params.permit(Submissions::Filter::ALLOWED_PARAMS).compact_blank %>
<% with_filters = @pagy.pages > 1 || params[:q].present? || filter_params.present? %>
2023-09-15 00:42:51 +03:00
<%= render 'templates/title', template: @template %>
2026-07-22 20:32:50 +03:00
<div>
<%= link_to template_path(@template), class: 'flex items-center mb-1 md:mb-0' do %>
<%= svg_icon('chevron_left', class: 'w-5 h-5') %>
<span style="margin-left: 3px"><%= t('back_to_active') %></span>
<% end %>
</div>
<div class="flex flex-col md:flex-row md:items-center mb-4 gap-3">
2026-07-23 11:13:10 +03:00
<div class="group/header flex w-full md:flex-1 min-w-0 justify-between items-center">
<div class="max-md:group-has-[search-input:focus-within]/header:hidden">
2026-07-22 20:32:50 +03:00
<h2 class="text-2xl md:text-3xl font-bold md:block"><%= t('submissions') %> <span class="badge badge-outline badge-lg align-middle"><%= t('archived') %></span></h2>
2024-11-23 01:45:10 +02:00
</div>
2026-07-23 11:13:10 +03:00
<div class="max-md:has-[search-input:focus-within]:grow <%= 'max-md:grow' if params[:q].present? %>">
2024-11-23 01:45:10 +02:00
<% if with_filters %>
2026-07-23 11:13:10 +03:00
<%= render 'shared/search_input' %>
2024-11-23 01:45:10 +02:00
<% end %>
2026-07-22 20:32:50 +03:00
</div>
</div>
2026-07-31 10:46:24 +03:00
<div class="flex flex-nowrap md:flex-wrap md:justify-end items-center gap-2">
<%= render 'submissions_filters/applied_filters', filter_params:, with_status: true %>
<div class="hidden md:block shrink-0 md:order-first">
2026-07-22 20:32:50 +03:00
<%= link_to new_template_submissions_export_path(@template, archived: true), class: 'btn btn-ghost text-base h-10 min-h-10', data: { turbo_frame: 'modal' } do %>
2024-11-23 01:45:10 +02:00
<%= svg_icon('download', class: 'w-6 h-6 stroke-2') %>
2026-07-24 17:48:45 +03:00
<span class="hidden md:inline"><%= t('export') %></span>
2024-11-23 01:45:10 +02:00
<% end %>
</div>
2026-07-22 20:32:50 +03:00
<%= render 'submissions_filters/filter_button', filter_params: %>
2023-09-15 00:42:51 +03:00
</div>
</div>
2025-05-28 22:48:15 +03:00
<% if @pagy.count.nil? || @pagy.count > 0 %>
2023-09-15 02:11:48 +03:00
<div class="space-y-4">
2024-07-20 22:21:36 +03:00
<%= render partial: 'templates/submission', collection: @submissions, locals: { template: @template, archived: true } %>
2023-09-15 02:11:48 +03:00
</div>
2024-11-23 01:45:10 +02:00
<% elsif params[:q].present? || filter_params.present? %>
2023-09-15 02:11:48 +03:00
<div class="text-center">
<div class="mt-16 text-3xl font-semibold">
2024-09-18 19:47:47 +03:00
<%= t('submissions_not_found') %>
2023-09-15 02:11:48 +03:00
</div>
</div>
<% end %>
2023-09-15 00:42:51 +03:00
<%= render 'shared/pagination', pagy: @pagy, items_name: 'submissions' %>