Sha256: dfa85ad74251b1d8d20a9dddff98718c5da5052cca6389c098cdbdf8680d7252

Contents?: true

Size: 1.82 KB

Versions: 48

Compression:

Stored size: 1.82 KB

Contents

<%
@nav = Caboose.plugin_hook('admin_nav', [], @user, @page)
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
%>

<%= 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 %>
<%= stylesheet_link_tag "caboose/station_modal", :media => "all" %>
<% end %>

<div id='station'>
  <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 %>'><a href='<%= href %>'<%= raw (modal ? " rel='modal'" : "") %>><span class='icon'></span><span class='text'><%= item['text'] %></span></a>
      <% if (!item['children'].nil? && item['children'].count > 0) %>
        <ul style='display: none;'>
          <% 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>
</div>

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
caboose-cms-0.2.66 app/views/caboose/station/index.html.erb
caboose-cms-0.2.65 app/views/caboose/station/index.html.erb
caboose-cms-0.2.64 app/views/caboose/station/index.html.erb
caboose-cms-0.2.62 app/views/caboose/station/index.html.erb
caboose-cms-0.2.57 app/views/caboose/station/index.html.erb
caboose-cms-0.2.55 app/views/caboose/station/index.html.erb
caboose-cms-0.2.54 app/views/caboose/station/index.html.erb
caboose-cms-0.2.52 app/views/caboose/station/index.html.erb
caboose-cms-0.2.50 app/views/caboose/station/index.html.erb
caboose-cms-0.2.49 app/views/caboose/station/index.html.erb
caboose-cms-0.2.48 app/views/caboose/station/index.html.erb
caboose-cms-0.2.47 app/views/caboose/station/index.html.erb
caboose-cms-0.2.46 app/views/caboose/station/index.html.erb
caboose-cms-0.2.45 app/views/caboose/station/index.html.erb
caboose-cms-0.2.44 app/views/caboose/station/index.html.erb
caboose-cms-0.2.43 app/views/caboose/station/index.html.erb
caboose-cms-0.2.42 app/views/caboose/station/index.html.erb
caboose-cms-0.2.41 app/views/caboose/station/index.html.erb
caboose-cms-0.2.40 app/views/caboose/station/index.html.erb
caboose-cms-0.2.39 app/views/caboose/station/index.html.erb