Module: Pageflow::Admin::EntriesHelper

Defined in:
app/helpers/pageflow/admin/entries_helper.rb

Overview

Since:

  • 12.2

Instance Method Summary collapse

Instance Method Details

#admin_entry_title(entry) ⇒ Object

Since:

  • 12.2



4
5
6
7
8
9
10
# File 'app/helpers/pageflow/admin/entries_helper.rb', line 4

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

#collection_for_entry_publication_statesObject

Since:

  • 12.2



12
13
14
15
16
17
18
19
20
# File 'app/helpers/pageflow/admin/entries_helper.rb', line 12

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

#entry_type_collectionObject

Since:

  • 12.2



22
23
24
# File 'app/helpers/pageflow/admin/entries_helper.rb', line 22

def entry_type_collection
  entry_type_collection_for_config(Pageflow.config)
end

#entry_type_collection_for_account(target) ⇒ Object

Since:

  • 12.2



26
27
28
# File 'app/helpers/pageflow/admin/entries_helper.rb', line 26

def (target)
  entry_type_collection_for_config(Pageflow.config_for(target))
end