Skip to content

Commit

Permalink
Merge pull request #1173 from cjcolvar/clear_bookmarks
Browse files Browse the repository at this point in the history
Clear Bookmarks should be a results collection tool. Fixes #1172
  • Loading branch information
cbeer committed Mar 24, 2015
2 parents c04ac76 + bd594ab commit 375d02c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/views/bookmarks/_clear_bookmarks_widget.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path, :method => :delete, :data => { :confirm => t('blacklight.bookmarks.clear.action_confirm') }, :class => 'clear-bookmarks btn btn-danger' %>
1 change: 0 additions & 1 deletion app/views/bookmarks/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

<h3 class='section-heading'><%= t('blacklight.bookmarks.no_bookmarks') %></h3>
<% else %>
<%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path, :method => :delete, :data => { :confirm => t('blacklight.bookmarks.clear.action_confirm') }, :class => 'clear-bookmarks btn btn-danger pull-right' %>
<%= render 'sort_and_per_page' %>
<%= render partial: 'tools', locals: { document_list: @document_list } %>
Expand Down
2 changes: 2 additions & 0 deletions lib/blacklight/bookmarks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module Blacklight::Bookmarks

before_filter :verify_user

blacklight_config.add_results_collection_tool(:clear_bookmarks_widget)

blacklight_config.show.document_actions[:bookmark].if = false if blacklight_config.show.document_actions[:bookmark]
blacklight_config.show.document_actions[:sms].if = false if blacklight_config.show.document_actions[:sms]
end
Expand Down

0 comments on commit 375d02c

Please sign in to comment.