Moves "add new item" button from bottom of the page to the top. Refs #1877
[arvados.git] / apps / workbench / app / views / application / _index.html.erb
index 9d77c4983f351fc516466d01e981eb8a764c29b6..07368a51d9b0746c698d12dadad2a3c7bfa96323 100644 (file)
@@ -1,3 +1,11 @@
+<h2 class="pull-left"><%= controller.model_class.to_s.pluralize.underscore.capitalize.gsub '_', ' ' %></h2>
+<br/>
+<% if controller.model_class.creatable? %>
+<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", 
+    { action: 'create', return_to: request.url }, 
+    { class: 'btn btn-primary pull-right' } %>
+<% end %>
+
 <% if @objects.empty? %>
 
 <p>
@@ -6,8 +14,6 @@
 
 <% else %>
 
-<h2><%= controller.model_class.to_s.pluralize.underscore.capitalize.gsub '_', ' ' %></h2>
-
 <% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at' %>
 
 <table class="table arv-index">
@@ -63,6 +69,3 @@
 
 <% end %>
 
-<% if controller.model_class.creatable? %>
-<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", { action: 'create', return_to: request.url }, { class: 'btn btn-primary' } %>
-<% end %>