Sha256: ffd9e02eb72f4d7825685398a0533d9ab27782e26f4a8ea03286584ee0dc86d6

Contents?: true

Size: 857 Bytes

Versions: 12

Compression:

Stored size: 857 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 eligible_accounts
        AccountPolicy::Scope.new(current_user, Account).entry_movable
      end

      def eligible_themings
        ThemingPolicy::Scope.new(current_user, Pageflow::Theming)
          .themings_allowed_for(resource.account)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pageflow-12.0.4 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.3 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.2 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.1 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc7 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc6 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc5 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc4 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc3 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc2 app/helpers/pageflow/admin/entries_helper.rb
pageflow-12.0.0.rc1 app/helpers/pageflow/admin/entries_helper.rb