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