1 <% object_class = @object.class_for_display.downcase %>
2 <% content_for :page_title do %>
3 <%= (@object.respond_to?(:properties) and !@object.properties.nil? ? @object.properties[:page_title] : nil) ||
4 @name_link.andand.name ||
5 @object.friendly_link_name %>
8 <% content_for :content_top do %>
9 <% if !['Group','User', 'Collection'].include? @object.class.to_s # projects and collections handle it themselves %>
10 <%= render partial: 'name_and_description' %>
14 <% if @object.class.goes_in_projects? && @object.uuid != current_user.andand.uuid # Not the "Home" project %>
15 <% content_for :tab_line_buttons do %>
16 <% if current_user.andand.is_active && @object.class.copies_to_projects? %>
19 title: "Copy this #{object_class} to:",
21 action_href: actions_path,
22 action_method: 'post',
24 copy_selections_into_project: true,
25 selection: @name_link.andand.uuid || @object.uuid,
26 selection_param: 'uuid',
27 success: 'redirect-to-created-object'
29 { class: "btn btn-sm btn-primary", remote: true, method: 'get',
30 title: "Make a copy of this #{object_class}" }) do %>
31 <i class="fa fa-fw fa-copy"></i> Copy to project...
34 <% if (ArvadosBase.find(@object.owner_uuid).writable_by.include?(current_user.andand.uuid) rescue nil) %>
37 title: "Move this #{object_class} to:",
39 action_href: actions_path,
40 action_method: 'post',
42 move_selections_into_project: true,
43 selection: @name_link.andand.uuid || @object.uuid,
44 selection_param: 'uuid',
45 success: 'redirect-to-created-object'
47 { class: "btn btn-sm btn-primary force-cache-reload", remote: true, method: 'get',
48 title: "Move this #{object_class} to a different project"}) do %>
49 <i class="fa fa-fw fa-truck"></i> Move <%=object_class%>...
55 <% unless flash["error"].blank? %>
56 <div class="flash-message alert alert-danger" role="alert">
57 <p class="contain-align-left"><%= flash["error"] %></p>
59 <% flash.delete("error") %>
62 <% unless flash.empty? %>
63 <div class="flash-message alert alert-warning">
64 <% flash.each do |_, msg| %>
65 <p class="contain-align-left"><%= msg %></p>