Merge branch '11917-dont-clear-cache'
[arvados.git] / apps / workbench / app / views / collections / _show_tags.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%
6   object = @object unless object
7 %>
8
9   <div class="collection-tags-container" style="padding-left:2em;padding-right:2em;">
10     <% if object.editable? %>
11       <p title="Edit tags" id="edit-collection-tags">
12         <a class="btn btn-primary edit-collection-tags">Edit</a>
13       </p>
14     <% end %>
15
16     <table class="table table-condensed table-fixedlayout collection-tags-table" border="1">
17       <colgroup>
18         <col width="5%" />
19         <col width="25%" />
20         <col width="70%" />
21       </colgroup>
22
23       <thead>
24         <tr>
25           <th></th>
26           <th>Key</th>
27           <th>Value</th>
28         </tr>
29       </thead>
30
31       <tbody class="collection-tag-rows">
32         <%= render partial: 'show_tag_rows', locals: {object: object} %>
33       </tbody>
34     </table>
35     <div>
36       <% if object.editable? %>
37         <div class="pull-left">
38           <a class="btn btn-primary btn-sm collection-tag-add hide"><i class="glyphicon glyphicon-plus"></i> Add new tag </a>
39         </div>
40         <div class="pull-right">
41           <%= link_to(save_tags_collection_path, {class: 'btn btn-sm btn-primary collection-tag-save hide', :remote => true, method: 'post', return_to: request.url}) do %>
42             Save
43           <% end %>
44           <%= link_to(tags_collection_path, {class: 'btn btn-sm btn-primary collection-tag-cancel hide', :remote => true, method: 'get', return_to: request.url}) do %>
45             Cancel
46           <% end %>
47         </div>
48
49         <div><div class="collection-tags-status"/></div></div>
50       <% end %>
51     </div>
52   </div>