%aside.main-sidebar %section.sidebar.sidebar-collapse .user-panel .pull-left.image = image_tag (current_user.avatar.url || 'admin/avatar_keppler.svg'), class: 'img-circle side-img-profile keppler-background', alt: current_user.name .info %p= current_user.name %small= current_user.rol.humanize %ul.sidebar-menu.tree{ 'data-widget': 'tree' } %li.sidebar-item = link_to '/admin/dashboard', class: "sidebar-link #{'active' if request.env['REQUEST_PATH'].eql?('/admin/dashboard')}", 'data-turbolinks': false do %i.icon-pie-chart %span= t('keppler.sidebar-menu.dashboard') - @sidebar.each do |menu| - menu.each do |key, _value| - if menu[key]['submenu'] - unless menu[key]['model'].eql?('Customize') && Rails.env.production? - if menu[key]['model'] && can?(menu[key]['model'].constantize).index? %li.sidebar-item{ class: ('active' if menu[key]['current'].include?(controller_path)) } %a.sidebar-link{ href: '#', class: ('active current' if menu[key]['current'].include?(controller_path)) } %i{ class: "icon-#{menu[key]['icon']}" } %span= t("keppler.sidebar-menu.#{menu[key]['name'].parameterize}") %ul.treeview-menu - menu[key]['submenu'].each do |submenu, _val| - submenu.each do |name, _val| %li= link_to t("keppler.sidebar-menu.#{menu[key]['name'].parameterize}-submenu.#{submenu[name]['name'].parameterize}"), submenu[name]['url_path'], class: "treeview-menu-link #{'active current' if submenu[name]['url_path'].include?(controller_path)}", 'data-no-turbolink' => true - elsif menu[key]['model'] && can?(menu[key]['model'].constantize).index? # tree sidebar links %li.sidebar-item.treeview{ class: ('active' if controller_name.eql?(menu[key]['name'])) } = link_to menu[key]['url_path'], class: "sidebar-link collapsible-header #{'current' if menu[key]['current'].include?(controller_path)}", 'data-no-turbolink': true do %i{ class: "icon-#{menu[key]['icon']}" } %span= t("keppler.sidebar-menu.#{menu[key]['name'].parameterize}") - if menu[key]['model'].constantize.attribute_names.include?('read') && !menu[key]['model'].constantize.all.reject(&:read).count.zero? %span.pull-right-container %small.label.pull-right.bg-red= menu[key]['model'].constantize.all.reject(&:read).count %li.sidebar-item{ class: ('active' if 'admin/settings/basic_information'.eql?(controller_path)) } %a.sidebar-link{ href: '#', class: ('active current' if 'admin/settings/basic_information'.eql?(controller_path)) } %i.icon-settings %span= t('keppler.sidebar-menu.setting') %ul.treeview-menu %li = link_to '/admin/settings/basic_information' do = t('keppler.sidebar-menu.setting-submenu.basic-information') %li = link_to '/admin/settings/email_setting' do = t('keppler.sidebar-menu.setting-submenu.email-setting-smtp') %li = link_to '/admin/settings/google_analytics_setting' do = t('keppler.sidebar-menu.setting-submenu.google-analytics') %li = link_to '/admin/settings/social_accounts' do = t('keppler.sidebar-menu.setting-submenu.social-accounts') .sidebar-footer %a{ href: 'http://slicegroup.xyz', target: '_blank' } .brand.pull-left#slice = image_tag 'admin/slice_white.png' .brand.pull-left.hidden#icon = image_tag 'admin/slice-icon.png' %span.pull-right v 2.0