X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/006e0adfe8e05084d47d7871a69e9d234f429564..e513251f7b0f6acdc0c0d6df5792c18358030221:/apps/workbench/app/views/layouts/body.html.erb
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 7e8def7cd8..22ccc2f91d 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -7,7 +7,12 @@
- <%= Rails.configuration.site_name.downcase rescue Rails.application.class.parent_name %>
+ <% site_name = Rails.configuration.site_name.downcase rescue Rails.application.class.parent_name %>
+ <% if current_user %>
+ <%= site_name %>
+ <% else %>
+ <%= site_name %>
+ <% end %>
@@ -18,130 +23,160 @@
<% if current_user %>
- <% if current_user.is_active %>
-
-
-
- <% end %>
-
-
-
-
+ <% if current_user.is_active %>
+
+
+
+ <% end %>
- <% if current_user.is_admin %>
-
-
-
- API tokens
-
-
- Links
-
-
- Users
-
-
- Groups
-
-
- Compute nodes
-
-
- Keep services
-
-
- Keep disks
-
+ <% end %>
+
+
+ <% if Rails.configuration.user_profile_form_fields %>
+
Manage profile
+ <% end %>
+ <% end %>
+
+
Log out
+ <% if user_notifications.any? %>
+
+ <% user_notifications.each_with_index do |n, i| %>
+ <% if i > 0 %>
<% end %>
+
<%= n.call(self) %>
+ <% end %>
+ <% end %>
- <% end %>
+
+ <% if current_user.is_admin %>
+
+
+
+
+ <% end %>
<% else %>
-
Log in
+ <% if Rails.configuration.anonymous_user_token and Rails.configuration.enable_public_projects_page %>
+
<%= link_to 'Browse public projects', "/projects/public" %>
+ <% end %>
+
<% end %>
<% if @name_link or @object %>
@@ -201,8 +256,29 @@
<% end %>
+ <% elsif !current_user %> <%# anonymous %>
+ <% if (@name_link or @object) and (project_breadcrumbs.any?) %>
+
+
+
+ Public Projects
+
+ <% project_breadcrumbs.each do |p| %>
+
+
+
+
+ <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
+
+ <% end %>
+
+
+ <% end %>
<% end %>
+ <%= render partial: 'browser_unsupported' %><%# requires JS support below %>
+ <%= render partial: 'getting_started/getting_started_popup' %>
+
<%= yield %>
@@ -212,3 +288,18 @@
+
+
+<% if current_user and !current_user.prefs[:getting_started_shown] and
+ !request.url.include?("/profile") and
+ !request.url.include?("/user_agreements") and
+ !request.url.include?("/inactive")%>
+
+ <%
+ prefs = current_user.prefs
+ prefs[:getting_started_shown] = Time.now
+ current_user.update_attributes prefs: prefs.to_json
+ %>
+<% end %>