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.
		
		
		
		
		
			
		
			
				
					
					
						
							102 lines
						
					
					
						
							4.1 KiB
						
					
					
				
			
		
		
	
	
							102 lines
						
					
					
						
							4.1 KiB
						
					
					
				| <div class="card card-compact bg-primary mb-12 md:card-normal">
 | |
|   <div class="card-body">
 | |
|     <div class="grid md:grid-cols-2 gap-4 md:flex md:justify-between">
 | |
|       <h2 class="card-title text-4xl ">
 | |
|         <%= @template.name %>
 | |
|       </h2>
 | |
|       <div class="flex md:justify-between space-x-2">
 | |
|         <%= 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') %>
 | |
|           <span>Clone</span>
 | |
|         <% end %>
 | |
|         <%= link_to template_path(@template), class: 'btn btn-outline btn-sm' do %>
 | |
|           <span class="flex items-center justify-center space-x-2">
 | |
|             <%= svg_icon('pencil', class: 'w-6 h-6') %>
 | |
|             <span>Edit</span>
 | |
|           </span>
 | |
|         <% end %>
 | |
|       </div>
 | |
|     </div>
 | |
|     <% if @template.submitters.size == 1 %>
 | |
|       <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 swap swap-active" for="share-link-input">
 | |
|           <%= svg_icon('clipboard', class: 'w-6 h-6 swap-on text-white') %>
 | |
|           <%= svg_icon('clipboard_copy', class: 'w-6 h-6 swap-off text-white') %>
 | |
|         </clipboard-copy>
 | |
|       </div>
 | |
|     <% end %>
 | |
|   </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>
 | |
|             Share Link
 | |
|           </th>
 | |
|           <th class="text-right" width="1px">
 | |
|           </th>
 | |
|         </tr>
 | |
|       </thead>
 | |
|       <tbody>
 | |
|         <% @submissions.each do |submission| %>
 | |
|           <tr>
 | |
|             <td>
 | |
|               <% submission.submitters.each do |submitter| %>
 | |
|                 <%= submitter.email %>
 | |
|               </br>
 | |
|             <% end %>
 | |
|           </td>
 | |
|           <td>
 | |
|             <% submission.submitters.each do |submitter| %>
 | |
|               <div>
 | |
|                 <span class="badge badge-info badge-outline">
 | |
|                   <%= submitter.status %>
 | |
|                 </span>
 | |
|               </div>
 | |
|             <% end %>
 | |
|           </td>
 | |
|           <td>
 | |
|             <% submission.submitters.each do |submitter| %>
 | |
|               <% share_link_input_id = "share-link-input_#{submitter.id}" %>
 | |
|               <div class="join ">
 | |
|                 <input id="<%= share_link_input_id %>" autocomplete="off" type="text" class="input input-xs input-bordered join-item" value="<%= submit_form_url(slug: submitter.slug) %>" disabled>
 | |
|                 <clipboard-copy class="btn btn-xs btn-neutral btn-square join-item text-white font-bold swap swap-active" for="<%= share_link_input_id %>">
 | |
|                   <%= svg_icon('clipboard', class: 'w-3 h-3 swap-on text-white') %>
 | |
|                   <%= svg_icon('clipboard_copy', class: 'w-3 h-3 swap-off text-white') %>
 | |
|                 </clipboard-copy>
 | |
|               </div>
 | |
|               <br/>
 | |
|             <% end %>
 | |
|           </td>
 | |
|           <td  class="flex items-center space-x-2 justify-end">
 | |
|             <%= link_to 'View', submission_path(submission), 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>
 |