Newer
Older
dmpopidor / app / views / administrate / application / _navigation.html.erb
@Jimmy Angelakos Jimmy Angelakos on 15 May 2017 797 bytes Upgraded Administrate (0.7.0), closes #266.
<%# Hack for customisation %>

<%#
# Navigation

This partial is used to display the navigation in Administrate.
By default, the navigation contains navigation links
for all resources in the admin dashboard,
as defined by the routes in the `admin/` namespace
%>

<nav class="navigation" role="navigation">

  <%= render 'admin_header' %>

  <% Administrate::Namespace.new(namespace).resources.each do |resource| %>
    <%# Hack to hide unnecessary models from sidebar %>
    <% if ["users","orgs","perms","identifier_schemes","languages",].include? resource.to_s %> 
        <%= link_to(
          display_resource_name(resource),
          [namespace, resource.path],
          class: "navigation__link navigation__link--#{nav_link_state(resource)}"
        ) %>
    <% end %>
  <% end %>
</nav>