Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / apps / workbench / app / views / application / _selection_checkbox.html.erb
1 <%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')) %>
2   <% fn = if defined? friendly_name and not friendly_name.nil?
3             friendly_name
4           else
5             link_to_if_arvados_object object, {no_link: true}
6           end
7      %>
8   <% # This 'fn' string may contain embedded HTML which is already marked html_safe.
9      # Since we are putting it into a tag attribute, we need to copy into an
10      # unsafe string so that rails will escape it for us.
11      fn = String.new fn %>
12 <%= check_box_tag 'uuids[]', object.uuid, false, {
13       :class => 'persistent-selection',
14       :friendly_type => object.class.name,
15       :friendly_name => fn,
16       :href => "#{url_for controller: object.class.name.tableize, action: 'show', id: object.uuid }",
17       :title => "Click to add this item to your selection list"
18 } %>
19 <% end %>