Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.2 KB
Raw Blame
<%#
  Admin dashboard tile -- a fully clickable navigation card. The link wraps the
  whole tile, so there is no separate "view all" footer link.

  Required locals:
    path        -- link target
    icon        -- bootstrap-icon suffix (e.g. "building" -> bi-building)
    title       -- tile heading
  Optional locals:
    count       -- big number shown as the second line (Verwaltung tiles)
    description -- helper text shown as the second line (Monitoring/Einstellungen tiles)
    icon_color  -- tailwind text-* class for the icon (default neutral gray)
%>
<%= link_to path,
    class: "flex items-center justify-between gap-4 bg-white border-2 border-black rounded-lg p-4 shadow-[2px_2px_0_0_#000000] hover:shadow-[4px_4px_0_0_#000000] hover:-translate-x-0.5 hover:-translate-y-0.5 transition-all duration-200" do %>
  <div class="min-w-0">
    <p class="text-sm text-gray-600"><%= title %></p>
    <% if local_assigns.key?(:count) %>
      <p class="text-2xl font-bold"><%= count %></p>
    <% elsif local_assigns[:description].present? %>
      <p class="text-sm font-medium text-gray-900"><%= description %></p>
    <% end %>
  </div>
  <i class="bi bi-<%= icon %> text-3xl <%= local_assigns[:icon_color] || 'text-gray-700' %> shrink-0"></i>
<% end %>