Merge branch '3198-inode-cache' into 3198-writable-fuse, fix tests.
[arvados.git] / apps / workbench / app / views / application / index.html.erb
index 0d7657f51259ac86592b43caf4a83a312ae809ae..4c7896f728883a0de6b46218d3dc4eae1100acc7 100644 (file)
@@ -1,50 +1,13 @@
-<% if @objects.empty? %>
-
-<p>
-  No <%= controller.model_class.to_s.underscore.pluralize.gsub '_', ' ' %> to display.
-</p>
-
-<% else %>
-
-<% attr_blacklist = 'created_at modified_at modified_by_user modified_by_client updated_at' %>
+<% content_for :page_title do %>
+<%= controller.controller_name.humanize.capitalize %>
+<% end %>
 
-<table class="table arv-index">
-  <thead>
-    <tr>
-      <% @objects.first.attributes_for_display.each do |attr, attrvalue| %>
-      <% next if attr_blacklist.index attr %>
-      <th class="arv-attr-<%= attr %>">
-        <%= attr.sub /_uuid/, '' %>
-      </th>
-      <% end %>
-    </tr>
-  </thead>
-      
-  <tbody>
-    <% @objects.each do |object| %>
-    <tr>
-      <% object.attributes_for_display.each do |attr, attrvalue| %>
-      <% next if attr_blacklist.index attr %>
-      <td class="arv-object-<%= object.class.to_s %> arv-attr-<%= attr %>">
-        <% if attr == 'uuid' %>
-        <%= link_to_if_arvados_object object %>
-        <% elsif object.attribute_editable? attr %>
-        <%= render_editable_attribute object, attr %>
-        <% else %>
-        <%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: @object, with_prefixes: true, with_class_name: true} %>
-        <% end %>
-      </td>
-      <% end %>
-    </tr>
-    <% end %>
-  </tbody>
+<% content_for :tab_line_buttons do %>
 
-  <tfoot>
-  </tfoot>
-</table>
+  <% if controller.model_class.creatable? %>
+    <%= render partial: 'create_new_object_button' %>
+  <% end %>
 
 <% end %>
 
-<% if controller.model_class.creatable? %>
-<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", { action: 'create', return_to: './' }, { class: 'btn btn-primary' } %>
-<% end %>
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.index_pane_list }%>