update dashboard template

pull/105/head
Alex Turchyn 2 years ago
parent d0c0da0939
commit b0b4386927

@ -1,8 +1,38 @@
<%= link_to 'Create Template', new_template_path, data: { turbo_frame: :modal } %>
<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 >
<%= template.name %> |
<a href="<%= template_path(template) %>">edit</a> |
<a href="<%= template_submissions_path(template) %>">submissions</a> |
<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>

@ -4,31 +4,10 @@
<div class="flex justify-between mb-4">
<h1 class="text-4xl font-bold">Team</h1>
<%= link_to new_user_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 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>New User</span>
<% end %>

Loading…
Cancel
Save