Class: CatalogController
- Inherits:
-
ApplicationController
show all
- Includes:
- Blacklight::Catalog, BlacklightAdvancedSearch::ParseBasicQ, Hydra::Controller::ControllerBehavior
- Defined in:
- app/controllers/catalog_controller.rb
Instance Method Summary
collapse
#show_action_bar?, #sufia, with_themed_layout
Instance Method Details
#index ⇒ Object
43
44
45
46
47
48
|
# File 'app/controllers/catalog_controller.rb', line 43
def index
super
recent
recent_me
end
|
#recent ⇒ Object
50
51
52
53
54
55
56
57
58
59
|
# File 'app/controllers/catalog_controller.rb', line 50
def recent
if user_signed_in?
(resp, doc_list) = get_search_results(:q =>'{!lucene q.op=AND df=depositor_t}-'+current_user.user_key, :sort=>"system_create_dt desc", :rows=>3)
else
(resp, doc_list) = get_search_results(:q =>'', :sort=>"system_create_dt desc", :rows=>3)
end
@recent_documents = doc_list[0..3]
end
|
#recent_me ⇒ Object
61
62
63
64
65
66
67
68
|
# File 'app/controllers/catalog_controller.rb', line 61
def recent_me
if user_signed_in?
(resp, doc_list) = get_search_results(:q =>'{!lucene q.op=AND df=depositor_t}'+current_user.user_key, :sort=>"system_create_dt desc", :rows=>3)
@recent_user_documents = doc_list[0..3]
else
@recent_user_documents = nil
end
end
|