15720: Warn about empty ManagementToken or SystemRootToken.
[arvados.git] / apps / workbench / app / views / collections / show.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <div class="row row-fill-height">
6   <div class="col-md-7">
7     <div class="panel panel-info">
8       <div class="panel-heading">
9         <h3 class="panel-title">
10           <%= if @object.respond_to? :name
11                 render_editable_attribute @object, :name
12               elsif @name_link
13                 @name_link.name
14               else
15                 @object.uuid
16               end %>
17         </h3>
18       </div>
19       <div class="panel-body">
20         <div class="arv-description-as-subtitle">
21           <%= render_editable_attribute @object, 'description', nil, { 'data-emptytext' => "(No description provided)", 'data-toggle' => 'manual' } %>
22         </div>
23         <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
24         <p><i>Collection UUID:</i><br />
25           <%= render partial: "show_autoselect_text", locals: {text: @object.uuid, tagclass: "arvados-uuid"} %>
26         </p>
27         <p><i>Content address:</i><br />
28           <%= render partial: "show_autoselect_text", locals: {text: @object.portable_data_hash, tagclass: "arvados-uuid"} %>
29         </p>
30         <%= render partial: "show_source_summary" %>
31       </div>
32     </div>
33   </div>
34   <% if current_user %>
35   <div class="col-md-5">
36     <div class="panel panel-default">
37       <div class="panel-heading">
38         <h3 class="panel-title">
39           Sharing and permissions
40         </h3>
41       </div>
42       <div class="panel-body">
43         <!--
44         <input type="text" class="form-control" placeholder="Search"/>
45         -->
46
47         <div id="sharing-button">
48           <%= render partial: 'sharing_button' %>
49         </div>
50
51         <div style="height:0.5em;"></div>
52         <% if @projects.andand.any? %>
53           <p>Included in projects:<br />
54           <%= render_arvados_object_list_start(@projects, 'Show all projects',
55                 links_path(filters: [['head_uuid', '=', @object.uuid],
56                                      ['link_class', '=', 'name']].to_json)) do |project| %>
57             <%= link_to_if_arvados_object(project, friendly_name: true) %><br />
58           <% end %>
59           </p>
60         <% end %>
61         <% if @permissions.andand.any? %>
62           <p>Readable by:<br />
63           <%= render_arvados_object_list_start(@permissions, 'Show all permissions',
64                 links_path(filters: [['head_uuid', '=', @object.uuid],
65                                     ['link_class', '=', 'permission']].to_json)) do |link| %>
66           <%= link_to_if_arvados_object(link.tail_uuid, friendly_name: true) %><br />
67           <% end %>
68           </p>
69         <% end %>
70
71       </div>
72     </div>
73   </div>
74   <% else %>
75   <div class="col-md-5">
76     <div class="panel panel-default">
77       <div class="panel-heading">
78         <h3 class="panel-title">
79           Welcome to Arvados
80         </h3>
81       </div>
82       <div class="panel-body">
83         You are accessing public data.
84       </div>
85     </div>
86   </div>
87   <% end %>
88 </div>
89
90 <%= render file: 'application/show.html.erb', locals: local_assigns %>