mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
50 lines
1.9 KiB
Handlebars
50 lines
1.9 KiB
Handlebars
{{#basic-dropdown verticalPosition="below" onOpen=(action "open") onClose=(action "close") as |dd|}}
|
|
{{#dd.trigger class="gh-btn gh-btn-outline gh-publishmenu-trigger"}}
|
|
<span data-test-publishmenu-trigger>{{triggerText}} {{svg-jar "arrow-down"}}</span>
|
|
{{/dd.trigger}}
|
|
|
|
{{#dd.content class="gh-publishmenu-dropdown"}}
|
|
{{#if (eq displayState "published")}}
|
|
{{gh-publishmenu-published
|
|
post=post
|
|
saveType=saveType
|
|
setSaveType=(action "setSaveType")
|
|
backgroundTask=this.backgroundTask
|
|
deliveredAction=this.deliveredAction}}
|
|
|
|
{{else if (eq displayState "scheduled")}}
|
|
{{gh-publishmenu-scheduled
|
|
post=post
|
|
saveType=saveType
|
|
isClosing=isClosing
|
|
setSaveType=(action "setSaveType")}}
|
|
|
|
{{else}}
|
|
{{gh-publishmenu-draft
|
|
post=post
|
|
saveType=saveType
|
|
setSaveType=(action "setSaveType")
|
|
backgroundTask=this.backgroundTask
|
|
deliveredAction=this.deliveredAction
|
|
memberCount=this.memberCount
|
|
sendEmailWhenPublished=this.sendEmailWhenPublishedScratch}}
|
|
{{/if}}
|
|
|
|
{{!--
|
|
save button needs to be outside of menu components so it doesn't lose state
|
|
or cancel the task when the post status updates and switches components
|
|
--}}
|
|
<footer class="gh-publishmenu-footer">
|
|
<button class="gh-btn gh-btn-outline gh-btn-link" {{action dd.actions.close}} data-test-publishmenu-cancel>
|
|
<span>Cancel</span>
|
|
</button>
|
|
{{gh-task-button buttonText
|
|
task=save
|
|
successText=successText
|
|
runningText=runningText
|
|
class="gh-btn gh-btn-blue gh-publishmenu-button gh-btn-icon"
|
|
data-test-publishmenu-save=true}}
|
|
</footer>
|
|
{{/dd.content}}
|
|
{{/basic-dropdown}}
|