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.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
<%# The result-list body, shared by the live search frame (search.html.erb) and
the initial render inside _search_box (so an opened result keeps the list).
Reads @searched / @results / @query / @selected_page. Result links target _top —
they navigate the whole page (and carry q= for the body highlight), NOT the
result frame, and the list is re-rendered filled on that navigation so it
survives the click.
The block is a clearly LABELLED group ("N Treffer") separated from the nav tree
below (border-b) so it reads as search results, not more navigation. The open
result gets a yellow left accent via an INSET shadow (not the tree's grey fill,
and not a left border) so the two "active" states never look identical AND the
1px card frame stays even on all four sides. %>
<% if @searched %>
<% if @results.empty? %>
<p class="mt-2 px-1 text-xs text-muted"><%= t('views.organisations.documentation.index.search_empty') %></p>
<% else %>
<div class="mt-2 mb-3 border-b border-cream-300 pb-3">
<p id="documentation-search-results-label" class="mb-1 flex items-center gap-1 px-1 text-xs font-semibold uppercase tracking-wide text-muted">
<i class="bi bi-search"></i>
<%= t('views.organisations.documentation.index.results_count', count: @results.size) %>
</p>
<%# role=listbox + role=option make this the keyboard combobox popup; the option
id/aria-selected are managed by frame_search_controller. aria-current="page"
marks the open card so a keyboard Enter can land the selection back on it. %>
<ul role="listbox" id="documentation-search-listbox" aria-labelledby="documentation-search-results-label" class="flex flex-col gap-1">
<% @results.each do |page| %>
<% is_active = page.path == @selected_page&.path %>
<li role="presentation">
<%= link_to organisation_project_documentation_index_path(
@current_organisation, @project, set_id: @documentation_set.id, page: page.path, q: @query),
role: "option",
"aria-current": (is_active ? "page" : nil),
data: { turbo_frame: '_top', frame_search_target: 'result' },
class: "block truncate rounded-md border border-cream-300 bg-surface-raised px-2 py-1.5 text-sm hover:bg-selected #{is_active ? 'font-medium text-heading shadow-[inset_3px_0_0_0_#fbbf24]' : 'text-body'}" do %>
<%= documentation_result_title(page) %>
<% end %>
</li>
<% end %>
</ul>
</div>
<% end %>
<% end %>