Module: ApplicationHelper
Instance Method Summary
collapse
Methods included from SolrHelper
#__initialize_collection, #get_current_browse_level, #get_exhibit_navigation_data
#add_browse_facet_params, #get_browse_facet_path, #get_selected_browse_facet_path, #get_selected_browse_facets, #remove_related_facet_params
#facet_element, #get_parent_path, #get_showcase_parent_edit_path, #get_showcase_parent_show_path, #render_showcase_facet_selection
#get_saved_items, #get_saved_search, #saved_searches_for_select
Instance Method Details
#application_name ⇒ Object
29
30
31
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 29
def application_name
"Digitial Collections — Rare Books & Special Collections".html_safe
end
|
#breadcrumb_builder ⇒ Object
TODO: Improve the robustness of this implementation
21
22
23
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 21
def breadcrumb_builder
@collection.pretty_title
end
|
#breadcrumb_links ⇒ Object
16
17
18
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 16
def breadcrumb_links
in_collection_context? ? breadcrumb_builder : "Search Across Collections"
end
|
#collection_title ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 33
def collection_title
if @collection
if @collection.title_markup.blank?
"<h1 id=\"collection-title\">#{@collection.title}</h1>".html_safe
else
"<div id=\"collection-title\">#{@collection.title_markup}\n</div>".html_safe
end
end
end
|
#if_browsing_facet? ⇒ Boolean
25
26
27
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 25
def if_browsing_facet?
params[:f] && current_user
end
|
#in_collection_context? ⇒ Boolean
12
13
14
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 12
def in_collection_context?
!defined?(@collection).nil?
end
|
#in_unscoped_catalog_search? ⇒ Boolean
8
9
10
|
# File 'lib/generators/atrium/install/templates/helpers/application_helper.rb', line 8
def in_unscoped_catalog_search?
(params[:controller] == "catalog") && !params[:id]
end
|