Ghost/ghost/admin/app/components/posts-list/list.hbs
Sodbileg Gansukh 5ee67892dc
Improved publishing flow end screen (#20701)
ref DES-594

- this update introduces some improvements to the publishing flow end screen
- everything's behind a feature flag — publishFlowEndScreen
2024-08-15 18:22:32 +08:00

45 lines
2.1 KiB
Handlebars

<MultiList::List @model={{@list}} class="posts-list gh-list {{unless @model "no-posts"}} feature-memberAttribution" as |list| >
{{!-- always order as scheduled, draft, remainder --}}
{{#if (or @model.scheduledInfinityModel (or @model.draftInfinityModel @model.publishedAndSentInfinityModel))}}
{{#if @model.scheduledInfinityModel}}
{{#each @model.scheduledInfinityModel as |post|}}
<list.item @id={{post.id}} class="gh-posts-list-item-group">
<PostsList::ListItem
@post={{post}}
data-test-post-id={{post.id}}
/>
</list.item>
{{/each}}
{{/if}}
{{#if (and @model.draftInfinityModel (or (not @model.scheduledInfinityModel) (and @model.scheduledInfinityModel @model.scheduledInfinityModel.reachedInfinity)))}}
{{#each @model.draftInfinityModel as |post|}}
<list.item @id={{post.id}} class="gh-posts-list-item-group">
<PostsList::ListItem
@post={{post}}
data-test-post-id={{post.id}}
/>
</list.item>
{{/each}}
{{/if}}
{{#if (and @model.publishedAndSentInfinityModel (and (or (not @model.scheduledInfinityModel) @model.scheduledInfinityModel.reachedInfinity) (or (not @model.draftInfinityModel) @model.draftInfinityModel.reachedInfinity)))}}
{{#each @model.publishedAndSentInfinityModel as |post|}}
<list.item @id={{post.id}} class="gh-posts-list-item-group">
<PostsList::ListItem
@post={{post}}
data-test-post-id={{post.id}}
/>
</list.item>
{{/each}}
{{/if}}
{{else}}
{{yield}}
{{/if}}
</MultiList::List>
{{!-- The currently selected item or items are passed to the context menu --}}
<GhContextMenu
@name="context-menu"
as |menu|
>
<PostsList::ContextMenu @menu={{menu}} />
</GhContextMenu>