mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
Moved posts list components
no issue - relocated screen-specific components into a separate `posts-list/` directory as part of the move to keep the top-level `components/` directory for re-usable components
This commit is contained in:
parent
f654b24486
commit
ea93ff2a48
@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|||||||
import {get} from '@ember/object';
|
import {get} from '@ember/object';
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
|
|
||||||
export default class GhContentfilterComponent extends Component {
|
export default class PostsListContentFilter extends Component {
|
||||||
@service customViews;
|
@service customViews;
|
||||||
@service feature;
|
@service feature;
|
||||||
@service router;
|
@service router;
|
@ -4,7 +4,7 @@ import {formatPostTime} from 'ghost-admin/helpers/gh-format-post-time';
|
|||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
import {tracked} from '@glimmer/tracking';
|
import {tracked} from '@glimmer/tracking';
|
||||||
|
|
||||||
export default class GhPostsListItemComponent extends Component {
|
export default class PostsListItem extends Component {
|
||||||
@service feature;
|
@service feature;
|
||||||
@service session;
|
@service session;
|
||||||
@service settings;
|
@service settings;
|
@ -3,7 +3,7 @@
|
|||||||
<GhCustomViewTitle @title="Pages" @query={{reset-query-params "posts"}} />
|
<GhCustomViewTitle @title="Pages" @query={{reset-query-params "posts"}} />
|
||||||
|
|
||||||
<section class="view-actions">
|
<section class="view-actions">
|
||||||
<GhContentfilter
|
<PostsList::ContentFilter
|
||||||
@currentUser={{this.session.user}}
|
@currentUser={{this.session.user}}
|
||||||
@selectedType={{this.selectedType}}
|
@selectedType={{this.selectedType}}
|
||||||
@availableTypes={{this.availableTypes}}
|
@availableTypes={{this.availableTypes}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<GhCustomViewTitle @title="Pages" @query={{reset-query-params "posts"}} />
|
<GhCustomViewTitle @title="Pages" @query={{reset-query-params "posts"}} />
|
||||||
|
|
||||||
<section class="view-actions">
|
<section class="view-actions">
|
||||||
<GhContentfilter
|
<PostsList::ContentFilter
|
||||||
@currentUser={{this.session.user}}
|
@currentUser={{this.session.user}}
|
||||||
@selectedType={{this.selectedType}}
|
@selectedType={{this.selectedType}}
|
||||||
@availableTypes={{this.availableTypes}}
|
@availableTypes={{this.availableTypes}}
|
||||||
@ -41,9 +41,10 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each this.postsInfinityModel as |page|}}
|
{{#each this.postsInfinityModel as |page|}}
|
||||||
<GhPostsListItem
|
<PostsList::ListItem
|
||||||
@post={{page}}
|
@post={{page}}
|
||||||
data-test-page-id={{page.id}} />
|
data-test-page-id={{page.id}}
|
||||||
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li class="no-posts-box">
|
<li class="no-posts-box">
|
||||||
<div class="no-posts">
|
<div class="no-posts">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<GhCanvasHeader class="gh-canvas-header break tablet post-header">
|
<GhCanvasHeader class="gh-canvas-header break tablet post-header">
|
||||||
<GhCustomViewTitle @title={{if this.session.user.isContributor (concat this.config.blogTitle " posts") "Posts"}} @query={{reset-query-params "posts"}} />
|
<GhCustomViewTitle @title={{if this.session.user.isContributor (concat this.config.blogTitle " posts") "Posts"}} @query={{reset-query-params "posts"}} />
|
||||||
<section class="view-actions">
|
<section class="view-actions">
|
||||||
<GhContentfilter
|
<PostsList::ContentFilter
|
||||||
@currentUser={{this.session.user}}
|
@currentUser={{this.session.user}}
|
||||||
@selectedType={{this.selectedType}}
|
@selectedType={{this.selectedType}}
|
||||||
@availableTypes={{this.availableTypes}}
|
@availableTypes={{this.availableTypes}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<GhCustomViewTitle @title={{if this.session.user.isContributor (concat this.config.blogTitle " posts") "Posts"}} @query={{reset-query-params "posts"}} />
|
<GhCustomViewTitle @title={{if this.session.user.isContributor (concat this.config.blogTitle " posts") "Posts"}} @query={{reset-query-params "posts"}} />
|
||||||
|
|
||||||
<section class="view-actions">
|
<section class="view-actions">
|
||||||
<GhContentfilter
|
<PostsList::ContentFilter
|
||||||
@currentUser={{this.session.user}}
|
@currentUser={{this.session.user}}
|
||||||
@selectedType={{this.selectedType}}
|
@selectedType={{this.selectedType}}
|
||||||
@availableTypes={{this.availableTypes}}
|
@availableTypes={{this.availableTypes}}
|
||||||
@ -32,7 +32,7 @@
|
|||||||
{{#if this.postsInfinityModel}}
|
{{#if this.postsInfinityModel}}
|
||||||
<li class="gh-list-row header">
|
<li class="gh-list-row header">
|
||||||
<div class="gh-list-header gh-posts-title-header">Title</div>
|
<div class="gh-list-header gh-posts-title-header">Title</div>
|
||||||
|
|
||||||
{{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }}
|
{{#if (and this.feature.memberAttribution (not this.session.user.isContributor)) }}
|
||||||
<div class="gh-list-header gh-posts-status-header"></div>
|
<div class="gh-list-header gh-posts-status-header"></div>
|
||||||
<div class="gh-list-header gh-posts-signups-header">Signups</div>
|
<div class="gh-list-header gh-posts-signups-header">Signups</div>
|
||||||
@ -49,9 +49,10 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each this.postsInfinityModel as |post|}}
|
{{#each this.postsInfinityModel as |post|}}
|
||||||
<GhPostsListItem
|
<PostsList::ListItem
|
||||||
@post={{post}}
|
@post={{post}}
|
||||||
data-test-post-id={{post.id}} />
|
data-test-post-id={{post.id}}
|
||||||
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li class="no-posts-box">
|
<li class="no-posts-box">
|
||||||
<div class="no-posts">
|
<div class="no-posts">
|
||||||
|
Loading…
Reference in New Issue
Block a user