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

Contributor post list button fix

no refs.

- On the post list, an edit button was shown for contributors even if the post has been published. Clicking on this reloaded the post list
This commit is contained in:
Peter Zimon 2023-05-02 06:40:51 +02:00
parent be28283b36
commit a55efec7be

View file

@ -9,7 +9,7 @@
{{#if (and this.session.user.isContributor @post.isPublished)}}
<a href={{@post.url}} class="permalink gh-list-data gh-post-list-title" target="_blank" rel="noopener noreferrer">
<h3 class="gh-content-entry-title">
{{@post.title}} {{svg-jar "external" class="gh-post-list-external"}}
{{@post.title}}
</h3>
{{#unless @hideAuthor }}
<p class="gh-content-entry-meta">
@ -192,10 +192,18 @@
</span>
</LinkTo>
{{else}}
<LinkTo @route="editor.edit" @models={{array this.post.displayName this.post.id}} class="permalink gh-list-data gh-post-list-button" title="">
<span class="gh-post-list-cta edit {{if this.isHovered "is-hovered"}}" title="Go to Editor">
{{svg-jar "pen" title="Go to Editor"}}
</span>
</LinkTo>
{{#if (and this.session.user.isContributor @post.isPublished)}}
<a href={{@post.url}} class="permalink gh-list-data gh-post-list-button" target="_blank" rel="noopener noreferrer">
<span class="gh-post-list-cta edit {{if this.isHovered "is-hovered"}}" title="View post">
{{svg-jar "arrow-top-right" title="View post"}}
</span>
</a>
{{else}}
<LinkTo @route="editor.edit" @models={{array this.post.displayName this.post.id}} class="permalink gh-list-data gh-post-list-button" title="">
<span class="gh-post-list-cta edit {{if this.isHovered "is-hovered"}}" title="Go to Editor">
{{svg-jar "pen" title="Go to Editor"}}
</span>
</LinkTo>
{{/if}}
{{/if}}
</li>