X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/12d990a6590e5f23a5998d29a2d8efdb0f733688..95d1231a25637c5ba0fd07b116876b17711ec201:/apps/workbench/app/views/collections/_show_files.html.erb diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb index 9fdd32b733..9cd77b02e1 100644 --- a/apps/workbench/app/views/collections/_show_files.html.erb +++ b/apps/workbench/app/views/collections/_show_files.html.erb @@ -6,7 +6,9 @@ +
+ <%= form_tag collection_path(@object.uuid), {method: 'get'} do %> +
+ + + + +
+ <% end %> +

<% end %> +<% file_regex = nil %> +<% if params[:file_regex] %> + <% begin %> + <% file_regex = Regexp.new(params[:file_regex]) %> + <% rescue RegexpError %> + <% # If the pattern is not a valid regex, quote it %> + <% # (i.e. use it as a simple substring search) %> +

+

The search term <%= params[:file_regex] %> could not be parsed as a regular expression.

+

Searching for files named <%= params[:file_regex] %> instead.

+
+ <% file_regex = Regexp.new(Regexp.quote(params[:file_regex])) %> + <% end %> +<% end %> + <% file_tree = @object.andand.files_tree %> <% if file_tree.nil? or file_tree.empty? %>

This collection is empty.

<% else %>