46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/sufia/dashboard_controller_behavior.rb', line 46
def index
<< view_context.auto_discovery_link_tag(:rss, sufia.url_for(params.merge(:format => 'rss')), :title => "RSS for results")
<< view_context.auto_discovery_link_tag(:atom, sufia.url_for(params.merge(:format => 'atom')), :title => "Atom for results")
(@response, @document_list) = get_search_results
@user = current_user
@events = @user.events(100)
@last_event_timestamp = @user.events.first[:timestamp].to_i || 0 rescue 0
@filters = params[:f] || []
search_session[:dashboard] = true
respond_to do |format|
format.html { save_current_search_params }
format. { render :layout => false }
format.atom { render :layout => false }
end
@max_batch_size = 80
count_on_page = @document_list.count {|doc| batch.index(doc.id)}
@disable_select_all = @document_list.count > @max_batch_size
batch_size = batch.uniq.size
@result_set_size = @response.response["numFound"]
@empty_batch = batch.empty?
@all_checked = (count_on_page == @document_list.count)
@entire_result_set_selected = @response.response["numFound"] == batch_size
@batch_size_on_other_page = batch_size - count_on_page
@batch_part_on_other_page = (@batch_size_on_other_page) > 0
end
|