Sha256: d59c80926f9ef5969da5bfe1d9f08361df8175df2c770488f62be0f485900dcb

Contents?: true

Size: 1.55 KB

Versions: 3

Compression:

Stored size: 1.55 KB

Contents

<nav class="navbar navbar-default">
	<div class="container-fluid">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="/"><%= current_site.site_name if current_site %></a>
		</div>

		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1" >
			<ul class="nav navbar-nav navbar-right">
				<% if current_site %>
				<% current_site.pages.where('navbar_show = true AND draft != true').order(:order).includes(:children).each do |page| %>
					<% if page.children.exists? %>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><%= page.title %><span class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
								<li><%= link_to page.title, slugged_path(page) %></li>
								<% page.children.each do |child| %>
									<li><%= link_to child.title, slugged_path(child)  %></li>
								<% end %>
							</ul>
						</li>
					<% else %>
						<li><%= link_to page.title, slugged_path(page) %></li>
					<% end %>
				<% end %>
				<% end %>
				<% if current_user_is_admin? %>
						<li><%= link_to 'Admin', admin_pages_path %></li>
				<% end %>
			</ul>
		</div>

	</div><!-- /.container-fluid -->
</nav>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pages_cms-2.2.3 app/views/layouts/pages_cms/_header.html.erb
pages_cms-2.2.2 app/views/layouts/pages_cms/_header.html.erb
pages_cms-2.2.1 app/views/layouts/pages_cms/_header.html.erb