X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/16263c93ec077d2d54b012b9916cc9a421888317..5b5c9a43929d392f32f7a4db1393df2dd106cbeb:/apps/workbench/app/views/collections/show.html.erb diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb index 440d2ff40e..c3e0b7cb2e 100644 --- a/apps/workbench/app/views/collections/show.html.erb +++ b/apps/workbench/app/views/collections/show.html.erb @@ -3,32 +3,26 @@

- <% "Collection #{@object.uuid}" %> + <% if @name_link.nil? and @object.uuid.match /[0-9a-f]{32}/ %> + Content hash <%= @object.portable_data_hash %> + <% else %> + <%= if @object.respond_to? :name + render_editable_attribute @object, :name + else + @name_link.andand.name || @object.uuid + end %> + <% end %>

+
+ <%= render_editable_attribute @object, 'description', nil, { 'data-emptytext' => "(No description provided)", 'data-toggle' => 'manual' } %> +
- <% if not (@output_of.andand.any? or @log_of.andand.any?) %> -

No source information available.

- <% end %> - - <% if @output_of.andand.any? %> -

Output of jobs:
- <%= render_arvados_object_list_start(@output_of, 'Show all jobs', - jobs_path(filter: [['output', '=', @object.uuid]].to_json)) do |job| %> - <%= link_to_if_arvados_object(job, friendly_name: true) %>
- <% end %> -

- <% end %> - - <% if @log_of.andand.any? %> -

Log of jobs:
- <%= render_arvados_object_list_start(@log_of, 'Show all jobs', - jobs_path(filter: [['log', '=', @object.uuid]].to_json)) do |job| %> - <%= link_to_if_arvados_object(job, friendly_name: true) %>
- <% end %> -

- <% end %> +

Content hash:
+ <%= link_to @object.portable_data_hash, collection_path(@object.portable_data_hash) %> +

+ <%= render partial: "show_source_summary" %>
@@ -44,16 +38,17 @@ -->
- <% if not @logs.andand.any? %> + <% name_or_object = @name_link.andand.uuid ? @name_link : @object %> + <% if name_or_object.created_at and not @logs.andand.any? %>

- Created: <%= @object.created_at.to_s(:long) %> + Created: <%= name_or_object.created_at.to_s(:long) if name_or_object.created_at %>

- Last modified: <%= @object.modified_at.to_s(:long) %> by <%= link_to_if_arvados_object @object.modified_by_user_uuid, friendly_name: true %> + Last modified: <%= name_or_object.modified_at.to_s(:long) if name_or_object.modified_at %> by <%= link_to_if_arvados_object name_or_object.modified_by_user_uuid, friendly_name: true %>

<% else %> <%= render_arvados_object_list_start(@logs, 'Show all activity', - logs_path(filters: [['object_uuid','=',@object.uuid]].to_json)) do |log| %> + logs_path(filters: [['object_uuid','=',name_or_object.uuid]].to_json)) do |log| %>

<%= time_ago_in_words(log.event_at) rescue 'unknown time' %> ago: <%= log.summary %> <% if log.object_uuid %> @@ -82,19 +77,19 @@

- <% if @folders.andand.any? %> -

Included in folders:
- <%= render_arvados_object_list_start(@folders, 'Show all folders', - links_path(filter: [['head_uuid', '=', @object.uuid], - ['link_class', '=', 'name']].to_json)) do |folder| %> - <%= link_to_if_arvados_object(folder, friendly_name: true) %>
+ <% if @projects.andand.any? %> +

Included in projects:
+ <%= render_arvados_object_list_start(@projects, 'Show all projects', + links_path(filters: [['head_uuid', '=', @object.uuid], + ['link_class', '=', 'name']].to_json)) do |project| %> + <%= link_to_if_arvados_object(project, friendly_name: true) %>
<% end %>

<% end %> <% if @permissions.andand.any? %>

Readable by:
<%= render_arvados_object_list_start(@permissions, 'Show all permissions', - links_path(filter: [['head_uuid', '=', @object.uuid], + links_path(filters: [['head_uuid', '=', @object.uuid], ['link_class', '=', 'permission']].to_json)) do |link| %> <%= link_to_if_arvados_object(link.tail_uuid, friendly_name: true) %>
<% end %> @@ -106,4 +101,4 @@ -<%= render file: 'application/show.html.erb' %> +<%= render file: 'application/show.html.erb', locals: local_assigns %>