Sha256: c0d5de6ad92837fd7053b5f021a236ab88d68c29ddfd62201ed7d669bbe84e83

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

module FcrepoAdmin::Helpers
  module FcrepoAdminHelperBehavior

    def object_has_permissions?
      @object.is_a?(Hydra::ModelMixins::RightsMetadata)
    end

    def object_context_nav_header
	  t("fcrepo_admin.object.nav.header")
    end

    def object_context_nav_items
      render :partial => 'fcrepo_admin/objects/context_nav_items', :locals => {:object => @object}
    end

    def format_ds_profile_value(ds, key)
      value = ds.profile[key]
      case
      when key == "dsSize" then number_to_human_size(value)
      when key == "dsCreateDate" then value.strftime("%Y-%m-%dT%H:%M:%S.%LZ")
      when key == "dsLocation" && (ds.external? || ds.redirect?) then link_to(value, value)
      else value
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fcrepo_admin-0.4.1 lib/fcrepo_admin/helpers/fcrepo_admin_helper_behavior.rb