Merge branch '2800-python-global-state' into 2800-pgs
[arvados.git] / apps / workbench / app / helpers / application_helper.rb
index 1b186c5420fc85739559fe0fabbf8bb20204bf93..428c14f8282961f65e6ad69e9197794f62997d54 100644 (file)
@@ -260,12 +260,18 @@ module ApplicationHelper
           display_value = value_info[:link_name]
         end
       end
+      if (attr == :components) and (subattr.size > 2)
+        chooser_title = "Choose a dataset for #{object.component_input_title(subattr[0], subattr[2])}:"
+      else
+        chooser_title = "Choose a dataset:"
+      end
       modal_path = choose_collections_path \
-      ({ title: 'Choose a dataset:',
-         filters: [['tail_uuid', '=', object.owner_uuid]].to_json,
+      ({ title: chooser_title,
+         filters: [['owner_uuid', '=', object.owner_uuid]].to_json,
          action_name: 'OK',
          action_href: pipeline_instance_path(id: object.uuid),
          action_method: 'patch',
+         preconfigured_search_str: "#{value_info[:search_for]}",
          action_data: {
            merge: true,
            selection_param: selection_param,