-              
-                
-                  <%= svg_icon('cloud_upload', class: 'w-10 h-10') %>
-                
-                
-                  Upload New Document
-                
-                
-                  Click to upload or drag and drop
-                
-              
-              
-                <%= svg_icon('loader', class: 'w-10 h-10 animate-spin') %>
-                
-                  Uploading...
-                
+<% end %>
+<% if @template_folders.present? %>
+  
+    <%= render partial: 'template_folders/folder', collection: @template_folders, as: :folder %>
+  
+<% end %>
+<% if @templates.present? %>
+  
+    <%= render partial: 'templates/template', collection: @templates %>
+  
+<% 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)) %>
+  <%= form_for '', url: templates_upload_path, id: form_id = SecureRandom.uuid, method: :post, class: 'mt-8 block', html: { enctype: 'multipart/form-data' } do %>
+    
+    
+    
+      
-      
-    <% end %>
+          
+        
+      
+    
   <% end %>
-  <% if @templates.present? || params[:q].blank? %>
-    <% if @pagy.pages > 1 %>
-      <%= render 'shared/pagination', pagy: @pagy, items_name: 'templates', left_additional_html: view_archived_html %>
-    <% else %>
-      
-      
-        Templates not Found
-      
+<% end %>
+<% if @templates.present? || params[:q].blank? %>
+  <% if @pagy.pages > 1 %>
+    <%= render 'shared/pagination', pagy: @pagy, items_name: 'templates', left_additional_html: view_archived_html %>
+  <% else %>
+    
+      <%= view_archived_html %>
     
   <% end %>
-<% else %>
-  
-    
-      
-        
-          
-            
👋 Welcome to <%= Docuseal.product_name %>
-          
-          
-            
Streamline document workflows, from creating customizable templates to filling and signing document forms
-            <%= link_to new_template_path, class: 'base-button', data: { turbo_frame: :modal } do %>
-              <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
-              
Create Template
-            <% end %>
-          
-        
-      
+<% elsif params[:q].present? %>
+  
 <% end %>