Merge branch '3605-node-info-field' refs #3605
[arvados.git] / apps / workbench / app / views / application / show.html.erb
index 03a8f9bbb026790b79bd97d29d6b88c4978bf0ff..0697fefec596d55aa79e40cc419013c513456efb 100644 (file)
@@ -1,40 +1,32 @@
 <% 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>
-
-<% if @object.properties[:page_subtitle] %>
-<h4>
-<%= render_content_from_database @object.properties[:page_subtitle] %>
-</h4>
-<% end %>
+<% content_for :content_top do %>
+  <% if !['Group','User', 'Collection'].include? @object.class.to_s # projects and collections handle it themselves %>
+    <%= render partial: 'name_and_description' %>
+  <% 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_markup(@object.properties[:page_title] || @object.uuid) %>
+      </h1>
 
-<% pane_list = controller.show_pane_list  %>
+      <% if @object.properties[:page_subtitle] %>
+        <h4>
+          <%= render_markup @object.properties[:page_subtitle] %>
+        </h4>
+      <% end %>
 
-<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_markup @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 %>">
-    <div class="smart-scroll">
-      <%= render partial: 'show_' + pane %>
-    </div>
-  </div>
-  <% end %>
-</div>
+<% end %>
+
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>