Sha256: 73ece3eb0d33c5fb6c9df18a80a40650f49ad7e87ea0f81efdebf22a934ce40f
Contents?: true
Size: 819 Bytes
Versions: 10
Compression:
Stored size: 819 Bytes
Contents
module Hyrax class StatsController < ApplicationController include Hyrax::SingularSubresourceController include Hyrax::Breadcrumbs before_action :build_breadcrumbs, only: [:work, :file] def work @stats = Hyrax::WorkUsage.new(params[:id]) end def file @stats = Hyrax::FileUsage.new(params[:id]) end protected def add_breadcrumb_for_controller add_breadcrumb I18n.t('hyrax.dashboard.my.works'), hyrax.dashboard_works_path end def add_breadcrumb_for_action case action_name when 'file'.freeze add_breadcrumb I18n.t("hyrax.file_set.browse_view"), main_app.hyrax_file_set_path(params["id"]) when 'work'.freeze add_breadcrumb @work.to_s, main_app.polymorphic_path(@work) end end end end
Version data entries
10 entries across 10 versions & 2 rubygems