[ARVADOS] created: 52cc8e1f3902028f4b32c62b22c1b694929e7b58

git at public.curoverse.com git at public.curoverse.com
Fri Aug 1 14:15:01 EDT 2014


        at  52cc8e1f3902028f4b32c62b22c1b694929e7b58 (commit)


commit 52cc8e1f3902028f4b32c62b22c1b694929e7b58
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Aug 1 14:14:55 2014 -0400

    3452: Add "Add to project..." button to collections page.

diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 8576d40..fb61277 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -1,6 +1,28 @@
+<% content_for :css do %>
+.file_buttons form {
+  display: inline-block;
+}
+<% end %>
+
 <% content_for :tab_line_buttons do %>
+<span class="file_buttons">
+
+        <%= button_to(choose_projects_path(
+                   title: Add to...',
+                   editable: true,
+                   action_name: Add',
+c                   action_href: url_for(action: :update),
+                   action_method: 'patch',
+                   action_data: {selection_param: @object.resource_param_name+'[owner_uuid]', success: 'page-refresh'}.to_json),
+                  { class: "btn btn-primary btn-sm",
+                    remote: true, method: 'get' }) do %>
+          <i class="fa fa-fw fa-folder"></i> Add to project...
+        <% end %>
+
 <span style="padding-left: 1em">Collection storage status:</span>
 <%= render partial: 'toggle_persist', locals: { uuid: @object.uuid, current_state: (@is_persistent ? 'persistent' : 'cache') } %>
+
+</span>
 <% end %>
 
 <% file_tree = @object.andand.files_tree %>
diff --git a/apps/workbench/app/views/collections/_toggle_persist.html.erb b/apps/workbench/app/views/collections/_toggle_persist.html.erb
index aa6ed81..f112b4e 100644
--- a/apps/workbench/app/views/collections/_toggle_persist.html.erb
+++ b/apps/workbench/app/views/collections/_toggle_persist.html.erb
@@ -1,3 +1,3 @@
-<div class="btn-group btn-group-xs toggle-persist" data-remote-href="<%= set_persistent_collection_path(id: uuid) %>" data-persistent-state="<%= current_state %>">
+<span class="btn-group btn-group-xs toggle-persist" data-remote-href="<%= set_persistent_collection_path(id: uuid) %>" data-persistent-state="<%= current_state %>">
   <button type="button" class="btn btn-info <%= 'active' if current_state == 'persistent' %>"><%= current_state.capitalize %></button>
-</div>
+</span>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list