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

39 lines
1.9 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 class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="12" y1="5" x2="12" y2="19" />
<line x1="5" y1="12" x2="19" y2="12" />
</svg>
<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 xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z" />
<path d="M16 3v4" />
<path d="M8 3v4" />
<path d="M4 11h16" />
<path d="M11 15h1" />
<path d="M12 15v3" />
</svg>
<span><%= l(template.created_at, format: :long) %></span>
</p>
</div>
</div>
</div>
<% end %>
</div>