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.1 KB
Raw Blame
<%# locals: nodes — a list of Documentation::Navigation DirNode/PageNode %>
<ul class="flex flex-col gap-0.5 text-sm">
  <% nodes.each do |node| %>
    <li>
      <% if node.dir? %>
        <p class="mt-3 mb-0.5 px-1 text-xs font-semibold uppercase tracking-wide text-muted"><%= node.label %></p>
        <div class="border-l border-cream-300 pl-2">
          <%= render 'tree', nodes: node.children %>
        </div>
      <% else %>
        <%= link_to organisation_project_documentation_index_path(@current_organisation, @project, set_id: @documentation_set.id, page: node.page.path),
              class: "flex items-center justify-between gap-2 rounded-md px-2 py-1 #{node.active ? 'bg-selected font-medium text-heading' : 'text-body hover:bg-surface-raised'}" do %>
          <span class="truncate"><%= node.label %></span>
          <% if node.changed %>
            <span class="inline-block h-2 w-2 shrink-0 rounded-full bg-blue-500"
                  title="<%= t('views.organisations.documentation.index.changed_since_visit') %>"></span>
          <% end %>
        <% end %>
      <% end %>
    </li>
  <% end %>
</ul>