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