One-shot bilingual intro paragraph with markdown + author avatar
- Admin can set a per-locale intro paragraph for the next issue on
the preferences page; cleared automatically after a successful
send. Stored in module_setting (longText) so multi-paragraph
notes fit.
- Intro is rendered via webtrees' CommonMark factory (same flavour
as notes) with raw HTML escaped, supports {{first_name}},
{{last_name}}, {{username}}, {{email}} substitution per recipient.
- Two-column intro layout: tree contact user's linked Individual
becomes the editorial portrait on the left. Their avatar is
added to the per-recipient embed set so the inline image always
resolves rather than falling through to a tree-page login link.
- Masthead now shows the tree URL under the title.
- Avatar source dimensions bumped 96→192 px and JPEG quality 75→88
so portraits stay crisp at retina display ratios.
This commit is contained in:
@@ -167,6 +167,38 @@ use Illuminate\Support\Collection;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="row mb-3">
|
||||
<legend class="col-sm-3 col-form-label">
|
||||
<?= I18N::translate('Intro paragraph for the next email') ?>
|
||||
</legend>
|
||||
<div class="col-sm-9">
|
||||
<small class="form-text text-muted d-block mb-2">
|
||||
<?= I18N::translate('Shown once, above the upcoming events. Cleared automatically after the next successful send.') ?>
|
||||
<br>
|
||||
<?= I18N::translate('Formatted as Markdown — e.g. %1$s for emphasis, %2$s for a link.', '<code>**bold**</code>', '<code>[label](https://example.org)</code>') ?>
|
||||
<br>
|
||||
<?= I18N::translate('Personalisation tokens:') ?>
|
||||
<code>{{first_name}}</code>,
|
||||
<code>{{last_name}}</code>,
|
||||
<code>{{username}}</code>,
|
||||
<code>{{email}}</code>
|
||||
</small>
|
||||
<?php foreach (Configuration::supportedSubjectLocales() as $code => $label) : ?>
|
||||
<?php
|
||||
$field = 'intro-' . $id . '-' . $code;
|
||||
$val = Configuration::introForLocale($module, $tree, $code);
|
||||
?>
|
||||
<div class="mb-2">
|
||||
<label class="form-label small text-muted mb-1" for="<?= e($field) ?>">
|
||||
<?= e($label) ?>
|
||||
</label>
|
||||
<textarea class="form-control" rows="6"
|
||||
id="<?= e($field) ?>" name="<?= e($field) ?>"><?= e($val) ?></textarea>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-3 col-form-label">
|
||||
<?= I18N::translate('Subscribed users') ?>
|
||||
|
||||
Reference in New Issue
Block a user