% add_to_page_title "Outpost" %>
<%= page_title %>
<%= stylesheet_link_tag "outpost/application" %> <%= javascript_include_tag "outpost/application" %>
<%= csrf_meta_tags %>
<%= image_tag "outpost/logo.png" %>
<% if current_user %>
Navigation
<% models = current_user.respond_to?(:allowed_resources) ? current_user.allowed_resources.sort_by(&:name) : Outpost.config.registered_models.map(&:safe_constantize) %> <% per_col = 20 %> <% cols = (models.size.to_f / per_col.to_f).ceil %>
<% models.each_with_index do |model, index| %> <% if index % per_col == 0 %>
<% end %>
<%= model.name.titleize.pluralize %>
<% if model.respond_to?(:admin_new_path) %>
Add
<% end %>
<% if index % per_col == per_col - 1 or model == models.last %>
<% end %> <% end %>
<%= current_user.name %>
<%= link_to "Logout", outpost.logout_path, id: "logout" %>
<% else %>
<%= link_to "Login", outpost.login_path %>
<% end %>
<% if current_user %>
<% if breadcrumbs.present? %>
<%= render_breadcrumbs %>
<% end %>
<% end %>
"> <%= render_flash_messages %> <%= yield %>
<% if content_for?(:sidebar) %>
<%= yield :sidebar %>
<% end %>
<%= yield :footer %>