X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fc6c801e7448c34b3b916813a8792e32f22bb7a8..57d5e8e0f8e8c3871e2d95d14e3088c0a3f41a9b:/apps/workbench/app/views/application/_selection_checkbox.html.erb diff --git a/apps/workbench/app/views/application/_selection_checkbox.html.erb b/apps/workbench/app/views/application/_selection_checkbox.html.erb index 4d47d892c5..47e1dfdecf 100644 --- a/apps/workbench/app/views/application/_selection_checkbox.html.erb +++ b/apps/workbench/app/views/application/_selection_checkbox.html.erb @@ -1,8 +1,20 @@ -<%if object %> +<%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')) %> + <% fn = if defined? friendly_name and not friendly_name.nil? + friendly_name + else + link_to_if_arvados_object object, {no_link: true} + end + %> + <% # This 'fn' string may contain embedded HTML which is already marked html_safe. + # Since we are putting it into a tag attribute, we need to copy into an + # unsafe string so that rails will escape it for us. + fn = String.new fn %> <%= check_box_tag 'uuids[]', object.uuid, false, { - :class => 'persistent-selection', - :friendly_type => object.class.name, - :friendly_name => object.selection_label, - :href => "#{url_for controller: object.class.name.tableize, action: 'show', id: object.uuid }" + :class => 'persistent-selection', + :id => object.uuid, + :friendly_type => object.class.name, + :friendly_name => fn, + :href => "#{url_for controller: object.class.name.tableize, action: 'show', id: object.uuid }", + :title => "Click to add this item to your selection list" } %> <% end %>