Ghost/ghost/admin/app/components/posts-list/context-menu.hbs
Simon Backx 1ce4e4c522 Updated post context menu to take permissions into account
fixes https://github.com/TryGhost/Team/issues/2938

- Multi selection is disabled for contributors and authors (no actions available)
- Delete action is only available for admins and owners
2023-04-11 16:33:39 +02:00

40 lines
1.2 KiB
Handlebars

<ul class="gh-posts-context-menu dropdown-menu dropdown-triangle-top-left">
<li>
<button class="mr2" type="button" disabled {{on "click" @menu.close}}>
<span>Unpublish</span>
</button>
</li>
{{#if this.canFeatureSelection}}
{{#if this.shouldFeatureSelection }}
<li>
<button class="mr2" type="button" {{on "click" this.featurePosts}}>
<span>Feature</span>
</button>
</li>
{{else}}
<li>
<button class="mr2" type="button" {{on "click" this.unfeaturePosts}}>
<span>Unfeature</span>
</button>
</li>
{{/if}}
{{/if}}
<li>
<button class="mr2" type="button" disabled {{on "click" @menu.close}}>
<span>Add tag...</span>
</button>
</li>
<li>
<button class="mr2" type="button" disabled {{on "click" @menu.close}}>
<span>Post access...</span>
</button>
</li>
{{#if this.session.user.isAdmin}}
<li>
<button class="mr2" type="button" {{on "click" this.deletePosts}}>
<span>Delete</span>
</button>
</li>
{{/if}}
</ul>