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.
docuseal/app/views/templates_archived_submissions/index.html.erb

34 lines
1.2 KiB

<%= render 'templates/title', template: @template %>
<div>
<%= link_to template_path(@template) do %>
&larr;
<span>Back to Active</span>
<% end %>
</div>
<div class="flex justify-between mb-6 md:items-end flex-col md:flex-row">
<div>
<h1 class="text-3xl font-bold md:block <%= 'hidden' if params[:q].present? %>">Submissions <span class="badge badge-outline badge-lg align-middle">Archived</span></h1>
</div>
<div class="flex space-x-2 mt-3 md:mt-0">
<% if params[:q].present? || @pagy.pages > 1 %>
<%= render 'shared/search_input' %>
<% end %>
<%= link_to new_template_submissions_export_path(@template), class: 'order-3 md:order-1 btn btn-ghost text-base', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('download', class: 'w-6 h-6 stroke-2') %>
<span>Export</span>
<% end %>
</div>
</div>
<% if @pagy.count > 0 %>
<div class="space-y-4">
<%= render partial: 'templates/submission', collection: @submissions, locals: { template: @template, archived: true } %>
</div>
<% elsif params[:q].present? %>
<div class="text-center">
<div class="mt-16 text-3xl font-semibold">
Submissions not Found
</div>
</div>
<% end %>
<%= render 'shared/pagination', pagy: @pagy, items_name: 'submissions' %>