<% sidebar_collapse = request.cookies['admin_sidebar_collapse'].to_s == 'true' %>
<nav id="sidebar" class="<%= sidebar_collapse ? 'active' : '' %>" data-current-controller="<%= admin_sidebar_controller %>">
  <div class="sidebar-header">
    <a href="/" class="sidebar-header-logo" data-toggle="tooltip" data-title="返回主站" >
<!--      <img class="rounded-circle" src="/images/<%#= url_to_avatar(current_user) %>" />-->
      <span class="logo-label">后台管理</span>
    </a>
    <div id="sidebarCollapse" class="navbar-btn <%= sidebar_collapse ? 'active' : '' %>">
      <i class="fa fa-chevron-left fold" data-toggle="tooltip" data-placement="right" data-boundary="window" title="收起"></i>
      <i class="fa fa-bars unfold" data-toggle="tooltip" data-placement="right" data-boundary="window" title="展开"></i>
    </div>
  </div>

  <!-- Sidebar Links -->
  <ul class="list-unstyled components">
    <li><%= sidebar_item(admins_path, '概览', icon: 'dashboard', controller: 'admins-dashboards') %></li>
    <li>
      <%= sidebar_item_group('#user-submenu', '用户', icon: 'user') do %>
        <li><%= sidebar_item(admins_users_path, '用户列表', icon: 'user', controller: 'admins-users') %></li>
      <% end %>
    </li>
    <li>
      <%= sidebar_item_group('#projects-submenu', '开源项目', icon: 'database') do %>
        <li><%= sidebar_item(admins_projects_path, '项目列表', icon: 'database', controller: 'admins-projects') %></li>
        <li><%= sidebar_item(admins_project_languages_path, '项目语言', icon: 'language', controller: 'admins-project_languages') %></li>
        <li><%= sidebar_item(admins_project_categories_path, '分类列表', icon: 'sitemap', controller: 'admins-project_categories') %></li>
        <li><%= sidebar_item(admins_project_licenses_path, '开源许可证', icon: 'file-text-o', controller: 'admins-project_licenses') %></li>
        <li><%= sidebar_item(admins_project_ignores_path, '忽略文件', icon: 'git', controller: 'admins-project_ignores') %></li>
      <% end %>
    </li>
<li>
      <%= sidebar_item_group('#memos-submenu', '交流论坛', icon: 'columns') do %>
        <li><%= sidebar_item(admins_memos_path, '帖子', icon: 'columns', controller: 'admins-memos') %></li>
        <li><%= sidebar_item(admins_apply_destroy_index_path, '申请删帖', icon: 'trash', controller: 'admins-apply_destroy') %></li>
        <li><%= sidebar_item(admins_memo_reply_lists_path, '回复', icon: 'mail-reply-all', controller: 'admins-memo_reply_lists') %></li>
        <li><%= sidebar_item(admins_forum_sections_path, '版块配置', icon: 'tags', controller: 'admins-forum_sections') %></li>
        <li><%= sidebar_item(admins_banned_users_path, '禁言列表', icon: 'ban', controller: 'admins-banned_users') %></li>
        <li><%= sidebar_item(admins_forum_applies_path, '版主审批', icon: 'check-square-o', controller: 'admins-forum_applies') %></li>
      <% end %>
    </li>
    <li><%= sidebar_item(admins_laboratories_path, '云上实验室', icon: 'cloud', controller: 'admins-laboratories') %></li>

    <li>
      <%= sidebar_item_group('#setting-submenu', '网站建设', icon: 'cogs') do %>
        <li><%= sidebar_item(edit_admins_about_path, '关于我们', icon: 'smile-o', controller: 'admins-abouts') %></li>
        <li><%= sidebar_item(edit_admins_contact_us_path, '联系我们', icon: 'commenting-o', controller: 'admins-contact_us') %></li>
        <li><%= sidebar_item(admins_cooperatives_path, '合作伙伴', icon: 'handshake-o', controller: 'admins-cooperatives') %></li>
        <li><%= sidebar_item(edit_admins_agreement_path, '服务协议', icon: 'file-text-o', controller: 'admins-agreements') %></li>
        <li><%= sidebar_item(edit_admins_help_center_path, '帮助中心', icon: 'question-circle-o', controller: 'admins-help_centers') %></li>
      <% end %>
    </li>
    <li>
    <%= sidebar_item('/admins/sidekiq', '定时任务', icon: 'bell', controller: 'root') %>
    </li>
    <li><%= sidebar_item('/', '返回主站', icon: 'sign-out', controller: 'root') %></li>
  </ul>
</nav>
