The blog posts list: one full-width row per post, stacked.
Declared only by MishkaBlog.BlogPost, and it reads that record directly rather than by column
position — a post row is a specific shape (a thumbnail beside a title over its site and date, an
excerpt under its language, a stats line ending in a status badge, and a row of language chips)
that a generic position mapping cannot describe. The resource's columns stay the field-selection
contract and the vocabulary the table view sorts by.
The list shows one row per post rather than one per translation
(MishkaCmsCore.LanguageEditions); the chips under the stats line
(MishkaBlogWeb.Templates.EditionChips) are the way to a translation without searching for it.
The row folds rather than overflowing
The prototype keeps the five actions on the title's line at every width, so on a phone they wrap into a right-aligned block that pushes the excerpt into a column two words wide. Here the actions drop to their own full-width line under a rule below 560px, and the thumbnail shrinks with them — the row keeps its reading order and nothing leaves the viewport.
Features
:filter- the labelled filter row: search, site, status, language, with Featured as a switch:select- per-row selection for bulk operations:bulk_actions- bulk actions on the selected rows:paginate- the page-size picker and Load more under the list
The furniture around the rows is MishkaCmsCoreWeb.Templates.CardChrome, shared with the
collections and document card pages. Pairs with MishkaCmsCoreWeb.UIAdapters.Admin, which draws
the archive switch, the view switch and the row actions.
See MishkaBlogWeb.Templates.CollectionCard for the same shape as a grid.
Summary
Functions
One aggregate off the record, or 0 when it arrived unloaded.
When the post went out, or when it was written if it never did.
The switcher draws this glyph for the card view.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_bulk_actions/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_empty/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_error/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_filters/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_header/1.
One post row.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_pagination/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_template_switcher/1.
How a post's status badge reads and what colour it wears.
The thumbnail tint for a post with no image, picked from its id so it never flickers.
Functions
@spec count(map(), atom()) :: non_neg_integer()
One aggregate off the record, or 0 when it arrived unloaded.
When the post went out, or when it was written if it never did.
A scheduled post reads as its due date, which is the only date about it worth showing.
The switcher draws this glyph for the card view.
The same grid-of-squares every blog card page uses, so the Table/Cards switch reads identically on
posts, comments, collections and bloggers — the resource picking a different glyph would make the
same control look like a different one from page to page. switcher_icon_class/1 on the admin
adapter has a clause per name, because the runtime CSS compiler cannot emit a mask for a name it
only ever sees at runtime.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_bulk_actions/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_empty/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_error/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_filters/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_header/1.
One post row.
The tick sits level with the title rather than centred on the card, because a card's height is set by however long its excerpt runs and a centred tick drifts away from the thing it selects.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_pagination/1.
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_template_switcher/1.
How a post's status badge reads and what colour it wears.
One entry per value of the status attribute, falling back to :draft — the attribute's own
default.
The thumbnail tint for a post with no image, picked from its id so it never flickers.