Merge branch '16683-fed-sharing' refs #16683
[arvados.git] / apps / workbench / app / views / application / _breadcrumbs.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5       <nav class="navbar navbar-default breadcrumbs" role="navigation">
6         <ul class="nav navbar-nav navbar-left">
7           <li>
8             <a href="/">
9               <i class="fa fa-lg fa-fw fa-dashboard"></i>
10               Dashboard
11             </a>
12           </li>
13           <li class="dropdown">
14             <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="projects-menu">
15               Projects
16               <span class="caret"></span>
17             </a>
18             <ul class="dropdown-menu" style="min-width: 20em" role="menu">
19               <li role="menuitem">
20                   <%= link_to(
21                         url_for(
22                           action: 'choose',
23                           controller: 'search',
24                           filters: [['uuid', 'is_a', 'arvados#group']].to_json,
25                           title: 'Search',
26                           action_name: 'Show',
27                           action_href: url_for(controller: :actions, action: :show),
28                           action_method: 'get',
29                           action_data: {selection_param: 'uuid', success: 'redirect-to-created-object'}.to_json),
30                         { remote: true, method: 'get', title: "Search" }) do %>
31                     <i class="glyphicon fa-fw glyphicon-search"></i> Search all projects ...
32                   <% end %>
33                </li>
34               <% if !Rails.configuration.Users.AnonymousUserToken.empty? and Rails.configuration.Workbench.EnablePublicProjectsPage %>
35                 <li role="menuitem"><a href="/projects/public" role="menuitem"><i class="fa fa-fw fa-list"></i> Browse public projects </a>
36                 </li>
37               <% end %>
38               <li role="menuitem">
39                 <%= link_to projects_path(options: {ensure_unique_name: true}), role: 'menu-item', method: :post do %>
40                   <i class="fa fa-fw fa-plus"></i> Add a new project
41                 <% end %>
42               </li>
43               <li role="presentation" class="divider"></li>
44               <%= render partial: "projects_tree_menu", locals: {
45                   :project_link_to => Proc.new do |pnode, &block|
46                     link_to(project_path(pnode[:object].uuid),
47                       data: { 'object-uuid' => pnode[:object].uuid,
48                               'name' => 'name' },
49                       &block)
50                   end,
51               } %>
52             </ul>
53           </li>
54           <% if (defined?(@name_link) && @name_link) or (defined?(@object) && @object) %>
55             <li class="nav-separator">
56               <i class="fa fa-lg fa-angle-double-right"></i>
57             </li>
58             <li>
59               <%= link_to project_path(current_user.uuid) do %>
60                 Home
61               <% end %>
62             </li>
63             <% project_breadcrumbs.each do |p| %>
64               <li class="nav-separator">
65                 <i class="fa fa-lg fa-angle-double-right"></i>
66               </li>
67               <li>
68                 <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
69               </li>
70             <% end %>
71           <% end %>
72         </ul>
73         <ul class="nav navbar-nav navbar-right">
74           <li>
75             <a href="/trash">
76               <%= image_tag("trash-icon.png", size: "20x20" ) %> Trash
77             </a>
78           </li>
79         </ul>
80       </nav>