1 <div id="wrapper" class="container-fluid">
2 <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
3 <div class="navbar-header">
4 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
5 <span class="sr-only">Toggle navigation</span>
6 <span class="icon-bar"></span>
7 <span class="icon-bar"></span>
8 <span class="icon-bar"></span>
10 <% site_name = Rails.configuration.site_name.downcase rescue Rails.application.class.parent_name %>
12 <a class="navbar-brand" href="/" data-push=true><%= site_name %></a>
14 <span class="navbar-brand"><%= site_name %></span>
18 <div class="collapse navbar-collapse">
19 <ul class="nav navbar-nav navbar-right">
22 <a><i class="rotating loading glyphicon glyphicon-refresh"></i></a>
26 <% if current_user.is_active %>
28 <form class="navbar-form" role="search"
35 action_href: url_for(controller: :actions, action: :show),
37 action_data: {selection_param: 'uuid', success: 'redirect-to-created-object'}.to_json)
39 <div class="input-group" style="width: 220px">
40 <input type="text" class="form-control" placeholder="search">
41 <a class="input-group-addon"><span class="glyphicon glyphicon-search"></span></a>
47 <li class="dropdown notification-menu">
48 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
49 <span class="badge badge-alert notification-count"><%= user_notifications.length if user_notifications.any? %></span>
50 <span class="fa fa-lg fa-user"></span>
51 <span class="caret"></span>
53 <ul class="dropdown-menu" role="menu">
54 <li role="presentation" class="dropdown-header">
55 <%= current_user.email %>
57 <% if current_user.is_active %>
58 <li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-lg fa-home fa-fw"></i> Home project </a></li>
61 <%= link_to virtual_machines_user_path(current_user), role: 'menu-item' do %>
62 <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
66 <%= link_to repositories_user_path(current_user), role: 'menu-item' do %>
67 <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
70 <li role="menuitem"><a href="/current_token" role="menuitem"><i class="fa fa-lg fa-ticket fa-fw"></i> Current token</a></li>
72 <%= link_to ssh_keys_user_path(current_user), role: 'menu-item' do %>
73 <i class="fa fa-lg fa-key fa-fw"></i> SSH keys
77 <% if Rails.configuration.user_profile_form_fields %>
78 <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-lg fa-user fa-fw"></i> Manage profile</a></li>
81 <li role="presentation" class="divider"></li>
82 <li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-lg fa-sign-out fa-fw"></i> Log out</a></li>
83 <% if user_notifications.any? %>
84 <li role="presentation" class="divider"></li>
85 <% user_notifications.each_with_index do |n, i| %>
86 <% if i > 0 %><li class="divider"></li><% end %>
87 <li class="notification"><%= n.call(self) %></li>
93 <% if current_user.is_admin %>
95 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="system-menu">
96 <span class="fa fa-lg fa-gear"></span>
97 <span class="caret"></span>
99 <ul class="dropdown-menu" role="menu">
100 <li role="presentation" class="dropdown-header">
103 <li role="menuitem"><a href="/repositories">
104 <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
106 <li role="menuitem"><a href="/virtual_machines">
107 <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
109 <li role="menuitem"><a href="/authorized_keys">
110 <i class="fa fa-lg fa-key fa-fw"></i> SSH keys
112 <li role="menuitem"><a href="/api_client_authorizations">
113 <i class="fa fa-lg fa-ticket fa-fw"></i> API tokens
115 <li role="menuitem"><a href="/links">
116 <i class="fa fa-lg fa-arrows-h fa-fw"></i> Links
118 <li role="menuitem"><a href="/users">
119 <i class="fa fa-lg fa-user fa-fw"></i> Users
121 <li role="menuitem"><a href="/groups">
122 <i class="fa fa-lg fa-users fa-fw"></i> Groups
124 <li role="menuitem"><a href="/nodes">
125 <i class="fa fa-lg fa-cloud fa-fw"></i> Compute nodes
127 <li role="menuitem"><a href="/keep_services">
128 <i class="fa fa-lg fa-exchange fa-fw"></i> Keep services
130 <li role="menuitem"><a href="/keep_disks">
131 <i class="fa fa-lg fa-hdd-o fa-fw"></i> Keep disks
137 <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
138 <li><%= link_to 'Browse public projects', "/projects/public" %></li>
140 <li class="dropdown hover-dropdown login-menu">
141 <a href="<%= arvados_api_client.arvados_login_url(return_to: request.url) %>">Log in</a>
142 <ul class="dropdown-menu">
144 <a href="<%= arvados_api_client.arvados_login_url(return_to: request.url) %>">
145 <span class="fa fa-lg fa-sign-in"></span>
146 <p style="margin-left: 1.6em; margin-top: -1.35em; margin-bottom: 0em; margin-right: 0.5em;">Log in or register with<br/>any Google account</p>
153 <li class="dropdown help-menu">
154 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="arv-help">
155 <span class="fa fa-lg fa-question-circle"></span>
156 <span class="caret"></span>
158 <ul class="dropdown-menu">
159 <li role="presentation" class="dropdown-header">
162 <% if Rails.configuration.enable_getting_started_popup %>
164 <%= link_to raw('<i class="fa fa-fw fa-info"></i> Getting Started ...'), "#",
165 {'data-toggle' => "modal", 'data-target' => '#getting-started-modal-window'} %>
168 <% if Rails.configuration.arvados_public_data_doc_url %>
169 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Public Pipelines and Data sets'), "#{Rails.configuration.arvados_public_data_doc_url}", target: "_blank" %></li>
171 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Tutorials and User guide'), "#{Rails.configuration.arvados_docsite}/user", target: "_blank" %></li>
172 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> API Reference'), "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %></li>
173 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> SDK Reference'), "#{Rails.configuration.arvados_docsite}/sdk", target: "_blank" %></li>
174 <li role="presentation" class="divider"></li>
175 <li> <%= link_to report_issue_popup_path(popup_type: 'version', current_location: request.url, current_path: request.fullpath, action_method: 'post'),
176 {class: 'report-issue-modal-window', remote: true, return_to: request.url} do %>
177 <i class="fa fa-fw fa-support"></i> Show version / debugging info ...
180 <li> <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, current_path: request.fullpath, action_method: 'post'),
181 {class: 'report-issue-modal-window', remote: true, return_to: request.url} do %>
182 <i class="fa fa-fw fa-support"></i> Report a problem ...
188 </div><!-- /.navbar-collapse -->
191 <% if current_user.andand.is_active %>
192 <nav class="navbar navbar-default breadcrumbs" role="navigation">
193 <ul class="nav navbar-nav navbar-left">
196 <i class="fa fa-lg fa-fw fa-dashboard"></i>
200 <li class="dropdown">
201 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="projects-menu">
203 <span class="caret"></span>
205 <ul class="dropdown-menu" style="min-width: 20em" role="menu">
210 controller: 'search',
211 filters: [['uuid', 'is_a', 'arvados#group']].to_json,
214 action_href: url_for(controller: :actions, action: :show),
215 action_method: 'get',
216 action_data: {selection_param: 'uuid', success: 'redirect-to-created-object'}.to_json),
217 { remote: true, method: 'get', title: "Search" }) do %>
218 <i class="glyphicon fa-fw glyphicon-search"></i> Search all projects ...
221 <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
222 <li role="menuitem"><a href="/projects/public" role="menuitem"><i class="fa fa-fw fa-list"></i> Browse public projects </a>
226 <%= link_to projects_path(options: {ensure_unique_name: true}), role: 'menu-item', method: :post do %>
227 <i class="fa fa-fw fa-plus"></i> Add a new project
230 <li role="presentation" class="divider"></li>
231 <%= render partial: "projects_tree_menu", locals: {
232 :project_link_to => Proc.new do |pnode, &block|
233 link_to(project_path(pnode[:object].uuid),
234 data: { 'object-uuid' => pnode[:object].uuid,
241 <% if @name_link or @object %>
242 <li class="nav-separator">
243 <i class="fa fa-lg fa-angle-double-right"></i>
246 <%= link_to project_path(current_user.uuid) do %>
250 <% project_breadcrumbs.each do |p| %>
251 <li class="nav-separator">
252 <i class="fa fa-lg fa-angle-double-right"></i>
255 <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
261 <% elsif !current_user %> <%# anonymous %>
262 <% if (@name_link or @object) and (project_breadcrumbs.any?) %>
263 <nav class="navbar navbar-default breadcrumbs" role="navigation">
264 <ul class="nav navbar-nav navbar-left">
266 <a href="/projects/public">Public Projects</a>
268 <% project_breadcrumbs.each do |p| %>
269 <li class="nav-separator">
270 <i class="fa fa-lg fa-angle-double-right"></i>
273 <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
281 <%= render partial: 'browser_unsupported' %><%# requires JS support below %>
282 <%= render partial: 'getting_started/getting_started_popup' %>
284 <div id="page-wrapper">
289 <%= yield :footer_html %>
291 <div class="modal-container"></div>
292 <div id="report-issue-modal-window"></div>
293 <script src="/browser_unsupported.js"></script>
295 <% if Rails.configuration.enable_getting_started_popup and current_user and !current_user.prefs[:getting_started_shown] and
296 !request.url.include?("/profile") and
297 !request.url.include?("/user_agreements") and
298 !request.url.include?("/inactive")%>
300 $("#getting-started-modal-window").modal('show');
303 prefs = current_user.prefs
304 prefs[:getting_started_shown] = Time.now
305 current_user.update_attributes prefs: prefs.to_json