diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 9f1bde62..4fa74712 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -1,101 +1,80 @@ <% if Docuseal.demo? %><%= render 'shared/demo_alert' %><% end %> -<% if @pagy.count > 0 || params[:q].present? || @template_folders.present? %> -
-

Templates

-
- <% if params[:q].present? || @pagy.pages > 1 || @template_folders.present? %> - <%= render 'shared/search_input' %> - <% end %> - <% if can?(:create, ::Template) %> - <%= render 'templates/upload_button' %> - <%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %> - <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %> - - <% end %> +
+

Templates

+
+ <% if params[:q].present? || @pagy.pages > 1 || @template_folders.present? %> + <%= render 'shared/search_input' %> + <% end %> + <% if can?(:create, ::Template) %> + <%= render 'templates/upload_button' %> + <%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %> + <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %> + <% end %> -
-
- <% view_archived_html = capture do %> - <% if current_account.templates.where.not(archived_at: nil).exists? %> -
- View Archived -
<% end %> - <% 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 %> +
+
+<% view_archived_html = capture do %> + <% if current_account.templates.where.not(archived_at: nil).exists? %> +
+ View Archived
<% 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 %> - - - -