Lists posts for a publishing group and provides creation actions.
Summary
Functions
Builds language data for the display version (live > draft > latest).
Builds language data for the publishing_language_switcher component. Returns a list of language maps with status, path, enabled flag, known flag, and metadata.
Gets the display version info for a post based on priority
Gets the published version number from a post's version_statuses map. Returns nil if no version is published.
Callback implementation for Phoenix.LiveView.render/1.
Functions
Builds language data for the display version (live > draft > latest).
Builds language data for the publishing_language_switcher component. Returns a list of language maps with status, path, enabled flag, known flag, and metadata.
The enabled field indicates if the language is currently active in the Languages module.
The known field indicates if the language code is recognized (vs unknown files like "test.phk").
The is_primary field indicates if this is the primary language for versioning.
For versioned posts with a live version, shows the live version's languages and paths.
Gets the display version info for a post based on priority:
- Published version (if exists) - what visitors see
- Newest draft version (if no published) - work in progress
- Latest version (fallback)
Returns {version_number, status, label} where label is :live, :draft, or :latest
Gets the published version number from a post's version_statuses map. Returns nil if no version is published.
Callback implementation for Phoenix.LiveView.render/1.