747f1d6fb256a41156fd9d4936fd49b8b206ee44
[arvados.git] / apps / workbench / app / views / layouts / application.html.erb
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <title><%= Rails.configuration.site_name rescue Rails.application.class.parent_name %></title>
6   <meta name="viewport" content="width=device-width, initial-scale=1.0">
7   <meta name="description" content="">
8   <meta name="author" content="">
9   <%= stylesheet_link_tag    "application", :media => "all" %>
10   <%= javascript_include_tag "application" %>
11   <%= csrf_meta_tags %>
12   <%= yield :head %>
13   <%= javascript_tag do %>
14   <%= yield :js %>
15   <% end %>
16   <style>
17     body {
18     padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
19     }
20   </style>
21 </head>
22 <body>
23
24   <div class="navbar navbar-inverse navbar-fixed-top">
25     <div class="navbar-inner">
26       <div class="container">
27         <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
28           <span class="icon-bar"></span>
29           <span class="icon-bar"></span>
30           <span class="icon-bar"></span>
31         </a>
32         <a class="brand" href="/"><%= Rails.configuration.site_name rescue Rails.application.class.parent_name %></a>
33         <div class="nav-collapse collapse">
34           <ul class="nav">
35             <% [
36                [false, 'Keys', authorized_keys_path],
37                [false, 'VMs', virtual_machines_path],
38                [false, 'Repos', repositories_path],
39                [false, 'Jobs', jobs_path]
40                ].each do |admin_only, name, path| %>
41             <% if !admin_only or (current_user and current_user.is_admin) %>
42             <li<%= raw ' class="active"' if request.fullpath.index(path) %>><a href="<%= path %>"><%= name %></a></li>
43             <% end %>
44             <% end %>
45           </ul>
46           <ul class="nav pull-right">
47       <% if current_user -%>
48             <li><span class="badge badge-info" style="margin: 10px auto 10px; padding-top: 4px; padding-bottom: 4px"><%= current_user.email %></span></li>
49             <li><a href="<%= logout_path %>">Log out</a></li>
50       <% else -%>
51             <li><a href="<%= root_path %>">Log in</a></li>
52       <% end -%>
53           </ul>
54         </div><!--/.nav-collapse -->
55       </div>
56     </div>
57   </div>
58
59   <div class="container">
60
61     <%= yield %>
62
63   </div> <!-- /container -->
64
65 </body>
66 </html>