|
<div class="navbar-header">
<button type="button" class="navbar-toggle" 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>
<%= link_to "Huginn", root_path, :class => 'navbar-brand' %>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<% if user_signed_in? %>
<ul class='nav navbar-nav'>
<%= nav_link "Agents", agents_path do %>
<ul class='dropdown-menu' role='menu'>
<%= nav_link "New Agent", new_agent_path, glyphicon: "plus" %>
<%= nav_link "Run event propagation", propagate_agents_path, method: 'post', glyphicon: "refresh" %>
<%= nav_link "View Diagram", diagram_path, glyphicon: 'random' %>
</ul>
<% end %>
<%= nav_link "Scenarios", scenarios_path %>
<%= nav_link "Events", events_path %>
<%= nav_link "Credentials", user_credentials_path %>
</ul>
<% end %>
<ul class="nav navbar-nav navbar-right">
<% if user_signed_in? %>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" id='agent-navigate' autocomplete="off" placeholder="Search">
<%= image_tag "spinner-arrows.gif", :class => "spinner" %>
</div>
</form>
<li id='job-indicator'>
<% if defined?(DelayedJobWeb) %>
<a href="/delayed_job">
<span class="badge"><span class="glyphicon glyphicon-refresh icon-white"></span> <span class='number'>0</span></span>
</a>
<% else %>
<a href="#" onclick='return false;'>
<span class="badge"><span class="glyphicon glyphicon-refresh icon-white"></span> <span class='number'>0</span></span>
</a>
<% end %>
</li>
<li id='event-indicator'>
<a href="#">
<span class="badge"><span class="glyphicon glyphicon-random icon-white"></span> <span class='number'>0</span> new events</span>
</a>
</li>
<% end %>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Account
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li>
<% if user_signed_in? %>
<%= link_to 'Account', edit_user_registration_path, :tabindex => "-1" %>
<% else %>
<%= link_to 'Sign up', new_user_registration_path, :tabindex => "-1" %>
<% end %>
</li>
<li>
<%= link_to 'About', 'https://github.com/cantino/huginn', :tabindex => "-1" %>
</li>
<li>
<% if user_signed_in? %>
<%= link_to 'Logout', destroy_user_session_path, :method => :delete, :tabindex => "-1" %>
<% else %>
<%= link_to 'Login', new_user_session_path, :tabindex => "-1" %>
<% end %>
</li>
</ul>
</li>
</ul>
</div>
|