Limit detailed view to lineal kin; rest as summary bullets
Per-recipient: only direct ancestors and direct descendants
within a configurable number of generations (default 3) get the
full row treatment (avatar, icon, timeline). Everyone else falls
through to a compact text-only bullet list at the bottom of the
same section.
- New tree preference NEWSLETTER_LINEAL_DEPTH (range 0–10,
default 3) with a clearly-explained admin input.
- RelationshipPathFinder::linealKin() does two cheap recursive
expansions (ancestors and descendants only — no spouse or
sibling traversal) and returns the xref set. Memoised per
recipient within a dispatch run.
- Avatar attachments are filtered per recipient to only the
embeds actually referenced in their HTML, so summary-only rows
no longer inflate per-email size with unused images.
- Recipients with no PREF_TREE_ACCOUNT_XREF (external admin
addresses, users not linked to a record) see the entire
newsletter in detail — no lineal anchor to filter against.
- German translations for the three new section kickers ("Other
birthdays", etc.) and the admin input help text.
This commit is contained in:
@@ -47,6 +47,7 @@ use Illuminate\Support\Collection;
|
||||
$annivs = Configuration::includeAnniversaries($tree);
|
||||
$subject = Configuration::subjectPrefix($tree);
|
||||
$extras = $tree->getPreference(Configuration::PREF_EXTRA_RECIPIENTS, '');
|
||||
$lineal = Configuration::linealDepth($tree);
|
||||
$last_sent = Configuration::lastSentAt($tree);
|
||||
?>
|
||||
|
||||
@@ -129,6 +130,22 @@ use Illuminate\Support\Collection;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-3 col-form-label" for="lineal-<?= $id ?>">
|
||||
<?= I18N::translate('Detailed view depth (generations)') ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="number" style="max-width: 18rem;"
|
||||
id="lineal-<?= $id ?>" name="lineal-<?= $id ?>"
|
||||
value="<?= e((string) $lineal) ?>"
|
||||
min="<?= Configuration::MIN_LINEAL_DEPTH ?>"
|
||||
max="<?= Configuration::MAX_LINEAL_DEPTH ?>" required>
|
||||
<small class="form-text text-muted">
|
||||
<?= I18N::translate('Recipients see profile pictures, icons and the timeline only for their own direct ancestors and descendants within this many generations. Everyone else appears as a compact text list at the bottom of each section. Set to 0 to render the whole newsletter as text. Recipients with no linked tree record always see the full detailed view.') ?>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-3 col-form-label" for="subject-<?= $id ?>">
|
||||
<?= I18N::translate('Subject prefix') ?>
|
||||
|
||||
Reference in New Issue
Block a user