Skip to content

Commit

Permalink
add admin nav menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Cesium-Ice committed Dec 26, 2024
1 parent 93774a8 commit 6c54648
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions app/views/admin/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,15 @@
<% if policy(:wrangling).full_access? %>
<li><%= link_to t(".nav.wrangling"), tag_wranglings_path %></li>
<% end %>
<% if policy(Locale).index? %>
<li><%= link_to t(".nav.locales"), locales_path %></li>
<% if policy(Locale).index? || policy(LocaleLanguage).index? || policy(Language).index? %>
<li class="dropdown">
<%= link_to t(".nav.locales_and_languages.menu"), locales_path %>
<ul class="menu">
<li><%= link_to t(".nav.locales_and_languages.locales"), locales_path %></li>
<li><%= link_to t(".nav.locales_and_languages.locale_languages"), locale_languages_path %></li>
<li><%= link_to t(".nav.locales_and_languages.work_languages"), languages_path %></li>
</ul>
</li>
<% end %>

<% if policy(AdminActivity).index? %>
Expand Down
6 changes: 5 additions & 1 deletion config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ en:
queue: Manage Queue
requests: Manage Requests
label: Admin
locales: Locales
locales_and_languages:
locale_languages: Locale Languages
locales: Locales
menu: Locales and Languages
work_languages: Work Languages
posts:
admin_posts: Admin Posts
faqs: Archive FAQ
Expand Down

0 comments on commit 6c54648

Please sign in to comment.