3654: add a default name to newly created combined collection
authorradhika <radhika@curoverse.com>
Thu, 11 Sep 2014 19:01:07 +0000 (15:01 -0400)
committerradhika <radhika@curoverse.com>
Thu, 11 Sep 2014 19:01:07 +0000 (15:01 -0400)
apps/workbench/app/controllers/actions_controller.rb
apps/workbench/app/views/collections/_show_files.html.erb
apps/workbench/app/views/collections/_show_recent.html.erb
apps/workbench/app/views/projects/_show_tab_contents.html.erb

index 62c0b32e1edab98ec13c52932ae91f6ec0bb1fb2..347644bdbd141092051173315e52afcc3548d03f 100644 (file)
@@ -158,6 +158,7 @@ class ActionsController < ApplicationController
 
     normalized = arv_normalize combined
     newc = Collection.new({:manifest_text => normalized})
+    newc.name = newc.name || "Collection created at #{Time.now.localtime}"
     newc.save!
 
     chash.each do |k,v|
index 4718cb18abc772290bab107fc002d2c3a47608ca..38c86e1d4a5493e27b8183cf6961ebc0cb69b4ad 100644 (file)
@@ -4,7 +4,7 @@
       <div class="btn-group btn-group-sm">
         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <span class="caret"></span></button>
         <ul class="dropdown-menu" role="menu">
-          <li><%= link_to "Combine selections into a new collection", '#',
+          <li><%= link_to "Combine selected files into a new collection", '#',
                   'data-href' => combine_selected_path,
                   'data-selection-param-name' => 'selection[]',
                   'data-selection-action' => 'combine-collections',
index 7272b510491b59b8a98d84951ab72f69aebc48fd..5edabfaa69a62373a945a55daa036912729f0d53 100644 (file)
@@ -4,7 +4,7 @@
       <div class="btn-group btn-group-sm">
         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <span class="caret"></span></button>
         <ul class="dropdown-menu" role="menu">
-          <li><%= link_to "Combine selections into a new collection", '#',
+          <li><%= link_to "Combine selected collections into a new collection", '#',
                   'data-href' => combine_selected_path,
                   'data-selection-param-name' => 'selection[]',
                   'data-selection-action' => 'combine-collections',
index 3235783b875690e942f0db3b2bb629a0d351c365..3aff23e7443d2d89a8ac341010dc48760333c7b9 100644 (file)
@@ -4,10 +4,11 @@
       <div class="btn-group btn-group-sm">
         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <span class="caret"></span></button>
         <ul class="dropdown-menu" role="menu">
-          <li><%= link_to "Combine selections into a new collection", '#',
+          <li><%= link_to "Combine selected collections into a new collection", '#',
                   'data-href' => combine_selected_path(
                     action_data: {selection_param: 'project'}.to_json
                   ),
+                  'id' => 'combine_selections_button',
                   'data-selection-param-name' => 'selection[]',
                   'data-selection-action' => 'combine-project-contents',
                   'method' => 'post',