Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / application / _selection_checkbox.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%if object and object.uuid and (object.class.goes_in_projects? or (object.is_a?(Link) and ArvadosBase::resource_class_for_uuid(object.head_uuid).to_s == 'Collection')) %>
6   <% fn = if defined? friendly_name and not friendly_name.nil?
7             friendly_name
8           else
9             link_to_if_arvados_object object, {no_link: true}
10           end
11      %>
12   <% # This 'fn' string may contain embedded HTML which is already marked html_safe.
13      # Since we are putting it into a tag attribute, we need to copy into an
14      # unsafe string so that rails will escape it for us.
15      fn = String.new fn %>
16 <%= check_box_tag 'uuids[]', object.uuid, false, {
17       :class => 'persistent-selection',
18       :id => object.uuid,
19       :friendly_type => object.class.name,
20       :friendly_name => fn,
21       :href => "#{url_for controller: object.class.name.tableize, action: 'show', id: object.uuid }",
22       :title => "Click to add this item to your selection list"
23 } %>
24 <% end %>