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.5 KB
Raw Blame
<%# One bucket's body for the "Meine offenen Tickets" overview widget: the ticket rows, or a calm
    "nothing" line when empty. Shared by BOTH display modes (stacked sections and switchable tabs) so
    the row markup lives in exactly one place. Each row links to the ticket; priority + status + due
    chip sit on a sub-line for at-a-glance triage. Locals: organisation, tickets (Array<Ticket>). %>
<% if tickets.any? %>
  <ul class="divide-y divide-cream-200 border border-cream-300 rounded-lg bg-cream-50 overflow-hidden">
    <% tickets.each do |ticket| %>
      <li>
        <%= link_to organisation_project_ticket_path(organisation, ticket.project, ticket),
              class: "block px-4 py-2.5 hover:bg-cream-100 transition-colors" do %>
          <div class="flex items-baseline gap-3">
            <span class="flex-1 truncate text-sm text-cream-900"><%= ticket.title %></span>
            <span class="font-mono text-xs text-cream-500 truncate max-w-[40%]"><%= ticket.project.name %></span>
          </div>
          <% priority = ticket_priority_info(ticket) %>
          <% status = ticket_status_info(ticket) %>
          <% due = ticket_due_badge(ticket) %>
          <% if priority || status || due %>
            <div class="flex items-center flex-wrap gap-x-4 gap-y-1 mt-1"><%= priority %><%= status %><%= due %></div>
          <% end %>
        <% end %>
      </li>
    <% end %>
  </ul>
<% else %>
  <div class="text-xs text-cream-500 px-1 py-1"><%= t('overview.my_open_tickets.group_empty') %></div>
<% end %>