|  |  | @ -1,6 +1,5 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | <% if Docuseal.demo? %><%= render 'shared/demo_alert' %><% end %> |  |  |  | <% if Docuseal.demo? %><%= render 'shared/demo_alert' %><% end %> | 
			
		
	
		
		
			
				
					
					|  |  |  | <% if @pagy.count > 0 || params[:q].present? || @template_folders.present? %> |  |  |  | <div class="flex justify-between mb-4 items-center"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   <div class="flex justify-between mb-4 items-center"> |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <h1 class="text-4xl font-bold"><span class="hidden md:inline">Document</span> Templates</h1> |  |  |  |   <h1 class="text-4xl font-bold"><span class="hidden md:inline">Document</span> Templates</h1> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <div class="flex space-x-2"> |  |  |  |   <div class="flex space-x-2"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <% if params[:q].present? || @pagy.pages > 1 || @template_folders.present? %> |  |  |  |     <% if params[:q].present? || @pagy.pages > 1 || @template_folders.present? %> | 
			
		
	
	
		
		
			
				
					|  |  | @ -14,25 +13,25 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |       <% end %> |  |  |  |       <% end %> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <% end %> |  |  |  |     <% end %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   </div> |  |  |  |   </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   </div> |  |  |  | </div> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   <% view_archived_html = capture do %> |  |  |  | <% view_archived_html = capture do %> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <% if current_account.templates.where.not(archived_at: nil).exists? %> |  |  |  |   <% if current_account.templates.where.not(archived_at: nil).exists? %> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <div> |  |  |  |     <div> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <a href="<%= templates_archived_index_path %>" class="link text-sm">View Archived</a> |  |  |  |       <a href="<%= templates_archived_index_path %>" class="link text-sm">View Archived</a> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </div> |  |  |  |     </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  |   <% end %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  | <% end %> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   <% if @template_folders.present? %> |  |  |  | <% if @template_folders.present? %> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <div class="grid gap-4 md:grid-cols-3 <%= 'mb-6' if @templates.present? %>"> |  |  |  |   <div class="grid gap-4 md:grid-cols-3 <%= 'mb-6' if @templates.present? %>"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <%= render partial: 'template_folders/folder', collection: @template_folders, as: :folder %> |  |  |  |     <%= render partial: 'template_folders/folder', collection: @template_folders, as: :folder %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   </div> |  |  |  |   </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  | <% end %> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   <% if @templates.present? %> |  |  |  | <% if @templates.present? %> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <div class="grid gap-4 md:grid-cols-3"> |  |  |  |   <div class="grid gap-4 md:grid-cols-3"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <%= render partial: 'templates/template', collection: @templates %> |  |  |  |     <%= render partial: 'templates/template', collection: @templates %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   </div> |  |  |  |   </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  | <% end %> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   <% if params[:q].blank? && @pagy.pages == 1 && ((@template_folders.size < 10 && @templates.size.zero?) || (@template_folders.size < 7 && @templates.size < 4) || (@template_folders.size < 4 && @templates.size < 7)) %> |  |  |  | <% if params[:q].blank? && @pagy.pages == 1 && ((@template_folders.size < 10 && @templates.size.zero?) || (@template_folders.size < 7 && @templates.size < 4) || (@template_folders.size < 4 && @templates.size < 7)) %> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <%= form_for '', url: templates_upload_path, id: form_id = SecureRandom.uuid, method: :post, class: 'mt-8 block', html: { enctype: 'multipart/form-data' } do %> |  |  |  |   <%= form_for '', url: templates_upload_path, id: form_id = SecureRandom.uuid, method: :post, class: 'mt-8 block', html: { enctype: 'multipart/form-data' } do %> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <input type="hidden" name="form_id" value="<%= form_id %>"> |  |  |  |     <input type="hidden" name="form_id" value="<%= form_id %>"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <button type="submit" class="hidden"></button> |  |  |  |     <button type="submit" class="hidden"></button> | 
			
		
	
	
		
		
			
				
					|  |  | @ -63,8 +62,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |       </label> |  |  |  |       </label> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </file-dropzone> |  |  |  |     </file-dropzone> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  |   <% end %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  | <% end %> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   <% if @templates.present? || params[:q].blank? %> |  |  |  | <% if @templates.present? || params[:q].blank? %> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <% if @pagy.pages > 1 %> |  |  |  |   <% if @pagy.pages > 1 %> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <%= render 'shared/pagination', pagy: @pagy, items_name: 'templates', left_additional_html: view_archived_html %> |  |  |  |     <%= render 'shared/pagination', pagy: @pagy, items_name: 'templates', left_additional_html: view_archived_html %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% else %> |  |  |  |   <% else %> | 
			
		
	
	
		
		
			
				
					|  |  | @ -72,30 +71,10 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |       <%= view_archived_html %> |  |  |  |       <%= view_archived_html %> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </div> |  |  |  |     </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  |   <% end %> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% elsif params[:q].present? %> |  |  |  | <% elsif params[:q].present? %> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   <div class="text-center"> |  |  |  |   <div class="text-center"> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <div class="mt-16 text-3xl font-semibold"> |  |  |  |     <div class="mt-16 text-3xl font-semibold"> | 
			
		
	
		
		
			
				
					
					|  |  |  |       Templates not Found |  |  |  |       Templates not Found | 
			
		
	
		
		
			
				
					
					|  |  |  |     </div> |  |  |  |     </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   </div> |  |  |  |   </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <% end %> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | <% else %> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   <div class="card bg-base-200 h-96 mb-2"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     <div class="card-body text-center"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       <div class="flex items-center h-full"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         <div class="mx-auto"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           <div class="max-w-xl mx-auto"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <h1 class="text-5xl font-bold text-base-content">👋 Welcome to <%= Docuseal.product_name %></h1> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           </div> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           <div class="max-w-lg mx-auto"> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <p class="py-6 text-gray-600">Streamline document workflows, from creating customizable templates to filling and signing document forms</p> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <%= link_to new_template_path, class: 'base-button', data: { turbo_frame: :modal } do %> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               <span class="mr-1">Create Template</span> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             <% end %> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           </div> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         </div> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       </div> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     </div> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   </div> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | <% end %> |  |  |  | <% end %> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |