1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/web/views/_nav.erb
2014-08-06 16:46:57 +00:00

34 lines
1.3 KiB
Text

<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid text-center">
<a class="navbar-brand" href="<%= root_path %>">
<%= Sidekiq::NAME %>
<%= erb :_status %>
</a>
<ul class="nav navbar-nav">
<% Sidekiq::Web.default_tabs.each do |title, url| %>
<% if url == '' %>
<li class="<%= current_path == url ? 'active' : '' %>">
<a href="<%= root_path %><%= url %>"><%= t(title) %></a>
</li>
<% else %>
<li class="<%= current_path.start_with?(url) ? 'active' : '' %>">
<a href="<%= root_path %><%= url %>"><%= t(title) %></a>
</li>
<% end %>
<% end %>
<% Sidekiq::Web.custom_tabs.each do |title, url| %>
<li class="<%= current_path.start_with?(url) ? 'active' : '' %>">
<a href="<%= root_path %><%= url %>"><%= t(title) %></a>
</li>
<% end %>
</ul>
</div>
<div class="poll-wrapper pull-right">
<%= erb :_poll %>
<%- if Sidekiq::Web.app_url -%>
<a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>">Back to App</a>
<%- end -%>
</div>
</div>
</div>