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', copy_from_search_box: true}.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-home fa-fw"></i> Home project </a></li>
59 <li role="menuitem"><a href="/manage_account" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage account</a></li>
60 <% if Rails.configuration.user_profile_form_fields %>
61 <li role="menuitem"><a href="/users/<%=current_user.uuid%>/profile" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage profile</a></li>
64 <li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-sign-out fa-fw"></i> Log out</a></li>
65 <% if user_notifications.any? %>
66 <li role="presentation" class="divider"></li>
67 <% user_notifications.each_with_index do |n, i| %>
68 <% if i > 0 %><li class="divider"></li><% end %>
69 <li class="notification"><%= n.call(self) %></li>
75 <% if current_user.is_admin %>
77 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="system-menu">
78 <span class="fa fa-lg fa-gear"></span>
79 <span class="caret"></span>
81 <ul class="dropdown-menu" role="menu">
82 <li role="presentation" class="dropdown-header">
85 <li role="menuitem"><a href="/repositories">
86 <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
88 <li role="menuitem"><a href="/virtual_machines">
89 <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
91 <li role="menuitem"><a href="/authorized_keys">
92 <i class="fa fa-lg fa-key fa-fw"></i> SSH keys
94 <li role="menuitem"><a href="/api_client_authorizations">
95 <i class="fa fa-lg fa-ticket fa-fw"></i> API tokens
97 <li role="menuitem"><a href="/links">
98 <i class="fa fa-lg fa-arrows-h fa-fw"></i> Links
100 <li role="menuitem"><a href="/users">
101 <i class="fa fa-lg fa-user fa-fw"></i> Users
103 <li role="menuitem"><a href="/groups">
104 <i class="fa fa-lg fa-users fa-fw"></i> Groups
106 <li role="menuitem"><a href="/nodes">
107 <i class="fa fa-lg fa-cloud fa-fw"></i> Compute nodes
109 <li role="menuitem"><a href="/keep_services">
110 <i class="fa fa-lg fa-exchange fa-fw"></i> Keep services
112 <li role="menuitem"><a href="/keep_disks">
113 <i class="fa fa-lg fa-hdd-o fa-fw"></i> Keep disks
119 <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
120 <li><%= link_to 'Browse public projects', "/projects/public" %></li>
122 <li class="dropdown hover-dropdown login-menu">
123 <a href="<%= arvados_api_client.arvados_login_url(return_to: root_url) %>">Log in</a>
124 <ul class="dropdown-menu">
126 <a href="<%= arvados_api_client.arvados_login_url(return_to: root_url) %>">
127 <span class="fa fa-lg fa-sign-in"></span>
128 <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>
135 <li class="dropdown help-menu">
136 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="arv-help">
137 <span class="fa fa-lg fa-question-circle"></span>
138 <span class="caret"></span>
140 <ul class="dropdown-menu">
141 <li role="presentation" class="dropdown-header">
145 <%= link_to raw('<i class="fa fa-fw fa-info"></i> Getting Started ...'), "#",
146 {'data-toggle' => "modal", 'data-target' => '#getting-started-modal-window'} %>
148 <% if Rails.configuration.arvados_public_data_doc_url %>
149 <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>
151 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Tutorials and User guide'), "#{Rails.configuration.arvados_docsite}/user", target: "_blank" %></li>
152 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> API Reference'), "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %></li>
153 <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> SDK Reference'), "#{Rails.configuration.arvados_docsite}/sdk", target: "_blank" %></li>
154 <li role="presentation" class="divider"></li>
155 <li> <%= link_to report_issue_popup_path(popup_type: 'version', current_location: request.url, current_path: request.fullpath, action_method: 'post'),
156 {class: 'report-issue-modal-window', remote: true, return_to: request.url} do %>
157 <i class="fa fa-fw fa-support"></i> Show version / debugging info ...
160 <li> <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, current_path: request.fullpath, action_method: 'post'),
161 {class: 'report-issue-modal-window', remote: true, return_to: request.url} do %>
162 <i class="fa fa-fw fa-support"></i> Report a problem ...
168 </div><!-- /.navbar-collapse -->
171 <% if current_user.andand.is_active %>
172 <nav class="navbar navbar-default breadcrumbs" role="navigation">
173 <ul class="nav navbar-nav navbar-left">
176 <i class="fa fa-lg fa-fw fa-dashboard"></i>
180 <li class="dropdown">
181 <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="projects-menu">
183 <span class="caret"></span>
185 <ul class="dropdown-menu" style="min-width: 20em" role="menu">
186 <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
187 <li><%= link_to 'Browse public projects', "/projects/public", class: 'btn btn-xs btn-default pull-right' %></li>
190 <%= link_to projects_path(options: {ensure_unique_name: true}), method: :post, class: 'btn btn-xs btn-default pull-right' do %>
191 <i class="fa fa-plus"></i> Add a new project
194 <%= render partial: "projects_tree_menu", locals: {
195 :project_link_to => Proc.new do |pnode, &block|
196 link_to(project_path(pnode[:object].uuid),
197 data: { 'object-uuid' => pnode[:object].uuid,
204 <% if @name_link or @object %>
205 <li class="nav-separator">
206 <i class="fa fa-lg fa-angle-double-right"></i>
209 <%= link_to project_path(current_user.uuid) do %>
213 <% project_breadcrumbs.each do |p| %>
214 <li class="nav-separator">
215 <i class="fa fa-lg fa-angle-double-right"></i>
218 <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
224 <% elsif !current_user %> <%# anonymous %>
225 <% if (@name_link or @object) and (project_breadcrumbs.any?) %>
226 <nav class="navbar navbar-default breadcrumbs" role="navigation">
227 <ul class="nav navbar-nav navbar-left">
229 <a href="/projects/public">Public Projects</a>
231 <% project_breadcrumbs.each do |p| %>
232 <li class="nav-separator">
233 <i class="fa fa-lg fa-angle-double-right"></i>
236 <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
244 <%= render partial: 'browser_unsupported' %><%# requires JS support below %>
245 <%= render partial: 'getting_started/getting_started_popup' %>
247 <div id="page-wrapper">
252 <%= yield :footer_html %>
254 <div class="modal-container"></div>
255 <div id="report-issue-modal-window"></div>
256 <script src="/browser_unsupported.js"></script>
258 <% if current_user and !current_user.prefs[:getting_started_shown] and
259 !request.url.include?("/profile") and
260 !request.url.include?("/user_agreements") and
261 !request.url.include?("/inactive")%>
263 $("#getting-started-modal-window").modal('show');
266 prefs = current_user.prefs
267 prefs[:getting_started_shown] = Time.now
268 current_user.update_attributes prefs: prefs.to_json