2020-05-11 17:37:22 +00:00
|
|
|
<%#
|
|
|
|
# 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' %>
|
|
|
|
|
2020-05-24 17:14:26 +00:00
|
|
|
<%
|
|
|
|
sidebar_icons = {
|
|
|
|
accounts: 'ion ion-briefcase',
|
|
|
|
users: 'ion ion-person-stalker',
|
|
|
|
super_admins: 'ion ion-unlocked',
|
2021-01-15 07:51:53 +00:00
|
|
|
access_tokens: 'ion-key',
|
2021-04-19 18:31:05 +00:00
|
|
|
platform_apps: 'ion ion-social-buffer',
|
2021-01-15 07:51:53 +00:00
|
|
|
installation_configs: 'ion ion-settings'
|
2020-05-24 17:14:26 +00:00
|
|
|
}
|
|
|
|
%>
|
2020-05-11 17:37:22 +00:00
|
|
|
|
2020-05-24 17:14:26 +00:00
|
|
|
<div class="navigation" role="navigation">
|
|
|
|
<div class="logo-brand">
|
|
|
|
<%= link_to image_tag('/brand-assets/logo.svg', alt: 'Chatwoot Admin Dashboard'), super_admin_root_url %>
|
2020-07-26 16:20:59 +00:00
|
|
|
<div class="app-version">v<%= Chatwoot.config[:version] %></div>
|
2020-05-14 17:21:51 +00:00
|
|
|
</div>
|
2020-05-24 17:14:26 +00:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li class="navigation__link">
|
|
|
|
<i class="ion ion-ios-keypad"></i>
|
|
|
|
<%= link_to "Dashboard", super_admin_root_url %>
|
|
|
|
</li>
|
2022-01-04 16:20:16 +00:00
|
|
|
|
|
|
|
<li class="navigation__link">
|
|
|
|
<i class="ion ion-android-settings"></i>
|
|
|
|
<%= link_to "App Config", super_admin_app_config_url %>
|
|
|
|
</li>
|
|
|
|
|
2020-05-24 17:14:26 +00:00
|
|
|
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
|
2022-01-04 16:20:16 +00:00
|
|
|
<% next if ["account_users", "agent_bots", "dashboard", "devise/sessions", "app_configs" ].include? resource.resource %>
|
2020-05-24 17:14:26 +00:00
|
|
|
<li class="navigation__link navigation__link--<%= nav_link_state(resource) %>">
|
|
|
|
<i class="<%= sidebar_icons[resource.resource.to_sym] %>"></i>
|
|
|
|
<%= link_to(
|
|
|
|
display_resource_name(resource),
|
2020-09-08 05:54:08 +00:00
|
|
|
resource_index_route(resource)
|
2020-05-24 17:14:26 +00:00
|
|
|
) if valid_action? :index, resource %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<li class="navigation__link">
|
|
|
|
<i class="ion ion ion-network"></i>
|
2021-01-15 07:51:53 +00:00
|
|
|
<%= link_to "Sidekiq", sidekiq_web_url, { target: "_blank" } %>
|
2020-05-24 17:14:26 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2020-07-26 16:20:59 +00:00
|
|
|
<ul class="logout">
|
|
|
|
<li class="navigation__link">
|
|
|
|
<i class="ion ion-log-out"></i>
|
|
|
|
<%= link_to "Logout", super_admin_logout_url %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2020-05-24 17:14:26 +00:00
|
|
|
</div>
|