Sha256: 5101e3be554fe66bdb7de18abeb3cd4269bdae06cddbc04095a6a6eb247f9c29

Contents?: true

Size: 1.36 KB

Versions: 44

Compression:

Stored size: 1.36 KB

Contents

# frozen_string_literal: true

require_dependency "bulkrax/application_controller"
require_dependency "oai"

module Bulkrax
  class EntriesController < ApplicationController
    include Hyrax::ThemedLayoutController
    before_action :authenticate_user!
    with_themed_layout 'dashboard'

    def show
      if params[:importer_id].present?
        show_importer
      elsif params[:exporter_id].present?
        show_exporter
      end
    end

    # GET /importers/1/entries/1
    def show_importer
      @importer = Importer.find(params[:importer_id])
      @entry = Entry.find(params[:id])

      add_breadcrumb t(:'hyrax.controls.home'), main_app.root_path
      add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
      add_breadcrumb 'Importers', bulkrax.importers_path
      add_breadcrumb @importer.name, bulkrax.importer_path(@importer.id)
      add_breadcrumb @entry.id
    end

    # GET /exporters/1/entries/1
    def show_exporter
      @exporter = Exporter.find(params[:exporter_id])
      @entry = Entry.find(params[:id])

      add_breadcrumb t(:'hyrax.controls.home'), main_app.root_path
      add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
      add_breadcrumb 'Exporters', bulkrax.exporters_path
      add_breadcrumb @exporter.name, bulkrax.exporter_path(@exporter.id)
      add_breadcrumb @entry.id
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
bulkrax-4.4.2 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.4.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.3.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.4.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.3.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.2.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.2.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.1.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.1.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-4.0.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.5.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.5.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.4.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.3.2 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.3.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.3.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.2.0 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.1.2 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.1.1 app/controllers/bulkrax/entries_controller.rb
bulkrax-3.1.0 app/controllers/bulkrax/entries_controller.rb