Class: Pageflow::Admin::EntriesTab

Inherits:
ViewComponent
  • Object
show all
Defined in:
app/views/components/pageflow/admin/entries_tab.rb

Overview

Since:

  • 12.2

Instance Method Summary collapse

Instance Method Details

#build(account) ⇒ Object

Since:

  • 12.2



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/views/components/pageflow/admin/entries_tab.rb', line 4

def build()
  embedded_index_table(.entries,
                       blank_slate_text: I18n.t('pageflow.admin.entries.no_members')) do
    table_for_collection(sortable: true, class: 'entries', i18n: Pageflow::Entry) do
      column :title, sortable: :title do |entry|
        link_to(entry.title, admin_entry_path(entry))
      end
      column :created_at
      column :updated_at
    end
  end
end