0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Wired up revision post status and reason to admin

no issue

We can now get post_status and reason in admin for each post_revision
object
This commit is contained in:
Ronald 2023-04-21 13:51:10 +01:00
parent 0adc81e192
commit f37d7a3fc7
4 changed files with 10 additions and 4 deletions

View file

@ -50,7 +50,7 @@
<span class="gh-post-history-version-tag current">Latest</span>
{{/if}}
{{#if revision.published}}
<span class="gh-post-history-version-tag published">Publised</span>
<span class="gh-post-history-version-tag published">Published</span>
{{/if}}
</div>
<span class="gh-post-history-version-meta {{if (eq revision.author.name "Anonymous") "anonymous-author"}}">{{revision.author.name}}</span>

View file

@ -62,7 +62,9 @@ export default class ModalPostHistory extends Component {
feature_image: revision.get('featureImage'),
author: {
name: revision.get('author.name') || 'Anonymous'
}
},
postStatus: revision.get('postStatus'),
reason: revision.get('reason')
};
});
}

View file

@ -7,4 +7,6 @@ export default class PostRevisionModel extends Model {
@attr('string') featureImage;
@attr('moment-utc') createdAt;
@belongsTo('user') author;
@attr('string') postStatus;
@attr('string') reason;
}

View file

@ -9,7 +9,9 @@ export default class PostRevisionSerializer extends ApplicationSerializer.extend
lexical: {key: 'lexical'},
title: {key: 'title'},
createdAt: {key: 'created_at'},
featureImage: {key: 'feature_image'},
postIdLocal: {key: 'post_id'}
postIdLocal: {key: 'post_id'},
postStatus: {key: 'post_status'},
reason: {key: 'reason'},
featureImage: {key: 'feature_image'}
};
}