Sha256: de9c2562440d24ae4ad1884b8b8751b113fcbed3de17bba251313ac941c2b260

Contents?: true

Size: 821 Bytes

Versions: 11

Compression:

Stored size: 821 Bytes

Contents

module Pageflow
  module Admin
    module EntriesHelper
      def admin_entry_title(entry)
        if entry.title.blank?
          I18n.t('pageflow.admin.entries.default_title', id: entry.id)
        else
          entry.title
        end
      end

      def collection_for_entry_publication_states
        [
          'published_without_password_protection',
          'published_with_password_protection',
          'not_published'
        ].index_by do |state|
          I18n.t(state, scope: 'activerecord.values.pageflow/entry.publication_states')
        end
      end

      def entry_type_collection(entry_types = Pageflow.config.entry_types)
        entry_types.map(&:name).index_by do |type|
          I18n.t(type, scope: 'activerecord.values.pageflow/entry.type_names')
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pageflow-17.0.4 app/helpers/pageflow/admin/entries_helper.rb
pageflow-17.0.3 app/helpers/pageflow/admin/entries_helper.rb
pageflow-17.0.2 app/helpers/pageflow/admin/entries_helper.rb
pageflow-17.0.1 app/helpers/pageflow/admin/entries_helper.rb
pageflow-17.0.0 app/helpers/pageflow/admin/entries_helper.rb
pageflow-16.2.0 app/helpers/pageflow/admin/entries_helper.rb
pageflow-16.1.0 app/helpers/pageflow/admin/entries_helper.rb
pageflow-16.0.0 app/helpers/pageflow/admin/entries_helper.rb
pageflow-15.8.0 app/helpers/pageflow/admin/entries_helper.rb
pageflow-15.7.1 app/helpers/pageflow/admin/entries_helper.rb
pageflow-15.7.0 app/helpers/pageflow/admin/entries_helper.rb