FleetbaseFleetbase

Resource Layouts

<Layout::Resource::Tabular>, <Layout::Resource::Card>, <Layout::Resource::CardsGrid>, and <Layout::Resource::Panel> — pre-built page layouts for resource list views.

Resource Layouts

@fleetbase/ember-ui ships four pre-built page layouts for rendering a resource list. They are higher-level wrappers around <Table>, search, filters, bulk actions, and pagination — drop one in and you get a complete resource page.

LayoutComponentWhen to use
Tabular<Layout::Resource::Tabular>Standard list/detail page (the default for most resources)
Card<Layout::Resource::Card>Single-card detail view
CardsGrid<Layout::Resource::CardsGrid>Grid of cards (e.g. media gallery, store grid)
Panel<Layout::Resource::Panel>Sectioned panel layout

Tabular Example

<Layout::Resource::Tabular
  @title="Drivers"
  @searchQuery={{this.q}}
  @onSearch={{this.onSearch}}
  @onReload={{this.onReload}}
  @columns={{this.columns}}
  @rows={{this.rows}}
  @table={{this.table}}
  @onRowClick={{this.openDriver}}
/>

<Layout::Resource::Tabular> renders:

  • Section header with @title, search input, refresh button
  • Filters picker (driven by columns marked filterable)
  • Visible-column picker (let the user hide/show columns)
  • Bulk-action dropdown (when rows are selected)
  • The actual <Table> with sortable columns and pagination
  • Optional bulk-search dropdown for advanced multi-field search

Common Arguments

ArgumentDescription
@titleHeader title
@columnsColumn descriptors (passed to <Table>)
@rowsRow data
@tableThe ember-light-table model object
@searchQueryBound to the search input
@onSearchSearch callback
@onReloadRefresh button callback
@onRowClickClick callback for each row
@onSubmitBulkSearchOptional advanced search
@bulkSearchValueBound to advanced search
@withoutHeaderSkip the entire header row
@hideColumnsPickerSkip the visible-column picker

Plus a long tail of *Class and *Width overrides for each subsection.

Real-World Usage

Look at any of the resource list controllers in fleet-ops or storefront — they all use <Layout::Resource::Tabular> as their root template:

  • fleet-ops/addon/templates/management/drivers/index.hbs
  • fleet-ops/addon/templates/management/vehicles/index.hbs
  • storefront/addon/templates/networks/index.hbs

Studying any of these is the fastest way to see the full set of arguments in action.

Source

Resource Layouts | Fleetbase