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.

Move the glossary entry from the sidebar to the meetings pages

Guido Boyke7f1577c7d31c
diff --git a/app/helpers/navigation_helper.rb b/app/helpers/navigation_helper.rb
index 5f3a193..9454ae6 100644
--- a/app/helpers/navigation_helper.rb
+++ b/app/helpers/navigation_helper.rb
@@ -63,6 +63,12 @@ module NavigationHelper
TIMES_TAB_CONTROLLERS = TIMES_TABS.map { |tab| tab[:controller_name] }.freeze
+ # The meetings area of the sidebar: "Alle Meetings" and the glossary. The
+ # glossary has no sidebar entry of its own (user, 04.11.2026: it only serves
+ # the transcription of meetings); it is reached from the head of the
+ # meetings pages, and "Alle Meetings" stays lit while it is open.
+ MEETINGS_SECTION_CONTROLLERS = %w[meetings_overview glossary].freeze
+
# The AI area (doc/ki_bereich_navigation_plan.md S2): three tabs collapsed into one,
# with a hub in front of them. The three pages keep their own controllers and routes,
# so they are NOT in SETTINGS_TABS any more — and that is exactly the trap §7 of the
@@ -125,6 +131,11 @@ module NavigationHelper
TIMES_TAB_CONTROLLERS.include?(controller_name)
end
+ # True on "Alle Meetings" and on the glossary (MEETINGS_SECTION_CONTROLLERS).
+ def meetings_section_active?
+ MEETINGS_SECTION_CONTROLLERS.include?(controller_name)
+ end
+
# Can the current user reach organisation management? Port of the inline gate the nav
# partial used: account admin, or any of the account-management permissions (seeing roles
# already counts — read access to the management area). Guards on current_user (nil ⟺
diff --git a/app/views/common/_navigation_application.html.erb b/app/views/common/_navigation_application.html.erb
index f4ef4f7..fe530da 100644
--- a/app/views/common/_navigation_application.html.erb
+++ b/app/views/common/_navigation_application.html.erb
@@ -132,9 +132,9 @@
gate that actually belongs to it. That predicate is exactly the old block
condition, so nothing changes for anybody who had the block before.
The people directory is a right of its own (PersonPolicy) and opens the
- block too: a customer role may hold it without any project. So does the
- glossary (GlossaryPolicy). %>
- <% if user_signed_in? && (policy(Project).index? || policy(TimeSession).index? || assistant_available? || policy(Person).index? || policy(GlossaryTerm).index?) %>
+ block too: a customer role may hold it without any project. The glossary
+ does not: it has no entry here, it is reached from the meetings pages. %>
+ <% if user_signed_in? && (policy(Project).index? || policy(TimeSession).index? || assistant_available? || policy(Person).index?) %>
<div class="w-full px-4 pt-3">
<div class="mb-2">
<% can_view_times = TimeSessionNavigationService.new(current_user, current_organisation).can_show_all_time_sessions_menu? %>
@@ -188,12 +188,11 @@
<%= render 'common/navigation_item', name: t('navigation.times'), path: organisation_time_sessions_path(organisation_id: current_organisation.id), icon: 'bi bi-clock-history', active: times_section_active? %>
<% end %>
<% if can_view_meetings %>
- <%= render 'common/navigation_item', name: t('navigation.all_meetings'), path: organisation_meetings_path(organisation_id: current_organisation.id), icon: 'bi bi-chat-quote', active: controller_name == 'meetings_overview' %>
- <% end %>
- <%# The glossary: a right of its own (GlossaryPolicy, K4a). %>
- <% if policy(GlossaryTerm).index? %>
- <%= render 'common/navigation_item', name: t('navigation.glossary'), path: organisation_glossary_terms_path(organisation_id: current_organisation.id), icon: 'bi bi-book', active: controller_name == 'glossary' %>
+ <%= render 'common/navigation_item', name: t('navigation.all_meetings'), path: organisation_meetings_path(organisation_id: current_organisation.id), icon: 'bi bi-chat-quote', active: meetings_section_active? %>
<% end %>
+ <%# No glossary entry (user, 04.11.2026): the glossary serves the
+ transcription of meetings and is reached from the head of the
+ meetings pages (meetings/_glossary_link). %>
<%# The people directory: a right of its own (PersonPolicy). %>
<% if policy(Person).index? %>
<%= render 'common/navigation_item', name: t('navigation.people'), path: organisation_people_path(organisation_id: current_organisation.id), icon: 'bi bi-people', active: controller_name == 'people' %>
diff --git a/app/views/organisations/glossary/_list_head.html.erb b/app/views/organisations/glossary/_list_head.html.erb
index d4bc3a7..3f9d63a 100644
--- a/app/views/organisations/glossary/_list_head.html.erb
+++ b/app/views/organisations/glossary/_list_head.html.erb
@@ -29,6 +29,17 @@
title: t('views.organisations.glossary.index.new_term'), data: add_data) %>
<% end %>
<% end %>
+ <%# The way back into the meetings area this page belongs to (no sidebar
+ entry of its own since 04.11.2026), for those who may read meetings. %>
+ <% if AccessCheck::ProjectAccessService.accessible_project_ids(current_user, @current_organisation, action: :read, area: :meetings).any? %>
+ <% box.with_right_content do %>
+ <%= render Neo::Buttons::ButtonComponent.new(variant: :secondary, size: :medium, icon: 'arrow-left',
+ url: organisation_meetings_path(@current_organisation),
+ data: { turbo_frame: '_top', glossary_meetings_link: true }) do %>
+ <%= t('navigation.all_meetings') %>
+ <% end %>
+ <% end %>
+ <% end %>
<% end %>
<% end %>
</div>
diff --git a/app/views/organisations/meetings/_glossary_link.html.erb b/app/views/organisations/meetings/_glossary_link.html.erb
new file mode 100644
index 0000000..7b6261b
--- /dev/null
+++ b/app/views/organisations/meetings/_glossary_link.html.erb
@@ -0,0 +1,17 @@
+<%# locals: () %>
+<%# The way into the glossary (user, 04.11.2026): the glossary serves the
+ transcription of meetings, so it is reached from the head of the meetings
+ pages ("Alle Meetings" and a project's meetings), not from the sidebar.
+ Only for those who may read it (GlossaryPolicy). A link of the whole page:
+ the head stands beside frames, and the glossary is a page of its own. %>
+<% if policy(GlossaryTerm).index? %>
+ <%= render Neo::Buttons::ButtonComponent.new(
+ variant: :secondary,
+ size: :medium,
+ icon: 'book',
+ url: organisation_glossary_terms_path(@current_organisation),
+ data: { turbo_frame: '_top', meetings_glossary_link: true }
+ ) do %>
+ <%= t('navigation.glossary') %>
+ <% end %>
+<% end %>
diff --git a/app/views/organisations/meetings/_list_head.html.erb b/app/views/organisations/meetings/_list_head.html.erb
index 7587823..4108df8 100644
--- a/app/views/organisations/meetings/_list_head.html.erb
+++ b/app/views/organisations/meetings/_list_head.html.erb
@@ -44,6 +44,7 @@
<%# No time button here (16.09.2026). Time is booked on a meeting at the
hours chip in its detail meta row, as on a ticket; project time
without a subject is booked on the times page. %>
+ <%= render 'organisations/meetings/glossary_link' %>
<%= render 'common/contextual_help_menu', context: :meetings %>
</div>
<% end %>
diff --git a/app/views/organisations/meetings_overview/_list_head.html.erb b/app/views/organisations/meetings_overview/_list_head.html.erb
index bf35da1..c0a39e0 100644
--- a/app/views/organisations/meetings_overview/_list_head.html.erb
+++ b/app/views/organisations/meetings_overview/_list_head.html.erb
@@ -40,7 +40,10 @@
<% end %>
<% end %>
<% box.with_right_content do %>
- <%= render 'common/contextual_help_menu', context: :meetings %>
+ <div class="flex items-center gap-2">
+ <%= render 'organisations/meetings/glossary_link' %>
+ <%= render 'common/contextual_help_menu', context: :meetings %>
+ </div>
<% end %>
<% end %>
diff --git a/app/views/organisations/mobile_navigation/more.html.erb b/app/views/organisations/mobile_navigation/more.html.erb
index 19cccec..95c5846 100644
--- a/app/views/organisations/mobile_navigation/more.html.erb
+++ b/app/views/organisations/mobile_navigation/more.html.erb
@@ -6,19 +6,15 @@
<%= link_to t('mobile.switch'), select_organisation_path, class: 'mobile-text-action' %>
</div>
<% show_meetings = AccessCheck::ProjectAccessService.accessible_project_ids(current_user, current_organisation, action: :read, area: :meetings).any? %>
- <% show_glossary = policy(GlossaryTerm).index? %>
<% show_people = policy(Person).index? %>
<% show_billings = policy(TimeSessionGroup).index? %>
<% show_management = can_manage_organisation?(current_organisation) %>
- <% if show_meetings || show_glossary || show_people || show_billings || show_management %>
+ <% if show_meetings || show_people || show_billings || show_management %>
<h2 class="mobile-section-label"><%= t('mobile.organisation') %></h2>
<ul class="mobile-menu-list">
<% if show_meetings %>
<li><%= link_to safe_join([content_tag(:i, '', class: 'bi bi-chat-left', aria: { hidden: true }), content_tag(:span, t('navigation.all_meetings'))]), organisation_meetings_path(current_organisation) %></li>
<% end %>
- <% if show_glossary %>
- <li><%= link_to safe_join([content_tag(:i, '', class: 'bi bi-book', aria: { hidden: true }), content_tag(:span, t('navigation.glossary'))]), organisation_glossary_terms_path(current_organisation) %></li>
- <% end %>
<% if show_people %>
<li><%= link_to safe_join([content_tag(:i, '', class: 'bi bi-people', aria: { hidden: true }), content_tag(:span, t('navigation.people'))]), organisation_people_path(current_organisation) %></li>
<% end %>
diff --git a/spec/helpers/navigation_helper_spec.rb b/spec/helpers/navigation_helper_spec.rb
index fc57b82..d567586 100644
--- a/spec/helpers/navigation_helper_spec.rb
+++ b/spec/helpers/navigation_helper_spec.rb
@@ -97,6 +97,20 @@ RSpec.describe NavigationHelper, type: :helper do
end
end
+ describe '#meetings_section_active?' do
+ it 'lights "Alle Meetings" on that page and on the glossary, nowhere else' do
+ %w[meetings_overview glossary].each do |controller|
+ allow(helper).to receive(:controller_name).and_return(controller)
+ expect(helper.meetings_section_active?).to be(true), "expected active on '#{controller}'"
+ end
+
+ %w[meetings people time_sessions projects].each do |controller|
+ allow(helper).to receive(:controller_name).and_return(controller)
+ expect(helper.meetings_section_active?).to be(false), "unexpectedly active on '#{controller}'"
+ end
+ end
+ end
+
describe 'settings tabs are a fixed contract' do
# Explicit, DECOUPLED expectation (key => controller_name), in tab-bar order. The subnav renders
# these and management_section_active? derives its controller list from the SAME source; pinning
diff --git a/spec/requests/organisations/glossary_spec.rb b/spec/requests/organisations/glossary_spec.rb
index 4fc174e..9815821 100644
--- a/spec/requests/organisations/glossary_spec.rb
+++ b/spec/requests/organisations/glossary_spec.rb
@@ -239,13 +239,81 @@ RSpec.describe 'Organisations::Glossary', :ci_guard, type: :request do
end
end
- it 'shows the menu entry in the sidebar and on the mobile "more" page' do
+ # The glossary has no menu entry (user, 04.11.2026): it is reached from
+ # the head of the meetings pages, see 'the way in from the meetings pages'.
+ it 'shows no menu entry in the sidebar and on the mobile "more" page' do
get organisation_root_path(organisation)
follow_redirect! while response.redirect?
- expect(response.body).to include(%(href="#{organisation_glossary_terms_path(organisation)}"), I18n.t('navigation.glossary'))
+ expect(response.body).to include(I18n.t('navigation.all_organisations'))
+ expect(response.body).not_to include(organisation_glossary_terms_path(organisation))
get organisation_mobile_more_path(organisation)
- expect(response.body).to include(%(href="#{organisation_glossary_terms_path(organisation)}"))
+ expect(response.body).to include(I18n.t('mobile.more'))
+ expect(response.body).not_to include(organisation_glossary_terms_path(organisation))
+ end
+
+ it 'offers no way back to the meetings without read access to any meeting' do
+ get organisation_glossary_terms_path(organisation)
+
+ expect(response).to have_http_status(:ok)
+ expect(response.body).to include(I18n.t('views.organisations.glossary.index.title'))
+ expect(response.body).not_to include('data-glossary-meetings-link')
+ end
+ end
+
+ # The glossary belongs to the meetings area (user, 04.11.2026): the head of
+ # "Alle Meetings" and of a project's meetings page carries the link, for
+ # those with the glossary right only; the glossary page leads back to
+ # "Alle Meetings" and keeps that sidebar entry lit.
+ describe 'the way in from the meetings pages' do
+ def meetings_reader(*rights)
+ member_with(role_with(*rights)).tap do |user|
+ create(:project_permission, user: user, project: open_project, meetings_access: 'read_only')
+ end
+ end
+
+ def glossary_link
+ %(href="#{organisation_glossary_terms_path(organisation)}")
+ end
+
+ def meetings_pages
+ [organisation_meetings_path(organisation), organisation_project_meetings_path(organisation, open_project)]
+ end
+
+ it 'shows the link on both meetings pages with the glossary right' do
+ sign_in meetings_reader('view_glossary')
+
+ meetings_pages.each do |path|
+ get path
+ expect(response).to have_http_status(:ok)
+ expect(response.body).to include('data-meetings-glossary-link', glossary_link), "no glossary link on #{path}"
+ expect(response.body).to include(I18n.t('navigation.glossary'))
+ end
+ end
+
+ it 'shows no link on either meetings page without the glossary right' do
+ sign_in meetings_reader
+
+ meetings_pages.each do |path|
+ get path
+ expect(response).to have_http_status(:ok)
+ expect(response.body).not_to include('data-meetings-glossary-link')
+ expect(response.body).not_to include(glossary_link)
+ end
+ end
+
+ it 'leads back to "Alle Meetings" from the glossary and keeps that entry lit' do
+ sign_in meetings_reader('view_glossary')
+
+ get organisation_glossary_terms_path(organisation)
+
+ page = Nokogiri::HTML(response.body)
+ back = page.at_css('a[data-glossary-meetings-link]')
+ expect(back).to be_present
+ expect(back['href']).to eq(organisation_meetings_path(organisation))
+ sidebar_entry = page.css('a').find { |link| link['href'] == organisation_meetings_path(organisation) && link != back }
+ expect(sidebar_entry).to be_present
+ expect(sidebar_entry['class']).to include('sidebar-row--active')
end
end