_navigation.html.erb 659 B

123456789101112131415161718192021222324
  1. <%#
  2. # Navigation
  3. This partial is used to display the navigation in Administrate.
  4. By default, the navigation contains navigation links
  5. for all resources in the admin dashboard,
  6. as defined by the routes in the `admin/` namespace
  7. %>
  8. <nav class="navigation" role="navigation">
  9. <%= link_to(
  10. "← Back to App",
  11. root_path,
  12. class: "navigation__link"
  13. ) %>
  14. <% Administrate::Namespace.new(namespace).resources.each do |resource| %>
  15. <%= link_to(
  16. display_resource_name(resource),
  17. [namespace, resource_index_route_key(resource)],
  18. class: "navigation__link navigation__link--#{nav_link_state(resource)}"
  19. ) %>
  20. <% end %>
  21. </nav>