3605: Fix tab param['tab_pane'] merge conflicts causing tests to fail.
[arvados.git] / apps / workbench / app / views / application / show.html.erb
1 <% content_for :page_title do %>
2   <%= (@object.respond_to?(:properties) and !@object.properties.nil? ? @object.properties[:page_title] : nil) ||
3       @name_link.andand.name ||
4       @object.friendly_link_name %>
5 <% end %>
6
7 <% content_for :content_top do %>
8   <% if !['Group','User', 'Collection'].include? @object.class.to_s # projects and collections handle it themselves %>
9     <%= render partial: 'name_and_description' %>
10   <% end %>
11
12 <% if @object.class.goes_in_projects? && @object.uuid != current_user.uuid # Not the "Home" project %>
13   <% content_for :tab_line_buttons do %>
14     <% if @object.class.copies_to_projects? %>
15       <%= link_to(
16           choose_projects_path(
17            title: 'Copy to project...',
18            action_name: 'Copy',
19            action_href: actions_path,
20            action_method: 'post',
21            action_data: {
22              copy_selections_into_project: true,
23              selection: @name_link.andand.uuid || @object.uuid,
24              selection_param: 'uuid',
25              success: 'redirect-to-created-object'
26            }.to_json),
27           { class: "btn btn-sm btn-primary", remote: true, method: 'get' }) do %>
28         <i class="fa fa-fw fa-copy"></i> Copy to project...
29       <% end %>
30     <% end %>
31     <% if @object.owner_uuid == current_user.uuid or (Group.find(@object.owner_uuid).writable_by.include?(current_user.uuid) rescue nil) %>
32       <%= link_to(
33           choose_projects_path(
34            title: 'Move to project...',
35            action_name: 'Move',
36            action_href: actions_path,
37            action_method: 'post',
38            action_data: {
39              move_selections_into_project: true,
40              selection: @name_link.andand.uuid || @object.uuid,
41              selection_param: 'uuid',
42              success: 'redirect-to-created-object'
43            }.to_json),
44           { class: "btn btn-sm btn-primary", remote: true, method: 'get' }) do %>
45         <i class="fa fa-fw fa-truck"></i> Move to project...
46       <% end %>
47     <% end %>
48   <% end %>
49 <% end %>
50
51 <% if @object.respond_to? :properties and !@object.properties.nil? %>
52   <% if @object.properties[:page_content] %>
53     <% content_for :page_content do %>
54       <h1>
55         <%= render_markup(@object.properties[:page_title] || @object.uuid) %>
56       </h1>
57
58       <% if @object.properties[:page_subtitle] %>
59         <h4>
60           <%= render_markup @object.properties[:page_subtitle] %>
61         </h4>
62       <% end %>
63
64       <%= render_markup @object.properties[:page_content] %>
65     <% end %>
66   <% end %>
67 <% end %>
68
69 <% end %>
70
71 <%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>