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
<ul class="mobile-project-list">
  <% mobile_projects.each do |project| %>
    <li data-mobile-project-search-target="project" data-name="<%= project.name %>">
      <%= link_to mobile_project_destination(project, area: (switcher ? mobile_area : 'tickets'), switched: switcher),
          class: ('is-current' if project == mobile_project), data: { turbo_frame: '_top', action: ('click->mobile-shell#switchProject' if switcher) } do %>
        <span class="mobile-project-initials" aria-hidden="true"><%= project.name.split.map { |word| word.first }.first(2).join.upcase %></span>
        <span class="mobile-project-name"><%= project.name %></span>
        <% if current_user.sidebar_pins.project_pinned?(current_organisation, project.id) %>
          <i class="bi bi-pin-angle" aria-label="<%= t('mobile.pinned') %>"></i>
        <% end %>
        <% if policy(project).area_access?(:tickets, :read) %>
          <span class="font-mono" aria-label="<%= t('mobile.ticket_count', count: mobile_ticket_counts.fetch(project.id, 0)) %>"><%= mobile_ticket_counts.fetch(project.id, 0) %></span>
        <% end %>
      <% end %>
    </li>
  <% end %>
</ul>
<p <%= 'hidden' if mobile_projects.any? %> data-mobile-project-search-target="empty"><%= t('mobile.no_projects') %></p>