2939: added no_reuse, nondeterministic
[arvados.git] / apps / workbench / app / views / collections / show.html.erb
1 <div class="row row-fill-height">
2   <div class="col-md-6">
3     <div class="panel panel-info">
4       <div class="panel-heading">
5         <h3 class="panel-title">
6           <% default_name = "Collection #{@object.uuid}" %>
7           <% name_html = render_editable_attribute @object, 'name', nil, {data: {emptytext: default_name}} %>
8           <%= (/\S/.match(name_html)) ? name_html : default_name %>
9         </h3>
10       </div>
11       <div class="panel-body">
12         <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
13         <% if not (@output_of.andand.any? or @log_of.andand.any?) %>
14           <p><i>No source information available.</i></p>
15         <% end %>
16
17         <% if @output_of.andand.any? %>
18           <p>Output of jobs:<br />
19           <%= render_arvados_object_list_start(@output_of, 'Show all jobs',
20                 jobs_path(filter: [['output', '=', @object.uuid]].to_json)) do |job| %>
21           <%= link_to_if_arvados_object(job, friendly_name: true) %><br />
22           <% end %>
23           </p>
24         <% end %>
25
26         <% if @log_of.andand.any? %>
27           <p>Log of jobs:<br />
28           <%= render_arvados_object_list_start(@log_of, 'Show all jobs',
29                 jobs_path(filter: [['log', '=', @object.uuid]].to_json)) do |job| %>
30           <%= link_to_if_arvados_object(job, friendly_name: true) %><br />
31           <% end %>
32           </p>
33         <% end %>
34       </div>
35     </div>
36   </div>
37   <div class="col-md-3">
38     <div class="panel panel-default">
39       <div class="panel-heading">
40         <h3 class="panel-title">
41           Activity
42         </h3>
43       </div>
44       <div class="panel-body smaller-text">
45         <!--
46         <input type="text" class="form-control" placeholder="Search"/>
47         -->
48         <div style="height:0.5em;"></div>
49         <% if not @logs.andand.any? %>
50           <p>
51             Created: <%= @object.created_at.to_s(:long) %>
52           </p>
53           <p>
54             Last modified: <%= @object.modified_at.to_s(:long) %> by <%= link_to_if_arvados_object @object.modified_by_user_uuid, friendly_name: true %>
55           </p>
56         <% else %>
57           <%= render_arvados_object_list_start(@logs, 'Show all activity',
58                 logs_path(filters: [['object_uuid','=',@object.uuid]].to_json)) do |log| %>
59           <p>
60           <%= time_ago_in_words(log.event_at) rescue 'unknown time' %> ago: <%= log.summary %>
61             <% if log.object_uuid %>
62             <%= link_to_if_arvados_object log.object_uuid, link_text: raw('<i class="fa fa-hand-o-right"></i>') %>
63             <% end %>
64           </p>
65           <% end %>
66         <% end %>
67       </div>
68     </div>
69   </div>
70   <div class="col-md-3">
71     <div class="panel panel-default">
72       <div class="panel-heading">
73         <h3 class="panel-title">
74           Sharing and permissions
75         </h3>
76       </div>
77       <div class="panel-body">
78         <!--
79         <input type="text" class="form-control" placeholder="Search"/>
80         -->
81
82         <div id="sharing-button">
83           <%= render partial: 'sharing_button' %>
84         </div>
85
86         <div style="height:0.5em;"></div>
87         <% if @folders.andand.any? %>
88           <p>Included in folders:<br />
89           <%= render_arvados_object_list_start(@folders, 'Show all folders',
90                 links_path(filter: [['head_uuid', '=', @object.uuid],
91                                     ['link_class', '=', 'name']].to_json)) do |folder| %>
92           <%= link_to_if_arvados_object(folder, friendly_name: true) %><br />
93           <% end %>
94           </p>
95         <% end %>
96         <% if @permissions.andand.any? %>
97           <p>Readable by:<br />
98           <%= render_arvados_object_list_start(@permissions, 'Show all permissions',
99                 links_path(filter: [['head_uuid', '=', @object.uuid],
100                                     ['link_class', '=', 'permission']].to_json)) do |link| %>
101           <%= link_to_if_arvados_object(link.tail_uuid, friendly_name: true) %><br />
102           <% end %>
103           </p>
104         <% end %>
105
106       </div>
107     </div>
108   </div>
109 </div>
110
111 <%= render file: 'application/show.html.erb' %>