diff options
| author | Greg Roach <fisharebest@gmail.com> | 2018-01-07 13:19:10 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2018-01-07 13:48:19 +0000 |
| commit | cb22dde7e440e246bed547b79c39f04c78a3affa (patch) | |
| tree | 02d98a6a9c6e5f4d54a21d230cd8568ba714fe7a /family.php | |
| parent | d6b3677be38ceba2ff72e03efc8443158b20c9ce (diff) | |
| download | webtrees-cb22dde7e440e246bed547b79c39f04c78a3affa.tar.gz webtrees-cb22dde7e440e246bed547b79c39f04c78a3affa.tar.bz2 webtrees-cb22dde7e440e246bed547b79c39f04c78a3affa.zip | |
Use view for family page
Diffstat (limited to 'family.php')
| -rw-r--r-- | family.php | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/family.php b/family.php index d49cea5297..10556274cc 100644 --- a/family.php +++ b/family.php @@ -16,7 +16,6 @@ namespace Fisharebest\Webtrees; use Fisharebest\Webtrees\Controller\FamilyController; -use Fisharebest\Webtrees\Functions\FunctionsCharts; use Fisharebest\Webtrees\Functions\FunctionsPrint; /** @global Tree $WT_TREE */ @@ -62,54 +61,7 @@ if ($controller->record && $controller->record->canShow()) { return; } -?> -<div id="family-page"> - <h2><?= $controller->record->getFullName() ?></h2> - - <table id="family-table"> - <tr style="vertical-align:top;"> - <td style="width: <?= Theme::theme()->parameter('chart-box-x') + 30 ?>px;"><!--//List of children//--> - <?php FunctionsCharts::printFamilyChildren($controller->record) ?> - </td> - <td> <!--//parents pedigree chart and Family Details//--> - <table width="100%"> - <tr> - <td class="subheaders"><?= I18N::translate('Parents') ?></td> - <td class="subheaders"><?= I18N::translate('Grandparents') ?></td> - </tr> - <tr> - <td colspan="2"> - <?php - FunctionsCharts::printFamilyParents($controller->record); - if (Auth::isEditor($controller->record->getTree())) { - $husb = $controller->record->getHusband(); - if ($husb !== null) { - echo '<a href="edit_interface.php?action=add_spouse_to_family&ged=' . $controller->record->getTree()->getNameHtml() . '&xref=', $controller->record->getXref(), '&famtag=HUSB">', I18N::translate('Add a father'), '</a><br>'; - } - $wife = $controller->record->getWife(); - if ($wife !== null) { - echo '<a href="edit_interface.php?action=add_spouse_to_family&ged=\' . $controller->record->getTree()->getNameHtml() . \'&xref=\', $controller->record->getXref(), \'&famtag=WIFE">', I18N::translate('Add a mother'), '</a><br>'; - } - } - ?> - </td> - </tr> - <tr> - <td colspan="2"> - <span class="subheaders"><?= I18N::translate('Family group information') ?></span> - <?php - if ($controller->record->canShow()) { - echo '<table class="table wt-facts-table">'; - $controller->printFamilyFacts(); - echo '</table>'; - } else { - echo '<p>', I18N::translate('The details of this family are private.'), '</p>'; - } - ?> - </td> - </tr> - </table> - </td> - </tr> - </table> -</div> +echo View::make('family-page', [ + 'family' => $controller->record, + 'facts' => $controller->familyFacts(), +]); |
