Sha256: 0f7736d58155ad222c6ab56f254caab6ae758021aaf053705280a843943539e7
Contents?: true
Size: 804 Bytes
Versions: 8
Compression:
Stored size: 804 Bytes
Contents
# frozen_string_literal: true 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 private def add_breadcrumb_for_controller add_breadcrumb I18n.t('hyrax.dashboard.my.works'), hyrax.my_works_path end def add_breadcrumb_for_action case action_name when 'file' add_breadcrumb I18n.t("hyrax.file_set.browse_view"), main_app.hyrax_file_set_path(params["id"]) when 'work' add_breadcrumb @work.to_s, main_app.polymorphic_path(@work) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems