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, '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 +- <%= 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 %>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' }) %>
+
+ <% 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 %>
+
-
- <% 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 |
---|