<%= @template.name %>

<%= button_to button_title(title: 'Remove', disabled_with: 'Removing', icon: svg_icon('trash', class: 'w-6 h-6')), template_path(@template), class: 'btn btn-outline btn-sm', method: :delete, data: { turbo_confirm: 'Are you sure?' } %> <%= link_to new_template_path(base_template_id: @template.id), class: 'btn btn-outline btn-sm', data: { turbo_frame: :modal } do %> <%= svg_icon('copy', class: 'w-6 h-6') %> Clone <% end %> <%= link_to edit_template_path(@template), class: 'btn btn-outline btn-sm' do %> <%= svg_icon('pencil', class: 'w-6 h-6') %> Edit <% end %>
<% if !@pagy.count.zero? || @template.submitters.to_a.size == 1 %>

Submissions

<%= 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') %> Export <% end %> <% if @template.submitters.to_a.size == 1 %> <%= render 'shared/clipboard_copy', text: start_form_url(slug: @template.slug), class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy Share Link', copied_title: 'Copied to Clipboard', copy_title_md: 'Copy', copied_title_md: 'Copied' %> <% end %> <% unless @pagy.count.zero? %> <%= link_to new_template_submission_path(@template), class: 'order-1 btn btn-primary text-base', data: { turbo_frame: 'modal' } do %> <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %> Add <% end %> <% end %>
<% end %> <% if @submissions.present? %>
<%= render partial: 'submission', collection: @submissions %>
<%= render 'shared/pagination', pagy: @pagy, items_name: 'submissions' %> <% else %>

There are no Submissions

Send an invitation to fill and complete the form

<%= link_to new_template_submission_path(@template), class: 'base-button mt-6', data: { turbo_frame: 'modal' } do %> <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %> Add Recipients <% end %> <%= link_to start_form_url(slug: @template.slug), class: 'white-button mt-6', target: '_blank', rel: 'noopener' do %> <%= svg_icon('writing', class: 'w-6 h-6') %> Submit it Yourself <% end %>
<% end %>