Sha256: 7304de8b8dadc4f05a3cc9e9eb63547e1e8ab7b8f1b4dfa643a197fc3ee4a8ee

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

<aside class="app-sidebar<%= " #{cookies["trestle:sidebar"]}" if cookies["trestle:sidebar"] %>">
  <header class="app-sidebar-header">
    <button class="navbar-toggle">
      <span class="sr-only"><%= t("admin.ui.toggle_navigation", default: "Toggle navigation") %></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>

    <%= link_to trestle_title, Trestle.config.path, class: "navbar-brand" %>
  </header>

  <div class="app-sidebar-inner">
    <nav class="app-nav">
      <% collapsed = cookies["trestle:navigation:collapsed"].try(:split, ",") || [] %>
      <% Trestle.navigation.each do |group, items| %>
        <ul<% if group.present? && collapsed.include?(group.id) %> class="collapsed"<% end %>>
          <% if group.present? %>
            <li class="nav-header"><%= link_to group.label, "##{group.id}" %></li>
          <% end %>

          <% items.each do |item| %>
            <li<% if current_navigation_item?(item) %> class="active"<% end %>>
              <%= link_to item.path do %>
                <%= icon("nav-icon", item.icon) %>
                <span class="nav-label"><%= item.label %></span>

                <%= content_tag(:span, item.badge.text, class: ["nav-badge", item.badge.html_class]) if item.badge? %>
              <% end %>
            </li>
          <% end %>
        </ul>
      <% end %>
    </nav>

    <button class="toggle-sidebar">
      <span class="sr-only"><%= t("admin.ui.toggle_sidebar", default: "Toggle sidebar") %></span>
    </button>
  </div>
</aside>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trestle-0.8.6 app/views/trestle/shared/_sidebar.html.erb
trestle-0.8.5 app/views/trestle/shared/_sidebar.html.erb