Permalink
Browse files

added conditional display of menu entries from plugins

  • Loading branch information...
1 parent 3d80fa8 commit 25f704cfab91c030d02bb08e221d8355da8ac8e9 @nu7hatch nu7hatch committed Jul 25, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 app/views/layouts/application.html.erb
@@ -62,14 +62,16 @@
<div class="span3">
<ul class="nav nav-list well">
<% Datajam.navigation.each do |section| %>
+ <% if !section[:if] || section[:if].call %>
<li class="nav-header"><%= section[:title] %></li>
- <% section[:items].each do |item| %>
- <li>
- <a href="<%= item[:url] %>">
- <i class="icon-<%= item[:icon] %>"></i>
- <%= item[:title] %>
- </a>
- </li>
+ <% section[:items].each do |item| %>
+ <li>
+ <a href="<%= item[:url] %>">
+ <i class="icon-<%= item[:icon] %>"></i>
+ <%= item[:title] %>
+ </a>
+ </li>
+ <% end %>
<% end %>
<% end %>
</ul>

0 comments on commit 25f704c

Please sign in to comment.