X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7a54fd6a073e03f98f68d0b6c816a9f394f625dd..2255281ed7406e7c10027ed778f53ee28e6869fa:/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 c703bc7004..acb056e9c9 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,117 +23,163 @@
<% if current_user %>
-
-
-
- <%= link_to(url_for(
- action: 'choose',
- controller: 'search',
- title: 'Search',
- action_name: 'Show',
- action_href: url_for(controller: :actions, action: :show),
- action_method: 'get',
- action_data: {selection_param: 'uuid', success: 'redirect-to-created-object'}.to_json),
- { class: "", remote: true, method: 'get' }) do %>
- Search
+ <% if current_user.is_active %>
+
+
+
<% end %>
-
-
-
-
-
- <% if current_user.is_active %>
-
-
- <% 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 %>
@@ -140,46 +191,94 @@
-
- Home
+
+ Dashboard
-
-
-
-
- <% project_breadcrumbs.each do |p| %>
+ <% if @name_link or @object %>
- <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
+ <%= link_to project_path(current_user.uuid) do %>
+ Home
+ <% end %>
+ <% project_breadcrumbs.each do |p| %>
+
+
+
+
+ <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
+
+ <% end %>
<% 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 %>
@@ -188,3 +287,19 @@
<%= yield :footer_html %>
+
+
+
+<% 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 %>