Ghost/ghost/admin/app/components/modals/edit-newsletter.hbs

46 lines
2.2 KiB
Handlebars
Raw Normal View History

2022-04-04 21:26:49 +03:00
<div class="modal-content">
<div class="modal-body modal-fullsettings">
<div class="modal-fullsettings-body gh-newsletters-labs">
<div class="modal-fullsettings-sidebar">
<div class="flex items-center justify-between">
<h2 class="modal-fullsettings-heading">
{{if @data.newsletter.isNew "Create" "Edit"}} newsletter
</h2>
<div class="gh-btn-group">
<button type="button" class="gh-btn gh-btn-icon {{if (eq this.tab "settings") "gh-btn-group-selected"}}" {{on "click" (fn this.changeTab "settings")}}><span>Settings</span></button>
<button type="button" class="gh-btn gh-btn-icon {{if (eq this.tab "design") "gh-btn-group-selected"}}" {{on "click" (fn this.changeTab "design")}}><span>Design</span></button>
</div>
2022-04-04 21:26:49 +03:00
</div>
{{#if (eq this.tab "settings")}}
<Modals::EditNewsletter::Settings
@newsletter={{@data.newsletter}}
@optInExisting={{this.optInExisting}}
@setOptInExisting={{this.setOptInExisting}}
/>
2022-04-04 21:26:49 +03:00
{{else}}
<Modals::EditNewsletter::Design @newsletter={{@data.newsletter}} />
{{/if}}
</div>
<div class="modal-fullsettings-main">
<div class="modal-fullsettings-main-topbar">
<button class="gh-btn mr3" type="button" {{on "click" @close}}>
<span>Cancel</span>
</button>
<GhTaskButton
@buttonText="Save and close"
@successText="Saved"
@task={{this.saveTask}}
@idleClass="gh-btn-primary"
@class="gh-btn gh-btn-icon"
{{on-key "cmd+s" this.saveViaKeyboard priority=1}}
data-test-button="save-newsletter"
/>
</div>
2022-04-04 21:26:49 +03:00
<Modals::EditNewsletter::Preview @newsletter={{@data.newsletter}} />
</div>
</div>
</div>
</div>