app/themes/default/views/layouts/backend/_sidebar.html.erb in archangel-0.3.0 vs app/themes/default/views/layouts/backend/_sidebar.html.erb in archangel-0.4.0
- old
+ new
@@ -1,55 +1,75 @@
-<div class="sidebar">
- <nav class="sidebar-nav">
- <ul class="nav">
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_root_path %>"><%= fa_icon("home") %> <%= Archangel.t(:dashboard) %></a>
- </li>
+<div id="navbarSidebar">
+ <ul class="sidebar navbar-nav">
+ <li class="nav-item<%= " active" if active_backend_menu_for("dashboards") %>">
+ <a class="nav-link" href="<%= backend_root_path %>">
+ <i class="fas fa-home"></i>
+ <span><%= Archangel.t(:dashboard) %></span>
+ </a>
+ </li>
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_pages_path %>"><%= fa_icon("file") %> <%= Archangel.t(:pages) %></a>
- </li>
+ <li class="nav-item<%= " active" if active_backend_menu_for("pages") %>">
+ <a class="nav-link" href="<%= backend_pages_path %>">
+ <i class="fas fa-file"></i>
+ <span><%= Archangel.t(:pages) %></span>
+ </a>
+ </li>
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_collections_path %>"><%= fa_icon("folder-open") %> <%= Archangel.t(:collections) %></a>
- </li>
+ <li class="nav-item<%= " active" if active_backend_menu_for("widgets") %>">
+ <a class="nav-link" href="<%= backend_widgets_path %>">
+ <i class="fas fa-star"></i>
+ <span><%= Archangel.t(:widgets) %></span>
+ </a>
+ </li>
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_widgets_path %>"><%= fa_icon("star") %> <%= Archangel.t(:widgets) %></a>
- </li>
+ <li class="nav-item dropdown<%= " active" if active_backend_menu_for("collections") %>">
+ <a href="<%= backend_collections_path %>" id="entriesDropdown" class="nav-link dropdown-toggle"
+ role="button"
+ data-toggle="dropdown"
+ aria-haspopup="true" aria-expanded="false">
+ <i class="fas fa-layer-group"></i>
+ <span><%= Archangel.t(:collections) %></span>
+ </a>
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_assets_path %>"><%= fa_icon("paperclip") %> <%= Archangel.t(:assets) %></a>
- </li>
-
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_templates_path %>"><%= fa_icon("flag") %> <%= Archangel.t(:templates) %></a>
- </li>
-
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_users_path %>"><%= fa_icon("user") %> <%= Archangel.t(:users) %></a>
- </li>
-
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_site_path %>"><%= fa_icon("cog") %> <%= Archangel.t(:site) %></a>
- </li>
-
<% if current_site.collections.present? %>
- <% current_site.collections.each_with_index do |item, index| %>
- <% if item.persisted? %>
- <% if index.zero? %>
- <li class="nav-title">
- <%= Archangel.t(:collections) %>
- </li>
- <% end %>
+ <div class="dropdown-menu" aria-labelledby="entriesDropdown">
+ <% current_site.collections.each_with_index do |item, index| %>
+ <% next unless item.persisted? %>
- <li class="nav-item">
- <a class="nav-link" href="<%= backend_collection_entries_path(item) %>"><%= fa_icon("circle") %> <%= item.name %></a>
- </li>
+ <a class="dropdown-item" href="<%= backend_collection_entries_path(item) %>">
+ <i class="fas fa-circle"></i>
+ <span><%= item.name %></span>
+ </a>
<% end %>
- <% end %>
+ </div>
<% end %>
- </ul>
- </nav>
+ </li>
- <button class="sidebar-minimizer brand-minimizer" type="button"></button>
+ <li class="nav-item<%= " active" if active_backend_menu_for("designs") %>">
+ <a class="nav-link" href="<%= backend_designs_path %>">
+ <i class="fas fa-paint-roller"></i>
+ <span><%= Archangel.t(:designs) %></span>
+ </a>
+ </li>
+
+ <li class="nav-item<%= " active" if active_backend_menu_for("assets") %>">
+ <a class="nav-link" href="<%= backend_assets_path %>">
+ <i class="fas fa-images"></i>
+ <span><%= Archangel.t(:assets) %></span>
+ </a>
+ </li>
+
+ <li class="nav-item<%= " active" if active_backend_menu_for("users") %>">
+ <a class="nav-link" href="<%= backend_users_path %>">
+ <i class="fas fa-users"></i>
+ <span><%= Archangel.t(:users) %></span>
+ </a>
+ </li>
+
+ <li class="nav-item<%= " active" if active_backend_menu_for("sites") %>">
+ <a class="nav-link" href="<%= backend_site_path %>">
+ <i class="fas fa-globe-americas"></i>
+ <span><%= Archangel.t(:site) %></span>
+ </a>
+ </li>
+ </ul>
</div>