Sha256: 7ce90d52ed24b1ead1f50bded25679aa393c767a79b9b547cfd6cc5919105fa0

Contents?: true

Size: 793 Bytes

Versions: 19

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  class CitationsController < ApplicationController
    include WorksControllerBehavior
    include DenyAccessOverrideBehavior
    include Breadcrumbs

    # Overrides decide_layout from WorksControllerBehavior
    with_themed_layout '1_column'

    before_action :build_breadcrumbs, only: [:work, :file]

    def work
      show
    end

    def file
      # We set _@presenter_ here so it isn't set in WorksControllerBehavior#presenter
      # which is intended to find works (not files)
      solr_file = ::SolrDocument.find(params[:id])
      authorize! :show, solr_file
      @presenter = FileSetPresenter.new(solr_file, current_ability, request)
      show
    end

    private

    def show_presenter
      WorkShowPresenter
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
hyrax-5.0.4 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.3 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.2 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.1 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.0 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.0.rc3 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.0.rc2 app/controllers/hyrax/citations_controller.rb
hyrax-5.0.0.rc1 app/controllers/hyrax/citations_controller.rb
hyrax-3.6.0 app/controllers/hyrax/citations_controller.rb
hyrax-4.0.0 app/controllers/hyrax/citations_controller.rb
hyrax-4.0.0.rc3 app/controllers/hyrax/citations_controller.rb
hyrax-4.0.0.rc2 app/controllers/hyrax/citations_controller.rb
hyrax-4.0.0.rc1 app/controllers/hyrax/citations_controller.rb
hyrax-3.5.0 app/controllers/hyrax/citations_controller.rb
hyrax-4.0.0.beta2 app/controllers/hyrax/citations_controller.rb
hyrax-3.4.2 app/controllers/hyrax/citations_controller.rb
hyrax-4.0.0.beta1 app/controllers/hyrax/citations_controller.rb
hyrax-3.4.1 app/controllers/hyrax/citations_controller.rb
hyrax-3.4.0 app/controllers/hyrax/citations_controller.rb