Merge branch 'master' into 14988-wb-rails5-upgrade
[arvados.git] / services / api / app / views / layouts / application.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <!DOCTYPE html>
6 <html>
7 <head>
8   <title>Arvados API Server (<%= Rails.configuration.ClusterID %>)</title>
9   <%= stylesheet_link_tag    "application" %>
10   <%= javascript_include_tag "application" %>
11   <%= csrf_meta_tags %>
12 </head>
13 <body>
14 <div id="header">
15   <div class="apptitle">ARVADOS</div>
16   <div>(<%= Rails.configuration.ClusterID %>)</div>
17   <div style="float:right">
18     <% if current_user %>
19     <%= current_user.full_name %>
20     <% if current_user.is_admin %>
21     &nbsp;&bull;&nbsp;
22     <a class="logout" href="/admin/users">Admin</a>
23     <% end %>
24     &nbsp;&bull;&nbsp;
25     <a class="logout" href="/logout">Log out</a>
26     <% else %>
27       <!--<a class="logout" href="/auth/joshid">Log in</a>-->
28     <% end %>
29
30     <% if current_user and session[:real_uid] and session[:switch_back_to] and User.find(session[:real_uid].to_i).verify_userswitch_cookie(session[:switch_back_to]) %>
31     &nbsp;&bull;&nbsp;
32     <span class="sudo-warning">Logged in as <b><%= current_user.full_name %></b>. <%= link_to "Back to #{User.find(session[:real_uid]).full_name}", switch_to_user_path(session[:real_uid]), :method => :post, :class => 'sudo-logout' %></span>
33     <% end %>
34   </div>
35 </div>
36
37
38 <%= yield %>
39
40 <div style="clear:both"></div>
41
42 <% if current_user or session['invite_code'] %>
43 <div id="footer">
44   <div style="float:right">Questions &rarr; <a href="mailto:arvados@curoverse.com">arvados@curoverse.com</a></div>
45   <div style="clear:both"></div>
46 </div>
47 <% end %>
48
49 </body>
50 </html>