2014-12-08 16:35:49 -05:00
|
|
|
<p>{{i18n "admin.email.preview_digest_desc"}}</p>
|
2013-06-11 12:27:11 -04:00
|
|
|
|
2017-06-28 15:36:34 -04:00
|
|
|
<div class="admin-controls email-preview">
|
2020-03-11 15:31:29 +01:00
|
|
|
<div class="controls">
|
2021-09-09 11:01:56 -04:00
|
|
|
<div class="inline-form">
|
|
|
|
<label for="last-seen">{{i18n "admin.email.last_seen_user"}}</label>
|
2022-07-05 10:41:31 -07:00
|
|
|
<DatePickerPast @value={{this.lastSeen}} @id="last-seen" />
|
2021-09-09 11:01:56 -04:00
|
|
|
<label>{{i18n "admin.email.user"}}:</label>
|
2022-07-05 10:41:31 -07:00
|
|
|
<EmailGroupUserChooser @value={{this.username}} @onChange={{action "updateUsername"}} @options={{hash
|
2021-09-09 11:01:56 -04:00
|
|
|
maximum=1
|
2022-06-30 12:30:50 +02:00
|
|
|
}} />
|
|
|
|
<DButton @class="btn-primary digest-refresh-button" @action={{action "refresh"}} @label="admin.email.refresh" />
|
2021-09-09 11:01:56 -04:00
|
|
|
<div class="toggle">
|
|
|
|
<label>{{i18n "admin.email.format"}}</label>
|
2022-07-05 10:41:31 -07:00
|
|
|
{{#if this.showHtml}}
|
2021-09-09 11:01:56 -04:00
|
|
|
<span>{{i18n "admin.email.html"}}</span>
|
|
|
|
|
|
|
|
|
<a href {{action "toggleShowHtml"}}>
|
|
|
|
{{i18n "admin.email.text"}}
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
<a href {{action "toggleShowHtml"}}>{{i18n "admin.email.html"}}</a> |
|
|
|
|
<span>{{i18n "admin.email.text"}}</span>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2015-08-16 11:51:31 +02:00
|
|
|
</div>
|
2013-06-03 16:12:24 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-07-05 10:41:31 -07:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.loading}}>
|
2016-11-23 17:46:57 -05:00
|
|
|
|
2019-08-01 14:37:42 +08:00
|
|
|
<div class="email-preview-digest">
|
2022-07-05 10:41:31 -07:00
|
|
|
{{#if this.showSendEmailForm}}
|
2019-08-01 14:37:42 +08:00
|
|
|
<div class="controls">
|
2021-09-09 11:01:56 -04:00
|
|
|
<div class="inline-form">
|
2022-07-05 10:41:31 -07:00
|
|
|
{{#if this.sendingEmail}}
|
2021-09-09 11:01:56 -04:00
|
|
|
{{i18n "admin.email.sending_test"}}
|
|
|
|
{{else}}
|
|
|
|
<label>{{i18n "admin.email.send_digest_label"}}</label>
|
2022-07-05 10:41:31 -07:00
|
|
|
<TextField @value={{this.email}} @placeholderKey="admin.email.test_email_address" />
|
|
|
|
<DButton @class="btn-default" @action={{action "sendEmail"}} @disabled={{this.sendEmailDisabled}} @label="admin.email.send_digest" />
|
|
|
|
{{#if this.sentEmail}}
|
2021-09-09 11:01:56 -04:00
|
|
|
<span class="result-message">{{i18n "admin.email.sent_test"}}</span>
|
|
|
|
{{/if}}
|
2019-08-01 14:37:42 +08:00
|
|
|
{{/if}}
|
2021-09-09 11:01:56 -04:00
|
|
|
</div>
|
2019-08-01 14:37:42 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2016-11-23 17:46:57 -05:00
|
|
|
|
2019-08-01 14:37:42 +08:00
|
|
|
<div class="preview-output">
|
2022-07-05 10:41:31 -07:00
|
|
|
{{#if this.showHtml}}
|
|
|
|
{{#if this.htmlEmpty}}
|
2019-08-01 14:37:42 +08:00
|
|
|
<p>{{i18n "admin.email.no_result"}}</p>
|
|
|
|
{{else}}
|
2022-07-05 10:41:31 -07:00
|
|
|
<iframe title={{i18n "admin.email.html_preview"}} srcdoc={{this.model.html_content}} />
|
2019-08-01 14:37:42 +08:00
|
|
|
{{/if}}
|
2016-11-24 15:38:22 -05:00
|
|
|
{{else}}
|
2022-07-05 10:41:31 -07:00
|
|
|
<pre>{{html-safe this.model.text_content}}</pre>
|
2016-11-24 15:38:22 -05:00
|
|
|
{{/if}}
|
2019-08-01 14:37:42 +08:00
|
|
|
</div>
|
2016-11-24 15:38:22 -05:00
|
|
|
</div>
|
|
|
|
|
2022-06-30 12:30:50 +02:00
|
|
|
</ConditionalLoadingSpinner>
|