Skip to content

Commit

Permalink
Fixed post/page labels in feature image and save components (TryGhost…
Browse files Browse the repository at this point in the history
…#1143)

closes TryGhost/Ghost#10658

- update publish menu states to use `{{post.displayName}}` instead of hard coded `post`
- update settings menu image uploader to generate CTA using `post.displayName`
  • Loading branch information
vikaspotluri123 authored and kevinansfield committed Apr 6, 2019
1 parent ca5f9f1 commit 98f2ba3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/templates/components/gh-post-settings-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="settings-menu-content">
{{gh-image-uploader-with-preview
image=post.featureImage
text="Upload post image"
text=(concat "Upload " post.displayName " image")
allowUnsplash=true
update=(action "setCoverImage")
remove=(action "clearCoverImage")
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/gh-publishmenu-draft.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<header class="gh-publishmenu-heading">Ready to publish your post?</header>
<header class="gh-publishmenu-heading">Ready to publish your {{post.displayName}}?</header>
<section class="gh-publishmenu-content">
<div class="gh-publishmenu-radio {{if (eq saveType "publish") "active"}}" {{action "setSaveType" "publish" on="click"}}>
<div class="gh-publishmenu-radio-button" data-test-publishmenu-published-option></div>
<div class="gh-publishmenu-radio-content">
<div class="gh-publishmenu-radio-label">Set it live now</div>
<div class="gh-publishmenu-radio-desc">Publish this post immediately</div>
<div class="gh-publishmenu-radio-desc">Publish this {{post.displayName}} immediately</div>
</div>
</div>
<div class="gh-publishmenu-radio {{if (eq saveType "schedule") "active"}}" {{action "setSaveType" "schedule" on="click"}}>
Expand Down
6 changes: 3 additions & 3 deletions app/templates/components/gh-publishmenu-published.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<header class="gh-publishmenu-heading">Update post status</header>
<header class="gh-publishmenu-heading">Update {{post.displayName}} status</header>
<section class="gh-publishmenu-content">
<div class="gh-publishmenu-radio {{if (eq saveType "draft") "active"}}" {{action setSaveType "draft" on="click"}}>
<div class="gh-publishmenu-radio-button" data-test-publishmenu-unpublished-option></div>
<div class="gh-publishmenu-radio-content">
<div class="gh-publishmenu-radio-label">Unpublished</div>
<div class="gh-publishmenu-radio-desc">Revert this post to a private draft</div>
<div class="gh-publishmenu-radio-desc">Revert this {{post.displayName}} to a private draft</div>
</div>
</div>
<div class="gh-publishmenu-radio {{if (eq saveType "publish") "active"}}" {{action setSaveType "publish" on="click"}}>
<div class="gh-publishmenu-radio-button" data-test-publishmenu-published-option></div>
<div class="gh-publishmenu-radio-content">
<div class="gh-publishmenu-radio-label">Published</div>
<div class="gh-publishmenu-radio-desc">Display this post publicly</div>
<div class="gh-publishmenu-radio-desc">Display this {{post.displayName}} publicly</div>
</div>
</div>
</section>
1 change: 1 addition & 0 deletions app/templates/components/gh-publishmenu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{{#dd.content class="gh-publishmenu-dropdown"}}
{{#if (eq displayState "published")}}
{{gh-publishmenu-published
post=post
saveType=saveType
setSaveType=(action "setSaveType")}}

Expand Down

0 comments on commit 98f2ba3

Please sign in to comment.