1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <% object_class = @object.class_for_display.downcase %>
6 <% content_for :page_title do %>
7 <%= (@object.respond_to?(:properties) and !@object.properties.nil? ? @object.properties[:page_title] : nil) ||
8 @name_link.andand.name ||
9 @object.friendly_link_name %>
12 <% content_for :content_top do %>
13 <% if !['Group','User', 'Collection'].include? @object.class.to_s # projects and collections handle it themselves %>
14 <%= render partial: 'name_and_description' %>
18 <% if @object.class.goes_in_projects? && @object.uuid != current_user.andand.uuid # Not the "Home" project %>
19 <% content_for :tab_line_buttons do %>
20 <% if current_user.andand.is_active %>
21 <%= render partial: 'extra_tab_line_buttons' %>
23 <% if current_user.andand.is_active && @object.class.copies_to_projects? %>
26 title: "Copy this #{object_class} to:",
28 action_href: actions_path,
29 action_method: 'post',
31 copy_selections_into_project: true,
32 selection: @name_link.andand.uuid || @object.uuid,
33 selection_param: 'uuid',
34 success: 'redirect-to-created-object'
36 { class: "btn btn-sm btn-primary", remote: true, method: 'get',
37 title: "Make a copy of this #{object_class}" }) do %>
38 <i class="fa fa-fw fa-copy"></i> Copy to project...
41 <% if (ArvadosBase.find(@object.owner_uuid).writable_by.include?(current_user.andand.uuid) rescue nil) %>
44 title: "Move this #{object_class} to:",
46 action_href: actions_path,
47 action_method: 'post',
49 move_selections_into_project: true,
50 selection: @name_link.andand.uuid || @object.uuid,
51 selection_param: 'uuid',
52 success: 'redirect-to-created-object'
54 { class: "btn btn-sm btn-primary force-cache-reload", remote: true, method: 'get',
55 title: "Move this #{object_class} to a different project"}) do %>
56 <i class="fa fa-fw fa-truck"></i> Move <%=object_class%>...
62 <% unless flash["error"].blank? %>
63 <div class="flash-message alert alert-danger" role="alert">
64 <p class="contain-align-left"><%= flash["error"] %></p>
66 <% flash.delete("error") %>
69 <% unless flash.empty? %>
70 <div class="flash-message alert alert-warning">
71 <% flash.each do |_, msg| %>
72 <p class="contain-align-left"><%= msg %></p>