Merge branch '3504-clients-compatible-with-3036' refs #3504
[arvados.git] / apps / workbench / app / views / application / show.html.erb
index d2abd72b87c96bf72cc2b957defb8e88edea1ab6..97922e8331ad03d644ac0575baae8b9c2f133927 100644 (file)
@@ -1,39 +1,29 @@
 <% content_for :page_title do %>
-<%= (@object.respond_to?(:properties) ? @object.properties[:page_title] : nil) ||
-    @object.friendly_link_name %>
+  <%= (@object.respond_to?(:properties) and !@object.properties.nil? ? @object.properties[:page_title] : nil) ||
+      @name_link.andand.name ||
+      @object.friendly_link_name %>
 <% end %>
 
-<% if @object.respond_to? :properties %>
-<% if @object.properties[:page_content] %>
-<% content_for :page_content do %>
-<h1>
-<%= render_content_from_database(@object.properties[:page_title] || @object.uuid) %>
-</h1>
+<% content_for :content_top do %>
 
-<% if @object.properties[:page_subtitle] %>
-<h4>
-<%= render_content_from_database @object.properties[:page_subtitle] %>
-</h4>
-<% end %>
-
-<%= render_content_from_database @object.properties[:page_content] %>
-<% end %>
-<% end %>
-<% end %>
+<% if @object.respond_to? :properties and !@object.properties.nil? %>
+  <% if @object.properties[:page_content] %>
+    <% content_for :page_content do %>
+      <h1>
+        <%= render_content_from_database(@object.properties[:page_title] || @object.uuid) %>
+      </h1>
 
-<% pane_list = controller.show_pane_list rescue %w(attributes) %>
+      <% if @object.properties[:page_subtitle] %>
+        <h4>
+          <%= render_content_from_database @object.properties[:page_subtitle] %>
+        </h4>
+      <% end %>
 
-<div class="tabbable">
-<ul class="nav nav-tabs">
-  <% pane_list.each_with_index do |pane, i| %>
-  <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab" id="<%= pane %>-tab"><%= pane.capitalize.gsub '_', ' ' %></a></li>
+      <%= render_content_from_database @object.properties[:page_content] %>
+    <% end %>
   <% end %>
-</ul>
+<% end %>
 
-<div class="tab-content">
-  <% pane_list.each_with_index do |pane, i| %>
-  <div id="<%= pane %>" class="tab-pane fade in <%= 'active' if i==0 %>">
-    <%= render partial: 'show_' + pane %>
-  </div>
-  <% end %>
-</div>
+<% end %>
+
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>