X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e01ec69ced94414b7b9c139669664b8cb203e563..d2f68bd1e108c3f2dda2322c427050d019b17e04:/apps/workbench/app/views/application/index.html.erb diff --git a/apps/workbench/app/views/application/index.html.erb b/apps/workbench/app/views/application/index.html.erb index bb9dde3087..4c7896f728 100644 --- a/apps/workbench/app/views/application/index.html.erb +++ b/apps/workbench/app/views/application/index.html.erb @@ -1,50 +1,13 @@ -<% if @objects.empty? %> - -

- No <%= controller.model_class.to_s.underscore.pluralize.gsub '_', ' ' %> to display. -

- -<% 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 %> - - - - <% @objects.first.attributes_for_display.each do |attr, attrvalue| %> - <% next if attr_blacklist.index attr %> - - <% end %> - - - - - <% @objects.each do |object| %> - - <% object.attributes_for_display.each do |attr, attrvalue| %> - <% next if attr_blacklist.index attr %> - - <% end %> - - <% end %> - +<% content_for :tab_line_buttons do %> - - -
- <%= attr.sub /_uuid/, '' %> -
- <% 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_class_name: true} %> - <% end %> -
+ <% 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 }%>