Method: Sufia::SufiaHelperBehavior#link_back_to_dashboard
- Defined in:
- app/helpers/sufia/sufia_helper_behavior.rb
#link_back_to_dashboard(opts = { label: 'Back to Search' }) ⇒ Object
Create a link back to the dashboard screen, keeping the user’s facet, query and paging choices intact by using session.
63 64 65 66 67 68 69 |
# File 'app/helpers/sufia/sufia_helper_behavior.rb', line 63 def link_back_to_dashboard(opts = { label: 'Back to Search' }) query_params = session[:search] ? session[:search].dup : {} query_params.delete :counter query_params.delete :total link_url = dashboard_index_path + "?" + query_params.to_query link_to opts[:label], link_url end |