<% sidebar_collapse = request.cookies['cooperative_sidebar_collapse'].to_s == 'true' %>
<nav id="sidebar" class="<%= sidebar_collapse ? 'active' : '' %>" data-current-controller="<%= sidebar_controller %>">
  <div class="sidebar-header">
    <a href="/" class="sidebar-header-logo" data-toggle="tooltip" title="返回主页">
      <img src="<%= current_setting_or_default(:nav_logo_url) %>"/>
      <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(cooperative_path, '概览', icon: 'dashboard', controller: 'cooperative-dashboards') %></li>-->
    <li><%= sidebar_item(edit_cooperative_laboratory_setting_path, '网站设置', icon: 'cogs', controller: 'cooperative-laboratory_settings') %></li>
    <li><%= sidebar_item(cooperative_carousels_path, '轮播图设置', icon: 'image', controller: 'cooperative-carousels') %></li>
    <li><%= sidebar_item(cooperative_laboratory_users_path, '管理员列表', icon: 'user', controller: 'cooperative-laboratory_users') %></li>
    <li><%= sidebar_item(cooperative_users_path, '用户列表', icon: 'users', controller: 'cooperative-users') %></li>
    <li><%= sidebar_item(cooperative_laboratory_shixuns_path, '实训项目', icon: 'window-restore', controller: 'cooperative-laboratory_shixuns') %></li>
    <li><%= sidebar_item(cooperative_laboratory_subjects_path, '实践课程', icon: 'th-list', controller: 'cooperative-laboratory_subjects') %></li>
    <li><%= sidebar_item(cooperative_competitions_path, '竞赛列表', icon: 'trophy', controller: 'cooperative-competitions') %></li>
    <li><%= sidebar_item('/', '返回主页', icon: 'sign-out', controller: 'root') %></li>
  </ul>
</nav>