2024-04-18 07:56:51 -04:00
|
|
|
<% content_for :sidebar do %>
|
|
|
|
<%= render "settings/nav" %>
|
|
|
|
<% end %>
|
2024-08-27 17:06:41 -04:00
|
|
|
|
2024-05-02 07:24:31 -06:00
|
|
|
<section class="space-y-4">
|
|
|
|
<header class="flex items-center justify-between">
|
|
|
|
<h1 class="text-gray-900 text-xl font-medium"><%= t(".categories") %></h1>
|
|
|
|
|
2024-08-27 17:06:41 -04:00
|
|
|
<%= link_to new_category_path, class: "btn btn--primary flex items-center gap-1 justify-center", data: { turbo_frame: :modal } do %>
|
2024-05-02 07:24:31 -06:00
|
|
|
<%= lucide_icon "plus", class: "w-5 h-5" %>
|
|
|
|
<p><%= t(".new") %></p>
|
|
|
|
<% end %>
|
|
|
|
</header>
|
|
|
|
|
2024-04-18 07:56:51 -04:00
|
|
|
<div class="bg-white shadow-xs border border-alpha-black-25 rounded-xl p-4">
|
2024-08-27 17:06:41 -04:00
|
|
|
<% if @categories.any? %>
|
|
|
|
<div class="rounded-xl bg-gray-25 space-y-1 p-1">
|
|
|
|
<div class="flex items-center gap-1.5 px-4 py-2 text-xs font-medium text-gray-500 uppercase">
|
|
|
|
<p><%= t(".categories") %></p>
|
|
|
|
<span class="text-gray-400">·</span>
|
|
|
|
<p><%= @categories.count %></p>
|
|
|
|
</div>
|
2024-05-02 07:24:31 -06:00
|
|
|
|
2024-08-27 17:06:41 -04:00
|
|
|
<div class="border border-alpha-black-25 rounded-md bg-white shadow-xs">
|
|
|
|
<div class="overflow-hidden rounded-md">
|
|
|
|
<%= render partial: @categories, spacer_template: "categories/ruler" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="flex justify-center items-center py-20">
|
|
|
|
<div class="text-center flex flex-col items-center max-w-[300px]">
|
|
|
|
<p class="text-gray-900 mb-1 font-medium text-sm"><%= t(".empty") %></p>
|
|
|
|
<%= link_to new_category_path, class: "w-fit flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2 pr-3", data: { turbo_frame: "modal" } do %>
|
|
|
|
<%= lucide_icon("plus", class: "w-5 h-5") %>
|
|
|
|
<span><%= t(".new") %></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2024-05-02 07:24:31 -06:00
|
|
|
</div>
|
2024-08-27 17:06:41 -04:00
|
|
|
<% end %>
|
2024-04-18 07:56:51 -04:00
|
|
|
</div>
|
2024-05-02 07:24:31 -06:00
|
|
|
|
2024-08-27 17:10:31 -04:00
|
|
|
<%= settings_nav_footer %>
|
2024-05-02 07:24:31 -06:00
|
|
|
</section>
|