Skip to content

Commit 375d02c

Browse files
committed
Merge pull request #1173 from cjcolvar/clear_bookmarks
Clear Bookmarks should be a results collection tool. Fixes #1172
2 parents c04ac76 + bd594ab commit 375d02c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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' %>

app/views/bookmarks/index.html.erb

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
<h3 class='section-heading'><%= t('blacklight.bookmarks.no_bookmarks') %></h3>
1111
<% else %>
12-
<%= 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' %>
1312
<%= render 'sort_and_per_page' %>
1413
<%= render partial: 'tools', locals: { document_list: @document_list } %>
1514

lib/blacklight/bookmarks.rb

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module Blacklight::Bookmarks
1515

1616
before_filter :verify_user
1717

18+
blacklight_config.add_results_collection_tool(:clear_bookmarks_widget)
19+
1820
blacklight_config.show.document_actions[:bookmark].if = false if blacklight_config.show.document_actions[:bookmark]
1921
blacklight_config.show.document_actions[:sms].if = false if blacklight_config.show.document_actions[:sms]
2022
end

0 commit comments

Comments
 (0)