Skip to content

Commit

Permalink
DRY catalog helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jan 14, 2014
1 parent fdf151f commit 08fe600
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/helpers/blacklight/catalog_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ def has_search_parameters?

def show_sort_and_per_page? response = nil
response ||= @response
response.total > 1
!response.empty?
end

def should_autofocus_on_search_box?
controller.is_a? Blacklight::Catalog and
action_name == "index" and
params[:q].to_s.empty? and
params[:f].to_s.empty?
!has_search_parameters?
end

def has_thumbnail? document
Expand Down

0 comments on commit 08fe600

Please sign in to comment.