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