Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / application / index.html.erb
index a32e7bfdb9ff897d6ca6fc18735d9b774049cc61..7db8559b37ce3d3e6fa34d9332104e6ae3e3a2ad 100644 (file)
@@ -1,22 +1,15 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <% content_for :page_title do %>
-<%= controller.model_class.to_s.pluralize.underscore.capitalize.gsub('_', ' ') %>
+<%= controller.controller_name.humanize.capitalize %>
 <% end %>
 
 <% content_for :tab_line_buttons do %>
 
   <% if controller.model_class.creatable? %>
-
-    <% if controller.model_class.name == 'User' %>
-      <%= link_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", setup_user_popup_path,
-        {class: 'btn btn-primary pull-right', :remote => true, 'data-toggle' =>  "modal",
-          'data-target' => '#user-setup-modal-window', return_to: request.url}  %>
-      <div id="user-setup-modal-window" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
-    <% else %>
-      <%= button_to "Add a new #{controller.controller_name.singularize.humanize.downcase}",
-        { action: 'create' },
-        { class: 'btn btn-primary pull-right' } %>
-    <% end %>
-
+    <%= render partial: 'create_new_object_button' %>
   <% end %>
 
 <% end %>