Skip to content

Commit

Permalink
Override show method
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Nov 14, 2024
1 parent a430525 commit 60e4684
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ def index
end
end

# [hyc-override] Switch to monthly stats and fix typo in file-set-in-work-download
def show
@pageviews = Hyrax::Analytics.monthly_events_for_id(@document.id, 'work-view')
@uniques = Hyrax::Analytics.unique_visitors_for_id(@document.id)
@downloads = Hyrax::Analytics.monthly_events_for_id(@document.id, 'file-set-in-work-download')
@files = paginate(@document._source['file_set_ids_ssim'], rows: 5)
respond_to do |format|
format.html
format.csv { export_data }
end
end

private
# [hyc-override] Builds a hash instead of an array for faster lookups
def top_analytics_works
Expand Down

0 comments on commit 60e4684

Please sign in to comment.