Sha256: 9df6edaddcabfe869f0c67973809abe6421ccace5b6c8c484f8b02bd0b70060f

Contents?: true

Size: 1.3 KB

Versions: 18

Compression:

Stored size: 1.3 KB

Contents

module CurationConcerns::WorkBehavior
  extend ActiveSupport::Concern

  include Hydra::Works::WorkBehavior
  include CurationConcerns::HumanReadableType
  include CurationConcerns::Noid
  include CurationConcerns::Permissions
  include CurationConcerns::Serializers
  include Hydra::WithDepositor
  include Solrizer::Common
  include CurationConcerns::HasRepresentative
  include CurationConcerns::WithFileSets
  include CurationConcerns::Naming
  include CurationConcerns::RequiredMetadata
  include Hydra::AccessControls::Embargoable
  include GlobalID::Identification

  included do
    property :owner, predicate: RDF::URI.new('http://opaquenamespace.org/ns/hydra/owner'), multiple: false
    class_attribute :human_readable_short_description
  end

  module ClassMethods
    def indexer
      CurationConcerns::WorkIndexer
    end

    # This governs which partial to draw when you render this type of object
    def _to_partial_path #:nodoc:
      @_to_partial_path ||= begin
        element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name))
        collection = ActiveSupport::Inflector.tableize(name)
        "curation_concerns/#{collection}/#{element}".freeze
      end
    end
  end

  def to_s
    if title.present?
      Array(title).join(' | ')
    else
      'No Title'
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
curation_concerns-0.14.0.pre4 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.14.0.pre3 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.14.0.pre2 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.14.0.pre1 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.13.1 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.13.0 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre9 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre8 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre7 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre6 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre5 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre4 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre3 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-0.12.0.pre2 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-models-0.12.0.pre1 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-models-0.11.0 app/models/concerns/curation_concerns/work_behavior.rb
curation_concerns-models-0.11.0.rc1 app/models/concerns/curation_concerns/work_behavior.rb