X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b7161fff2cb2fdd2bc0975c75f1fbc32f625343b..facb17a2885e6b6d3e998e15862a3c6e970e8cf1:/apps/workbench/app/views/folders/show.html.erb?ds=sidebyside diff --git a/apps/workbench/app/views/folders/show.html.erb b/apps/workbench/app/views/folders/show.html.erb index c7db562352..ebf504ef7e 100644 --- a/apps/workbench/app/views/folders/show.html.erb +++ b/apps/workbench/app/views/folders/show.html.erb @@ -2,17 +2,17 @@
-

- <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => "New folder" } %> -

+

+ <%= render_editable_attribute @object, 'name', nil, {data: {emptytext: "New folder"}} %> +

-

- <%= render_editable_attribute @object, 'description', nil, { 'data-emptytext' => "Created: #{@object.created_at.to_s(:long)}", 'data-toggle' => 'manual', 'id' => "#{@object.uuid}-description" } %> -

+ <%= render_editable_attribute @object, 'description', nil, { 'data-emptytext' => "Created: #{@object.created_at.to_s(:long)}", 'data-toggle' => 'manual', 'id' => "#{@object.uuid}-description" } %> <% if @object.attribute_editable? 'description' %> - Edit description +
+ Edit description +
<% end %>
@@ -20,34 +20,32 @@
-

- Activity -

+

+ Activity +

-
- <% @logs[0..2].each do |log| %> -

- <%= time_ago_in_words(log.event_at) %> ago: <%= log.summary %> - <% if log.object_uuid %> - <%= link_to_if_arvados_object log.object_uuid, link_text: raw('') %> - <% end %> -

- <% end %> +
<% if @logs.any? %> - <%= link_to raw('Show all activity   '), - logs_path(filters: [['object_uuid','=',@object.uuid]].to_json), - class: 'btn btn-sm btn-info' %> + <%= render_arvados_object_list_start(@logs, 'Show all activity', + logs_path(filters: [['object_uuid','=',@object.uuid]].to_json)) do |log| %> +

+ <%= time_ago_in_words(log.event_at) %> ago: <%= log.summary %> + <% if log.object_uuid %> + <%= link_to_if_arvados_object log.object_uuid, link_text: raw('') %> + <% end %> +

+ <% end %> <% else %> -

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

-

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

+

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

+

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

<% end %>
@@ -55,52 +53,55 @@
-

- Sharing and permissions -

+

+ Sharing and permissions +

-
-

Owner: <%= link_to_if_arvados_object @object.owner_uuid, friendly_name: true %>

+
+ <% if @object.owner %> +

Permissions inherited from: +
+ <% if User == resource_class_for_uuid(@object.owner_uuid) %> + + <% else %> + + <% end %> + <%= link_to_if_arvados_object @object.owner_uuid, friendly_name: true %> + <%= button_to('Move to...', + choose_folders_path( + title: 'Move to...', + editable: true, + action_name: 'Move', + action_href: folder_path(@object.uuid), + action_method: 'put', + action_data: {selection_param: 'folder[owner_uuid]'}.to_json), + { class: "btn btn-default btn-xs arv-move-to-folder", remote: true, method: 'get' }) %> +

+
+ <% end %> +

+ <% if not @share_links.any? %> + (No additional permissions) + <% else %> + Also shared with: + <% @share_links.andand.each do |link| %> +
<%= link_to_if_arvados_object link.tail_uuid, friendly_name: true %> + <% end %> + <% end %> +

+<% if @show_cards %> +
-
-
- - - -
-
- Test dataset -
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
-
-
- -
-
- -
-
- - - -
-
- GATK Exome Pipeline -
exome p.e. fastq -> vcf
-
-
- -
-
- + <% @objects[0..3].each do |object| %>
- Reference result -
Known good -- checked concordance against other datasets
+ <%= @objects.name_for(object) || object.class_for_display %> +
<%= object.respond_to?(:description) ? object.description : object.uuid %>
- -
-
- -
-
- - - -
-
- Some other thing -
(Objects that are "starred" appear in this area)
-
-
- + <%= render :partial => "show_object_button", :locals => {object: object, htmloptions: {class: 'btn-default btn-block'}} %>
+ <% end %>
+ +<% end %>
@@ -144,7 +133,7 @@
- +
@@ -152,46 +141,68 @@

- +
+ + + + - - + - <% @objects.each do |object| %> - - - - - - + <% @objects_and_names.each do |object, name_link| %> + + + + + + + + + <% end %> + + +
- <% name_link = @objects.links_for(object, 'name').first || Link.new(link_class: "name", owner_uuid: @object.uuid, tail_uuid: @object.uuid, head_uuid: object.uuid, name: "") %> - <%= render_editable_attribute name_link, 'name', nil, { 'data-emptytext' => "Unnamed #{object.class}" } %> - - <%= object.content_summary %> - - - <%= raw distance_of_time_in_words(object.modified_at, Time.now).sub('about ','~').sub(' ',' ') + ' ago' rescue object.modified_at %> - - - <%= link_to_if_arvados_object(object, {no_tags: true}) %> -
+ <%= render :partial => "selection_checkbox", :locals => {object: object} %> + + <%= render :partial => "show_object_button", :locals => {object: object, size: 'xs'} %> + + <%= render_editable_attribute name_link, 'name', nil, {data: {emptytext: "Unnamed #{object.class_for_display}"}} %> + + <%= object.content_summary %> + + + <%= raw distance_of_time_in_words(object.modified_at, Time.now).sub('about ','~').sub(' ',' ') + ' ago' rescue object.modified_at %> + + + <%= object.uuid %> + + <% if @object.editable? %> + <%= link_to({action: 'remove_item', id: @object.uuid, item_uuid: ((name_link && name_link.uuid) || object.uuid)}, method: :delete, remote: true, data: {confirm: "You are about to remove #{object.class_for_display} #{object.uuid} from this folder.\n\nAre you sure?"}, class: 'btn btn-xs btn-default') do %> + Remove + <% end %> + <% end %> +
- Name - Modified + name + + type + + modified + + uuid - UUID