otwarchive-symphonyarchive/app/views/admin/_admin_nav.html.erb
2026-03-11 22:22:11 +00:00

41 lines
1.3 KiB
Text

<h3 class="landmark heading"><%= t(".landmark") %></h3>
<ul class="navigation actions" role="navigation">
<li>
<%= span_if_current t(".ao3_news"), admin_posts_path %>
</li>
<% if policy(AdminPost).can_post? %>
<li>
<%= span_if_current t(".post_ao3_news"), new_admin_post_path %>
</li>
<% end %>
<% if params[:controller] == "admin_posts" && params[:action] == "edit" %>
<li>
<%= link_to t(".news.delete_post"),
@admin_post,
data: { confirm: "Are you sure you want to delete this news post?" },
method: :delete %>
</li>
<% end %>
<% if params[:controller] == "archive_faqs" && params[:action] == "edit" &&
Globalize.locale.to_s == "en" %>
<li>
<%= link_to t(".faq.reorder_questions"), manage_archive_faq_questions_path(@archive_faq) %>
</li>
<% end %>
<% if policy(ArchiveFaq).translation_access? %>
<li>
<%= span_if_current t(".archive_faq"), archive_faqs_path %>
</li>
<% end %>
<% if policy(KnownIssue).admin_index? %>
<li>
<%= span_if_current t(".known_issues"), known_issues_path %>
</li>
<% end %>
<% if policy(:wrangling).new? %>
<li>
<%= span_if_current t(".wrangling_guidelines"), wrangling_guidelines_path %>
</li>
<% end %>
</ul>