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.
docuseal/app/views/dashboard/index.html.erb

27 lines
1.0 KiB

<div class="flex justify-between mb-4">
<h1 class="text-4xl font-bold">Dashboard</h1>
<%= link_to new_template_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6') %>
<span class="hidden md:block">Create Template</span>
<% end %>
</div>
<div class="grid gap-4 md:grid-cols-3">
<% @templates.each do |template| %>
<div class="card bg-base-300">
<div class="card-body">
<h2 class="card-title flex justify-between">
<%= link_to template.name, template_submissions_path(template) %>
<%= link_to 'Edit', template_path(template), class: 'btn btn-outline btn-xs' %>
</h2>
<div >
<p class="text-sm opacity-70 mb-1">Created by <%= template.author.full_name %></p>
<p class="flex items-center gap-1 text-xs opacity-50">
<%= svg_icon('calendar', class: 'w-4 h-4') %>
<span><%= l(template.created_at, format: :long) %></span>
</p>
</div>
</div>
</div>
<% end %>
</div>