Files
leadchat/app/views/super_admin/application/_navigation.html.erb
Sojan Jose c74b5c21d7 Feature: Introduce Super Admins (#705)
* Feature: Introduce Super Admins

- added new devise model for super user
- added administrate gem
- sample dashboards for users and accounts

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-05-11 23:07:22 +05:30

28 lines
911 B
Plaintext

<%#
# 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
%>
<%= javascript_pack_tag 'superadmin_pages' %>
<%= stylesheet_pack_tag 'superadmin_pages' %>
<nav class="navigation" role="navigation">
<%= link_to "Back to app", root_url, class: "button button--alt" %>
<%= link_to "Logout", super_admin_logout_url , class: "button button--alt" %>
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
<%= link_to(
display_resource_name(resource),
[namespace, resource_index_route_key(resource)],
class: "navigation__link navigation__link--#{nav_link_state(resource)}"
) if valid_action? :index, resource %>
<% end %>
<%= link_to "Sidekiq", sidekiq_web_url , class: "button" %>
</nav>