-<% if @objects.empty? %>
-
-<p>
- No <%= controller.model_class.to_s.underscore.pluralize.gsub '_', ' ' %> to display.
-</p>
+<% content_for :page_title do %>
+<%= controller.controller_name.humanize.capitalize %>
+<% end %>
-<% else %>
+<% content_for :tab_line_buttons do %>
-<% attr_blacklist = 'created_at modified_at modified_by_user modified_by_client updated_at' %>
+ <% if controller.model_class.creatable? %>
-<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>
+ <% if controller.model_class.name == 'User' %>
+ <%= link_to setup_user_popup_path,
+ {class: 'btn btn-sm btn-primary', :remote => true, 'data-toggle' => "modal",
+ 'data-target' => '#user-setup-modal-window', return_to: request.url} do %>
+ <i class="fa fa-fw fa-plus"></i> Add a new user
<% 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>
+ <div id="user-setup-modal-window" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
+ <% elsif controller.controller_name == 'manage_account' %>
+ <%# No add button is needed %>
+ <% else %>
+ <%= button_to({action: 'create'}, {class: 'btn btn-sm btn-primary'}) do %>
+ <i class="fa fa-fw fa-plus"></i>
+ Add a new
+ <%= controller.controller_name.singularize.humanize.downcase %>
<% end %>
- </tr>
<% end %>
- </tbody>
- <tfoot>
- </tfoot>
-</table>
+ <% 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 }%>