mirror of https://github.com/docusealco/docuseal
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.
63 lines
2.3 KiB
63 lines
2.3 KiB
<div class="card card-compact bg-primary mb-12 md:card-normal">
|
|
<div class="card-body">
|
|
<h2 class="card-title text-4xl flex justify-between">
|
|
<%= @template.name %>
|
|
<%= link_to 'Edit', template_path(@template), class: 'btn btn-outline btn-sm' %>
|
|
</h2>
|
|
<div class="join w-full">
|
|
<buttun class="btn bg-neutral btn-disabled text-white join-item">
|
|
Share link
|
|
</buttun>
|
|
<input id="share-link-input" autocomplete="off" type="text" class="input input-bordered w-full join-item" value="<%= start_form_url(slug: @template.slug) %>" disabled>
|
|
<clipboard-copy class="btn btn-neutral btn-square join-item text-white font-bold" for="share-link-input">
|
|
<%= svg_icon('clipboard', class: 'w-6 h-6') %>
|
|
</clipboard-copy>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-between mb-4">
|
|
<h1 class="text-3xl font-bold">Recepients</h1>
|
|
<%= link_to new_template_submission_path(@template), class: 'btn btn-primary btn-sm gap-2', data: { turbo_frame: 'modal' } do %>
|
|
<%= svg_icon('plus', class: 'w-6 h-6') %>
|
|
<span class="hidden md:block">Add Recepients</span>
|
|
<% end %>
|
|
</div>
|
|
<div class="overflow-x-auto">
|
|
<%- if @submissions.any? %>
|
|
<table class="table w-full table-lg rounded-t-2xl overflow-hidden">
|
|
<thead class="bg-base-200">
|
|
<tr class="text-neutral uppercase">
|
|
<th>
|
|
Email
|
|
</th>
|
|
<th>
|
|
Status
|
|
</th>
|
|
<th class="text-right" width="1px">
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @submissions.each do |submission| %>
|
|
<tr>
|
|
<td>
|
|
<%= submission.email %>
|
|
</td>
|
|
<td>
|
|
<span class="badge badge-info badge-outline">
|
|
<%= submission.status.humanize %>
|
|
</span>
|
|
</td>
|
|
<td class="flex items-center space-x-2 justify-end">
|
|
<%= link_to 'View', submission_path(@template), title: 'View', class: 'btn btn-outline btn-xs' %>
|
|
<%= button_to 'Remove', submission_path(submission), class: 'btn btn-outline btn-error btn-xs', title: 'Delete', method: :delete, data: { turbo_confirm: 'Are you sure?' } %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<%= render 'shared/no_data_banner' %>
|
|
<% end %>
|
|
</div>
|