-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restores action_meny _collection partial from worthwhile (needed by s…
…ufia-core. test coverage will come when jpstroop fully restores collections in curation_concerns
- Loading branch information
1 parent
232871f
commit ce0ea90
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
app/views/catalog/_action_menu_partials/_collection.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<div class="btn-group"> | ||
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" href="#">Select an action <span class="caret"></span></button> | ||
<ul class="dropdown-menu"> | ||
<% if can? :edit, document %> | ||
<li> | ||
<%= link_to [collections, :edit, document], class: 'itemicon itemedit' do %><i class="glyphicon glyphicon-pencil"></i> Edit <%= document.human_readable_type %> | ||
<% end %> | ||
</li> | ||
<li> | ||
<% if @collection # We're on the view page for @collection. -%> | ||
<%= button_for_remove_from_collection(document) %> | ||
<% else %> | ||
<%= link_to [collections, document], class: 'itemicon itemtrash', title: 'Delete Collection', method: :delete, data: { | ||
confirm: "Deleting a collection from #{t('sufia.product_name')} is permanent. Click OK to delete this collection from #{t('sufia.product_name')}, or Cancel to cancel this operation" } do %> | ||
<i class="glyphicon glyphicon-trash"></i> Delete <%= document.human_readable_type %> | ||
<% end %> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
<% if can? :collect, document %> | ||
<li> | ||
<%= link_to_select_collection document %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<%= render 'curate/collections/add_to_collection_modal', collectible: document if can? :collect, document %> | ||
</div> |