Files
docuseal/app/views/dashboard/index.html.erb
T

63 lines
2.4 KiB
Plaintext
Raw Normal View History

2023-07-12 01:24:25 +03:00
<% if Docuseal.demo? %><%= render 'shared/demo_alert' %><% end %>
2023-09-15 02:11:48 +03:00
<% if @pagy.count > 0 || params[:q].present? %>
2023-06-29 02:04:17 +03:00
<div class="flex justify-between mb-4 items-center">
2023-09-14 01:43:08 +03:00
<h1 class="text-4xl font-bold"><span class="hidden md:inline">Document</span> Templates</h1>
<div class="flex space-x-2">
2023-09-15 02:11:48 +03:00
<% if params[:q].present? || @pagy.pages > 1 %>
<%= render 'shared/search_input' %>
<% end %>
2023-09-17 00:45:57 +03:00
<% if can?(:create, ::Template) %>
<%= render 'templates/upload_button' %>
<%= link_to new_template_path, class: 'btn btn-primary text-base btn-md gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block">Create</span>
<% end %>
2023-09-14 01:43:08 +03:00
<% end %>
</div>
2023-06-11 17:40:08 +03:00
</div>
2023-09-15 02:11:48 +03:00
<% if @pagy.count > 0 %>
<div class="grid gap-4 md:grid-cols-3">
<%= render partial: 'templates/template', collection: @templates %>
</div>
<% view_archived_html = capture do %>
<% if current_account.templates.where.not(deleted_at: nil).exists? %>
<div>
<a href="<%= templates_archived_index_path %>" class="link text-sm">View Archived</a>
</div>
<% end %>
<% end %>
<% if @pagy.pages > 1 %>
<%= render 'shared/pagination', pagy: @pagy, items_name: 'templates', left_additional_html: view_archived_html %>
<% else %>
<div class="mt-2">
<%= view_archived_html %>
2023-06-11 17:40:08 +03:00
</div>
<% end %>
2023-09-15 02:11:48 +03:00
<% elsif params[:q].present? %>
<div class="text-center">
<div class="mt-16 text-3xl font-semibold">
Templates not Found
</div>
2023-09-15 00:42:51 +03:00
</div>
<% end %>
2023-06-11 17:40:08 +03:00
<% else %>
<div class="card bg-base-200 h-96 mb-2">
<div class="card-body text-center">
<div class="flex items-center h-full">
2023-06-30 01:26:13 +03:00
<div class="mx-auto">
<div class="max-w-xl mx-auto">
<h1 class="text-5xl font-bold text-base-content">👋 Welcome to DocuSeal</h1>
</div>
<div class="max-w-lg mx-auto">
2023-07-04 23:05:22 +03:00
<p class="py-6 text-gray-600">Streamline document workflows, from creating customizable templates to filling and signing document forms</p>
2023-06-30 01:26:13 +03:00
<%= link_to new_template_path, class: 'base-button', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
2023-07-04 23:05:22 +03:00
<span class="mr-1">Create Template</span>
2023-06-30 01:26:13 +03:00
<% end %>
</div>
2023-06-03 01:39:22 +03:00
</div>
</div>
</div>
2023-06-11 17:40:08 +03:00
</div>
<% end %>