2017-04-11 16:39:45 +03:00
|
|
|
{{#basic-dropdown verticalPosition="below" onOpen=(action "open") onClose=(action "close") as |dd|}}
|
|
|
|
{{#dd.trigger class="gh-btn gh-btn-outline gh-publishmenu-trigger"}}
|
2018-03-19 12:57:31 +03:00
|
|
|
<span data-test-publishmenu-trigger>{{triggerText}} {{svg-jar "arrow-down"}}</span>
|
2017-04-11 16:39:45 +03:00
|
|
|
{{/dd.trigger}}
|
|
|
|
|
|
|
|
{{#dd.content class="gh-publishmenu-dropdown"}}
|
2018-03-27 20:06:55 +03:00
|
|
|
{{#if (eq displayState "published")}}
|
2017-04-11 16:39:45 +03:00
|
|
|
{{gh-publishmenu-published
|
|
|
|
saveType=saveType
|
|
|
|
setSaveType=(action "setSaveType")}}
|
|
|
|
|
2018-03-27 20:06:55 +03:00
|
|
|
{{else if (eq displayState "scheduled")}}
|
2017-04-11 16:39:45 +03:00
|
|
|
{{gh-publishmenu-scheduled
|
|
|
|
post=post
|
|
|
|
saveType=saveType
|
2017-05-23 16:30:00 +03:00
|
|
|
isClosing=isClosing
|
2017-04-11 16:39:45 +03:00
|
|
|
setSaveType=(action "setSaveType")}}
|
|
|
|
|
|
|
|
{{else}}
|
|
|
|
{{gh-publishmenu-draft
|
|
|
|
post=post
|
|
|
|
saveType=saveType
|
|
|
|
setSaveType=(action "setSaveType")}}
|
|
|
|
{{/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
|
2017-06-15 20:35:23 +03:00
|
|
|
successText=successText
|
2017-07-20 13:46:31 +03:00
|
|
|
runningText=runningText
|
2017-04-14 19:22:14 +03:00
|
|
|
class="gh-btn gh-btn-blue gh-publishmenu-button gh-btn-icon"
|
2017-04-11 16:39:45 +03:00
|
|
|
data-test-publishmenu-save=true}}
|
|
|
|
</footer>
|
|
|
|
{{/dd.content}}
|
|
|
|
{{/basic-dropdown}}
|