1<?php 2 3use Fisharebest\Webtrees\Family; 4use Fisharebest\Webtrees\I18N; 5use Fisharebest\Webtrees\Individual; 6 7/** 8 * @var Individual|null $individual 9 * @var Family|null $parents 10 * @var int $generations 11 * @var int $sosa 12 */ 13 14?> 15 16<div class="d-flex"> 17 <?= view('chart-box', ['individual' => $individual]) ?> 18 <div class="wt-sosa-number align-self-center p-1 mx-2 d-none d-md-block" title="<?= I18N::translate('Sosa-Stradonitz number') ?>"> 19 <?= I18N::number($sosa) ?> 20 </div> 21</div> 22 23<?php if ($generations > 1 && $parents instanceof Family) : ?> 24 <div class="d-flex"> 25 <span class="wt-chart-horizontal-spacer d-inline-block"></span> 26 <button class="btn btn-link px-0 py-1 wt-chart-expansion-control" data-toggle="collapse" data-target="#fam-<?= e($parents->xref()) ?>" aria-controls="fam-<?= e($parents->xref()) ?>" aria-expanded="true"> 27 <span class="chart-expand"> 28 <?= view('icons/expand') ?> 29 </span> 30 <span class="chart-collapse"> 31 <?= view('icons/collapse') ?> 32 </span> 33 <?php foreach ($parents->facts(['MARR', 'DIV', '_NMR'], true) as $fact) : ?> 34 <?= $fact->label() ?> 35 <?php if ($fact->date()->isOK()) : ?> 36 <?= strip_tags($fact->date()->display()) ?> 37 <?php endif ?> 38 — 39 <?php endforeach ?> 40 <?= I18N::plural('%s child', '%s children', $parents->children()->count(), I18N::number($parents->children()->count())) ?> 41 </button> 42 </div> 43 <div id="fam-<?= e($parents->xref()) ?>" class="collapse show mb-4"> 44 <?php foreach ($parents->spouses() as $n => $spouse) : ?> 45 <div class="d-flex"> 46 <div class="wt-chart-horizontal-indent position-relative"> 47 <?php if ($n + 1 === $parents->spouses()->count()) : ?> 48 <div class="wt-chart-vertical-last-child-line position-absolute"></div> 49 <?php else : ?> 50 <div class="wt-chart-vertical-line position-absolute"></div> 51 <div class="wt-chart-vertical-child-line position-absolute"></div> 52 <?php endif ?> 53 </div> 54 <div> 55 <?= view('modules/ancestors-chart/tree', ['individual' => $spouse, 'parents' => $spouse->childFamilies()->first(), 'generations' => $generations - 1, 'sosa' => $sosa * 2 + ($spouse->sex() === 'F' ? 1 : 0)]) ?> 56 </div> 57 </div> 58 <?php endforeach ?> 59 </div> 60<?php endif ?> 61