Sha256: 824f43498f8ccbb83279dcbcdca06eb6a72911b7bfb62bcdf8fa39fbf6027900

Contents?: true

Size: 1.82 KB

Versions: 77

Compression:

Stored size: 1.82 KB

Contents

<%
@nav = Caboose.plugin_hook('admin_nav', [], @logged_in_user, @page, @site)
return_url = session[:caboose_station_return_url].nil? ? '/' : session[:caboose_station_return_url]
return_url = '/' if return_url.starts_with?('/admin/') || return_url == '/admin'

width = 200
@nav.each {|item| width = 400 if item['id'] == @tab } if @tab
%>

<h1>Admin</h1>
<ul>
  <!--
  <li id='nav_item_logout'><a href='/logout'><span class='icon'></span><span class='text'>Logout</span></a>
  <li id='nav_item_myaccount'><a href='/my-account'><span class='icon'></span><span class='text'>My Account</span></a>
  -->
  <% i = 0 %>
  <% @nav.each do |item| %>
    <% id = item['id'].nil? ? i.to_s : item['id'] %>
    <% href = item['href'].nil? ? '#' : item['href'] %>
    <% modal = item['modal'].nil? ? false : item['modal'] %>
    <li id='nav_item_<%= id %>'>
      <% if href != "#" %><a href='<%= href %>'<%= raw (modal ? " rel='modal'" : "") %>><% end %>
        <span class='icon'></span><span class='text'><%= item['text'] %></span>
      <% if href != "#" %></a><% end %>
    <% if (!item['children'].nil? && item['children'].count > 0) %>
      <ul>
        <% item['children'].each do |item2| %>
          <% modal = item2['modal'].nil? ? false : item2['modal'] %>
          <li><a href='<%= item2['href'] %>'<%= raw (modal ? " rel='modal'" : "") %>><%= item2['text'] %></a></li>
        <% end %>
      </ul>
    <% end %>
    </li>
    <% i + 1 %>
  <% end %>
</ul>

<%= content_for :caboose_js do %>
<%= javascript_include_tag "caboose/station" %>
<script type='text/javascript'>
var modal = false;
var station = false;
$(document).ready(function() {
  modal = new CabooseModal(<%= width %>);
  station = new CabooseStation(modal<%= raw @tab ? ", '#{@tab}'" : '' %>);
});
</script>
<% end %>
<%= content_for :caboose_css do %>
<style type='text/css'>

</style>
<% end %>

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
caboose-cms-0.9.64 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.63 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.62 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.61 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.60 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.59 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.58 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.57 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.56 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.55 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.54 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.53 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.52 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.51 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.50 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.49 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.48 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.47 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.46 app/views/caboose/admin/index.html.erb
caboose-cms-0.9.45 app/views/caboose/admin/index.html.erb