Class: Pageflow::Admin::SitesTab

Inherits:
ViewComponent
  • Object
show all
Defined in:
app/views/components/pageflow/admin/sites_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
16
17
18
19
20
21
22
# File 'app/views/components/pageflow/admin/sites_tab.rb', line 4

def build()
  embedded_index_table(.sites,
                       blank_slate_text: I18n.t('pageflow.admin.accounts.no_sites')) do
    table_for_collection class: 'sites', i18n: Pageflow::Site do
      column :name do |site|
        link_to(site.display_name,
                (site., site))
      end
      column :title do |site|
        site.title.presence || '-'
      end
      column :host do |site|
        site.host.presence || '-'
      end
    end
  end

  add_button()
end