diff options
Diffstat (limited to 'resources/views')
288 files changed, 14092 insertions, 14077 deletions
diff --git a/resources/views/admin/broadcast.php b/resources/views/admin/broadcast.php index 42fb471e2d..18fc808f5d 100644 --- a/resources/views/admin/broadcast.php +++ b/resources/views/admin/broadcast.php @@ -5,56 +5,56 @@ <h1><?= $title ?></h1> <form method="post" action="<?= e(route('broadcast')) ?>"> - <?= csrf_field() ?> - <input type="hidden" name="url" value="<?= e($url) ?>"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="url" value="<?= e($url) ?>"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="from"> - <?= I18N::translate('From') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="from" type="text" value="<?= e($from->getRealName()) ?>" disabled> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="from"> + <?= I18N::translate('From') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="from" type="text" value="<?= e($from->getRealName()) ?>" disabled> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="to"> - <?= I18N::translate('To') ?> - </label> - <div class="col-sm-9"> - <input type="hidden" name="to" value="<?= e($to) ?>"> - <input class="form-control" id="to" type="text" value="<?= e(implode(', ', $to_names)) ?>" disabled> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="to"> + <?= I18N::translate('To') ?> + </label> + <div class="col-sm-9"> + <input type="hidden" name="to" value="<?= e($to) ?>"> + <input class="form-control" id="to" type="text" value="<?= e(implode(', ', $to_names)) ?>" disabled> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="subject"> - <?= I18N::translate('Subject') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="subject"> + <?= I18N::translate('Subject') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="body"> - <?= I18N::translate('Message') ?> - </label> - <div class="col-sm-9"> - <textarea class="form-control" id="body" rows="5" type="text" name="body" required><?= e($body) ?></textarea> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="body"> + <?= I18N::translate('Message') ?> + </label> + <div class="col-sm-9"> + <textarea class="form-control" id="body" rows="5" type="text" name="body" required><?= e($body) ?></textarea> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 col-form-label"></div> - <div class="col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('Send') ?> - </button> - <a class="btn btn-link" href="<?= e($url) ?>"> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 col-form-label"></div> + <div class="col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('Send') ?> + </button> + <a class="btn btn-link" href="<?= e($url) ?>"> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/admin/changes-log.php b/resources/views/admin/changes-log.php index bec1bf088b..def61e8b09 100644 --- a/resources/views/admin/changes-log.php +++ b/resources/views/admin/changes-log.php @@ -6,108 +6,108 @@ <h1><?= $title ?></h1> <form class="form" name="logs"> - <input type="hidden" name="action" value="show"> - <input type="hidden" name="route" value="admin-changes-log"> - <input type="hidden" name="ged" value="<?= e($ged) ?>"> + <input type="hidden" name="action" value="show"> + <input type="hidden" name="route" value="admin-changes-log"> + <input type="hidden" name="ged" value="<?= e($ged) ?>"> - <div class="row"> - <div class="form-group col-xs-6 col-md-3"> - <label for="from"> - <?= /* I18N: From date1 (To date2) */ I18N::translate('From') ?> - </label> - <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required> - </div> + <div class="row"> + <div class="form-group col-xs-6 col-md-3"> + <label for="from"> + <?= /* I18N: From date1 (To date2) */ I18N::translate('From') ?> + </label> + <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required> + </div> - <div class="form-group col-xs-6 col-md-3"> - <label for="to"> - <?= /* I18N: (From date1) To date2 */ I18N::translate('To') ?> - </label> - <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="to" value="<?= e($to) ?>" required> - </div> + <div class="form-group col-xs-6 col-md-3"> + <label for="to"> + <?= /* I18N: (From date1) To date2 */ I18N::translate('To') ?> + </label> + <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="to" value="<?= e($to) ?>" required> + </div> - <div class="form-group col-xs-6 col-md-3"> - <label for="type"> - <?= I18N::translate('Status') ?> - </label> - <?= Bootstrap4::select($statuses, $type, ['id' => 'type', 'name' => 'type']) ?> - </div> + <div class="form-group col-xs-6 col-md-3"> + <label for="type"> + <?= I18N::translate('Status') ?> + </label> + <?= Bootstrap4::select($statuses, $type, ['id' => 'type', 'name' => 'type']) ?> + </div> - <div class="form-group col-xs-6 col-md-3"> - <label for="xref"> - <?= I18N::translate('Record') ?> - </label> - <input class="form-control" type="text" id="xref" name="xref" value="<?= e($xref) ?>"> - </div> - </div> + <div class="form-group col-xs-6 col-md-3"> + <label for="xref"> + <?= I18N::translate('Record') ?> + </label> + <input class="form-control" type="text" id="xref" name="xref" value="<?= e($xref) ?>"> + </div> + </div> - <div class="row"> - <div class="form-group col-xs-6 col-md-3"> - <label for="oldged"> - <?= I18N::translate('Old data') ?> - </label> - <input class="form-control" type="text" id="oldged" name="oldged" value="<?= e($oldged) ?>"> - </div> + <div class="row"> + <div class="form-group col-xs-6 col-md-3"> + <label for="oldged"> + <?= I18N::translate('Old data') ?> + </label> + <input class="form-control" type="text" id="oldged" name="oldged" value="<?= e($oldged) ?>"> + </div> - <div class="form-group col-xs-6 col-md-3"> - <label for="newged"> - <?= I18N::translate('New data') ?> - </label> - <input class="form-control" type="text" id="newged" name="newged" value="<?= e($newged) ?>"> - </div> + <div class="form-group col-xs-6 col-md-3"> + <label for="newged"> + <?= I18N::translate('New data') ?> + </label> + <input class="form-control" type="text" id="newged" name="newged" value="<?= e($newged) ?>"> + </div> - <div class="form-group col-xs-6 col-md-3"> - <label for="username"> - <?= I18N::translate('User') ?> - </label> - <?= Bootstrap4::select($user_list, $username, ['id' => 'username', 'name' => 'username']) ?> - </div> + <div class="form-group col-xs-6 col-md-3"> + <label for="username"> + <?= I18N::translate('User') ?> + </label> + <?= Bootstrap4::select($user_list, $username, ['id' => 'username', 'name' => 'username']) ?> + </div> - <div class="form-group col-xs-6 col-md-3"> - <label for="ged"> - <?= I18N::translate('Family tree') ?> - </label> - <?= Bootstrap4::select($tree_list, $ged, ['id' => 'ged', 'name' => 'ged']) ?> - </div> - </div> + <div class="form-group col-xs-6 col-md-3"> + <label for="ged"> + <?= I18N::translate('Family tree') ?> + </label> + <?= Bootstrap4::select($tree_list, $ged, ['id' => 'ged', 'name' => 'ged']) ?> + </div> + </div> - <div class="text-center"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/search') ?> - <?= I18N::translate('search') ?> - </button> + <div class="text-center"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/search') ?> + <?= I18N::translate('search') ?> + </button> - <button type="submit" class="btn btn-secondary" onclick="document.logs.action.value='export';return true;" <?= $action === 'show' ? '' : 'disabled' ?>> - <?= view('icons/download') ?> - <?= /* I18N: A button label. */ I18N::translate('download') ?> - </button> + <button type="submit" class="btn btn-secondary" onclick="document.logs.action.value='export';return true;" <?= $action === 'show' ? '' : 'disabled' ?>> + <?= view('icons/download') ?> + <?= /* I18N: A button label. */ I18N::translate('download') ?> + </button> - <button type="submit" class="btn btn-danger" data-confirm="<?= I18N::translate('Permanently delete these records?') ?>" onclick="if (confirm(this.dataset.confirm)) {document.logs.action.value='delete'; return true;} else {return false;}" <?= $action === 'show' ? '' : 'disabled' ?>> + <button type="submit" class="btn btn-danger" data-confirm="<?= I18N::translate('Permanently delete these records?') ?>" onclick="if (confirm(this.dataset.confirm)) {document.logs.action.value='delete'; return true;} else {return false;}" <?= $action === 'show' ? '' : 'disabled' ?>> <?= view('icons/delete') ?> - <?= I18N::translate('delete') ?> - </button> - </div> + <?= I18N::translate('delete') ?> + </button> + </div> </form> -<?php if ($action === 'show'): ?> - <table - class="table table-bordered table-sm table-hover table-site-changes datatables" - data-ajax="<?= route('admin-changes-log-data', ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'ged' => $ged, 'username' => $username]) ?>" - data-server-side="true" - data-sorting="<?= e('[[ 0, "desc" ]]') ?>" - > - <caption class="sr-only"> - <?= $title ?> - </caption> - <thead> - <tr> - <th data-visible="false"></th> - <th><?= I18N::translate('Timestamp') ?></th> - <th><?= I18N::translate('Status') ?></th> - <th><?= I18N::translate('Record') ?></th> - <th data-sortable="false"><?= I18N::translate('Data') ?></th> - <th><?= I18N::translate('User') ?></th> - <th><?= I18N::translate('Family tree') ?></th> - </tr> - </thead> - </table> +<?php if ($action === 'show') : ?> + <table + class="table table-bordered table-sm table-hover table-site-changes datatables" + data-ajax="<?= route('admin-changes-log-data', ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'ged' => $ged, 'username' => $username]) ?>" + data-server-side="true" + data-sorting="<?= e('[[ 0, "desc" ]]') ?>" + > + <caption class="sr-only"> + <?= $title ?> + </caption> + <thead> + <tr> + <th data-visible="false"></th> + <th><?= I18N::translate('Timestamp') ?></th> + <th><?= I18N::translate('Status') ?></th> + <th><?= I18N::translate('Record') ?></th> + <th data-sortable="false"><?= I18N::translate('Data') ?></th> + <th><?= I18N::translate('User') ?></th> + <th><?= I18N::translate('Family tree') ?></th> + </tr> + </thead> + </table> <?php endif ?> diff --git a/resources/views/admin/clean-data.php b/resources/views/admin/clean-data.php index f046f6072b..b6d6a803a8 100644 --- a/resources/views/admin/clean-data.php +++ b/resources/views/admin/clean-data.php @@ -5,30 +5,30 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('Files marked with %s are required for proper operation and cannot be removed.', view('icons/ban')) ?> + <?= I18N::translate('Files marked with %s are required for proper operation and cannot be removed.', view('icons/ban')) ?> </p> <form method="post"> - <input type="hidden" value="admin-clean-data"> - <?= csrf_field() ?> - <ul class="fa-ul"> - <?php - foreach ($entries as $entry) { - if (in_array($entry, $protected)) { - echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>'; - } else { - echo '<li><span class="fa-li">' . view('icons/delete') . '</span>'; - echo '<label>'; - echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> '; - echo e($entry); - echo '</label></li>'; - } - } - ?> - </ul> + <input type="hidden" value="admin-clean-data"> + <?= csrf_field() ?> + <ul class="fa-ul"> + <?php + foreach ($entries as $entry) { + if (in_array($entry, $protected)) { + echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>'; + } else { + echo '<li><span class="fa-li">' . view('icons/delete') . '</span>'; + echo '<label>'; + echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> '; + echo e($entry); + echo '</label></li>'; + } + } + ?> + </ul> - <button class="btn btn-danger" type="submit"> - <?= view('icons/delete') ?> - <?= /* I18N: A button label. */ I18N::translate('delete') ?> - </button> + <button class="btn btn-danger" type="submit"> + <?= view('icons/delete') ?> + <?= /* I18N: A button label. */ I18N::translate('delete') ?> + </button> </form> diff --git a/resources/views/admin/control-panel-manager.php b/resources/views/admin/control-panel-manager.php index 304fa72cb5..d8c17e6e44 100644 --- a/resources/views/admin/control-panel-manager.php +++ b/resources/views/admin/control-panel-manager.php @@ -4,51 +4,51 @@ <!-- WEBTREES VERSION --> <div class="card mb-4"> - <div class="card-header"> - <h2 class="mb-0"> - <?= WT_WEBTREES ?> - <span class="badge badge-secondary"> - <?= WT_VERSION ?> - </span> - </h2> - </div> - <div class="card-body"> - <p> - <?= /* I18N: %s is a URL/link to the project website */ - I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?> - </p> - </div> + <div class="card-header"> + <h2 class="mb-0"> + <?= WT_WEBTREES ?> + <span class="badge badge-secondary"> + <?= WT_VERSION ?> + </span> + </h2> + </div> + <div class="card-body"> + <p> + <?= /* I18N: %s is a URL/link to the project website */ + I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?> + </p> + </div> </div> <!-- FAMILY TREES --> <div class="card mb-4 <?= array_sum($changes) ? 'card-outline-danger' : '' ?>"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Family trees') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($all_trees)) ?> - </span> - </h2> - </div> - <div class="card-body"> - <table class="table table-sm"> - <caption class="sr-only"> - <?= I18N::translate('Family trees') ?> - </caption> - <thead> - <tr> - <th><?= I18N::translate('Family tree') ?></th> - <th><span class="sr-only"><?= I18N::translate('Manage family trees') ?></span></th> - <th class="text-right"><?= I18N::translate('Pending changes') ?></th> - <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Individuals') ?></th> - <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Families') ?></th> - <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Sources') ?></th> - <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Repositories') ?></th> - <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Media') ?></th> - <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Notes') ?></th> - </tr> - </thead> - <tbody> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Family trees') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($all_trees)) ?> + </span> + </h2> + </div> + <div class="card-body"> + <table class="table table-sm"> + <caption class="sr-only"> + <?= I18N::translate('Family trees') ?> + </caption> + <thead> + <tr> + <th><?= I18N::translate('Family tree') ?></th> + <th><span class="sr-only"><?= I18N::translate('Manage family trees') ?></span></th> + <th class="text-right"><?= I18N::translate('Pending changes') ?></th> + <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Individuals') ?></th> + <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Families') ?></th> + <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Sources') ?></th> + <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Repositories') ?></th> + <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Media') ?></th> + <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Notes') ?></th> + </tr> + </thead> + <tbody> <?= view('admin/control-panel-tree-list', [ 'all_trees' => $all_trees, 'changes' => $changes, @@ -59,7 +59,7 @@ 'media' => $media, 'notes' => $notes, ]); ?> - </tbody> - </table> - </div> + </tbody> + </table> + </div> </div> diff --git a/resources/views/admin/control-panel-tree-list.php b/resources/views/admin/control-panel-tree-list.php index 590bd05102..4e3d82b57b 100644 --- a/resources/views/admin/control-panel-tree-list.php +++ b/resources/views/admin/control-panel-tree-list.php @@ -1,6 +1,6 @@ <?php use Fisharebest\Webtrees\I18N; ?> -<?php foreach ($all_trees as $tree): ?> +<?php foreach ($all_trees as $tree) : ?> <tr class="<?= $changes[$tree->getTreeId()] ? 'danger' : '' ?>"> <th scope="row"> <a href="<?= e(route('tree-page', ['ged' => $tree->getName()])) ?>"> @@ -15,66 +15,66 @@ </a> </td> <td class="text-right"> - <?php if ($changes[$tree->getTreeId()]): ?> + <?php if ($changes[$tree->getTreeId()]) : ?> <a href="<?= e(route('show-pending', ['ged' => $tree->getName(), 'url' => route('admin-control-panel')])) ?>"> <?= I18N::number($changes[$tree->getTreeId()]) ?> <span class="sr-only"><?= I18N::translate('Pending changes') ?> <?= e($tree->getTitle()) ?></span> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> <td class="d-none d-sm-table-cell text-right"> - <?php if ($individuals[$tree->getTreeId()]): ?> + <?php if ($individuals[$tree->getTreeId()]) : ?> <a href="<?= e(route('individual-list', ['ged' => $tree->getName()])) ?>"> <?= I18N::number($individuals[$tree->getTreeId()]) ?> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> <td class="d-none d-lg-table-cell text-right"> - <?php if ($families[$tree->getTreeId()]): ?> + <?php if ($families[$tree->getTreeId()]) : ?> <a href="<?= e(route('family-list', ['ged' => $tree->getName()])) ?>"> <?= I18N::number($families[$tree->getTreeId()]) ?> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> <td class="d-none d-sm-table-cell text-right"> - <?php if ($sources[$tree->getTreeId()]): ?> + <?php if ($sources[$tree->getTreeId()]) : ?> <a href="<?= e(route('source-list', ['ged' => $tree->getName()])) ?>"> <?= I18N::number($sources[$tree->getTreeId()]) ?> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> <td class="d-none d-lg-table-cell text-right"> - <?php if ($repositories[$tree->getTreeId()]): ?> + <?php if ($repositories[$tree->getTreeId()]) : ?> <a href="<?= e(route('repository-list', ['ged' => $tree->getName()])) ?>"> <?= I18N::number($repositories[$tree->getTreeId()]) ?> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> <td class="d-none d-sm-table-cell text-right"> - <?php if ($media[$tree->getTreeId()]): ?> + <?php if ($media[$tree->getTreeId()]) : ?> <a href="<?= e(route('media-list', ['ged' => $tree->getName()])) ?>"> <?= I18N::number($media[$tree->getTreeId()]) ?> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> <td class="d-none d-lg-table-cell text-right"> - <?php if ($notes[$tree->getTreeId()]): ?> + <?php if ($notes[$tree->getTreeId()]) : ?> <a href="<?= e(route('note-list', ['ged' => $tree->getName()])) ?>"> <?= I18N::number($media[$tree->getTreeId()]) ?> </a> - <?php else: ?> + <?php else : ?> - <?php endif ?> </td> diff --git a/resources/views/admin/control-panel.php b/resources/views/admin/control-panel.php index 24781f65d8..7240987756 100644 --- a/resources/views/admin/control-panel.php +++ b/resources/views/admin/control-panel.php @@ -4,127 +4,127 @@ <!-- WEBSITE / WEBTREES --> <div class="card mb-4"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Website') ?> - <span class="badge badge-secondary"> - <?= WT_VERSION ?> - </span> - </h2> - </div> - <div class="card-body"> - <?php foreach ($server_warnings as $server_warning): ?> - <p class="alert alert-warning"><?= $server_warning ?></p> - <?php endforeach ?> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Website') ?> + <span class="badge badge-secondary"> + <?= WT_VERSION ?> + </span> + </h2> + </div> + <div class="card-body"> + <?php foreach ($server_warnings as $server_warning) : ?> + <p class="alert alert-warning"><?= $server_warning ?></p> + <?php endforeach ?> - <p class="card-text"> - <?= /* I18N: %s is a URL/link to the project website */ - I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?> - </p> - <p class="card-text "> - <?php if ($latest_version === ''): ?> - <?= I18N::translate('No upgrade information is available.') ?> - <?php elseif (version_compare(WT_VERSION, $latest_version) < 0): ?> - <?= I18N::translate('A new version of webtrees is available.') ?> - <a href="<?= e(route('upgrade')) ?>" class="error"> - <?= /* I18N: %s is a version number */ - I18N::translate('Upgrade to webtrees %s.', e($latest_version)) ?> - </a> - <?php else: ?> - <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?> - <?php endif ?> - </p> + <p class="card-text"> + <?= /* I18N: %s is a URL/link to the project website */ + I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?> + </p> + <p class="card-text "> + <?php if ($latest_version === '') : ?> + <?= I18N::translate('No upgrade information is available.') ?> + <?php elseif (version_compare(WT_VERSION, $latest_version) < 0) : ?> + <?= I18N::translate('A new version of webtrees is available.') ?> + <a href="<?= e(route('upgrade')) ?>" class="error"> + <?= /* I18N: %s is a version number */ + I18N::translate('Upgrade to webtrees %s.', e($latest_version)) ?> + </a> + <?php else : ?> + <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?> + <?php endif ?> + </p> - <div class="row"> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-preferences')) ?>"> - <?= I18N::translate('Website preferences') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-mail')) ?>"> - <?= I18N::translate('Sending email') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-registration')) ?>"> - <?= I18N::translate('Sign-in and registration') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-languages')) ?>"> - <?= I18N::translate('Languages') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-analytics')) ?>"> - <?= I18N::translate('Tracking and analytics') ?> - </a> - </li> - </ul> - </div> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-logs')) ?>"> - <?= I18N::translate('Website logs') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-clean-data')) ?>"> - <?= I18N::translate('Clean up data folder') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-site-information')) ?>"> - <?= I18N::translate('Server information') ?> - </a> - </li> - </ul> - </div> - </div> - </div> + <div class="row"> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-preferences')) ?>"> + <?= I18N::translate('Website preferences') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-mail')) ?>"> + <?= I18N::translate('Sending email') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-registration')) ?>"> + <?= I18N::translate('Sign-in and registration') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-languages')) ?>"> + <?= I18N::translate('Languages') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-analytics')) ?>"> + <?= I18N::translate('Tracking and analytics') ?> + </a> + </li> + </ul> + </div> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-logs')) ?>"> + <?= I18N::translate('Website logs') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-clean-data')) ?>"> + <?= I18N::translate('Clean up data folder') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-site-information')) ?>"> + <?= I18N::translate('Server information') ?> + </a> + </li> + </ul> + </div> + </div> + </div> </div> <!-- FAMILY TREES --> <div class="card mb-4 <?= array_sum($changes) ? 'card-outline-danger' : '' ?>"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Family trees') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($all_trees)) ?> - </span> - </h2> - </div> - <div class="card-body"> - <table class="table table-sm"> - <caption class="sr-only"> - <?= I18N::translate('Family trees') ?> - </caption> - <thead> - <tr> - <th><?= I18N::translate('Family tree') ?></th> - <th><span class="sr-only"><?= I18N::translate('Manage family trees') ?></span></th> - <th class="text-right"><?= I18N::translate('Pending changes') ?></th> - <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Individuals') ?></th> - <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Families') ?></th> - <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Sources') ?></th> - <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Repositories') ?></th> - <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Media') ?></th> - <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Notes') ?></th> - </tr> - </thead> - <tbody> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Family trees') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($all_trees)) ?> + </span> + </h2> + </div> + <div class="card-body"> + <table class="table table-sm"> + <caption class="sr-only"> + <?= I18N::translate('Family trees') ?> + </caption> + <thead> + <tr> + <th><?= I18N::translate('Family tree') ?></th> + <th><span class="sr-only"><?= I18N::translate('Manage family trees') ?></span></th> + <th class="text-right"><?= I18N::translate('Pending changes') ?></th> + <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Individuals') ?></th> + <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Families') ?></th> + <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Sources') ?></th> + <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Repositories') ?></th> + <th class="d-none d-sm-table-cell text-right"><?= I18N::translate('Media') ?></th> + <th class="d-none d-lg-table-cell text-right"><?= I18N::translate('Notes') ?></th> + </tr> + </thead> + <tbody> <?= view('admin/control-panel-tree-list', [ 'all_trees' => $all_trees, 'changes' => $changes, @@ -135,311 +135,311 @@ 'media' => $media, 'notes' => $notes, ]); ?> - </tbody> - <tfoot> - <tr> - <th scope="row"> - <?= I18N::translate('Total') ?> - </th> - <td></td> - <td class="text-right"> - <?= I18N::number(array_sum($changes)) ?> - </td> - <td class="d-none d-sm-table-cell text-right"> - <?= I18N::number(array_sum($individuals)) ?> - </td> - <td class="d-none d-lg-table-cell text-right"> - <?= I18N::number(array_sum($families)) ?> - </td> - <td class="d-none d-sm-table-cell text-right"> - <?= I18N::number(array_sum($sources)) ?> - </td> - <td class="d-none d-lg-table-cell text-right"> - <?= I18N::number(array_sum($repositories)) ?> - </td> - <td class="d-none d-sm-table-cell text-right"> - <?= I18N::number(array_sum($media)) ?> - </td> - <td class="d-none d-lg-table-cell text-right"> - <?= I18N::number(array_sum($notes)) ?> - </td> - </tr> - </tfoot> - </table> + </tbody> + <tfoot> + <tr> + <th scope="row"> + <?= I18N::translate('Total') ?> + </th> + <td></td> + <td class="text-right"> + <?= I18N::number(array_sum($changes)) ?> + </td> + <td class="d-none d-sm-table-cell text-right"> + <?= I18N::number(array_sum($individuals)) ?> + </td> + <td class="d-none d-lg-table-cell text-right"> + <?= I18N::number(array_sum($families)) ?> + </td> + <td class="d-none d-sm-table-cell text-right"> + <?= I18N::number(array_sum($sources)) ?> + </td> + <td class="d-none d-lg-table-cell text-right"> + <?= I18N::number(array_sum($repositories)) ?> + </td> + <td class="d-none d-sm-table-cell text-right"> + <?= I18N::number(array_sum($media)) ?> + </td> + <td class="d-none d-lg-table-cell text-right"> + <?= I18N::number(array_sum($notes)) ?> + </td> + </tr> + </tfoot> + </table> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-trees', ['ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Manage family trees') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('tree-page-default-edit')) ?>"> - <?= I18N::translate('Set the default blocks for new family trees') ?> - </a> - </li> - <?php if (count($all_trees) > 1): ?> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-trees-merge')) ?>"> - <?= I18N::translate('Merge family trees') ?> - </a> - </li> - <?php endif ?> - </ul> - </div> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-trees', ['ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Manage family trees') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('tree-page-default-edit')) ?>"> + <?= I18N::translate('Set the default blocks for new family trees') ?> + </a> + </li> + <?php if (count($all_trees) > 1) : ?> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-trees-merge')) ?>"> + <?= I18N::translate('Merge family trees') ?> + </a> + </li> + <?php endif ?> + </ul> + </div> </div> <!-- USERS --> <div class="card mb-4 <?= $unapproved || $unverified ? 'card-outline-danger' : '' ?>"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Users') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($all_users)) ?> - </span> - </h2> - </div> - <div class="card-body"> - <dl class="row"> - <?php foreach ([I18N::translate('Administrators') => $administrators, I18N::translate('Managers') => $managers, I18N::translate('Moderators') => $moderators, I18N::translate('Not verified by the user') => $unverified, I18N::translate('Not approved by an administrator') => $unapproved] as $label => $list): ?> - <?php if (!empty($list)): ?> - <dt class="col-sm-3"> - <?= $label ?> - </dt> - <dd class="col-sm-9"> - <?php foreach ($list as $n => $user): ?> - <?= $n ? I18N::$list_separator : '' ?> - <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>" dir="auto"> - <?= e($user->getRealName()) ?> - </a> - <?php endforeach ?> - </dd> - <?php endif ?> - <?php endforeach ?> - </dl> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Users') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($all_users)) ?> + </span> + </h2> + </div> + <div class="card-body"> + <dl class="row"> + <?php foreach ([I18N::translate('Administrators') => $administrators, I18N::translate('Managers') => $managers, I18N::translate('Moderators') => $moderators, I18N::translate('Not verified by the user') => $unverified, I18N::translate('Not approved by an administrator') => $unapproved] as $label => $list) : ?> + <?php if (!empty($list)) : ?> + <dt class="col-sm-3"> + <?= $label ?> + </dt> + <dd class="col-sm-9"> + <?php foreach ($list as $n => $user) : ?> + <?= $n ? I18N::$list_separator : '' ?> + <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>" dir="auto"> + <?= e($user->getRealName()) ?> + </a> + <?php endforeach ?> + </dd> + <?php endif ?> + <?php endforeach ?> + </dl> - <div class="row"> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-users', ['ged' => $tree->getName()])) ?>"> - <?= I18N::translate('User administration') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-users-create', ['ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Add a user') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-users-cleanup')) ?>"> - <?= I18N::translate('Delete inactive users') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('user-page-default-edit')) ?>"> - <?= I18N::translate('Set the default blocks for new users') ?> - </a> - </li> - </ul> - </div> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/email') ?></span> - <a href="<?= e(route('broadcast', ['to' => 'all'])) ?>"> - <?= I18N::translate('Send a message to all users') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/email') ?></span> - <a href="<?= e(route('broadcast', ['to' => 'never_logged'])) ?>"> - <?= I18N::translate('Send a message to users who have never signed in') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/email') ?></span> - <a href="<?= e(route('broadcast', ['to' => 'last_6mo'])) ?>"> - <?= I18N::translate('Send a message to users who have not signed in for 6 months') ?> - </a> - </li> - </ul> - </div> - </div> - </div> + <div class="row"> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-users', ['ged' => $tree->getName()])) ?>"> + <?= I18N::translate('User administration') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-users-create', ['ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Add a user') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-users-cleanup')) ?>"> + <?= I18N::translate('Delete inactive users') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('user-page-default-edit')) ?>"> + <?= I18N::translate('Set the default blocks for new users') ?> + </a> + </li> + </ul> + </div> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/email') ?></span> + <a href="<?= e(route('broadcast', ['to' => 'all'])) ?>"> + <?= I18N::translate('Send a message to all users') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/email') ?></span> + <a href="<?= e(route('broadcast', ['to' => 'never_logged'])) ?>"> + <?= I18N::translate('Send a message to users who have never signed in') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/email') ?></span> + <a href="<?= e(route('broadcast', ['to' => 'last_6mo'])) ?>"> + <?= I18N::translate('Send a message to users who have not signed in for 6 months') ?> + </a> + </li> + </ul> + </div> + </div> + </div> </div> <!-- MODULES --> <div class="card mb-4"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Modules') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($all_modules)) ?> - </span> - </h2> - </div> - <div class="card-body"> - <div class="row"> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/menu') ?></span> - <a href="<?= e(route('admin-menus')) ?>"> - <?= I18N::translate('Menus') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/tab') ?></span> - <a href="<?= e(route('admin-tabs')) ?>"> - <?= I18N::translate('Tabs') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/block') ?></span> - <a href="<?= e(route('admin-blocks')) ?>"> - <?= I18N::translate('Blocks') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/sidebar') ?></span> - <a href="<?= e(route('admin-sidebars')) ?>"> - <?= I18N::translate('Sidebars') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/chart') ?></span> - <a href="<?= e(route('admin-charts')) ?>"> - <?= I18N::translate('Charts') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/report') ?></span> - <a href="<?= e(route('admin-reports')) ?>"> - <?= I18N::translate('Reports') ?> - </a> - </li> - </ul> - </div> - <div class="col-sm-6"> - <ul class="fa-ul"> - <?php foreach ($config_modules as $module): ?> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e($module->getConfigLink()) ?>"> - <?= $module->getTitle() ?> - </a> - </li> - <?php endforeach ?> - </ul> - </div> - </div> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Modules') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($all_modules)) ?> + </span> + </h2> + </div> + <div class="card-body"> + <div class="row"> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/menu') ?></span> + <a href="<?= e(route('admin-menus')) ?>"> + <?= I18N::translate('Menus') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/tab') ?></span> + <a href="<?= e(route('admin-tabs')) ?>"> + <?= I18N::translate('Tabs') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/block') ?></span> + <a href="<?= e(route('admin-blocks')) ?>"> + <?= I18N::translate('Blocks') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/sidebar') ?></span> + <a href="<?= e(route('admin-sidebars')) ?>"> + <?= I18N::translate('Sidebars') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/chart') ?></span> + <a href="<?= e(route('admin-charts')) ?>"> + <?= I18N::translate('Charts') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/report') ?></span> + <a href="<?= e(route('admin-reports')) ?>"> + <?= I18N::translate('Reports') ?> + </a> + </li> + </ul> + </div> + <div class="col-sm-6"> + <ul class="fa-ul"> + <?php foreach ($config_modules as $module) : ?> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e($module->getConfigLink()) ?>"> + <?= $module->getTitle() ?> + </a> + </li> + <?php endforeach ?> + </ul> + </div> + </div> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-modules')) ?>"> - <?= I18N::translate('Module administration') ?> - </a> - </li> - </ul> - </div> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-modules')) ?>"> + <?= I18N::translate('Module administration') ?> + </a> + </li> + </ul> + </div> </div> <!-- MEDIA --> <div class="card mb-4"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Media') ?> - </h2> - </div> - <div class="card-body"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-media')) ?>"> - <?= I18N::translate('Manage media') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-media-upload')) ?>"> - <?= I18N::translate('Upload media files') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-fix-level-0-media')) ?>"> - <?= I18N::translate('Link media objects to facts and events') ?> - </a> - </li> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-webtrees1-thumbs')) ?>"> - <?= I18N::translate('Import custom thumbnails from webtrees version 1') ?> - </a> - </li> - </ul> - </div> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Media') ?> + </h2> + </div> + <div class="card-body"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-media')) ?>"> + <?= I18N::translate('Manage media') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-media-upload')) ?>"> + <?= I18N::translate('Upload media files') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-fix-level-0-media')) ?>"> + <?= I18N::translate('Link media objects to facts and events') ?> + </a> + </li> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-webtrees1-thumbs')) ?>"> + <?= I18N::translate('Import custom thumbnails from webtrees version 1') ?> + </a> + </li> + </ul> + </div> </div> <!-- MAPS --> <div class="card mb-4"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Map') ?> - </h2> - </div> - <div class="card-body"> - <div class="row"> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/location') ?></span> - <a href="<?= e(route('map-data')) ?>"> - <?= I18N::translate('Geographic data') ?> - </a> - </li> - </ul> - </div> - <div class="col-sm-6"> - <ul class="fa-ul"> - <li> - <span class="fa-li"><?= view('icons/map') ?></span> - <a href="<?= e(route('map-provider')) ?>"> - <?= I18N::translate('Map provider') ?> - </a> - </li> - </ul> - </div> - </div> - </div> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Map') ?> + </h2> + </div> + <div class="card-body"> + <div class="row"> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/location') ?></span> + <a href="<?= e(route('map-data')) ?>"> + <?= I18N::translate('Geographic data') ?> + </a> + </li> + </ul> + </div> + <div class="col-sm-6"> + <ul class="fa-ul"> + <li> + <span class="fa-li"><?= view('icons/map') ?></span> + <a href="<?= e(route('map-provider')) ?>"> + <?= I18N::translate('Map provider') ?> + </a> + </li> + </ul> + </div> + </div> + </div> </div> <!-- OLD FILES --> -<?php if (!empty($files_to_delete)): ?> - <div class="card mb-4 card-outline-danger"> - <div class="card-header"> - <h2 class="mb-0"> - <?= I18N::translate('Old files found') ?> - </h2> - </div> - <div class="card-body"> - <p> - <?= I18N::translate('Files have been found from a previous version of webtrees. Old files can sometimes be a security risk. You should delete them.') ?> - </p> - <ul class="list-unstyled"> - <?php foreach ($files_to_delete as $file_to_delete): ?> - <li dir="ltr"><code><?= e($file_to_delete) ?></code></li> - <?php endforeach ?> - </ul> - </div> - </div> +<?php if (!empty($files_to_delete)) : ?> + <div class="card mb-4 card-outline-danger"> + <div class="card-header"> + <h2 class="mb-0"> + <?= I18N::translate('Old files found') ?> + </h2> + </div> + <div class="card-body"> + <p> + <?= I18N::translate('Files have been found from a previous version of webtrees. Old files can sometimes be a security risk. You should delete them.') ?> + </p> + <ul class="list-unstyled"> + <?php foreach ($files_to_delete as $file_to_delete) : ?> + <li dir="ltr"><code><?= e($file_to_delete) ?></code></li> + <?php endforeach ?> + </ul> + </div> + </div> <?php endif ?> diff --git a/resources/views/admin/fix-level-0-media-action.php b/resources/views/admin/fix-level-0-media-action.php index f6630b7d2b..6690fb53ac 100644 --- a/resources/views/admin/fix-level-0-media-action.php +++ b/resources/views/admin/fix-level-0-media-action.php @@ -1,14 +1,14 @@ <?php use Fisharebest\Webtrees\I18N; ?> <button - class="btn btn-primary btn-small mb-1 wt-fix-button" - data-confirm="<?= I18N::translate('Move the media object?') ?>" - data-fact-id="<?= e($fact->getFactId()) ?>" - data-tree-id="<?= e($tree->getTreeId()) ?>" - data-individual-xref="<?= e($individual->getXref()) ?>" - data-media-xref="<?= e($media->getXref()) ?>" - type="button" + class="btn btn-primary btn-small mb-1 wt-fix-button" + data-confirm="<?= I18N::translate('Move the media object?') ?>" + data-fact-id="<?= e($fact->getFactId()) ?>" + data-tree-id="<?= e($tree->getTreeId()) ?>" + data-individual-xref="<?= e($individual->getXref()) ?>" + data-media-xref="<?= e($media->getXref()) ?>" + type="button" > - <?= $fact->getLabel() ?> - <?= $fact->getDate()->display(false, '%Y', false) ?> + <?= $fact->getLabel() ?> + <?= $fact->getDate()->display(false, '%Y', false) ?> </button> diff --git a/resources/views/admin/fix-level-0-media.php b/resources/views/admin/fix-level-0-media.php index 96b789234f..1de0566893 100644 --- a/resources/views/admin/fix-level-0-media.php +++ b/resources/views/admin/fix-level-0-media.php @@ -6,22 +6,22 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('If a media object is linked to an individual, when it should be linked to a fact or event, then you can move it to the correct location.') ?> + <?= I18N::translate('If a media object is linked to an individual, when it should be linked to a fact or event, then you can move it to the correct location.') ?> </p> <table class="table table-bordered table-sm table-hover datatables wt-fix-table" data-ajax="<?= e(json_encode(['url' => route('admin-fix-level-0-media-data')])) ?>" data-server-side="true" data-state-save="true"> - <caption class="sr-only"> - <?= I18N::translate('Media objects') ?> - </caption> - <thead class="thead-dark"> - <tr> - <th data-sortable="false"><?= I18N::translate('Family tree') ?></th> - <th data-sortable="false"><?= I18N::translate('Media object') ?></th> - <th data-sortable="false"><?= I18N::translate('Title') ?></th> - <th data-sortable="false"><?= I18N::translate('Individual') ?></th> - <th data-sortable="false"><?= I18N::translate('Facts and events') ?></th> - </tr> - </thead> + <caption class="sr-only"> + <?= I18N::translate('Media objects') ?> + </caption> + <thead class="thead-dark"> + <tr> + <th data-sortable="false"><?= I18N::translate('Family tree') ?></th> + <th data-sortable="false"><?= I18N::translate('Media object') ?></th> + <th data-sortable="false"><?= I18N::translate('Title') ?></th> + <th data-sortable="false"><?= I18N::translate('Individual') ?></th> + <th data-sortable="false"><?= I18N::translate('Facts and events') ?></th> + </tr> + </thead> </table> <?php View::push('javascript') ?> diff --git a/resources/views/admin/import-progress.php b/resources/views/admin/import-progress.php index 4ae27bf6e6..357b53c653 100644 --- a/resources/views/admin/import-progress.php +++ b/resources/views/admin/import-progress.php @@ -1,19 +1,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="progress" id="progress<?= e($tree->getTreeId()) ?>"> - <div - class="progress-bar" - role="progressbar" - aria-valuenow="<?= $progress * 100 ?>" - aria-valuemin="0" - aria-valuemax="100" - style="width: <?= $progress * 100 ?>%; min-width: 40px;" - > - <?= I18N::percentage($progress, 1) ?> - </div> + <div + class="progress-bar" + role="progressbar" + aria-valuenow="<?= $progress * 100 ?>" + aria-valuemin="0" + aria-valuemax="100" + style="width: <?= $progress * 100 ?>%; min-width: 40px;" + > + <?= I18N::percentage($progress, 1) ?> + </div> </div> <script> $("#import<?= e($tree->getTreeId()) ?>") - .load("<?= route('import', ['ged' => $tree->getName()]) ?>", {}); + .load("<?= route('import', ['ged' => $tree->getName()]) ?>", {}); </script> diff --git a/resources/views/admin/location-edit.php b/resources/views/admin/location-edit.php index 387f5e54e8..2d0534da85 100644 --- a/resources/views/admin/location-edit.php +++ b/resources/views/admin/location-edit.php @@ -36,7 +36,7 @@ $location->getIcon(), ['name' => 'icon', 'id' => 'icon', 'class' => 'form-control'] ) - ?> +?> </div> </div> </div> diff --git a/resources/views/admin/locations.php b/resources/views/admin/locations.php index 799555bb23..26c7eb8f2f 100644 --- a/resources/views/admin/locations.php +++ b/resources/views/admin/locations.php @@ -8,118 +8,117 @@ <h1><?= $title ?></h1> <table class="table table-bordered table-striped table-sm table-hover"> - <thead class="thead-dark"> - <tr> - <th><?= I18N::translate('Place') ?></th> - <th><?= I18N::translate('Latitude') ?></th> - <th><?= I18N::translate('Longitude') ?></th> - <th><?= I18N::translate('Zoom level') ?></th> - <th><?= I18N::translate('Flag') ?> </th> - <th><?= I18N::translate('Edit') ?></th> - <th><?= I18N::translate('Delete') ?></th> - </tr> - </thead> - <tbody> + <thead class="thead-dark"> + <tr> + <th><?= I18N::translate('Place') ?></th> + <th><?= I18N::translate('Latitude') ?></th> + <th><?= I18N::translate('Longitude') ?></th> + <th><?= I18N::translate('Zoom level') ?></th> + <th><?= I18N::translate('Flag') ?> </th> + <th><?= I18N::translate('Edit') ?></th> + <th><?= I18N::translate('Delete') ?></th> + </tr> + </thead> + <tbody> - <?php foreach ($placelist as $place): ?> - <tr> + <?php foreach ($placelist as $place) : ?> + <tr> <th scope="row"> <a href="<?= e(route('map-data', ['parent_id' => $place->pl_id])) ?>"> - <?= e($place->pl_place) ?> + <?= e($place->pl_place) ?> <span class="badge badge-pill badge-<?= $place->badge ?>"> - <?= I18N::number($place->child_count) ?> + <?= I18N::number($place->child_count) ?> </span> </a> </th> - <td> - <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> - </td> - <td> - <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> - </td> - <td> - <?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?> - </td> - <td> - <?php if (is_file(WT_MODULES_DIR . 'openstreetmap' . '/' . $place->pl_icon)): ?> - <img src="<?= e(WT_MODULES_DIR . 'openstreetmap' . '/' . $place->pl_icon) ?>" width="25" height="15" alt="<?= I18N::translate("Flag of %s", $place->pl_place) ?>"> - <?php endif ?> - </td> - <td> - <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['href' => route('map-data-edit', ['place_id' => $place->pl_id, 'parent_id' => $place->pl_parent_id]), 'class' => 'btn btn-primary']) ?> - </td> - <td> - <?php if ($place->child_count === 0): ?> - <form method="POST" action="<?= e(route('map-data-delete', ['parent_id' => $parent_id, 'place_id' => $place->pl_id])) ?>" - data-confirm="<?= I18N::translate('Remove this location?') ?>" - onsubmit="return confirm(this.dataset.confirm)"> + <td> + <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> + </td> + <td> + <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> + </td> + <td> + <?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?> + </td> + <td> + <?php if (is_file(WT_MODULES_DIR . 'openstreetmap' . '/' . $place->pl_icon)) : ?> + <img src="<?= e(WT_MODULES_DIR . 'openstreetmap' . '/' . $place->pl_icon) ?>" width="25" height="15" alt="<?= I18N::translate("Flag of %s", $place->pl_place) ?>"> + <?php endif ?> + </td> + <td> + <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['href' => route('map-data-edit', ['place_id' => $place->pl_id, 'parent_id' => $place->pl_parent_id]), 'class' => 'btn btn-primary']) ?> + </td> + <td> + <?php if ($place->child_count === 0) : ?> + <form method="POST" action="<?= e(route('map-data-delete', ['parent_id' => $parent_id, 'place_id' => $place->pl_id])) ?>" + data-confirm="<?= I18N::translate('Remove this location?') ?>" + onsubmit="return confirm(this.dataset.confirm)"> <?= csrf_field() ?> - <button type="submit" class="btn btn-danger"> - <?= FontAwesome::semanticIcon('delete', I18N::translate('delete')) ?> - </button> - </form> - <?php else: ?> - <button type="button" class="btn btn-danger" disabled> - <?= FontAwesome::decorativeIcon('delete') ?> - </button> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - <tfoot> - <tr> - <td colspan="7"> - <a class="btn btn-primary" href="<?= e(route('map-data', ['parent_id' => $parent_id])) ?>"> - <?= FontAwesome::decorativeIcon('add') ?> - <?= /* I18N: A button label. */ - I18N::translate('add place') ?> - </a> - <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" - data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('download') ?> - <?= /* I18N: A button label. */ - I18N::translate('export file') ?> - </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> - <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'csv'])) ?>"> + <button type="submit" class="btn btn-danger"> + <?= FontAwesome::semanticIcon('delete', I18N::translate('delete')) ?> + </button> + </form> + <?php else : ?> + <button type="button" class="btn btn-danger" disabled> + <?= FontAwesome::decorativeIcon('delete') ?> + </button> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + <tfoot> + <tr> + <td colspan="7"> + <a class="btn btn-primary" href="<?= e(route('map-data', ['parent_id' => $parent_id])) ?>"> + <?= FontAwesome::decorativeIcon('add') ?> + <?= /* I18N: A button label. */ + I18N::translate('add place') ?> + </a> + <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('download') ?> + <?= /* I18N: A button label. */ + I18N::translate('export file') ?> + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'csv'])) ?>"> csv - </a> - <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'geojson'] - )) ?>"> + </a> + <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'geojson'])) ?>"> geoJSON - </a> - </div> - <a class="btn btn-primary" href="<?= e(route('locations-import', ['parent_id' => $parent_id])) ?>"> + </a> + </div> + <a class="btn btn-primary" href="<?= e(route('locations-import', ['parent_id' => $parent_id])) ?>"> <?= FontAwesome::decorativeIcon('upload') ?> - <?= /* I18N: A button label. */ - I18N::translate('import file') ?> - </a> - </td> - </tr> - </tfoot> + <?= /* I18N: A button label. */ + I18N::translate('import file') ?> + </a> + </td> + </tr> + </tfoot> </table> <form method="POST" action="<?= e(route('locations-import-from-tree')) ?>"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="form-group row"> - <label class="form-control-plaintext col-sm-4" for="ged"> - <?= I18N::translate('Import all places from a family tree') ?> - </label> - <div class="col-sm-6"> - <?= Bootstrap4::select( - Tree::getNameList(), - '', - ['id' => 'ged', 'name' => 'ged'] - ) ?> - </div> - <div class="col-sm-2"> - <button type="submit" class="btn btn-primary"> + <div class="form-group row"> + <label class="form-control-plaintext col-sm-4" for="ged"> + <?= I18N::translate('Import all places from a family tree') ?> + </label> + <div class="col-sm-6"> + <?= Bootstrap4::select( + Tree::getNameList(), + '', + ['id' => 'ged', 'name' => 'ged'] + ) ?> + </div> + <div class="col-sm-2"> + <button type="submit" class="btn btn-primary"> <?= view('icons/upload') ?> - <?= /* I18N: A button label. */ - I18N::translate('import') ?> - </button> - </div> - </div> + <?= /* I18N: A button label. */ + I18N::translate('import') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/admin/map-import-form.php b/resources/views/admin/map-import-form.php index 36c273f81b..3ca7b6c783 100644 --- a/resources/views/admin/map-import-form.php +++ b/resources/views/admin/map-import-form.php @@ -7,101 +7,101 @@ <h3><?= $title ?></h3> <form id="upload_form" method="post" enctype="multipart/form-data"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <!-- Server file --> - <div class="row form-group"> - <label class="col-form-label col-sm-4" for="serverfile"> - <?= I18N::translate('A file on the server') ?> - </label> - <div class="col-sm-8"> - <div class="input-group" dir="ltr"> - <div class="input-group-prepend"> - <span class="input-group-text"> - <?= WT_DATA_DIR . 'places/' ?> - </span> - </div> - <select id="serverfile" name="serverfile" class="form-control"> + <!-- Server file --> + <div class="row form-group"> + <label class="col-form-label col-sm-4" for="serverfile"> + <?= I18N::translate('A file on the server') ?> + </label> + <div class="col-sm-8"> + <div class="input-group" dir="ltr"> + <div class="input-group-prepend"> + <span class="input-group-text"> + <?= WT_DATA_DIR . 'places/' ?> + </span> + </div> + <select id="serverfile" name="serverfile" class="form-control"> <option selected value=""></option> - <?php foreach ($files as $file): ?> + <?php foreach ($files as $file) : ?> <option value="<?= e($file) ?>"> <?= e($file) ?> </option> <?php endforeach ?> - </select> - </div> - </div> - </div> + </select> + </div> + </div> + </div> - <!-- local file --> - <div class="row form-group"> - <label class="col-form-label col-sm-4" for="localfile"> - <?= I18N::translate('A file on your computer') ?> - </label> - <div class="col-sm-8"> - <input id="localfile" type="file" name="localfile" class="form-control-file"> - </div> - </div> + <!-- local file --> + <div class="row form-group"> + <label class="col-form-label col-sm-4" for="localfile"> + <?= I18N::translate('A file on your computer') ?> + </label> + <div class="col-sm-8"> + <input id="localfile" type="file" name="localfile" class="form-control-file"> + </div> + </div> - <!-- CLEAR DATABASE --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-4"> - <?= I18N::translate('Delete all existing geographic data before importing the file.') ?> - </legend> - <div class="col-sm-8"> - <?= Bootstrap4::radioButtons( - 'cleardatabase', - [I18N::translate('no'), I18N::translate('yes')], - '0', - true - ) ?> - </div> - </div> - </fieldset> + <!-- CLEAR DATABASE --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-4"> + <?= I18N::translate('Delete all existing geographic data before importing the file.') ?> + </legend> + <div class="col-sm-8"> + <?= Bootstrap4::radioButtons( + 'cleardatabase', + [I18N::translate('no'), I18N::translate('yes')], + '0', + true + ) ?> + </div> + </div> + </fieldset> - <!-- Import options --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-4" for="import-options"> - <?= I18N::translate('Import Options.') ?> - </legend> - <div class="col-sm-8"> - <?= Bootstrap4::select( - [ - 'addupdate' => I18N::translate('Add new, and update existing records'), - 'add' => I18N::translate('Only add new records'), - 'update' => I18N::translate('Only update existing records'), - ], - '0', - ['id' => 'import-options', 'name' => 'import-options'] - ) ?> - </div> - </div> - </fieldset> + <!-- Import options --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-4" for="import-options"> + <?= I18N::translate('Import Options.') ?> + </legend> + <div class="col-sm-8"> + <?= Bootstrap4::select( + [ + 'addupdate' => I18N::translate('Add new, and update existing records'), + 'add' => I18N::translate('Only add new records'), + 'update' => I18N::translate('Only update existing records'), + ], + '0', + ['id' => 'import-options', 'name' => 'import-options'] + ) ?> + </div> + </div> + </fieldset> - <!-- SAVE BUTTON --> - <div class="row form-group"> - <div class="offset-sm-4 col-sm-8"> - <button type="submit" class="btn btn-primary"> + <!-- SAVE BUTTON --> + <div class="row form-group"> + <div class="offset-sm-4 col-sm-8"> + <button type="submit" class="btn btn-primary"> <?= view('icons/save') ?> - <?= I18N::translate('continue') ?> - </button> - </div> - </div> + <?= I18N::translate('continue') ?> + </button> + </div> + </div> </form> <?php View::push('javascript') ?> - <script> - $('#upload_form').on('submit', function(e) { - let self = this; - e.preventDefault(); - if($('input[name="cleardatabase"]:checked').val() === '1') { - if (!confirm('<?= I18N::translate('Really delete all geographic data?') ?> ')) { - return false; - } - } - self.submit(); - }); - </script> + <script> + $('#upload_form').on('submit', function(e) { + let self = this; + e.preventDefault(); + if($('input[name="cleardatabase"]:checked').val() === '1') { + if (!confirm('<?= I18N::translate('Really delete all geographic data?') ?> ')) { + return false; + } + } + self.submit(); + }); + </script> <?php View::endpush() ?> diff --git a/resources/views/admin/map-provider.php b/resources/views/admin/map-provider.php index 145e94112f..dd67a592c2 100644 --- a/resources/views/admin/map-provider.php +++ b/resources/views/admin/map-provider.php @@ -4,14 +4,14 @@ <?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?> <form method="POST"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="form-group"> - <div class="form-row"> - <div class="col-form-label col-sm-3"> - <?= I18N::translate('Map provider') ?> - </div> - <div class="col-sm-9"> + <div class="form-group"> + <div class="form-row"> + <div class="col-form-label col-sm-3"> + <?= I18N::translate('Map provider') ?> + </div> + <div class="col-sm-9"> <?= view('components/radio', ['name' => 'provider', 'value' => '', 'checked' => $provider === '', 'text' => 'Do not use maps']) ?> <hr> <?= view('components/radio', ['name' => 'provider', 'value' => 'OpenStreetMap.Mapnik', 'checked' => $provider === 'OpenStreetMap.Mapnik', 'text' => 'OpenStreetMap']) ?> @@ -21,13 +21,13 @@ </div> </div> - <!-- SAVE BUTTON --> - <div class="form-group row"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> + <!-- SAVE BUTTON --> + <div class="form-group row"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> - </div> - </div> + <?= I18N::translate('save') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/admin/media-upload.php b/resources/views/admin/media-upload.php index e155cd3e98..edf28fcf05 100644 --- a/resources/views/admin/media-upload.php +++ b/resources/views/admin/media-upload.php @@ -5,57 +5,57 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('Upload one or more media files from your local computer. Media files can be pictures, video, audio, or other formats.') ?> - <?= I18N::translate('Maximum upload size: ') ?><?= e($filesize) ?> + <?= I18N::translate('Upload one or more media files from your local computer. Media files can be pictures, video, audio, or other formats.') ?> + <?= I18N::translate('Maximum upload size: ') ?><?= e($filesize) ?> </p> <form name="uploadmedia" enctype="multipart/form-data" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <?php for ($i = 1; $i <= $max_upload_files; $i++): ?> - <h2><?= I18N::translate('Media file') ?> <?= I18N::number($i) ?></h2> + <?php for ($i = 1; $i <= $max_upload_files; $i++) : ?> + <h2><?= I18N::translate('Media file') ?> <?= I18N::number($i) ?></h2> - <div class="form-group row"> - <label class="form-control-label col-sm-3" for="mediafile<?= e($i) ?>"> - <?= I18N::translate('Media file to upload') ?> - <span class="sr-only"><?= e($i) ?></span> - </label> - <div class="col-sm-9"> - <input class="form-control-file" id="mediafile<?= e($i) ?>" name="mediafile<?= e($i) ?>" type="file"> - </div> - </div> + <div class="form-group row"> + <label class="form-control-label col-sm-3" for="mediafile<?= e($i) ?>"> + <?= I18N::translate('Media file to upload') ?> + <span class="sr-only"><?= e($i) ?></span> + </label> + <div class="col-sm-9"> + <input class="form-control-file" id="mediafile<?= e($i) ?>" name="mediafile<?= e($i) ?>" type="file"> + </div> + </div> - <div class="form-group row"> - <label class="form-control-label col-sm-3" for="filename<?= e($i) ?>"> - <?= I18N::translate('Filename on server') ?> - <span class="sr-only"><?= e($i) ?></span> - </label> - <div class="col-sm-9"> - <input class="form-control" id="filename<?= e($i) ?>" name="filename<?= e($i) ?>" type="text"> - <p class="small text-muted"> - <?= I18N::translate('Leave this entry blank to keep the original filename') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="form-control-label col-sm-3" for="filename<?= e($i) ?>"> + <?= I18N::translate('Filename on server') ?> + <span class="sr-only"><?= e($i) ?></span> + </label> + <div class="col-sm-9"> + <input class="form-control" id="filename<?= e($i) ?>" name="filename<?= e($i) ?>" type="text"> + <p class="small text-muted"> + <?= I18N::translate('Leave this entry blank to keep the original filename') ?> + </p> + </div> + </div> - <div class="form-group row"> - <label class="form-control-label col-sm-3" for="folder_list<?= e($i) ?>"> - <?= I18N::translate('Folder name on server') ?> - <span class="sr-only"><?= e($i) ?></span> - </label> - <div class="col-sm-9"> - <select class="form-control" id="folder_list<?= e($i) ?>"name="folder<?= e($i) ?>"> - <?php foreach ($media_folders as $media_folder): ?> - <option value="<?= e($media_folder) ?>"> - <?= e($media_folder) ?> - </option> - <?php endforeach ?> - </select> - </div> - </div> - <?php endfor ?> + <div class="form-group row"> + <label class="form-control-label col-sm-3" for="folder_list<?= e($i) ?>"> + <?= I18N::translate('Folder name on server') ?> + <span class="sr-only"><?= e($i) ?></span> + </label> + <div class="col-sm-9"> + <select class="form-control" id="folder_list<?= e($i) ?>"name="folder<?= e($i) ?>"> + <?php foreach ($media_folders as $media_folder) : ?> + <option value="<?= e($media_folder) ?>"> + <?= e($media_folder) ?> + </option> + <?php endforeach ?> + </select> + </div> + </div> + <?php endfor ?> - <button class="btn btn-primary" type="submit"> - <?= /* I18N: A button label. */ I18N::translate('upload') ?> - </button> + <button class="btn btn-primary" type="submit"> + <?= /* I18N: A button label. */ I18N::translate('upload') ?> + </button> </form> diff --git a/resources/views/admin/media.php b/resources/views/admin/media.php index b7a18cc178..84b1cd240b 100644 --- a/resources/views/admin/media.php +++ b/resources/views/admin/media.php @@ -7,86 +7,84 @@ <h1><?= $title ?></h1> <form> - <input type="hidden" name="route" value="admin-media"> - <table class="table table-bordered table-sm"> - <thead> - <tr> - <th><?= I18N::translate('Media files') ?></th> - <th><?= I18N::translate('Media folders') ?></th> - </tr> - </thead> - <tbody> - <tr> - <td> - <label> - <input type="radio" name="files" value="local" <?= $files === 'local' ? 'checked' : '' ?> onchange="this.form.submit();"> - <?= /* I18N: “Local files” are stored on this computer */ I18N::translate('Local files') ?> - </label> - <br> - <label> - <input type="radio" name="files" value="external" <?= $files === 'external' ? 'checked' : '' ?> onchange="this.form.submit();"> - <?= /* I18N: “External files” are stored on other computers */ I18N::translate('External files') ?> - </label> - <br> - <label> - <input type="radio" name="files" value="unused" <?= $files === 'unused' ? 'checked' : '' ?> onchange="this.form.submit();"> - <?= I18N::translate('Unused files') ?> - </label> - </td> - <td> - <?php if ($files === 'local' || $files === 'unused'): ?> + <input type="hidden" name="route" value="admin-media"> + <table class="table table-bordered table-sm"> + <thead> + <tr> + <th><?= I18N::translate('Media files') ?></th> + <th><?= I18N::translate('Media folders') ?></th> + </tr> + </thead> + <tbody> + <tr> + <td> + <label> + <input type="radio" name="files" value="local" <?= $files === 'local' ? 'checked' : '' ?> onchange="this.form.submit();"> + <?= /* I18N: “Local files” are stored on this computer */ I18N::translate('Local files') ?> + </label> + <br> + <label> + <input type="radio" name="files" value="external" <?= $files === 'external' ? 'checked' : '' ?> onchange="this.form.submit();"> + <?= /* I18N: “External files” are stored on other computers */ I18N::translate('External files') ?> + </label> + <br> + <label> + <input type="radio" name="files" value="unused" <?= $files === 'unused' ? 'checked' : '' ?> onchange="this.form.submit();"> + <?= I18N::translate('Unused files') ?> + </label> + </td> + <td> + <?php if ($files === 'local' || $files === 'unused') : ?> + <div dir="ltr" class="form-inline"> + <?php if (count($media_folders) > 1) : ?> + <?= WT_DATA_DIR . Bootstrap4::select($media_folders, $media_folder, ['name' => 'media_folder', 'onchange' => 'this.form.submit();']) ?> + <?php else : ?> + <?= WT_DATA_DIR . e($media_folder) ?> + <input type="hidden" name="media_folder" value="<?= e($media_folder) ?>"> + <?php endif ?> + </div> - <div dir="ltr" class="form-inline"> - <?php if (count($media_folders) > 1): ?> - <?= WT_DATA_DIR . Bootstrap4::select($media_folders, $media_folder, ['name' => 'media_folder', 'onchange' => 'this.form.submit();']) ?> - <?php else: ?> - <?= WT_DATA_DIR . e($media_folder) ?> - <input type="hidden" name="media_folder" value="<?= e($media_folder) ?>"> - <?php endif ?> - </div> + <?php if (count($media_paths) > 1) : ?> + <?= Bootstrap4::select($media_paths, $media_path, ['name' => 'media_path', 'onchange' => 'this.form.submit();']) ?> + <?php else : ?> + <?= e($media_path) ?> + <input type="hidden" name="media_path" value="<?= e($media_path) ?>"> + <?php endif ?> - <?php if (count($media_paths) > 1): ?> - <?= Bootstrap4::select($media_paths, $media_path, ['name' => 'media_path', 'onchange' => 'this.form.submit();']) ?> - <?php else: ?> - <?= e($media_path) ?> - <input type="hidden" name="media_path" value="<?= e($media_path) ?>"> - <?php endif ?> + <label> + <input type="radio" name="subfolders" value="include" <?= $subfolders === 'include' ? 'checked' : '' ?> onchange="this.form.submit();"> + <?= I18N::translate('Include subfolders') ?> + </label> + <br> + <label> + <input type="radio" name="subfolders" value="exclude" <?= $subfolders === 'exclude' ? ' checked' : '' ?> onchange="this.form.submit();"> + <?= I18N::translate('Exclude subfolders') ?> + </label> - <label> - <input type="radio" name="subfolders" value="include" <?= $subfolders === 'include' ? 'checked' : '' ?> onchange="this.form.submit();"> - <?= I18N::translate('Include subfolders') ?> - </label> - <br> - <label> - <input type="radio" name="subfolders" value="exclude" <?= $subfolders === 'exclude' ? ' checked' : '' ?> onchange="this.form.submit();"> - <?= I18N::translate('Exclude subfolders') ?> - </label> + <?php elseif ($files === 'external') : ?> + <?= I18N::translate('External media files have a URL instead of a filename.') ?> + <input type="hidden" name="media_folder" value="<?= e($media_folder) ?>"> + <input type="hidden" name="media_path" value="<?= e($media_path) ?>"> - <?php elseif ($files === 'external'): ?> - - <?= I18N::translate('External media files have a URL instead of a filename.') ?> - <input type="hidden" name="media_folder" value="<?= e($media_folder) ?>"> - <input type="hidden" name="media_path" value="<?= e($media_path) ?>"> - - <?php endif ?> - </td> - </tr> - </tbody> - </table> + <?php endif ?> + </td> + </tr> + </tbody> + </table> </form> <br> <br> <table class="table table-bordered table-sm" id="media-table-<?= e($table_id) ?>" data-ajax="<?= e(route('admin-media-data', ['files' => $files, 'media_folder' => $media_folder, 'media_path' => $media_path, 'subfolders' => $subfolders])) ?>"> - <thead> - <tr> - <th><?= I18N::translate('Media file') ?></th> - <th><?= I18N::translate('Media') ?></th> - <th><?= I18N::translate('Media object') ?></th> - </tr> - </thead> - <tbody> - </tbody> + <thead> + <tr> + <th><?= I18N::translate('Media file') ?></th> + <th><?= I18N::translate('Media') ?></th> + <th><?= I18N::translate('Media object') ?></th> + </tr> + </thead> + <tbody> + </tbody> </table> <?= view('modals/create-media-from-file') ?> @@ -106,7 +104,7 @@ {sortable: false}, {sortable: <?= $files === 'unused' ? 'false' : 'true' ?>} ], - <?= I18N::datatablesI18N([5, 10, 20, 50, 100, 500, 1000, -1]) ?> + <?= I18N::datatablesI18N([5, 10, 20, 50, 100, 500, 1000, -1]) ?> }); </script> <?php View::endpush() ?> diff --git a/resources/views/admin/merge-records-step-1.php b/resources/views/admin/merge-records-step-1.php index ccc1dc4556..60adec8727 100644 --- a/resources/views/admin/merge-records-step-1.php +++ b/resources/views/admin/merge-records-step-1.php @@ -7,82 +7,82 @@ <h1><?= $title ?></h1> <form> - <input type="hidden" name="route" value="merge-records"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="record-type"> - <?= I18N::translate('Select two records to merge.') ?> - </label> - <div class="col-sm-9"> - <select class="form-control" id="record-type"> - <option value="individual"><?= I18N::translate('Individuals') ?></option> - <option value="family"><?= I18N::translate('Families') ?></option> - <option value="source"><?= I18N::translate('Sources') ?></option> - <option value="repository"><?= I18N::translate('Repositories') ?></option> - <option value="note"><?= I18N::translate('Notes') ?></option> - <option value="media"><?= I18N::translate('Media objects') ?></option> - </select> - </div> - </div> + <input type="hidden" name="route" value="merge-records"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="record-type"> + <?= I18N::translate('Select two records to merge.') ?> + </label> + <div class="col-sm-9"> + <select class="form-control" id="record-type"> + <option value="individual"><?= I18N::translate('Individuals') ?></option> + <option value="family"><?= I18N::translate('Families') ?></option> + <option value="source"><?= I18N::translate('Sources') ?></option> + <option value="repository"><?= I18N::translate('Repositories') ?></option> + <option value="note"><?= I18N::translate('Notes') ?></option> + <option value="media"><?= I18N::translate('Media objects') ?></option> + </select> + </div> + </div> - <label class="row form-group"> - <span class="col-sm-3 col-form-label"> - <?= I18N::translate('First record') ?> - </span> - <span class="col-sm-9 select-record select-individual"> - <?= FunctionsEdit::formControlIndividual($tree, $individual1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;']) ?> - </span> - <span class="col-sm-9 select-record select-family d-none"> - <?= FunctionsEdit::formControlFamily($tree, $family1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-source d-none"> - <?= FunctionsEdit::formControlSource($tree, $source1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-repository d-none"> - <?= FunctionsEdit::formControlRepository($tree, $repository1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-note d-none"> - <?= FunctionsEdit::formControlNote($tree, $note1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-media d-none"> - <?= FunctionsEdit::formControlMediaObject($tree, $media2, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - </label> + <label class="row form-group"> + <span class="col-sm-3 col-form-label"> + <?= I18N::translate('First record') ?> + </span> + <span class="col-sm-9 select-record select-individual"> + <?= FunctionsEdit::formControlIndividual($tree, $individual1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;']) ?> + </span> + <span class="col-sm-9 select-record select-family d-none"> + <?= FunctionsEdit::formControlFamily($tree, $family1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-source d-none"> + <?= FunctionsEdit::formControlSource($tree, $source1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-repository d-none"> + <?= FunctionsEdit::formControlRepository($tree, $repository1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-note d-none"> + <?= FunctionsEdit::formControlNote($tree, $note1, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-media d-none"> + <?= FunctionsEdit::formControlMediaObject($tree, $media2, ['name' => 'xref1', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + </label> - <label class="row form-group"> - <span class="col-sm-3 col-form-label"> - <?= I18N::translate('Second record') ?> - </span> - <span class="col-sm-9 select-record select-individual"> - <?= FunctionsEdit::formControlIndividual($tree, $individual2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;']) ?> - </span> - <span class="col-sm-9 select-record select-family d-none"> - <?= FunctionsEdit::formControlFamily($tree, $family2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-source d-none"> - <?= FunctionsEdit::formControlSource($tree, $source2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-repository d-none"> - <?= FunctionsEdit::formControlRepository($tree, $repository2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-note d-none"> - <?= FunctionsEdit::formControlNote($tree, $note2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="col-sm-9 select-record select-media d-none"> - <?= FunctionsEdit::formControlMediaObject($tree, $media2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - </label> + <label class="row form-group"> + <span class="col-sm-3 col-form-label"> + <?= I18N::translate('Second record') ?> + </span> + <span class="col-sm-9 select-record select-individual"> + <?= FunctionsEdit::formControlIndividual($tree, $individual2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;']) ?> + </span> + <span class="col-sm-9 select-record select-family d-none"> + <?= FunctionsEdit::formControlFamily($tree, $family2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-source d-none"> + <?= FunctionsEdit::formControlSource($tree, $source2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-repository d-none"> + <?= FunctionsEdit::formControlRepository($tree, $repository2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-note d-none"> + <?= FunctionsEdit::formControlNote($tree, $note2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="col-sm-9 select-record select-media d-none"> + <?= FunctionsEdit::formControlMediaObject($tree, $media2, ['name' => 'xref2', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + </label> - <div class="row form-group"> - <div class="col-sm-3"> - </div> - <div class="col-sm-9"> - <button class="btn btn-primary" type="submit"> - <?= view('icons/save') ?> - <?= I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3"> + </div> + <div class="col-sm-9"> + <button class="btn btn-primary" type="submit"> + <?= view('icons/save') ?> + <?= I18N::translate('continue') ?> + </button> + </div> + </div> </form> <?php View::push('javascript') ?> diff --git a/resources/views/admin/merge-records-step-2.php b/resources/views/admin/merge-records-step-2.php index c9038c3228..73ce2d79d4 100644 --- a/resources/views/admin/merge-records-step-2.php +++ b/resources/views/admin/merge-records-step-2.php @@ -5,152 +5,152 @@ <h1><?= $title ?></h1> <form action="<?= e(route('merge-records', ['ged' => $tree->getName(), 'xref1' => $record1->getXref(), 'xref2' => $record2->getXref()])) ?>" method="POST"> - <?= csrf_field() ?> - <p> - <?= I18N::translate('Select the facts and events to keep from both records.') ?> - </p> - <div class="card mb-4"> - <div class="card-header"> - <h2 class="card-title"> - <?= I18N::translate('The following facts and events were found in both records.') ?> - </h2> - </div> - <div class="card-body"> - <?php if (!empty($facts)): ?> - <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Select') ?> - </th> - <th> - <?= I18N::translate('Details') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($facts as $fact_id => $fact): ?> - <tr> - <td> - <input type="checkbox" name="keep1[]" value="<?= $fact->getFactId() ?>" checked> - </td> - <td> - <div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div> - <?php if ($fact->getTarget()): ?> - <a href="<?= e($fact->getTarget()->url()) ?>"> - <?= $fact->getTarget()->getFullName() ?> - </a> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - <?php else: ?> - <p> - <?= I18N::translate('No matching facts found') ?> - </p> - <?php endif ?> - </div> - </div> + <?= csrf_field() ?> + <p> + <?= I18N::translate('Select the facts and events to keep from both records.') ?> + </p> + <div class="card mb-4"> + <div class="card-header"> + <h2 class="card-title"> + <?= I18N::translate('The following facts and events were found in both records.') ?> + </h2> + </div> + <div class="card-body"> + <?php if (!empty($facts)) : ?> + <table class="table table-bordered table-sm"> + <thead> + <tr> + <th> + <?= I18N::translate('Select') ?> + </th> + <th> + <?= I18N::translate('Details') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($facts as $fact_id => $fact) : ?> + <tr> + <td> + <input type="checkbox" name="keep1[]" value="<?= $fact->getFactId() ?>" checked> + </td> + <td> + <div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div> + <?php if ($fact->getTarget()) : ?> + <a href="<?= e($fact->getTarget()->url()) ?>"> + <?= $fact->getTarget()->getFullName() ?> + </a> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + <?php else : ?> + <p> + <?= I18N::translate('No matching facts found') ?> + </p> + <?php endif ?> + </div> + </div> - <div class="row"> - <div class="col-sm-6"> - <div class="card"> - <div class="card-header"> - <h2 class="card-title"> - <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record1->url()) . '">' . $record1->getFullName()) . '</a>' ?> - </h2> - </div> - <div class="card-body"> - <?php if (!empty($facts1)): ?> - <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Select') ?> - </th> - <th> - <?= I18N::translate('Details') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($facts1 as $fact_id => $fact): ?> - <tr> - <td> - <input type="checkbox" name="keep1[]" value="<?= $fact->getFactId() ?>" checked> - </td> - <td> - <div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div> - <?php if ($fact->getTarget()): ?> - <a href="<?= e($fact->getTarget()->url()) ?>"> - <?= $fact->getTarget()->getFullName() ?> - </a> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - <?php else: ?> - <p> - <?= I18N::translate('No matching facts found') ?> - </p> - <?php endif ?> - </div> - </div> - </div> - <div class="col-sm-6"> - <div class="card"> - <div class="card-header"> - <h2 class="card-title"> - <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record2->url()) . '">' . $record2->getFullName()) . '</a>' ?> - </h2> - </div> - <div class="card-body"> - <?php if (!empty($facts2)): ?> - <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Select') ?> - </th> - <th> - <?= I18N::translate('Details') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($facts2 as $fact_id => $fact): ?> - <tr> - <td> - <input type="checkbox" name="keep2[]" value="<?= $fact->getFactId() ?>" checked> - </td> - <td> - <div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div> - <?php if ($fact->getTarget()): ?> - <a href="<?= e($fact->getTarget()->url()) ?>"> - <?= $fact->getTarget()->getFullName() ?> - </a> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - <?php else: ?> - <p> - <?= I18N::translate('No matching facts found') ?> - </p> - <?php endif ?> - </div> - </div> - </div> - </div> + <div class="row"> + <div class="col-sm-6"> + <div class="card"> + <div class="card-header"> + <h2 class="card-title"> + <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record1->url()) . '">' . $record1->getFullName()) . '</a>' ?> + </h2> + </div> + <div class="card-body"> + <?php if (!empty($facts1)) : ?> + <table class="table table-bordered table-sm"> + <thead> + <tr> + <th> + <?= I18N::translate('Select') ?> + </th> + <th> + <?= I18N::translate('Details') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($facts1 as $fact_id => $fact) : ?> + <tr> + <td> + <input type="checkbox" name="keep1[]" value="<?= $fact->getFactId() ?>" checked> + </td> + <td> + <div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div> + <?php if ($fact->getTarget()) : ?> + <a href="<?= e($fact->getTarget()->url()) ?>"> + <?= $fact->getTarget()->getFullName() ?> + </a> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + <?php else : ?> + <p> + <?= I18N::translate('No matching facts found') ?> + </p> + <?php endif ?> + </div> + </div> + </div> + <div class="col-sm-6"> + <div class="card"> + <div class="card-header"> + <h2 class="card-title"> + <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record2->url()) . '">' . $record2->getFullName()) . '</a>' ?> + </h2> + </div> + <div class="card-body"> + <?php if (!empty($facts2)) : ?> + <table class="table table-bordered table-sm"> + <thead> + <tr> + <th> + <?= I18N::translate('Select') ?> + </th> + <th> + <?= I18N::translate('Details') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($facts2 as $fact_id => $fact) : ?> + <tr> + <td> + <input type="checkbox" name="keep2[]" value="<?= $fact->getFactId() ?>" checked> + </td> + <td> + <div class="gedcom-data" dir="ltr"><?= e($fact->getGedcom()) ?></div> + <?php if ($fact->getTarget()) : ?> + <a href="<?= e($fact->getTarget()->url()) ?>"> + <?= $fact->getTarget()->getFullName() ?> + </a> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + <?php else : ?> + <p> + <?= I18N::translate('No matching facts found') ?> + </p> + <?php endif ?> + </div> + </div> + </div> + </div> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> </form> diff --git a/resources/views/admin/module-components.php b/resources/views/admin/module-components.php index a69286d13c..c043c2eaed 100644 --- a/resources/views/admin/module-components.php +++ b/resources/views/admin/module-components.php @@ -9,54 +9,54 @@ <h1><?= $title ?></h1> <form action="<?= e(route('admin-update-module-access')) ?>" method="post"> - <input type="hidden" name="component" value="<?= e($component) ?>"> - <?= csrf_field() ?> - <table class="table table-bordered"> - <thead> - <tr> - <th><?= $component_title ?></th> - <th class="d-none d-sm-table-cell"><?= I18N::translate('Description') ?></th> - <th><?= I18N::translate('Access level') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($modules as $module_name => $module): ?> - <tr> - <td> - <?php if ($module instanceof ModuleConfigInterface): ?> - <a href="<?= e($module->getConfigLink()) ?>"> - <?= $module->getTitle() ?> - <?= view('icons/preferences') ?> - </a> - <?php else: ?> - <?= $module->getTitle() ?> - <?php endif ?> - </td> - <td class="d-none d-sm-table-cell"> - <?= $module->getDescription() ?> - </td> - <td> - <table class="table table-sm"> - <tbody> - <?php foreach (Tree::getAll() as $tree): ?> - <tr> - <td> - <?= e($tree->getTitle()) ?> - </td> - <td> - <?= Bootstrap4::select(FunctionsEdit::optionsAccessLevels(), $module->getAccessLevel($tree, $component), ['name' => 'access-' . $module->getName() . '-' . $tree->getTreeId()]) ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - <button class="btn btn-primary" type="submit"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <input type="hidden" name="component" value="<?= e($component) ?>"> + <?= csrf_field() ?> + <table class="table table-bordered"> + <thead> + <tr> + <th><?= $component_title ?></th> + <th class="d-none d-sm-table-cell"><?= I18N::translate('Description') ?></th> + <th><?= I18N::translate('Access level') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($modules as $module_name => $module) : ?> + <tr> + <td> + <?php if ($module instanceof ModuleConfigInterface) : ?> + <a href="<?= e($module->getConfigLink()) ?>"> + <?= $module->getTitle() ?> + <?= view('icons/preferences') ?> + </a> + <?php else : ?> + <?= $module->getTitle() ?> + <?php endif ?> + </td> + <td class="d-none d-sm-table-cell"> + <?= $module->getDescription() ?> + </td> + <td> + <table class="table table-sm"> + <tbody> + <?php foreach (Tree::getAll() as $tree) : ?> + <tr> + <td> + <?= e($tree->getTitle()) ?> + </td> + <td> + <?= Bootstrap4::select(FunctionsEdit::optionsAccessLevels(), $module->getAccessLevel($tree, $component), ['name' => 'access-' . $module->getName() . '-' . $tree->getTreeId()]) ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + <button class="btn btn-primary" type="submit"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> </form> diff --git a/resources/views/admin/modules.php b/resources/views/admin/modules.php index f2de2322a3..d283031902 100644 --- a/resources/views/admin/modules.php +++ b/resources/views/admin/modules.php @@ -14,210 +14,210 @@ <h1><?= $title ?></h1> -<?php foreach ($deleted_modules as $module_name): ?> - <div class="alert alert-warning" role="alert"> - <form action="<?= e(route('admin-delete-module-settings')) ?>" class="form-inline" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="module_name" value="<?= $module_name ?>"> - <?= I18N::translate('Preferences exist for the module “%s”, but this module no longer exists.', $module_name) ?> - <button type="submit" class="btn btn-secondary text-wrap"> - <?= I18N::translate('Delete the preferences for this module.') ?> - </button> - </form> - </div> +<?php foreach ($deleted_modules as $module_name) : ?> + <div class="alert alert-warning" role="alert"> + <form action="<?= e(route('admin-delete-module-settings')) ?>" class="form-inline" method="POST"> + <?= csrf_field() ?> + <input type="hidden" name="module_name" value="<?= $module_name ?>"> + <?= I18N::translate('Preferences exist for the module “%s”, but this module no longer exists.', $module_name) ?> + <button type="submit" class="btn btn-secondary text-wrap"> + <?= I18N::translate('Delete the preferences for this module.') ?> + </button> + </form> + </div> <?php endforeach ?> <form action="<?= e(route('admin-update-module-status')) ?>" method="POST"> - <input type="hidden" name="route" value="admin-update-module-status"> - <?= csrf_field() ?> - <table class="table table-bordered table-hover table-sm table-module-administration" data-info="false" data-paging="false" data-state-save="true"> - <caption class="sr-only"> - <?= I18N::translate('Module administration') ?> - </caption> - <thead> - <tr> - <th> - <?= I18N::translate('Module') ?> - </th> - <th> - <?= I18N::translate('Enabled') ?> - </th> - <th class="d-none d-sm-table-cell" data-orderable="false"> - <?= I18N::translate('Description') ?> - </th> - <th class="d-none d-sm-table-cell"> - <a href="<?= e(route('admin-menus')) ?>"> - <?= I18N::translate('Menus') ?> - </a> - </th> - <th class="d-none d-sm-table-cell"> - <a href="<?= e(route('admin-tabs')) ?>"> - <?= I18N::translate('Tabs') ?> - </a> - </th> - <th class="d-none d-sm-table-cell"> - <a href="<?= e(route('admin-sidebars')) ?>"> - <?= I18N::translate('Sidebars') ?> - </a> - </th> - <th class="d-none d-sm-table-cell"> - <a href="<?= e(route('admin-blocks')) ?>"> - <?= I18N::translate('Blocks') ?> - </a> - </th> - <th class="d-none d-sm-table-cell"> - <a href="<?= e(route('admin-charts')) ?>"> - <?= I18N::translate('Charts') ?> - </a> - </th> - <th class="d-none d-sm-table-cell"> - <a href="<?= e(route('admin-reports')) ?>"> - <?= I18N::translate('Reports') ?> - </a> - </th> - <th class="d-none"> - <?= I18N::translate('Themes') ?> - </th> - <th class="d-sm-none" data-orderable="false"> - <?= I18N::translate('Type') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($modules as $module_name => $module): ?> - <tr> - <th scope="row" data-sort="<?= $module->getTitle() ?>" dir="auto"> - <?php if ($module instanceof ModuleConfigInterface): ?> - <a href="<?= e($module->getConfigLink()) ?>"> - <?= $module->getTitle() ?> - <?= view('icons/preferences') ?> - </a> - <?php else: ?> - <?= $module->getTitle() ?> - <?php endif ?> - </th> - <td class="text-center" data-sort="<?= $module_status[$module_name] ?>"> - <?= Bootstrap4::checkbox('', false, ['name' => 'status-' . $module->getName(), 'checked' => $module_status[$module_name] === 'enabled']) ?> - </td> - <td class="d-none d-sm-table-cell"> - <?= $module->getDescription() ?> - <?php if (!in_array($module->getName(), $core_module_names)): ?> - <br> + <input type="hidden" name="route" value="admin-update-module-status"> + <?= csrf_field() ?> + <table class="table table-bordered table-hover table-sm table-module-administration" data-info="false" data-paging="false" data-state-save="true"> + <caption class="sr-only"> + <?= I18N::translate('Module administration') ?> + </caption> + <thead> + <tr> + <th> + <?= I18N::translate('Module') ?> + </th> + <th> + <?= I18N::translate('Enabled') ?> + </th> + <th class="d-none d-sm-table-cell" data-orderable="false"> + <?= I18N::translate('Description') ?> + </th> + <th class="d-none d-sm-table-cell"> + <a href="<?= e(route('admin-menus')) ?>"> + <?= I18N::translate('Menus') ?> + </a> + </th> + <th class="d-none d-sm-table-cell"> + <a href="<?= e(route('admin-tabs')) ?>"> + <?= I18N::translate('Tabs') ?> + </a> + </th> + <th class="d-none d-sm-table-cell"> + <a href="<?= e(route('admin-sidebars')) ?>"> + <?= I18N::translate('Sidebars') ?> + </a> + </th> + <th class="d-none d-sm-table-cell"> + <a href="<?= e(route('admin-blocks')) ?>"> + <?= I18N::translate('Blocks') ?> + </a> + </th> + <th class="d-none d-sm-table-cell"> + <a href="<?= e(route('admin-charts')) ?>"> + <?= I18N::translate('Charts') ?> + </a> + </th> + <th class="d-none d-sm-table-cell"> + <a href="<?= e(route('admin-reports')) ?>"> + <?= I18N::translate('Reports') ?> + </a> + </th> + <th class="d-none"> + <?= I18N::translate('Themes') ?> + </th> + <th class="d-sm-none" data-orderable="false"> + <?= I18N::translate('Type') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($modules as $module_name => $module) : ?> + <tr> + <th scope="row" data-sort="<?= $module->getTitle() ?>" dir="auto"> + <?php if ($module instanceof ModuleConfigInterface) : ?> + <a href="<?= e($module->getConfigLink()) ?>"> + <?= $module->getTitle() ?> + <?= view('icons/preferences') ?> + </a> + <?php else : ?> + <?= $module->getTitle() ?> + <?php endif ?> + </th> + <td class="text-center" data-sort="<?= $module_status[$module_name] ?>"> + <?= Bootstrap4::checkbox('', false, ['name' => 'status-' . $module->getName(), 'checked' => $module_status[$module_name] === 'enabled']) ?> + </td> + <td class="d-none d-sm-table-cell"> + <?= $module->getDescription() ?> + <?php if (!in_array($module->getName(), $core_module_names)) : ?> + <br> <?= view('icons/warning') ?> - <?= I18N::translate('Custom module') ?> - <?php if ($module::CUSTOM_VERSION): ?> - - <?= I18N::translate('Version') ?> <?= $module::CUSTOM_VERSION ?> - <?php endif ?> - <?php if ($module::CUSTOM_WEBSITE): ?> - - <a href="<?= $module::CUSTOM_WEBSITE ?>"> - <?= $module::CUSTOM_WEBSITE ?> - </a> - <?php endif ?> - <?php endif ?> - </td> - <td class="text-center text-muted d-none d-sm-table-cell"> - <?php if ($module instanceof ModuleMenuInterface): ?> - <?= view('icons/menu') ?> - <span class="sr-only"><?= I18N::translate('Menu') ?></span> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-none d-sm-table-cell"> - <?php if ($module instanceof ModuleTabInterface): ?> - <?= view('icons/tab') ?> - <span class="sr-only"><?= I18N::translate('Tabs') ?></span> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-none d-sm-table-cell"> - <?php if ($module instanceof ModuleSidebarInterface): ?> - <?= view('icons/sidebar') ?> - <span class="sr-only"><?= I18N::translate('Sidebar') ?></span> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-none d-sm-table-cell"> - <?php if ($module instanceof ModuleBlockInterface): ?> - <?php if ($module->isUserBlock()): ?> - <?= view('icons/block-user') ?> - <span class="sr-only"><?= I18N::translate('My page') ?></span> - <?php endif ?> - <?php if ($module->isUserBlock()): ?> - <?= view('icons/block-tree') ?> - <span class="sr-only"><?= I18N::translate('Home page') ?></span> - <?php endif ?> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-none d-sm-table-cell"> - <?php if ($module instanceof ModuleChartInterface): ?> - <?= view('icons/chart') ?> - <span class="sr-only"><?= I18N::translate('Chart') ?></span> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-none d-sm-table-cell"> - <?php if ($module instanceof ModuleReportInterface): ?> - <?= view('icons/report') ?> - <span class="sr-only"><?= I18N::translate('Report') ?></span> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-none"> - <?php if ($module instanceof ModuleThemeInterface): ?> - <?= view('icons/theme') ?> - <span class="sr-only"><?= I18N::translate('Theme') ?></span> - <?php else: ?> - - - <?php endif ?> - </td> - <td class="text-center text-muted d-sm-none"> - <?php if ($module instanceof ModuleMenuInterface): ?> - <?= view('icons/menu') ?> - <span class="sr-only"><?= I18N::translate('Menu') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleTabInterface): ?> - <?= view('icons/tab') ?> - <span class="sr-only"><?= I18N::translate('Tab') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleSidebarInterface): ?> - <?= view('icons/sidebar') ?> - <span class="sr-only"><?= I18N::translate('Sidebar') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleBlockInterface && $module->isUserBlock()): ?> - <?= view('icons/block-user') ?> - <span class="sr-only"><?= I18N::translate('My page') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleBlockInterface && $module->isUserBlock()): ?> - <?= view('icons/block-tree') ?> - <span class="sr-only"><?= I18N::translate('Home page') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleChartInterface): ?> - <?= view('icons/chart') ?> - <span class="sr-only"><?= I18N::translate('Chart') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleReportInterface): ?> - <?= view('icons/report') ?> - <span class="sr-only"><?= I18N::translate('Report') ?></span> - <?php endif ?> - <?php if ($module instanceof ModuleThemeInterface): ?> - <?= view('icons/theme') ?> - <span class="sr-only"><?= I18N::translate('Theme') ?></span> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - <button class="btn btn-primary" type="submit"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?></button> + <?= I18N::translate('Custom module') ?> + <?php if ($module::CUSTOM_VERSION) : ?> + - <?= I18N::translate('Version') ?> <?= $module::CUSTOM_VERSION ?> + <?php endif ?> + <?php if ($module::CUSTOM_WEBSITE) : ?> + - <a href="<?= $module::CUSTOM_WEBSITE ?>"> + <?= $module::CUSTOM_WEBSITE ?> + </a> + <?php endif ?> + <?php endif ?> + </td> + <td class="text-center text-muted d-none d-sm-table-cell"> + <?php if ($module instanceof ModuleMenuInterface) : ?> + <?= view('icons/menu') ?> + <span class="sr-only"><?= I18N::translate('Menu') ?></span> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-none d-sm-table-cell"> + <?php if ($module instanceof ModuleTabInterface) : ?> + <?= view('icons/tab') ?> + <span class="sr-only"><?= I18N::translate('Tabs') ?></span> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-none d-sm-table-cell"> + <?php if ($module instanceof ModuleSidebarInterface) : ?> + <?= view('icons/sidebar') ?> + <span class="sr-only"><?= I18N::translate('Sidebar') ?></span> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-none d-sm-table-cell"> + <?php if ($module instanceof ModuleBlockInterface) : ?> + <?php if ($module->isUserBlock()) : ?> + <?= view('icons/block-user') ?> + <span class="sr-only"><?= I18N::translate('My page') ?></span> + <?php endif ?> + <?php if ($module->isUserBlock()) : ?> + <?= view('icons/block-tree') ?> + <span class="sr-only"><?= I18N::translate('Home page') ?></span> + <?php endif ?> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-none d-sm-table-cell"> + <?php if ($module instanceof ModuleChartInterface) : ?> + <?= view('icons/chart') ?> + <span class="sr-only"><?= I18N::translate('Chart') ?></span> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-none d-sm-table-cell"> + <?php if ($module instanceof ModuleReportInterface) : ?> + <?= view('icons/report') ?> + <span class="sr-only"><?= I18N::translate('Report') ?></span> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-none"> + <?php if ($module instanceof ModuleThemeInterface) : ?> + <?= view('icons/theme') ?> + <span class="sr-only"><?= I18N::translate('Theme') ?></span> + <?php else : ?> + - + <?php endif ?> + </td> + <td class="text-center text-muted d-sm-none"> + <?php if ($module instanceof ModuleMenuInterface) : ?> + <?= view('icons/menu') ?> + <span class="sr-only"><?= I18N::translate('Menu') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleTabInterface) : ?> + <?= view('icons/tab') ?> + <span class="sr-only"><?= I18N::translate('Tab') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleSidebarInterface) : ?> + <?= view('icons/sidebar') ?> + <span class="sr-only"><?= I18N::translate('Sidebar') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleBlockInterface && $module->isUserBlock()) : ?> + <?= view('icons/block-user') ?> + <span class="sr-only"><?= I18N::translate('My page') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleBlockInterface && $module->isUserBlock()) : ?> + <?= view('icons/block-tree') ?> + <span class="sr-only"><?= I18N::translate('Home page') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleChartInterface) : ?> + <?= view('icons/chart') ?> + <span class="sr-only"><?= I18N::translate('Chart') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleReportInterface) : ?> + <?= view('icons/report') ?> + <span class="sr-only"><?= I18N::translate('Report') ?></span> + <?php endif ?> + <?php if ($module instanceof ModuleThemeInterface) : ?> + <?= view('icons/theme') ?> + <span class="sr-only"><?= I18N::translate('Theme') ?></span> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + <button class="btn btn-primary" type="submit"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?></button> </form> <?php View::push('javascript') ?> diff --git a/resources/views/admin/phpgedview/steps.php b/resources/views/admin/phpgedview/steps.php index 873d0adb11..793f92841e 100644 --- a/resources/views/admin/phpgedview/steps.php +++ b/resources/views/admin/phpgedview/steps.php @@ -6,10 +6,10 @@ <h1><?= $title ?></h1> <dl> - <?php foreach ($steps as $url => $text): ?> - <dt><?= $text ?></dt> - <dd class="wt-ajax-load" data-url="<?= e($url) ?>"></dd> - <?php endforeach ?> + <?php foreach ($steps as $url => $text) : ?> + <dt><?= $text ?></dt> + <dd class="wt-ajax-load" data-url="<?= e($url) ?>"></dd> + <?php endforeach ?> </dl> <?php View::push('javascript') ?> diff --git a/resources/views/admin/phpgedview/wizard.php b/resources/views/admin/phpgedview/wizard.php index 7974c26a7f..88c5be6bf0 100644 --- a/resources/views/admin/phpgedview/wizard.php +++ b/resources/views/admin/phpgedview/wizard.php @@ -5,56 +5,56 @@ <h1><?= $title ?></h1> <form class="form-horizontal"> - <input type="hidden" name="route" value="phpgedview-wizard"> - <?php if (!empty($pgv_paths)): ?> - <div class="row form-group"> - <div class="col-sm-3 col-form-label"> - <?= I18N::translate('PhpGedView might be installed in one of these folders:') ?> - </div> - <div class="col-sm-9"> - <?php foreach ($pgv_paths as $pgv_path): ?> - <div> - <a href="#" onclick="document.getElementById('pgv_path').value=this.dataset.path; return false;" data-path="<?= e($pgv_path) ?>"> - <?= e($pgv_path) ?> - </a> - </div> - <?php endforeach ?> - </div> - </div> - <?php endif ?> + <input type="hidden" name="route" value="phpgedview-wizard"> + <?php if (!empty($pgv_paths)) : ?> + <div class="row form-group"> + <div class="col-sm-3 col-form-label"> + <?= I18N::translate('PhpGedView might be installed in one of these folders:') ?> + </div> + <div class="col-sm-9"> + <?php foreach ($pgv_paths as $pgv_path) : ?> + <div> + <a href="#" onclick="document.getElementById('pgv_path').value=this.dataset.path; return false;" data-path="<?= e($pgv_path) ?>"> + <?= e($pgv_path) ?> + </a> + </div> + <?php endforeach ?> + </div> + </div> + <?php endif ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="pgv_path"> - <?= I18N::translate('Where is your PhpGedView installation?') ?> - </label> - <div class="col-sm-9"> - <div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text"><?= e(WT_ROOT) ?></span> - </div> - <input - type="text" - class="form-control" - dir="ltr" - id="pgv_path" - name="pgv_path" - size="40" - placeholder="<?= I18N::translate('Installation folder') ?>" - value="<?= count($pgv_paths) === 1 ? $pgv_paths[0] : '' ?>" - required - > - <div class="input-group-append"> - <span class="input-group-text">config.php</span> - </div> - </div> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="pgv_path"> + <?= I18N::translate('Where is your PhpGedView installation?') ?> + </label> + <div class="col-sm-9"> + <div class="input-group"> + <div class="input-group-prepend"> + <span class="input-group-text"><?= e(WT_ROOT) ?></span> + </div> + <input + type="text" + class="form-control" + dir="ltr" + id="pgv_path" + name="pgv_path" + size="40" + placeholder="<?= I18N::translate('Installation folder') ?>" + value="<?= count($pgv_paths) === 1 ? $pgv_paths[0] : '' ?>" + required + > + <div class="input-group-append"> + <span class="input-group-text">config.php</span> + </div> + </div> + </div> + </div> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('continue') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/admin/server-information.php b/resources/views/admin/server-information.php index e0bc149fe2..1eefc098dd 100644 --- a/resources/views/admin/server-information.php +++ b/resources/views/admin/server-information.php @@ -5,20 +5,20 @@ <h1><?= $title ?></h1> <h2> - <?= I18N::translate('PHP information') ?> + <?= I18N::translate('PHP information') ?> </h2> <div class="php-info" dir="ltr"> - <?= $phpinfo ?> + <?= $phpinfo ?> </div> <h2> - <?= I18N::translate('MySQL variables') ?> + <?= I18N::translate('MySQL variables') ?> </h2> <dl> - <?php foreach ($mysql_variables as $variable => $value): ?> - <dt><?= e($variable) ?></dt> - <dd><?= e($value) ?></dd> - <?php endforeach ?> + <?php foreach ($mysql_variables as $variable => $value) : ?> + <dt><?= e($variable) ?></dt> + <dd><?= e($value) ?></dd> + <?php endforeach ?> </dl> diff --git a/resources/views/admin/site-analytics.php b/resources/views/admin/site-analytics.php index 15ec76930d..3a6b4ab472 100644 --- a/resources/views/admin/site-analytics.php +++ b/resources/views/admin/site-analytics.php @@ -6,131 +6,131 @@ <h1><?= $title ?></h1> <form method="post" class="form-horizontal"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <p> - <?= I18N::translate('If you use one of the following tracking and analytics services, webtrees can add the tracking codes automatically.') ?> - </p> + <p> + <?= I18N::translate('If you use one of the following tracking and analytics services, webtrees can add the tracking codes automatically.') ?> + </p> - <h2><a href="https://www.bing.com/toolbox/webmaster/">Bing Webmaster Tools</a></h2> + <h2><a href="https://www.bing.com/toolbox/webmaster/">Bing Webmaster Tools</a></h2> - <!-- BING_WEBMASTER_ID --> - <div class="row form-group"> - <label for="BING_WEBMASTER_ID" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Site verification code') ?> - <span class="sr-only">Google Webmaster Tools</span> - </label> - <div class="col-sm-9"> - <input - type="text" class="form-control" - id="BING_WEBMASTER_ID" name="BING_WEBMASTER_ID" <?= dirname(parse_url(WT_BASE_URL, PHP_URL_PATH)) === '/' ? '' : 'disabled' ?> - value="<?= e(Site::getPreference('BING_WEBMASTER_ID')) ?>" - maxlength="255" pattern="[0-9a-zA-Z+=/_:.!-]*" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the "Site verification code for Google Webmaster Tools" site configuration setting */ I18N::translate('Site verification codes do not work when webtrees is installed in a subfolder.') ?> - </p> - </div> - </div> + <!-- BING_WEBMASTER_ID --> + <div class="row form-group"> + <label for="BING_WEBMASTER_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site verification code') ?> + <span class="sr-only">Google Webmaster Tools</span> + </label> + <div class="col-sm-9"> + <input + type="text" class="form-control" + id="BING_WEBMASTER_ID" name="BING_WEBMASTER_ID" <?= dirname(parse_url(WT_BASE_URL, PHP_URL_PATH)) === '/' ? '' : 'disabled' ?> + value="<?= e(Site::getPreference('BING_WEBMASTER_ID')) ?>" + maxlength="255" pattern="[0-9a-zA-Z+=/_:.!-]*" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the "Site verification code for Google Webmaster Tools" site configuration setting */ I18N::translate('Site verification codes do not work when webtrees is installed in a subfolder.') ?> + </p> + </div> + </div> - <h2><a href="https://www.google.com/webmasters/">Google Webmaster Tools</a></h2> + <h2><a href="https://www.google.com/webmasters/">Google Webmaster Tools</a></h2> - <!-- GOOGLE_WEBMASTER_ID --> - <div class="row form-group"> - <label for="GOOGLE_WEBMASTER_ID" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Site verification code') ?> - <span class="sr-only">Google Webmaster Tools</span> - </label> - <div class="col-sm-9"> - <input - type="text" class="form-control" - id="GOOGLE_WEBMASTER_ID" name="GOOGLE_WEBMASTER_ID" <?= dirname(parse_url(WT_BASE_URL, PHP_URL_PATH)) === '/' ? '' : 'disabled' ?> - value="<?= e(Site::getPreference('GOOGLE_WEBMASTER_ID')) ?>" - maxlength="255" pattern="[0-9a-zA-Z+=/_:.!-]*" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the "Site verification code for Google Webmaster Tools" site configuration setting */ I18N::translate('Site verification codes do not work when webtrees is installed in a subfolder.') ?> - </p> - </div> - </div> + <!-- GOOGLE_WEBMASTER_ID --> + <div class="row form-group"> + <label for="GOOGLE_WEBMASTER_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site verification code') ?> + <span class="sr-only">Google Webmaster Tools</span> + </label> + <div class="col-sm-9"> + <input + type="text" class="form-control" + id="GOOGLE_WEBMASTER_ID" name="GOOGLE_WEBMASTER_ID" <?= dirname(parse_url(WT_BASE_URL, PHP_URL_PATH)) === '/' ? '' : 'disabled' ?> + value="<?= e(Site::getPreference('GOOGLE_WEBMASTER_ID')) ?>" + maxlength="255" pattern="[0-9a-zA-Z+=/_:.!-]*" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the "Site verification code for Google Webmaster Tools" site configuration setting */ I18N::translate('Site verification codes do not work when webtrees is installed in a subfolder.') ?> + </p> + </div> + </div> - <h2><a href="https://www.google.com/analytics/">Google Analytics</a></h2> + <h2><a href="https://www.google.com/analytics/">Google Analytics</a></h2> - <!-- GOOGLE_ANALYTICS_ID --> - <div class="row form-group"> - <label for="GOOGLE_ANALYTICS_ID" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> - <span class="sr-only">Google Analytics</span> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="GOOGLE_ANALYTICS_ID" name="GOOGLE_ANALYTICS_ID" value="<?= e(Site::getPreference('GOOGLE_ANALYTICS_ID')) ?>" placeholder="UA-12345-6" maxlength="255" pattern="UA-[0-9]+-[0-9]+"> - <p class="small text-muted"> - <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> - </p> - </div> - </div> + <!-- GOOGLE_ANALYTICS_ID --> + <div class="row form-group"> + <label for="GOOGLE_ANALYTICS_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> + <span class="sr-only">Google Analytics</span> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="GOOGLE_ANALYTICS_ID" name="GOOGLE_ANALYTICS_ID" value="<?= e(Site::getPreference('GOOGLE_ANALYTICS_ID')) ?>" placeholder="UA-12345-6" maxlength="255" pattern="UA-[0-9]+-[0-9]+"> + <p class="small text-muted"> + <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> + </p> + </div> + </div> - <h2><a href="https://piwik.org/">Piwik</a></h2> + <h2><a href="https://piwik.org/">Piwik</a></h2> - <!-- PIWIK_SITE_ID --> - <div class="row form-group"> - <label for="PIWIK_SITE_ID" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="PIWIK_SITE_ID" name="PIWIK_SITE_ID" value="<?= e(Site::getPreference('PIWIK_SITE_ID')) ?>" maxlength="255" pattern="[0-9]+"> - </div> - </div> + <!-- PIWIK_SITE_ID --> + <div class="row form-group"> + <label for="PIWIK_SITE_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="PIWIK_SITE_ID" name="PIWIK_SITE_ID" value="<?= e(Site::getPreference('PIWIK_SITE_ID')) ?>" maxlength="255" pattern="[0-9]+"> + </div> + </div> - <!-- PIWIK_URL --> - <div class="row form-group"> - <label for="PIWIK_URL" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('URL') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="PIWIK_URL" name="PIWIK_URL" value="<?= e(Site::getPreference('PIWIK_URL')) ?>" placeholder="example.com/piwik" maxlength="255"> - <p class="small text-muted"> - <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> - </p> - </div> - </div> + <!-- PIWIK_URL --> + <div class="row form-group"> + <label for="PIWIK_URL" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('URL') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="PIWIK_URL" name="PIWIK_URL" value="<?= e(Site::getPreference('PIWIK_URL')) ?>" placeholder="example.com/piwik" maxlength="255"> + <p class="small text-muted"> + <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> + </p> + </div> + </div> - <h2><a href="https://statcounter.com/">StatCounter</a></h2> + <h2><a href="https://statcounter.com/">StatCounter</a></h2> - <!-- STATCOUNTER_PROJECT_ID --> - <div class="row form-group"> - <label for="STATCOUNTER_PROJECT_ID" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="STATCOUNTER_PROJECT_ID" name="STATCOUNTER_PROJECT_ID" value="<?= e(Site::getPreference('STATCOUNTER_PROJECT_ID')) ?>" maxlength="255" pattern="[0-9]+"> - </div> - </div> + <!-- STATCOUNTER_PROJECT_ID --> + <div class="row form-group"> + <label for="STATCOUNTER_PROJECT_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="STATCOUNTER_PROJECT_ID" name="STATCOUNTER_PROJECT_ID" value="<?= e(Site::getPreference('STATCOUNTER_PROJECT_ID')) ?>" maxlength="255" pattern="[0-9]+"> + </div> + </div> - <!-- STATCOUNTER_SECURITY_ID --> - <div class="row form-group"> - <label for="STATCOUNTER_SECURITY_ID" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Security code') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="STATCOUNTER_SECURITY_ID" name="STATCOUNTER_SECURITY_ID" value="<?= e(Site::getPreference('STATCOUNTER_SECURITY_ID')) ?>" maxlength="255" pattern="[0-9a-zA-Z]+"> - <p class="small text-muted"> - <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> - </p> - </div> - </div> + <!-- STATCOUNTER_SECURITY_ID --> + <div class="row form-group"> + <label for="STATCOUNTER_SECURITY_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Security code') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="STATCOUNTER_SECURITY_ID" name="STATCOUNTER_SECURITY_ID" value="<?= e(Site::getPreference('STATCOUNTER_SECURITY_ID')) ?>" maxlength="255" pattern="[0-9a-zA-Z]+"> + <p class="small text-muted"> + <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> - <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> - <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> + <?= view('icons/cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/admin/site-languages.php b/resources/views/admin/site-languages.php index 9f4887ff06..ba48caf096 100644 --- a/resources/views/admin/site-languages.php +++ b/resources/views/admin/site-languages.php @@ -5,41 +5,41 @@ <h1><?= $title ?></h1> <form method="post" class="form-horizontal"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <p> - <?= I18N::translate('Select the languages that will be shown in menus.') ?> - </p> + <p> + <?= I18N::translate('Select the languages that will be shown in menus.') ?> + </p> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Language') ?> - </legend> - <div class="col-sm-9" style="columns: 4 150px;"> - <?php foreach (I18N::installedLocales() as $installed_locale): ?> - <div class="form-check"> - <label title="<?= $installed_locale->languageTag() ?>"> - <input type="checkbox" name="LANGUAGES[]" value="<?= $installed_locale->languageTag() ?>"<?= in_array($installed_locale->languageTag(), $language_tags) ? ' checked' : '' ?>> - <?= $installed_locale->endonym() ?> - </label> - </div> - <?php endforeach ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Language') ?> + </legend> + <div class="col-sm-9" style="columns: 4 150px;"> + <?php foreach (I18N::installedLocales() as $installed_locale) : ?> + <div class="form-check"> + <label title="<?= $installed_locale->languageTag() ?>"> + <input type="checkbox" name="LANGUAGES[]" value="<?= $installed_locale->languageTag() ?>"<?= in_array($installed_locale->languageTag(), $language_tags) ? ' checked' : '' ?>> + <?= $installed_locale->endonym() ?> + </label> + </div> + <?php endforeach ?> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> - <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> - <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> + <?= view('icons/cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/admin/site-logs.php b/resources/views/admin/site-logs.php index 805554205e..b9c74c3ee7 100644 --- a/resources/views/admin/site-logs.php +++ b/resources/views/admin/site-logs.php @@ -7,106 +7,106 @@ <h1><?= $title ?></h1> <form class="form" name="logs"> - <input type="hidden" name="route" value="admin-site-logs" id="route"> - <input type="hidden" name="action" value="show"> + <input type="hidden" name="route" value="admin-site-logs" id="route"> + <input type="hidden" name="action" value="show"> - <div class="row"> - <div class="form-group col-xs-6 col-sm-3"> - <label for="from"> - <?= /* I18N: label for the start of a date range (from x to y) */ I18N::translate('From') ?> - </label> - <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required> - </div> + <div class="row"> + <div class="form-group col-xs-6 col-sm-3"> + <label for="from"> + <?= /* I18N: label for the start of a date range (from x to y) */ I18N::translate('From') ?> + </label> + <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required> + </div> - <div class="form-group col-xs-6 col-sm-3"> - <label for="to"> - <?= /* I18N: label for the end of a date range (from x to y) */ I18N::translate('To') ?> - </label> - <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="to" value="<?= e($to) ?>" required> - </div> + <div class="form-group col-xs-6 col-sm-3"> + <label for="to"> + <?= /* I18N: label for the end of a date range (from x to y) */ I18N::translate('To') ?> + </label> + <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="to" value="<?= e($to) ?>" required> + </div> - <div class="form-group col-xs-6 col-sm-2"> - <label for="type"> - <?= I18N::translate('Type') ?> - </label> - <?= Bootstrap4::select(['' => '', 'auth' => 'auth', 'config' => 'config', 'debug' => 'debug', 'edit' => 'edit', 'error' => 'error', 'media' => 'media', 'search' => 'search'], $type, ['id' => 'type', 'name' => 'type']) ?> - </div> + <div class="form-group col-xs-6 col-sm-2"> + <label for="type"> + <?= I18N::translate('Type') ?> + </label> + <?= Bootstrap4::select(['' => '', 'auth' => 'auth', 'config' => 'config', 'debug' => 'debug', 'edit' => 'edit', 'error' => 'error', 'media' => 'media', 'search' => 'search'], $type, ['id' => 'type', 'name' => 'type']) ?> + </div> - <div class="form-group col-xs-6 col-sm-4"> - <label for="ip"> - <?= I18N::translate('IP address') ?> - </label> - <input class="form-control" type="text" id="ip" name="ip" value="<?= e($ip) ?>"> - </div> - </div> + <div class="form-group col-xs-6 col-sm-4"> + <label for="ip"> + <?= I18N::translate('IP address') ?> + </label> + <input class="form-control" type="text" id="ip" name="ip" value="<?= e($ip) ?>"> + </div> + </div> - <div class="row"> - <div class="form-group col-sm-4"> - <label for="text"> - <?= I18N::translate('Message') ?> - </label> - <input class="form-control" type="text" id="text" name="text" value="<?= e($text) ?>"> - </div> + <div class="row"> + <div class="form-group col-sm-4"> + <label for="text"> + <?= I18N::translate('Message') ?> + </label> + <input class="form-control" type="text" id="text" name="text" value="<?= e($text) ?>"> + </div> - <div class="form-group col-sm-4"> - <label for="username"> - <?= I18N::translate('User') ?> - </label> - <?= Bootstrap4::select($user_options, $username, ['id' => 'username', 'name' => 'username']) ?> - </div> + <div class="form-group col-sm-4"> + <label for="username"> + <?= I18N::translate('User') ?> + </label> + <?= Bootstrap4::select($user_options, $username, ['id' => 'username', 'name' => 'username']) ?> + </div> - <div class="form-group col-sm-4"> - <label for="gedc"> - <?= I18N::translate('Family tree') ?> - </label> - <?= Bootstrap4::select($tree_options, $gedc, ['id' => 'gedc', 'name' => 'gedc']) ?> - </div> - </div> + <div class="form-group col-sm-4"> + <label for="gedc"> + <?= I18N::translate('Family tree') ?> + </label> + <?= Bootstrap4::select($tree_options, $gedc, ['id' => 'gedc', 'name' => 'gedc']) ?> + </div> + </div> - <div class="text-center"> - <button type="submit" class="btn btn-primary"> + <div class="text-center"> + <button type="submit" class="btn btn-primary"> <?= view('icons/search') ?> - <?= /* I18N: A button label. */ I18N::translate('search') ?> - </button> + <?= /* I18N: A button label. */ I18N::translate('search') ?> + </button> - <a href="<?= e(route('admin-site-logs-export', ['from' => $from, 'to' => $to, 'type' => $type, 'text' => $text, 'ip' => $ip, 'username' => $username, 'gedc' => $gedc])) ?>" class="btn btn-primary" <?= $action === 'show' ? '' : 'disabled' ?>> + <a href="<?= e(route('admin-site-logs-export', ['from' => $from, 'to' => $to, 'type' => $type, 'text' => $text, 'ip' => $ip, 'username' => $username, 'gedc' => $gedc])) ?>" class="btn btn-primary" <?= $action === 'show' ? '' : 'disabled' ?>> <?= view('icons/download') ?> - <?= /* I18N: A button label. */ I18N::translate('download') ?> - </a> + <?= /* I18N: A button label. */ I18N::translate('download') ?> + </a> - <a href="#" class="btn btn-primary" data-confirm="<?= I18N::translate('Permanently delete these records?') ?>" id="delete-button" <?= $action === 'show' ? '' : 'disabled' ?>> + <a href="#" class="btn btn-primary" data-confirm="<?= I18N::translate('Permanently delete these records?') ?>" id="delete-button" <?= $action === 'show' ? '' : 'disabled' ?>> <?= view('icons/delete') ?> - <?= /* I18N: A button label. */ I18N::translate('delete') ?> - </a> - </div> + <?= /* I18N: A button label. */ I18N::translate('delete') ?> + </a> + </div> </form> -<?php if ($action): ?> - <table class="table table-bordered table-sm table-hover table-site-logs" data-ajax="<?= e(route('admin-site-logs-data', ['from' => $from, 'to' => $to, 'type' => $type, 'text' => $text, 'ip' => $ip, 'user' => $username, 'gedc' => $gedc])) ?>" data-server-side="true"> - <thead> - <tr> - <th></th> - <th><?= I18N::translate('Timestamp') ?></th> - <th><?= I18N::translate('Type') ?></th> - <th><?= I18N::translate('Message') ?></th> - <th><?= I18N::translate('IP address') ?></th> - <th><?= I18N::translate('User') ?></th> - <th><?= I18N::translate('Family tree') ?></th> - </tr> - </thead> - </table> +<?php if ($action) : ?> + <table class="table table-bordered table-sm table-hover table-site-logs" data-ajax="<?= e(route('admin-site-logs-data', ['from' => $from, 'to' => $to, 'type' => $type, 'text' => $text, 'ip' => $ip, 'user' => $username, 'gedc' => $gedc])) ?>" data-server-side="true"> + <thead> + <tr> + <th></th> + <th><?= I18N::translate('Timestamp') ?></th> + <th><?= I18N::translate('Type') ?></th> + <th><?= I18N::translate('Message') ?></th> + <th><?= I18N::translate('IP address') ?></th> + <th><?= I18N::translate('User') ?></th> + <th><?= I18N::translate('Family tree') ?></th> + </tr> + </thead> + </table> <?php endif ?> <?php View::push('javascript') ?> <script> - $("#delete-button").click(function() { + $("#delete-button").click(function() { if (confirm(this.dataset.confirm)) { var data = $(this).closest('form').serialize(); data.csrf = <?= json_encode(csrf_token()) ?>; jQuery.post( <?= json_encode(route('admin-site-logs-delete')) ?>, - data, + data, function() { document.location.reload(); } ) } diff --git a/resources/views/admin/site-mail.php b/resources/views/admin/site-mail.php index 9d6c03e200..ab2a31c641 100644 --- a/resources/views/admin/site-mail.php +++ b/resources/views/admin/site-mail.php @@ -8,144 +8,144 @@ <h1><?= $title ?></h1> <p class="alert alert-info"> - <?= I18N::translate('To use a Google mail account, use the following settings: server=smtp.gmail.com, port=587, security=tls, username=xxxxx@gmail.com, password=[your gmail password]') . '<br>' . I18N::translate('You must also enable “less secure applications” in your Google account.') . ' <a href="https://www.google.com/settings/security/lesssecureapps">https://www.google.com/settings/security/lesssecureapps</a>' ?> + <?= I18N::translate('To use a Google mail account, use the following settings: server=smtp.gmail.com, port=587, security=tls, username=xxxxx@gmail.com, password=[your gmail password]') . '<br>' . I18N::translate('You must also enable “less secure applications” in your Google account.') . ' <a href="https://www.google.com/settings/security/lesssecureapps">https://www.google.com/settings/security/lesssecureapps</a>' ?> </p> <form method="post" class="form-horizontal"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <!-- SMTP_ACTIVE --> - <div class="row form-group"> - <label for="SMTP_ACTIVE" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Messages') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($mail_transport_options, Site::getPreference('SMTP_ACTIVE'), ['id' => 'SMTP_ACTIVE', 'name' => 'SMTP_ACTIVE']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Messages” site configuration setting */ I18N::translate('webtrees needs to send emails, such as password reminders and website notifications. To do this, it can use this server’s built in PHP mail facility (which is not always available) or an external SMTP (mail-relay) service, for which you will need to provide the connection details.') ?> - </p> - </div> - </div> + <!-- SMTP_ACTIVE --> + <div class="row form-group"> + <label for="SMTP_ACTIVE" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Messages') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($mail_transport_options, Site::getPreference('SMTP_ACTIVE'), ['id' => 'SMTP_ACTIVE', 'name' => 'SMTP_ACTIVE']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Messages” site configuration setting */ I18N::translate('webtrees needs to send emails, such as password reminders and website notifications. To do this, it can use this server’s built in PHP mail facility (which is not always available) or an external SMTP (mail-relay) service, for which you will need to provide the connection details.') ?> + </p> + </div> + </div> - <!-- SMTP_FROM_NAME --> - <div class="row form-group"> - <label for="SMTP_FROM_NAME" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Sender name') ?> - </label> - <div class="col-sm-9"> - <input type="email" class="form-control" id="SMTP_FROM_NAME" name="SMTP_FROM_NAME" value="<?= e(Site::getPreference('SMTP_FROM_NAME')) ?>" placeholder="no-reply@localhost" maxlength="255"> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Sender name” site configuration setting */ I18N::translate('This name is used in the “From” field, when sending automatic emails from this server.') ?> - </p> - </div> - </div> + <!-- SMTP_FROM_NAME --> + <div class="row form-group"> + <label for="SMTP_FROM_NAME" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Sender name') ?> + </label> + <div class="col-sm-9"> + <input type="email" class="form-control" id="SMTP_FROM_NAME" name="SMTP_FROM_NAME" value="<?= e(Site::getPreference('SMTP_FROM_NAME')) ?>" placeholder="no-reply@localhost" maxlength="255"> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Sender name” site configuration setting */ I18N::translate('This name is used in the “From” field, when sending automatic emails from this server.') ?> + </p> + </div> + </div> - <h2><?= I18N::translate('SMTP mail server') ?></h2> + <h2><?= I18N::translate('SMTP mail server') ?></h2> - <!-- SMTP_HOST --> - <div class="row form-group"> - <label for="SMTP_HOST" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Server name') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="SMTP_HOST" name="SMTP_HOST" value="<?= e(Site::getPreference('SMTP_HOST')) ?>" placeholder="smtp.example.com" maxlength="255" pattern="[a-z0-9-]+(\.[a-z0-9-]+)*"> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Server name” site configuration setting */ I18N::translate('This is the name of the SMTP server. “localhost” means that the mail service is running on the same computer as your web server.') ?> - </p> - </div> - </div> + <!-- SMTP_HOST --> + <div class="row form-group"> + <label for="SMTP_HOST" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Server name') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="SMTP_HOST" name="SMTP_HOST" value="<?= e(Site::getPreference('SMTP_HOST')) ?>" placeholder="smtp.example.com" maxlength="255" pattern="[a-z0-9-]+(\.[a-z0-9-]+)*"> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Server name” site configuration setting */ I18N::translate('This is the name of the SMTP server. “localhost” means that the mail service is running on the same computer as your web server.') ?> + </p> + </div> + </div> - <!-- SMTP_PORT --> - <div class="row form-group"> - <label for="SMTP_PORT" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Port number') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="SMTP_PORT" name="SMTP_PORT" value="<?= e(Site::getPreference('SMTP_PORT')) ?>" pattern="[0-9]*" placeholder="25" maxlength="5"> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Port number" site configuration setting */ I18N::translate('By default, SMTP works on port 25.') ?> - </p> - </div> - </div> + <!-- SMTP_PORT --> + <div class="row form-group"> + <label for="SMTP_PORT" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Port number') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="SMTP_PORT" name="SMTP_PORT" value="<?= e(Site::getPreference('SMTP_PORT')) ?>" pattern="[0-9]*" placeholder="25" maxlength="5"> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Port number" site configuration setting */ I18N::translate('By default, SMTP works on port 25.') ?> + </p> + </div> + </div> - <!-- SMTP_AUTH --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Use password') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('SMTP_AUTH', FunctionsEdit::optionsNoYes(), Site::getPreference('SMTP_AUTH'), true) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Use password” site configuration setting */ I18N::translate('Most SMTP servers require a password.') ?> - </p> - </div> - </div> - </fieldset> + <!-- SMTP_AUTH --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Use password') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('SMTP_AUTH', FunctionsEdit::optionsNoYes(), Site::getPreference('SMTP_AUTH'), true) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Use password” site configuration setting */ I18N::translate('Most SMTP servers require a password.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SMTP_AUTH_USER --> - <div class="row form-group"> - <label for="SMTP_AUTH_USER" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Username') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="SMTP_AUTH_USER" name="SMTP_AUTH_USER" value="<?= e(Site::getPreference('SMTP_AUTH_USER')) ?>" maxlength="255"> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Username" site configuration setting */ I18N::translate('The username required for authentication with the SMTP server.') ?> - </p> - </div> - </div> + <!-- SMTP_AUTH_USER --> + <div class="row form-group"> + <label for="SMTP_AUTH_USER" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Username') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="SMTP_AUTH_USER" name="SMTP_AUTH_USER" value="<?= e(Site::getPreference('SMTP_AUTH_USER')) ?>" maxlength="255"> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Username" site configuration setting */ I18N::translate('The username required for authentication with the SMTP server.') ?> + </p> + </div> + </div> - <!-- SMTP_AUTH_PASS --> - <div class="row form-group"> - <label for="SMTP_AUTH_PASS" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Password') ?> - </label> - <div class="col-sm-9"> - <input type="password" class="form-control" id="SMTP_AUTH_PASS" name="SMTP_AUTH_PASS" value=""> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Password" site configuration setting */ I18N::translate('The password required for authentication with the SMTP server.') ?> - </p> - </div> - </div> + <!-- SMTP_AUTH_PASS --> + <div class="row form-group"> + <label for="SMTP_AUTH_PASS" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Password') ?> + </label> + <div class="col-sm-9"> + <input type="password" class="form-control" id="SMTP_AUTH_PASS" name="SMTP_AUTH_PASS" value=""> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Password" site configuration setting */ I18N::translate('The password required for authentication with the SMTP server.') ?> + </p> + </div> + </div> - <!-- SMTP_SSL --> - <div class="row form-group"> - <label for="SMTP_SSL" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Secure connection') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($mail_ssl_options, Site::getPreference('SMTP_SSL'), ['id' => 'SMTP_SSL', 'name' => 'SMTP_SSL']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Secure connection” site configuration setting */ I18N::translate('Most servers do not use secure connections.') ?> - </p> - </div> - </div> + <!-- SMTP_SSL --> + <div class="row form-group"> + <label for="SMTP_SSL" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Secure connection') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($mail_ssl_options, Site::getPreference('SMTP_SSL'), ['id' => 'SMTP_SSL', 'name' => 'SMTP_SSL']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Secure connection” site configuration setting */ I18N::translate('Most servers do not use secure connections.') ?> + </p> + </div> + </div> - <!-- SMTP_HELO --> - <div class="row form-group"> - <label for="SMTP_HELO" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Sending server name') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="SMTP_HELO" name="SMTP_HELO" value="<?= e(Site::getPreference('SMTP_HELO')) ?>" placeholder="localhost" maxlength="255" pattern="[a-z0-9-]+(\.[a-z0-9-]+)*"> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Sending server name" site configuration setting */ I18N::translate('Many mail servers require that the sending server identifies itself correctly, using a valid domain name.') ?> - </p> - </div> - </div> + <!-- SMTP_HELO --> + <div class="row form-group"> + <label for="SMTP_HELO" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Sending server name') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="SMTP_HELO" name="SMTP_HELO" value="<?= e(Site::getPreference('SMTP_HELO')) ?>" placeholder="localhost" maxlength="255" pattern="[a-z0-9-]+(\.[a-z0-9-]+)*"> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Sending server name" site configuration setting */ I18N::translate('Many mail servers require that the sending server identifies itself correctly, using a valid domain name.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> - <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> - <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> + <?= view('icons/cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/admin/site-preferences.php b/resources/views/admin/site-preferences.php index 24d65377d3..9e185eb6b7 100644 --- a/resources/views/admin/site-preferences.php +++ b/resources/views/admin/site-preferences.php @@ -8,138 +8,138 @@ <h1><?= $title ?></h1> <form method="post" class="form-horizontal"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <!-- INDEX_DIRECTORY --> - <div class="row form-group"> - <label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ - I18N::translate('Data folder') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" dir="ltr" id="INDEX_DIRECTORY" name="INDEX_DIRECTORY" value="<?= e(Site::getPreference('INDEX_DIRECTORY')) ?>" maxlength="255" placeholder="data/" required> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Data folder" site configuration setting */ - I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?> - </p> - <p class="small text-muted"> - <?= /* I18N: “Apache” is a software program. */ - I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?> - </p> - <p class="small text-muted"> - <?= I18N::translate('If you select a different folder, you must also move all files (except config.ini.php, index.php, and .htaccess) from the existing folder to the new folder.') ?> - </p> - <p class="small text-muted"> - <?= I18N::translate('The folder can be specified in full (e.g. /home/user_name/webtrees_data/) or relative to the installation folder (e.g. ../../webtrees_data/).') ?> - </p> - </div> - </div> + <!-- INDEX_DIRECTORY --> + <div class="row form-group"> + <label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ + I18N::translate('Data folder') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" dir="ltr" id="INDEX_DIRECTORY" name="INDEX_DIRECTORY" value="<?= e(Site::getPreference('INDEX_DIRECTORY')) ?>" maxlength="255" placeholder="data/" required> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Data folder" site configuration setting */ + I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?> + </p> + <p class="small text-muted"> + <?= /* I18N: “Apache” is a software program. */ + I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?> + </p> + <p class="small text-muted"> + <?= I18N::translate('If you select a different folder, you must also move all files (except config.ini.php, index.php, and .htaccess) from the existing folder to the new folder.') ?> + </p> + <p class="small text-muted"> + <?= I18N::translate('The folder can be specified in full (e.g. /home/user_name/webtrees_data/) or relative to the installation folder (e.g. ../../webtrees_data/).') ?> + </p> + </div> + </div> - <!-- MEMORY_LIMIT --> - <div class="row form-group"> - <label for="MEMORY_LIMIT" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ - I18N::translate('Memory limit') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="MEMORY_LIMIT" name="MEMORY_LIMIT" value="<?= e(Site::getPreference('MEMORY_LIMIT')) ?>" pattern="[0-9]+[KMG]" placeholder="<?= get_cfg_var('memory_limit') ?>" maxlength="255"> - <p class="small text-muted"> - <?= /* I18N: %s is an amount of memory, such as 32MB */ - I18N::translate('By default, your server allows scripts to use %s of memory.', get_cfg_var('memory_limit')) ?> - <?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?> - <?= I18N::translate('Leave this blank to use the default value.') ?> - </p> - </div> - </div> + <!-- MEMORY_LIMIT --> + <div class="row form-group"> + <label for="MEMORY_LIMIT" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ + I18N::translate('Memory limit') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="MEMORY_LIMIT" name="MEMORY_LIMIT" value="<?= e(Site::getPreference('MEMORY_LIMIT')) ?>" pattern="[0-9]+[KMG]" placeholder="<?= get_cfg_var('memory_limit') ?>" maxlength="255"> + <p class="small text-muted"> + <?= /* I18N: %s is an amount of memory, such as 32MB */ + I18N::translate('By default, your server allows scripts to use %s of memory.', get_cfg_var('memory_limit')) ?> + <?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?> + <?= I18N::translate('Leave this blank to use the default value.') ?> + </p> + </div> + </div> - <!-- MAX_EXECUTION_TIME --> - <div class="row form-group"> - <label for="MAX_EXECUTION_TIME" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ - I18N::translate('PHP time limit') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" id="MAX_EXECUTION_TIME" name="MAX_EXECUTION_TIME" value="<?= e(Site::getPreference('MAX_EXECUTION_TIME')) ?>" pattern="[0-9]*" placeholder="<?= get_cfg_var('max_execution_time') ?>" maxlength="255"> - <p class="small text-muted"> - <?= I18N::plural('By default, your server allows scripts to run for %s second.', 'By default, your server allows scripts to run for %s seconds.', $max_execution_time, I18N::number($max_execution_time)); ?> - <?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?> - <?= I18N::translate('Leave this blank to use the default value.') ?> - </p> - </div> - </div> + <!-- MAX_EXECUTION_TIME --> + <div class="row form-group"> + <label for="MAX_EXECUTION_TIME" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ + I18N::translate('PHP time limit') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="MAX_EXECUTION_TIME" name="MAX_EXECUTION_TIME" value="<?= e(Site::getPreference('MAX_EXECUTION_TIME')) ?>" pattern="[0-9]*" placeholder="<?= get_cfg_var('max_execution_time') ?>" maxlength="255"> + <p class="small text-muted"> + <?= I18N::plural('By default, your server allows scripts to run for %s second.', 'By default, your server allows scripts to run for %s seconds.', $max_execution_time, I18N::number($max_execution_time)); ?> + <?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?> + <?= I18N::translate('Leave this blank to use the default value.') ?> + </p> + </div> + </div> - <!-- TIMEZONE --> - <div class="row form-group"> - <label for="TIMEZONE" class="col-sm-3 col-form-label"> - <?= I18N::translate('Time zone') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select(array_combine(\DateTimeZone::listIdentifiers(), \DateTimeZone::listIdentifiers()), Site::getPreference('TIMEZONE') ?: 'UTC', ['id' => 'TIMEZONE', 'name' => 'TIMEZONE']) ?> - <p class="small text-muted"> - <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> - </p> - </div> - </div> + <!-- TIMEZONE --> + <div class="row form-group"> + <label for="TIMEZONE" class="col-sm-3 col-form-label"> + <?= I18N::translate('Time zone') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select(array_combine(\DateTimeZone::listIdentifiers(), \DateTimeZone::listIdentifiers()), Site::getPreference('TIMEZONE') ?: 'UTC', ['id' => 'TIMEZONE', 'name' => 'TIMEZONE']) ?> + <p class="small text-muted"> + <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> + </p> + </div> + </div> - <!-- THEME_DIR --> - <div class="row form-group"> - <label for="THEME_DIR" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ - I18N::translate('Default theme') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($all_themes, Site::getPreference('THEME_DIR', 'webtrees'), ['id' => 'THEME_DIR', 'name' => 'THEME_DIR']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Default theme" site configuration setting */ - I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> - </p> - <p class="small text-muted"> - <?= I18N::translate('Themes can be selected at three levels: user, family tree, and website. User preferences take priority over family tree preferences, which in turn take priority over the website preferences. Selecting “default theme” at one level will use the theme at the next level.') ?> - </p> - </div> - </div> + <!-- THEME_DIR --> + <div class="row form-group"> + <label for="THEME_DIR" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ + I18N::translate('Default theme') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($all_themes, Site::getPreference('THEME_DIR', 'webtrees'), ['id' => 'THEME_DIR', 'name' => 'THEME_DIR']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Default theme" site configuration setting */ + I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> + </p> + <p class="small text-muted"> + <?= I18N::translate('Themes can be selected at three levels: user, family tree, and website. User preferences take priority over family tree preferences, which in turn take priority over the website preferences. Selecting “default theme” at one level will use the theme at the next level.') ?> + </p> + </div> + </div> - <!-- ALLOW_USER_THEMES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ - I18N::translate('Allow users to select their own theme') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('ALLOW_USER_THEMES', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_USER_THEMES'), true) ?> - </div> - </div> - </fieldset> + <!-- ALLOW_USER_THEMES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ + I18N::translate('Allow users to select their own theme') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('ALLOW_USER_THEMES', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_USER_THEMES'), true) ?> + </div> + </div> + </fieldset> - <!-- ALLOW_CHANGE_GEDCOM --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ - I18N::translate('Show list of family trees') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('ALLOW_CHANGE_GEDCOM', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_CHANGE_GEDCOM'), true) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Show list of family trees” site configuration setting */ - I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?> - </p> - </div> - </div> - </fieldset> + <!-- ALLOW_CHANGE_GEDCOM --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ + I18N::translate('Show list of family trees') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('ALLOW_CHANGE_GEDCOM', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_CHANGE_GEDCOM'), true) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Show list of family trees” site configuration setting */ + I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?> + </p> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> - <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> - <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> + <?= view('icons/cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/admin/site-registration.php b/resources/views/admin/site-registration.php index c115d3251e..72fe596fe9 100644 --- a/resources/views/admin/site-registration.php +++ b/resources/views/admin/site-registration.php @@ -8,75 +8,75 @@ <h1><?= $title ?></h1> <form method="post" class="form-horizontal"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <!-- WELCOME_TEXT_AUTH_MODE --> - <div class="row form-group"> - <label for="WELCOME_TEXT_AUTH_MODE" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Welcome text on sign-in page') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($registration_text_options, Site::getPreference('WELCOME_TEXT_AUTH_MODE'), ['id' => 'WELCOME_TEXT_AUTH_MODE', 'name' => 'WELCOME_TEXT_AUTH_MODE']) ?> - <p class="small text-muted"> - </p> - </div> - </div> + <!-- WELCOME_TEXT_AUTH_MODE --> + <div class="row form-group"> + <label for="WELCOME_TEXT_AUTH_MODE" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Welcome text on sign-in page') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($registration_text_options, Site::getPreference('WELCOME_TEXT_AUTH_MODE'), ['id' => 'WELCOME_TEXT_AUTH_MODE', 'name' => 'WELCOME_TEXT_AUTH_MODE']) ?> + <p class="small text-muted"> + </p> + </div> + </div> - <!-- WELCOME_TEXT_AUTH_MODE_4 --> - <div class="row form-group"> - <label for="WELCOME_TEXT_AUTH_MODE_4" class="col-sm-3 col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Custom welcome text') ?> - </label> - <div class="col-sm-9"> - <textarea class="form-control" maxlength="2000" id="WELCOME_TEXT_AUTH_MODE_4" name="WELCOME_TEXT_AUTH_MODE_4" rows="4"><?= e(Site::getPreference('WELCOME_TEXT_AUTH_MODE_' . WT_LOCALE)) ?></textarea> - <p class="small text-muted"> - <?= /* I18N: Help text for the "Custom welcome text" site configuration setting */ I18N::translate('To set this text for other languages, you must switch to that language, and visit this page again.') ?> - </p> - </div> - </div> + <!-- WELCOME_TEXT_AUTH_MODE_4 --> + <div class="row form-group"> + <label for="WELCOME_TEXT_AUTH_MODE_4" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Custom welcome text') ?> + </label> + <div class="col-sm-9"> + <textarea class="form-control" maxlength="2000" id="WELCOME_TEXT_AUTH_MODE_4" name="WELCOME_TEXT_AUTH_MODE_4" rows="4"><?= e(Site::getPreference('WELCOME_TEXT_AUTH_MODE_' . WT_LOCALE)) ?></textarea> + <p class="small text-muted"> + <?= /* I18N: Help text for the "Custom welcome text" site configuration setting */ I18N::translate('To set this text for other languages, you must switch to that language, and visit this page again.') ?> + </p> + </div> + </div> - <!-- USE_REGISTRATION_MODULE --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Allow visitors to request a new user account') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('USE_REGISTRATION_MODULE', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('USE_REGISTRATION_MODULE'), true) ?> - <p class="small text-muted"> - <?= I18N::translate('The new user will be asked to confirm their email address before the account is created.') ?> - <?= I18N::translate('Details of the new user will be sent to the genealogy contact for the corresponding family tree.') ?> - <?= I18N::translate('An administrator must approve the new user account and select an access level before the user can sign in.') ?> - </p> - </div> - </div> - </fieldset> + <!-- USE_REGISTRATION_MODULE --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Allow visitors to request a new user account') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('USE_REGISTRATION_MODULE', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('USE_REGISTRATION_MODULE'), true) ?> + <p class="small text-muted"> + <?= I18N::translate('The new user will be asked to confirm their email address before the account is created.') ?> + <?= I18N::translate('Details of the new user will be sent to the genealogy contact for the corresponding family tree.') ?> + <?= I18N::translate('An administrator must approve the new user account and select an access level before the user can sign in.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SHOW_REGISTER_CAUTION --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Show acceptable use agreement on “Request a new user account” page') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('SHOW_REGISTER_CAUTION', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('SHOW_REGISTER_CAUTION'), true) ?> - <p class="small text-muted"> - </p> - </div> - </div> - </fieldset> + <!-- SHOW_REGISTER_CAUTION --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Show acceptable use agreement on “Request a new user account” page') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('SHOW_REGISTER_CAUTION', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('SHOW_REGISTER_CAUTION'), true) ?> + <p class="small text-muted"> + </p> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> - <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> - <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary"> + <?= view('icons/cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/admin/trees-check.php b/resources/views/admin/trees-check.php index 75dc6daa4c..82c222cc57 100644 --- a/resources/views/admin/trees-check.php +++ b/resources/views/admin/trees-check.php @@ -5,19 +5,19 @@ <h1><?= $title ?></h1> <ul class="list-group"> - <li class="list-group-item"> - <strong><?= I18N::translate('GEDCOM errors') ?></strong> - </li> + <li class="list-group-item"> + <strong><?= I18N::translate('GEDCOM errors') ?></strong> + </li> - <?php foreach ($errors as $error): ?> - <li class="list-group-item list-group-item-danger"><?= $error ?></li> - <?php endforeach ?> + <?php foreach ($errors as $error) : ?> + <li class="list-group-item list-group-item-danger"><?= $error ?></li> + <?php endforeach ?> - <?php foreach ($warnings as $warning): ?> - <li class="list-group-item list-group-item-warning"><?= $warning ?></li> - <?php endforeach ?> + <?php foreach ($warnings as $warning) : ?> + <li class="list-group-item list-group-item-warning"><?= $warning ?></li> + <?php endforeach ?> - <?php if (empty($errors) && empty($warnings)): ?> - <li class="list-group-item"><?= I18N::translate('No errors have been found.') ?></li> - <?php endif ?> + <?php if (empty($errors) && empty($warnings)) : ?> + <li class="list-group-item"><?= I18N::translate('No errors have been found.') ?></li> + <?php endif ?> </ul> diff --git a/resources/views/admin/trees-duplicates.php b/resources/views/admin/trees-duplicates.php index 1efc67ad8e..55723dc222 100644 --- a/resources/views/admin/trees-duplicates.php +++ b/resources/views/admin/trees-duplicates.php @@ -4,31 +4,30 @@ <h1><?= $title ?></h1> -<?php foreach ($duplicates as $category => $records): ?> +<?php foreach ($duplicates as $category => $records) : ?> + <h2><?= $category ?></h2> - <h2><?= $category ?></h2> - - <?php if (!empty($records)): ?> - <ul> - <?php foreach ($records as $duplicates): ?> - <li> - <?= $duplicates[0]->getFullName() ?> - <?php foreach ($duplicates as $record): ?> - — - <a href="<?= e($record->url()) ?>"> - <?= $record->getXref() ?> - </a> - <?php endforeach ?> - <?php if (count($duplicates) === 2): ?> - — - <a href="<?= e(route('merge-records', ['ged' => $tree->getName(), 'xref1' => $duplicates[0]->getXref(), 'xref2' => $duplicates[1]->getXref()])) ?>"> - <?= I18N::translate('Merge') ?> - </a> - <?php endif ?> - </li> - <?php endforeach ?> - </ul> - <?php else: ?> - <p><?= I18N::translate('No duplicates have been found.') ?></p> - <?php endif ?> + <?php if (!empty($records)) : ?> + <ul> + <?php foreach ($records as $duplicates) : ?> + <li> + <?= $duplicates[0]->getFullName() ?> + <?php foreach ($duplicates as $record) : ?> + — + <a href="<?= e($record->url()) ?>"> + <?= $record->getXref() ?> + </a> + <?php endforeach ?> + <?php if (count($duplicates) === 2) : ?> + — + <a href="<?= e(route('merge-records', ['ged' => $tree->getName(), 'xref1' => $duplicates[0]->getXref(), 'xref2' => $duplicates[1]->getXref()])) ?>"> + <?= I18N::translate('Merge') ?> + </a> + <?php endif ?> + </li> + <?php endforeach ?> + </ul> + <?php else : ?> + <p><?= I18N::translate('No duplicates have been found.') ?></p> + <?php endif ?> <?php endforeach ?> diff --git a/resources/views/admin/trees-export.php b/resources/views/admin/trees-export.php index 0cb57941d2..fb7c822782 100644 --- a/resources/views/admin/trees-export.php +++ b/resources/views/admin/trees-export.php @@ -5,116 +5,116 @@ <h1><?= $title ?></h1> <form class="form form-horizontal" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="row form-group"> - <div for="submit-export" class="col-sm-3 col-form-label"> - <?= I18N::translate('A file on the server') ?> - </div> - <div class="col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div for="submit-export" class="col-sm-3 col-form-label"> + <?= I18N::translate('A file on the server') ?> + </div> + <div class="col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> + </div> + </div> </form> <hr> <form class="form form-horizontal"> - <input type="hidden" name="route" value="admin-trees-download"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="admin-trees-download"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <!-- DOWNLOAD OPTIONS --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Export preferences') ?> - </legend> - <div class="col-sm-9"> - <div class="form-check"> - <label class="form-check-label"> - <input class="form-check-input" type="checkbox" name="zip"> - <?= I18N::translate('Compress the GEDCOM file') ?> - </label> - </div> - <p class="small muted"> - <?= I18N::translate('To reduce the size of the download, you can compress the data into a .ZIP file. You will need to uncompress the .ZIP file before you can use it.') ?> - </p> + <!-- DOWNLOAD OPTIONS --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Export preferences') ?> + </legend> + <div class="col-sm-9"> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" type="checkbox" name="zip"> + <?= I18N::translate('Compress the GEDCOM file') ?> + </label> + </div> + <p class="small muted"> + <?= I18N::translate('To reduce the size of the download, you can compress the data into a .ZIP file. You will need to uncompress the .ZIP file before you can use it.') ?> + </p> - <div class="form-check"> - <label class="form-check-label"> - <input class="form-check-input" type="checkbox" name="media"> - <?= I18N::translate('Include media (automatically zips files)') ?> - </label> - </div> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" type="checkbox" name="media"> + <?= I18N::translate('Include media (automatically zips files)') ?> + </label> + </div> - <?php if ($tree->getPreference('GEDCOM_MEDIA_PATH')): ?> - <label> - <input type="checkbox" name="media-path" value="<?= e($tree->getPreference('GEDCOM_MEDIA_PATH')) ?>"> - <?= /* I18N: A media path (e.g. C:\aaa\bbb\ccc\) in a GEDCOM file */ I18N::translate('Add the GEDCOM media path to filenames') ?> - </label> - <p> - <?= /* I18N: %s is the name of a folder. */ I18N::translate('Media filenames will be prefixed by %s.', '<code dir="ltr">' . e($tree->getPreference('GEDCOM_MEDIA_PATH')) . '</code>') ?> - </p> - <?php endif ?> + <?php if ($tree->getPreference('GEDCOM_MEDIA_PATH')) : ?> + <label> + <input type="checkbox" name="media-path" value="<?= e($tree->getPreference('GEDCOM_MEDIA_PATH')) ?>"> + <?= /* I18N: A media path (e.g. C:\aaa\bbb\ccc\) in a GEDCOM file */ I18N::translate('Add the GEDCOM media path to filenames') ?> + </label> + <p> + <?= /* I18N: %s is the name of a folder. */ I18N::translate('Media filenames will be prefixed by %s.', '<code dir="ltr">' . e($tree->getPreference('GEDCOM_MEDIA_PATH')) . '</code>') ?> + </p> + <?php endif ?> - <div class="form-check"> - <label class="form-check-label"> - <input class="form-check-input" type="checkbox" name="convert"> - <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?> - </label> - </div> - <p class="small muted"> - <?= I18N::translate('webtrees uses UTF-8 encoding for accented letters, special characters and non-Latin scripts. If you want to use this GEDCOM file with genealogy software that does not support UTF-8, then you can create it using ISO-8859-1 encoding.') ?> - </p> - </div> - </div> - </fieldset> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" type="checkbox" name="convert"> + <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?> + </label> + </div> + <p class="small muted"> + <?= I18N::translate('webtrees uses UTF-8 encoding for accented letters, special characters and non-Latin scripts. If you want to use this GEDCOM file with genealogy software that does not support UTF-8, then you can create it using ISO-8859-1 encoding.') ?> + </p> + </div> + </div> + </fieldset> - <!-- PRIVACY OPTIONS --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Apply privacy settings') ?> - </legend> - <div class="col-sm-9"> - <div class="form-check form-check-inline"> - <label> - <input type="radio" name="privatize_export" value="none" checked> - <?= I18N::translate('None') ?> - </label> - </div> - <div class="form-check form-check-inline"> - <label> - <input type="radio" name="privatize_export" value="gedadmin"> - <?= I18N::translate('Manager') ?> - </label> - </div> - <div class="form-check form-check-inline"> - <label> - <input type="radio" name="privatize_export" value="user"> - <?= I18N::translate('Member') ?> - </label> - </div> - <div class="form-check form-check-inline"> - <label> - <input type="radio" name="privatize_export" value="visitor"> - <?= I18N::translate('Visitor') ?> - </label> - </div> - </div> - </div> - </fieldset> + <!-- PRIVACY OPTIONS --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Apply privacy settings') ?> + </legend> + <div class="col-sm-9"> + <div class="form-check form-check-inline"> + <label> + <input type="radio" name="privatize_export" value="none" checked> + <?= I18N::translate('None') ?> + </label> + </div> + <div class="form-check form-check-inline"> + <label> + <input type="radio" name="privatize_export" value="gedadmin"> + <?= I18N::translate('Manager') ?> + </label> + </div> + <div class="form-check form-check-inline"> + <label> + <input type="radio" name="privatize_export" value="user"> + <?= I18N::translate('Member') ?> + </label> + </div> + <div class="form-check form-check-inline"> + <label> + <input type="radio" name="privatize_export" value="visitor"> + <?= I18N::translate('Visitor') ?> + </label> + </div> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-sm-3 col-form-label"> - <?= I18N::translate('A file on your computer') ?> - </div> - <div class="col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label"> + <?= I18N::translate('A file on your computer') ?> + </div> + <div class="col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/admin/trees-import.php b/resources/views/admin/trees-import.php index 73d56a51fb..47ae3113fa 100644 --- a/resources/views/admin/trees-import.php +++ b/resources/views/admin/trees-import.php @@ -6,112 +6,112 @@ <h1><?= $title ?></h1> <div class="alert alert-warning"> - <?= /* I18N: %s is the name of a family tree */ I18N::translate('This will delete all the genealogy data from “%s” and replace it with data from a GEDCOM file.', e($tree->getTitle())) ?> + <?= /* I18N: %s is the name of a family tree */ I18N::translate('This will delete all the genealogy data from “%s” and replace it with data from a GEDCOM file.', e($tree->getTitle())) ?> </div> <form class="form form-horizontal" method="post" enctype="multipart/form-data" onsubmit="return checkGedcomImportForm('<?= e(I18N::translate('You have selected a GEDCOM file with a different name. Is this correct?')) ?>');"> - <input type="hidden" name="ged" value="<?= $tree->getName() ?>"> - <input type="hidden" id="gedcom_filename" value="<?= e($default_gedcom_file) ?>"> - <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= $tree->getName() ?>"> + <input type="hidden" id="gedcom_filename" value="<?= e($default_gedcom_file) ?>"> + <?= csrf_field() ?> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Select a GEDCOM file to import') ?> - </legend> - <div class="col-sm-9"> - <div class="row form-group"> - <label class="col-sm-3"> - <input type="radio" name="source" id="import-computer" value="client" checked> - <?= I18N::translate('A file on your computer') ?> - </label> - <div class="col-sm-9"> - <div class="btn btn-default"> - <input type="file" class="form-control-file" name="tree_name" id="import-computer-file"> - </div> - </div> - </div> - <div class="row"> - <label class="col-sm-3"> - <input type="radio" name="source" id="import-server" value="server"> - <?= I18N::translate('A file on the server') ?> - </label> - <div class="col-sm-9"> - <div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text"> - <?= WT_DATA_DIR ?> - </span> - </div> - <select name="tree_name" class="form-control" id="import-server-file"> - <option value=""></option> - <?php foreach ($gedcom_files as $gedcom_file): ?> - <option value="<?= e($gedcom_file) ?>" <?= $gedcom_file === $default_gedcom_file ? 'selected' : '' ?>> - <?= e($gedcom_file) ?> - </option> - <?php endforeach ?> - <?php if (empty($gedcom_files)): ?> - <option disabled selected> - <?= I18N::translate('No GEDCOM files found.') ?> - </option> - <?php endif ?> - </select> - </div> - </div> - </div> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Select a GEDCOM file to import') ?> + </legend> + <div class="col-sm-9"> + <div class="row form-group"> + <label class="col-sm-3"> + <input type="radio" name="source" id="import-computer" value="client" checked> + <?= I18N::translate('A file on your computer') ?> + </label> + <div class="col-sm-9"> + <div class="btn btn-default"> + <input type="file" class="form-control-file" name="tree_name" id="import-computer-file"> + </div> + </div> + </div> + <div class="row"> + <label class="col-sm-3"> + <input type="radio" name="source" id="import-server" value="server"> + <?= I18N::translate('A file on the server') ?> + </label> + <div class="col-sm-9"> + <div class="input-group"> + <div class="input-group-prepend"> + <span class="input-group-text"> + <?= WT_DATA_DIR ?> + </span> + </div> + <select name="tree_name" class="form-control" id="import-server-file"> + <option value=""></option> + <?php foreach ($gedcom_files as $gedcom_file) : ?> + <option value="<?= e($gedcom_file) ?>" <?= $gedcom_file === $default_gedcom_file ? 'selected' : '' ?>> + <?= e($gedcom_file) ?> + </option> + <?php endforeach ?> + <?php if (empty($gedcom_files)) : ?> + <option disabled selected> + <?= I18N::translate('No GEDCOM files found.') ?> + </option> + <?php endif ?> + </select> + </div> + </div> + </div> + </div> + </div> + </fieldset> - <hr> + <hr> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Import preferences') ?> - </legend> - <div class="col-sm-9"> - <label> - <input type="checkbox" name="keep_media" value="1" <?= $tree->getPreference('keep_media') ? 'checked' : '' ?>> - <?= /* I18N: A configuration setting */ I18N::translate('Keep media objects') ?> - </label> - <p class="small text-muted"> - <?= I18N::translate('If you have created media objects in webtrees, and have subsequently edited this GEDCOM file using genealogy software that deletes media objects, then select this option to merge the current media objects with the new GEDCOM file.') ?> - </p> - <label> - <input type="checkbox" name="WORD_WRAPPED_NOTES" value="1" <?= $tree->getPreference('WORD_WRAPPED_NOTES') ? 'checked' : '' ?>> - <?= I18N::translate('Add spaces where long lines were wrapped') ?> - </label> - <p class="small text-muted"> - <?= I18N::translate('If you created this GEDCOM file using genealogy software that omits spaces when splitting long lines, then select this option to reinsert the missing spaces.') ?> - </p> - <label for="GEDCOM_MEDIA_PATH"> - <?= /* I18N: A media path (e.g. c:\aaa\bbb\ccc\ddd.jpeg) in a GEDCOM file */ I18N::translate('Remove the GEDCOM media path from filenames') ?> - </label> - <input - class="form-control" - dir="ltr" - id="GEDCOM_MEDIA_PATH" - maxlength="255" - name="GEDCOM_MEDIA_PATH" - type="text" - value="<?= e($gedcom_media_path) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “GEDCOM media path” configuration setting. A “path” is something like “C:\Documents\Genealogy\Photos\John_Smith.jpeg” */ I18N::translate('Some genealogy software creates GEDCOM files that contain media filenames with full paths. These paths will not exist on the web-server. To allow webtrees to find the file, the first part of the path must be removed.') ?> - <?= /* I18N: Help text for the “GEDCOM media path” configuration setting. %s are all folder names */ I18N::translate('For example, if the GEDCOM file contains %1$s and webtrees expects to find %2$s in the media folder, then you would need to remove %3$s.', '<code>C:\\Documents\\family\\photo.jpeg</code>', '<code>family\\photo.jpeg</code>', '<code>C:\\Documents\\</code>') ?> - </p> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Import preferences') ?> + </legend> + <div class="col-sm-9"> + <label> + <input type="checkbox" name="keep_media" value="1" <?= $tree->getPreference('keep_media') ? 'checked' : '' ?>> + <?= /* I18N: A configuration setting */ I18N::translate('Keep media objects') ?> + </label> + <p class="small text-muted"> + <?= I18N::translate('If you have created media objects in webtrees, and have subsequently edited this GEDCOM file using genealogy software that deletes media objects, then select this option to merge the current media objects with the new GEDCOM file.') ?> + </p> + <label> + <input type="checkbox" name="WORD_WRAPPED_NOTES" value="1" <?= $tree->getPreference('WORD_WRAPPED_NOTES') ? 'checked' : '' ?>> + <?= I18N::translate('Add spaces where long lines were wrapped') ?> + </label> + <p class="small text-muted"> + <?= I18N::translate('If you created this GEDCOM file using genealogy software that omits spaces when splitting long lines, then select this option to reinsert the missing spaces.') ?> + </p> + <label for="GEDCOM_MEDIA_PATH"> + <?= /* I18N: A media path (e.g. c:\aaa\bbb\ccc\ddd.jpeg) in a GEDCOM file */ I18N::translate('Remove the GEDCOM media path from filenames') ?> + </label> + <input + class="form-control" + dir="ltr" + id="GEDCOM_MEDIA_PATH" + maxlength="255" + name="GEDCOM_MEDIA_PATH" + type="text" + value="<?= e($gedcom_media_path) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “GEDCOM media path” configuration setting. A “path” is something like “C:\Documents\Genealogy\Photos\John_Smith.jpeg” */ I18N::translate('Some genealogy software creates GEDCOM files that contain media filenames with full paths. These paths will not exist on the web-server. To allow webtrees to find the file, the first part of the path must be removed.') ?> + <?= /* I18N: Help text for the “GEDCOM media path” configuration setting. %s are all folder names */ I18N::translate('For example, if the GEDCOM file contains %1$s and webtrees expects to find %2$s in the media folder, then you would need to remove %3$s.', '<code>C:\\Documents\\family\\photo.jpeg</code>', '<code>family\\photo.jpeg</code>', '<code>C:\\Documents\\</code>') ?> + </p> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> + </div> + </div> </form> <?php View::push('javascript') ?> diff --git a/resources/views/admin/trees-merge.php b/resources/views/admin/trees-merge.php index 4f3eba8e0d..4ad15c3435 100644 --- a/resources/views/admin/trees-merge.php +++ b/resources/views/admin/trees-merge.php @@ -5,40 +5,40 @@ <h1><?= $title ?></h1> -<?php if (!empty($xrefs)): ?> - <p> - <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?> - </p> - <p> - <?= I18N::plural(/* I18N: An XREF is the identification number used in GEDCOM files. */ 'The two family trees have %1$s record which uses the same “XREF”.', 'The two family trees have %1$s records which use the same “XREF”.', count($xrefs), count($xrefs)) ?> - </p> - <p> - <?= I18N::translate('You must renumber the records in one of the trees before you can merge them.') ?> - </p> - <p> - <a class="current" href="<?= e(route('admin-trees-renumber', ['ged' => $tree1->getName()])) ?>"> - <?= I18N::translate('Renumber family tree') ?> — <?= e($tree1->getTitle()) ?> - </a> - </p> - <p> - <a class="current" href="<?= e(route('admin-trees-renumber', ['ged' => $tree2->getName()])) ?>"> - <?= I18N::translate('Renumber family tree') ?> — <?= e($tree2->getTitle()) ?> - </a> - </p> +<?php if (!empty($xrefs)) : ?> + <p> + <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?> + </p> + <p> + <?= I18N::plural(/* I18N: An XREF is the identification number used in GEDCOM files. */ 'The two family trees have %1$s record which uses the same “XREF”.', 'The two family trees have %1$s records which use the same “XREF”.', count($xrefs), count($xrefs)) ?> + </p> + <p> + <?= I18N::translate('You must renumber the records in one of the trees before you can merge them.') ?> + </p> + <p> + <a class="current" href="<?= e(route('admin-trees-renumber', ['ged' => $tree1->getName()])) ?>"> + <?= I18N::translate('Renumber family tree') ?> — <?= e($tree1->getTitle()) ?> + </a> + </p> + <p> + <a class="current" href="<?= e(route('admin-trees-renumber', ['ged' => $tree2->getName()])) ?>"> + <?= I18N::translate('Renumber family tree') ?> — <?= e($tree2->getTitle()) ?> + </a> + </p> <?php endif ?> <form action="<?= e(route('admin-trees-merge')) ?>" method="post"> - <?= csrf_field() ?> - <p class="form-inline"> - <?= I18N::translate(/* I18N: Copy all the records from [family tree 1] into [family tree 2] */ - 'Copy all the records from %1$s into %2$s.', - Bootstrap4::select($tree_list, $tree1 ? $tree1->getName() : '', ['name' => 'tree1_name']), - Bootstrap4::select($tree_list, $tree2 ? $tree2->getName() : '', ['name' => 'tree2_name']) - ) ?> - </p> + <?= csrf_field() ?> + <p class="form-inline"> + <?= I18N::translate(/* I18N: Copy all the records from [family tree 1] into [family tree 2] */ + 'Copy all the records from %1$s into %2$s.', + Bootstrap4::select($tree_list, $tree1 ? $tree1->getName() : '', ['name' => 'tree1_name']), + Bootstrap4::select($tree_list, $tree2 ? $tree2->getName() : '', ['name' => 'tree2_name']) + ) ?> + </p> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('continue') ?> - </button> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('continue') ?> + </button> </form> diff --git a/resources/views/admin/trees-places.php b/resources/views/admin/trees-places.php index 81b5365d8a..cc1d6a07e8 100644 --- a/resources/views/admin/trees-places.php +++ b/resources/views/admin/trees-places.php @@ -5,54 +5,54 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('This will update the highest-level part or parts of the place name. For example, “Mexico” will match “Quintana Roo, Mexico”, but not “Santa Fe, New Mexico”.') ?> + <?= I18N::translate('This will update the highest-level part or parts of the place name. For example, “Mexico” will match “Quintana Roo, Mexico”, but not “Santa Fe, New Mexico”.') ?> </p> <form> - <input type="hidden" name="route" value="admin-trees-places"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="admin-trees-places"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <dl> - <dt> - <label for="search"><?= I18N::translate('Search for') ?></label> - </dt> - <dd> - <input name="search" id="search" type="text" size="60" value="<?= e($search) ?>" data-autocomplete-type="PLAC" required autofocus> - </dd> - <dt> - <label for="replace"><?= I18N::translate('Replace with') ?></label> - </dt> - <dd> - <input name="replace" id="replace" type="text" size="60" value="<?= e($replace) ?>" data-autocomplete-type="PLAC" required> - </dd> - </dl> + <dl> + <dt> + <label for="search"><?= I18N::translate('Search for') ?></label> + </dt> + <dd> + <input name="search" id="search" type="text" size="60" value="<?= e($search) ?>" data-autocomplete-type="PLAC" required autofocus> + </dd> + <dt> + <label for="replace"><?= I18N::translate('Replace with') ?></label> + </dt> + <dd> + <input name="replace" id="replace" type="text" size="60" value="<?= e($replace) ?>" data-autocomplete-type="PLAC" required> + </dd> + </dl> - <button class="btn btn-primary" type="submit" value="preview"><?= /* I18N: A button label. */ - I18N::translate('preview') ?></button> + <button class="btn btn-primary" type="submit" value="preview"><?= /* I18N: A button label. */ + I18N::translate('preview') ?></button> </form> -<?php if ($search && $replace): ?> - <?php if (empty($changes)): ?> - <p> - <?= I18N::translate('No places have been found.') ?> - </p> - <?php else: ?> - <p> - <?= I18N::translate('The following places would be changed:') ?> - </p> +<?php if ($search && $replace) : ?> + <?php if (empty($changes)) : ?> + <p> + <?= I18N::translate('No places have been found.') ?> + </p> + <?php else : ?> + <p> + <?= I18N::translate('The following places would be changed:') ?> + </p> - <ul> - <?php foreach ($changes as $old_place => $new_place) { ?> - <li> - <?= e($old_place) ?> → <?= e($new_place) ?> - </li> - <?php } ?> - </ul> + <ul> + <?php foreach ($changes as $old_place => $new_place) { ?> + <li> + <?= e($old_place) ?> → <?= e($new_place) ?> + </li> + <?php } ?> + </ul> - <form method="post" action="<?= e(route('admin-trees-places', ['ged' => $tree->getName(), 'search' => $search, 'replace' => $replace])) ?>"> - <?= csrf_field() ?> - <button class="btn btn-primary" type="submit" value="update" name="confirm"><?= /* I18N: A button label. */ - I18N::translate('update') ?></button> - </form> - <?php endif ?> + <form method="post" action="<?= e(route('admin-trees-places', ['ged' => $tree->getName(), 'search' => $search, 'replace' => $replace])) ?>"> + <?= csrf_field() ?> + <button class="btn btn-primary" type="submit" value="update" name="confirm"><?= /* I18N: A button label. */ + I18N::translate('update') ?></button> + </form> + <?php endif ?> <?php endif ?> diff --git a/resources/views/admin/trees-preferences.php b/resources/views/admin/trees-preferences.php index f235bdad83..3552fc7fb5 100644 --- a/resources/views/admin/trees-preferences.php +++ b/resources/views/admin/trees-preferences.php @@ -7,1154 +7,1154 @@ <h1><?= $title ?></h1> <form class="form-horizontal" method="post"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="action" value="general"> + <input type="hidden" name="action" value="general"> - <h3><?= I18N::translate('General') ?></h3> + <h3><?= I18N::translate('General') ?></h3> - <!-- TREE TITLE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="title"> - <?= I18N::translate('Family tree title') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - dir="auto" - id="title" - maxlength="255" - name="title" - required - type="text" - value="<?= e($tree->getPreference('title')) ?>" - > - </div> - </div> + <!-- TREE TITLE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="title"> + <?= I18N::translate('Family tree title') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + dir="auto" + id="title" + maxlength="255" + name="title" + required + type="text" + value="<?= e($tree->getPreference('title')) ?>" + > + </div> + </div> - <!-- TREE URL / FILENAME --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="gedcom"> - <?= I18N::translate('URL') ?> - </label> - <div class="col-sm-9"> - <div class="input-group" dir="ltr"> - <div class="input-group-append"> - <span class="input-group-text"> - <?= WT_BASE_URL ?>?ged= - </span> - </div> - <input - class="form-control" - id="gedcom" - maxlength="255" - name="gedcom" - required - type="text" - value="<?= e($tree->getName()) ?>" - > - </div> - <p class="small text-muted"> - <?= /* I18N: help text for family tree / GEDCOM file names */ I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?> - </p> - </div> - </div> + <!-- TREE URL / FILENAME --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="gedcom"> + <?= I18N::translate('URL') ?> + </label> + <div class="col-sm-9"> + <div class="input-group" dir="ltr"> + <div class="input-group-append"> + <span class="input-group-text"> + <?= WT_BASE_URL ?>?ged= + </span> + </div> + <input + class="form-control" + id="gedcom" + maxlength="255" + name="gedcom" + required + type="text" + value="<?= e($tree->getName()) ?>" + > + </div> + <p class="small text-muted"> + <?= /* I18N: help text for family tree / GEDCOM file names */ I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?> + </p> + </div> + </div> - <!-- LANGUAGE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="LANGUAGE"> - <?= /* I18N: A configuration setting */ I18N::translate('Language') ?> - </label> - <div class="col-sm-9"> - <select id="LANGUAGE" name="LANGUAGE" class="form-control"> - <?php foreach (I18N::activeLocales() as $active_locale): ?> - <option value="<?= $active_locale->languageTag() ?>" <?= $tree->getPreference('LANGUAGE') === $active_locale->languageTag() ? 'selected' : '' ?>> - <?= $active_locale->endonym() ?> - </option> - <?php endforeach ?> - </select> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Language” configuration setting */ I18N::translate('If a visitor to the website has not selected a preferred language in their browser preferences, or they have selected an unsupported language, then this language will be used. Typically this applies to search engines.') ?> - </p> - </div> - </div> + <!-- LANGUAGE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="LANGUAGE"> + <?= /* I18N: A configuration setting */ I18N::translate('Language') ?> + </label> + <div class="col-sm-9"> + <select id="LANGUAGE" name="LANGUAGE" class="form-control"> + <?php foreach (I18N::activeLocales() as $active_locale) : ?> + <option value="<?= $active_locale->languageTag() ?>" <?= $tree->getPreference('LANGUAGE') === $active_locale->languageTag() ? 'selected' : '' ?>> + <?= $active_locale->endonym() ?> + </option> + <?php endforeach ?> + </select> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Language” configuration setting */ I18N::translate('If a visitor to the website has not selected a preferred language in their browser preferences, or they have selected an unsupported language, then this language will be used. Typically this applies to search engines.') ?> + </p> + </div> + </div> - <!-- PEDIGREE_ROOT_ID --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="PEDIGREE_ROOT_ID"> - <?= /* I18N: A configuration setting */ I18N::translate('Default individual') ?> - </label> - <div class="col-sm-9"> - <?= FunctionsEdit::formControlIndividual($tree, $pedigree_individual, ['id' => 'PEDIGREE_ROOT_ID', 'name' => 'PEDIGREE_ROOT_ID']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Default individual” configuration setting */ I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> - </p> - </div> - </div> + <!-- PEDIGREE_ROOT_ID --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="PEDIGREE_ROOT_ID"> + <?= /* I18N: A configuration setting */ I18N::translate('Default individual') ?> + </label> + <div class="col-sm-9"> + <?= FunctionsEdit::formControlIndividual($tree, $pedigree_individual, ['id' => 'PEDIGREE_ROOT_ID', 'name' => 'PEDIGREE_ROOT_ID']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Default individual” configuration setting */ I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> + </p> + </div> + </div> - <!-- CALENDAR_FORMAT --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> - <label class="sr-only" for="CALENDAR_FORMAT0"> - <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 1 - </label> - <label class="sr-only" for="CALENDAR_FORMAT1"> - <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 2 - </label> - </legend> - <div class="col-sm-9"> - <div class=row"> - <div class="col-sm-6" style="padding-left: 0;"> - <?= Bootstrap4::select(FunctionsEdit::optionsCalendarConversions(), $calendar_formats[0], ['name' => 'CALENDAR_FORMAT0']) ?> - </div> - <div class="col-sm-6" style="padding-right: 0;"> - <?= Bootstrap4::select(FunctionsEdit::optionsCalendarConversions(), $calendar_formats[1], ['name' => 'CALENDAR_FORMAT1']) ?> - </div> - </div> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Different calendar systems are used in different parts of the world, and many other calendar systems have been used in the past. Where possible, you should enter dates using the calendar in which the event was originally recorded. You can then specify a conversion, to show these dates in a more familiar calendar. If you regularly use two calendars, you can specify two conversions and dates will be converted to both the selected calendars.') ?> - </p> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Dates are only converted if they are valid for the calendar. For example, only dates between %1$s and %2$s will be converted to the French calendar and only dates after %3$s will be converted to the Gregorian calendar.', $french_calendar_start->display(false, null, false), $french_calendar_end->display(false, null, false), $gregorian_calendar_start->display(false, null, false)) ?> - </p> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('In some calendars, days start at midnight. In other calendars, days start at sunset. The conversion process does not take account of the time, so for any event that occurs between sunset and midnight, the conversion between these types of calendar will be one day out.') ?> - </p> - </div> - </div> - </fieldset> + <!-- CALENDAR_FORMAT --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> + <label class="sr-only" for="CALENDAR_FORMAT0"> + <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 1 + </label> + <label class="sr-only" for="CALENDAR_FORMAT1"> + <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 2 + </label> + </legend> + <div class="col-sm-9"> + <div class=row"> + <div class="col-sm-6" style="padding-left: 0;"> + <?= Bootstrap4::select(FunctionsEdit::optionsCalendarConversions(), $calendar_formats[0], ['name' => 'CALENDAR_FORMAT0']) ?> + </div> + <div class="col-sm-6" style="padding-right: 0;"> + <?= Bootstrap4::select(FunctionsEdit::optionsCalendarConversions(), $calendar_formats[1], ['name' => 'CALENDAR_FORMAT1']) ?> + </div> + </div> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Different calendar systems are used in different parts of the world, and many other calendar systems have been used in the past. Where possible, you should enter dates using the calendar in which the event was originally recorded. You can then specify a conversion, to show these dates in a more familiar calendar. If you regularly use two calendars, you can specify two conversions and dates will be converted to both the selected calendars.') ?> + </p> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Dates are only converted if they are valid for the calendar. For example, only dates between %1$s and %2$s will be converted to the French calendar and only dates after %3$s will be converted to the Gregorian calendar.', $french_calendar_start->display(false, null, false), $french_calendar_end->display(false, null, false), $gregorian_calendar_start->display(false, null, false)) ?> + </p> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('In some calendars, days start at midnight. In other calendars, days start at sunset. The conversion process does not take account of the time, so for any event that occurs between sunset and midnight, the conversion between these types of calendar will be one day out.') ?> + </p> + </div> + </div> + </fieldset> - <!-- GENERATE_UIDS --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Add unique identifiers') ?> - </legend> - <div class="col-sm-9"> - <?= view('components/radios-no-yes', ['name' => 'GENERATE_UIDS', 'value' => $tree->getPreference('GENERATE_UIDS')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Add unique identifiers” configuration setting */ I18N::translate('Unique identifiers allow the same record to be found in different family trees and in different systems. They will be added whenever records are created or updated. If you do not want unique identifiers to be displayed, you can hide them using the privacy rules.') ?> - </p> - </div> - </div> - </fieldset> + <!-- GENERATE_UIDS --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Add unique identifiers') ?> + </legend> + <div class="col-sm-9"> + <?= view('components/radios-no-yes', ['name' => 'GENERATE_UIDS', 'value' => $tree->getPreference('GENERATE_UIDS')]) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Add unique identifiers” configuration setting */ I18N::translate('Unique identifiers allow the same record to be found in different family trees and in different systems. They will be added whenever records are created or updated. If you do not want unique identifiers to be displayed, you can hide them using the privacy rules.') ?> + </p> + </div> + </div> + </fieldset> - <h3><?= I18N::translate('Contact information') ?></h3> + <h3><?= I18N::translate('Contact information') ?></h3> - <!-- WEBTREES_EMAIL --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="WEBTREES_EMAIL"> - <?= /* I18N: A configuration setting */ I18N::translate('webtrees reply address') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="WEBTREES_EMAIL" - maxlength="255" - name="WEBTREES_EMAIL" - required - type="email" - value="<?= e($tree->getPreference('WEBTREES_EMAIL')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “webtrees reply address” configuration setting */ I18N::translate('Email address to be used in the “From:” field of emails that webtrees creates automatically.<br><br>webtrees can automatically create emails to notify administrators of changes that need to be reviewed. webtrees also sends notification emails to users who have requested an account.<br><br>Usually, the “From:” field of these automatically created emails is something like <i>From: webtrees-noreply@yoursite</i> to show that no response to the email is required. To guard against spam or other email abuse, some email systems require each message’s “From:” field to reflect a valid email account and will not accept messages that are apparently from account <i>webtrees-noreply</i>.') ?> - </p> - </div> - </div> + <!-- WEBTREES_EMAIL --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="WEBTREES_EMAIL"> + <?= /* I18N: A configuration setting */ I18N::translate('webtrees reply address') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="WEBTREES_EMAIL" + maxlength="255" + name="WEBTREES_EMAIL" + required + type="email" + value="<?= e($tree->getPreference('WEBTREES_EMAIL')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “webtrees reply address” configuration setting */ I18N::translate('Email address to be used in the “From:” field of emails that webtrees creates automatically.<br><br>webtrees can automatically create emails to notify administrators of changes that need to be reviewed. webtrees also sends notification emails to users who have requested an account.<br><br>Usually, the “From:” field of these automatically created emails is something like <i>From: webtrees-noreply@yoursite</i> to show that no response to the email is required. To guard against spam or other email abuse, some email systems require each message’s “From:” field to reflect a valid email account and will not accept messages that are apparently from account <i>webtrees-noreply</i>.') ?> + </p> + </div> + </div> - <!-- CONTACT_USER_ID --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="CONTACT_USER_ID"> - <?= /* I18N: A configuration setting */ I18N::translate('Genealogy contact') ?> - </label> - <div class="col-sm-9"> - <select id="CONTACT_USER_ID" name="CONTACT_USER_ID" class="form-control"> - <option value=""></option> - <?php foreach ($members as $member): ?> - <option value="<?= $member->getUserId() ?>" <?= $tree->getPreference('CONTACT_USER_ID') === $member->getUserId() ? 'selected' : '' ?>> - <?= e($member->getRealName()) ?> - <?= e($member->getUserName()) ?> - </option> - <?php endforeach ?> - </select> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Genealogy contact” configuration setting */ I18N::translate('The individual to contact about the genealogy data on this website.') ?> - </p> - </div> - </div> + <!-- CONTACT_USER_ID --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="CONTACT_USER_ID"> + <?= /* I18N: A configuration setting */ I18N::translate('Genealogy contact') ?> + </label> + <div class="col-sm-9"> + <select id="CONTACT_USER_ID" name="CONTACT_USER_ID" class="form-control"> + <option value=""></option> + <?php foreach ($members as $member) : ?> + <option value="<?= $member->getUserId() ?>" <?= $tree->getPreference('CONTACT_USER_ID') === $member->getUserId() ? 'selected' : '' ?>> + <?= e($member->getRealName()) ?> - <?= e($member->getUserName()) ?> + </option> + <?php endforeach ?> + </select> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Genealogy contact” configuration setting */ I18N::translate('The individual to contact about the genealogy data on this website.') ?> + </p> + </div> + </div> - <!-- WEBMASTER_USER_ID --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="WEBMASTER_USER_ID"> - <?= /* I18N: A configuration setting */ I18N::translate('Technical help contact') ?> - </label> - <div class="col-sm-9"> - <select id="WEBMASTER_USER_ID" name="WEBMASTER_USER_ID" class="form-control"> - <option value=""></option> - <?php foreach ($members as $member): ?> - <option value="<?= $member->getUserId() ?>" <?= $tree->getPreference('WEBMASTER_USER_ID') === $member->getUserId() ? 'selected' : '' ?>> - <?= e($member->getRealName()) ?> - <?= e($member->getUserName()) ?> - </option> - <?php endforeach ?> - </select> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Technical help contact” configuration setting */ I18N::translate('The individual to be contacted about technical questions or errors encountered on your website.') ?> - </p> - </div> - </div> + <!-- WEBMASTER_USER_ID --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="WEBMASTER_USER_ID"> + <?= /* I18N: A configuration setting */ I18N::translate('Technical help contact') ?> + </label> + <div class="col-sm-9"> + <select id="WEBMASTER_USER_ID" name="WEBMASTER_USER_ID" class="form-control"> + <option value=""></option> + <?php foreach ($members as $member) : ?> + <option value="<?= $member->getUserId() ?>" <?= $tree->getPreference('WEBMASTER_USER_ID') === $member->getUserId() ? 'selected' : '' ?>> + <?= e($member->getRealName()) ?> - <?= e($member->getUserName()) ?> + </option> + <?php endforeach ?> + </select> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Technical help contact” configuration setting */ I18N::translate('The individual to be contacted about technical questions or errors encountered on your website.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Website') ?></h3> + <h3><?= I18N::translate('Website') ?></h3> - <!-- META_TITLE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="META_TITLE"> - <?= /* I18N: A configuration setting */ I18N::translate('Add to TITLE header tag') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="META_TITLE" - maxlength="255" - name="META_TITLE" - type="text" - value="<?= e($tree->getPreference('META_TITLE')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Add to TITLE header tag” configuration setting */ I18N::translate('This text will be appended to each page title. It will be shown in the browser’s title bar, bookmarks, etc.') ?> - </p> - </div> - </div> + <!-- META_TITLE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="META_TITLE"> + <?= /* I18N: A configuration setting */ I18N::translate('Add to TITLE header tag') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="META_TITLE" + maxlength="255" + name="META_TITLE" + type="text" + value="<?= e($tree->getPreference('META_TITLE')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Add to TITLE header tag” configuration setting */ I18N::translate('This text will be appended to each page title. It will be shown in the browser’s title bar, bookmarks, etc.') ?> + </p> + </div> + </div> - <!-- META_DESCRIPTION --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="META_DESCRIPTION"> - <?= /* I18N: A configuration setting */ I18N::translate('Description META tag') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="META_DESCRIPTION" - maxlength="255" - name="META_DESCRIPTION" - type="text" - value="<?= e($tree->getPreference('META_DESCRIPTION')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Description META tag” configuration setting */ I18N::translate('The value to place in the “meta description” tag in the HTML page header. Leave this field empty to use the name of the family tree.') ?> - </p> - </div> - </div> + <!-- META_DESCRIPTION --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="META_DESCRIPTION"> + <?= /* I18N: A configuration setting */ I18N::translate('Description META tag') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="META_DESCRIPTION" + maxlength="255" + name="META_DESCRIPTION" + type="text" + value="<?= e($tree->getPreference('META_DESCRIPTION')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Description META tag” configuration setting */ I18N::translate('The value to place in the “meta description” tag in the HTML page header. Leave this field empty to use the name of the family tree.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('User preferences') ?></h3> - <!-- ALLOW_THEME_DROPDOWN --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Theme menu') ?> - </legend> - <div class="col-sm-9"> - <?= view('components/radios-hide-show', ['name' => 'ALLOW_THEME_DROPDOWN', 'value' => $tree->getPreference('ALLOW_THEME_DROPDOWN')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Theme dropdown selector for theme changes” configuration setting */ I18N::translate('The theme menu will only be shown if the website preferences allow users to select their own theme.') ?> - </p> - </div> - </div> - </fieldset> + <h3><?= I18N::translate('User preferences') ?></h3> + <!-- ALLOW_THEME_DROPDOWN --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Theme menu') ?> + </legend> + <div class="col-sm-9"> + <?= view('components/radios-hide-show', ['name' => 'ALLOW_THEME_DROPDOWN', 'value' => $tree->getPreference('ALLOW_THEME_DROPDOWN')]) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Theme dropdown selector for theme changes” configuration setting */ I18N::translate('The theme menu will only be shown if the website preferences allow users to select their own theme.') ?> + </p> + </div> + </div> + </fieldset> - <!-- THEME_DIR --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="THEME_DIR"> - <?= /* I18N: A configuration setting */ I18N::translate('Default theme') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($theme_options, $tree->getPreference('THEME_DIR'), ['id' => 'THEME_DIR', 'name' => 'THEME_DIR']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Default theme” configuration setting */ I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> - </p> - </div> - </div> + <!-- THEME_DIR --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="THEME_DIR"> + <?= /* I18N: A configuration setting */ I18N::translate('Default theme') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($theme_options, $tree->getPreference('THEME_DIR'), ['id' => 'THEME_DIR', 'name' => 'THEME_DIR']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Default theme” configuration setting */ I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Media folders') ?></h3> + <h3><?= I18N::translate('Media folders') ?></h3> - <!-- MEDIA_DIRECTORY --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="MEDIA_DIRECTORY"> - <?= /* I18N: A configuration setting */ I18N::translate('Media folder') ?> - </label> - <div class="col-sm-9"> - <div class="input-group" dir="ltr"> - <div class="input-group-prepend"> - <span class="input-group-text"> - <?= WT_DATA_DIR ?> - </span> - </div> - <input - class="form-control" - id="MEDIA_DIRECTORY" - maxlength="255" - name="MEDIA_DIRECTORY" - type="text" - value="<?= e($tree->getPreference('MEDIA_DIRECTORY')) ?>" - > - </div> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('This folder will be used to store the media files for this family tree.') ?> - <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If you select a different folder, you must also move any media files from the existing folder to the new one.') ?> - <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If two family trees use the same media folder, then they will be able to share media files. If they use different media folders, then their media files will be kept separate.') ?> - </p> - </div> - </div> + <!-- MEDIA_DIRECTORY --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="MEDIA_DIRECTORY"> + <?= /* I18N: A configuration setting */ I18N::translate('Media folder') ?> + </label> + <div class="col-sm-9"> + <div class="input-group" dir="ltr"> + <div class="input-group-prepend"> + <span class="input-group-text"> + <?= WT_DATA_DIR ?> + </span> + </div> + <input + class="form-control" + id="MEDIA_DIRECTORY" + maxlength="255" + name="MEDIA_DIRECTORY" + type="text" + value="<?= e($tree->getPreference('MEDIA_DIRECTORY')) ?>" + > + </div> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('This folder will be used to store the media files for this family tree.') ?> + <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If you select a different folder, you must also move any media files from the existing folder to the new one.') ?> + <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If two family trees use the same media folder, then they will be able to share media files. If they use different media folders, then their media files will be kept separate.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Media files') ?></h3> + <h3><?= I18N::translate('Media files') ?></h3> - <!-- MEDIA_UPLOAD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="MEDIA_UPLOAD"> - <?= /* I18N: A configuration setting */ I18N::translate('Who can upload new media files') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($privacy_options, $tree->getPreference('MEDIA_UPLOAD'), ['id' => 'MEDIA_UPLOAD', 'name' => 'MEDIA_UPLOAD']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Who can upload new media files” configuration setting */ I18N::translate('If you are concerned that users might upload inappropriate images, you can restrict media uploads to managers only.') ?> - </p> - </div> - </div> + <!-- MEDIA_UPLOAD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="MEDIA_UPLOAD"> + <?= /* I18N: A configuration setting */ I18N::translate('Who can upload new media files') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($privacy_options, $tree->getPreference('MEDIA_UPLOAD'), ['id' => 'MEDIA_UPLOAD', 'name' => 'MEDIA_UPLOAD']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Who can upload new media files” configuration setting */ I18N::translate('If you are concerned that users might upload inappropriate images, you can restrict media uploads to managers only.') ?> + </p> + </div> + </div> - <!-- SHOW_MEDIA_DOWNLOAD --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Show a download link in the media viewer') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::select(FunctionsEdit::optionsAccessLevels(), $tree->getPreference('SHOW_MEDIA_DOWNLOAD'), ['id' => 'SHOW_MEDIA_DOWNLOAD', 'name' => 'SHOW_MEDIA_DOWNLOAD']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Show a download link in the media viewer” configuration setting */ I18N::translate('This option will make it easier for users to download images.') ?> - </p> - </div> - </div> - </fieldset> + <!-- SHOW_MEDIA_DOWNLOAD --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Show a download link in the media viewer') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::select(FunctionsEdit::optionsAccessLevels(), $tree->getPreference('SHOW_MEDIA_DOWNLOAD'), ['id' => 'SHOW_MEDIA_DOWNLOAD', 'name' => 'SHOW_MEDIA_DOWNLOAD']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Show a download link in the media viewer” configuration setting */ I18N::translate('This option will make it easier for users to download images.') ?> + </p> + </div> + </div> + </fieldset> - <h3><?= I18N::translate('Thumbnail images') ?></h3> + <h3><?= I18N::translate('Thumbnail images') ?></h3> - <!-- SHOW_HIGHLIGHT_IMAGES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Thumbnail images') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_HIGHLIGHT_IMAGES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Thumbnail images') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_HIGHLIGHT_IMAGES', 'value' => $tree->getPreference('SHOW_HIGHLIGHT_IMAGES')]) ?> - <p class="small text-muted"> - <?= I18N::translate('Show thumbnail images in charts and family groups.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= I18N::translate('Show thumbnail images in charts and family groups.') ?> + </p> + </div> + </div> + </fieldset> - <!-- USE_SILHOUETTE --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Use silhouettes') ?> - </legend> - <div class="col-sm-9"> - <?= view('components/radios-no-yes', ['name' => 'USE_SILHOUETTE', 'value' => $tree->getPreference('USE_SILHOUETTE')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Use silhouettes” configuration setting */ I18N::translate('Use silhouette images when no highlighted image for that individual has been specified. The images used are specific to the gender of the individual in question.') ?> - </p> - </div> - </div> - </fieldset> + <!-- USE_SILHOUETTE --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Use silhouettes') ?> + </legend> + <div class="col-sm-9"> + <?= view('components/radios-no-yes', ['name' => 'USE_SILHOUETTE', 'value' => $tree->getPreference('USE_SILHOUETTE')]) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Use silhouettes” configuration setting */ I18N::translate('Use silhouette images when no highlighted image for that individual has been specified. The images used are specific to the gender of the individual in question.') ?> + </p> + </div> + </div> + </fieldset> - <h3><?= I18N::translate('Watermarks') ?></h3> + <h3><?= I18N::translate('Watermarks') ?></h3> - <!-- SHOW_NO_WATERMARK --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="SHOW_NO_WATERMARK"> - <?= I18N::translate('Images without watermarks') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select(FunctionsEdit::optionsAccessLevels(), $tree->getPreference('SHOW_NO_WATERMARK'), ['id' => 'SHOW_NO_WATERMARK', 'name' => 'SHOW_NO_WATERMARK']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Images without watermarks” configuration setting */ I18N::translate('Watermarks are optional and normally shown just to visitors.') ?> - </p> - </div> - </div> + <!-- SHOW_NO_WATERMARK --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="SHOW_NO_WATERMARK"> + <?= I18N::translate('Images without watermarks') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select(FunctionsEdit::optionsAccessLevels(), $tree->getPreference('SHOW_NO_WATERMARK'), ['id' => 'SHOW_NO_WATERMARK', 'name' => 'SHOW_NO_WATERMARK']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Images without watermarks” configuration setting */ I18N::translate('Watermarks are optional and normally shown just to visitors.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Lists') ?></h3> + <h3><?= I18N::translate('Lists') ?></h3> - <!-- SURNAME_LIST_STYLE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="SURNAME_LIST_STYLE"> - <?= I18N::translate('Surname list style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($surname_list_styles, $tree->getPreference('SURNAME_LIST_STYLE'), ['id' => 'SURNAME_LIST_STYLE', 'name' => 'SURNAME_LIST_STYLE']) ?> - <p class="small text-muted"> - </p> - </div> - </div> + <!-- SURNAME_LIST_STYLE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="SURNAME_LIST_STYLE"> + <?= I18N::translate('Surname list style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($surname_list_styles, $tree->getPreference('SURNAME_LIST_STYLE'), ['id' => 'SURNAME_LIST_STYLE', 'name' => 'SURNAME_LIST_STYLE']) ?> + <p class="small text-muted"> + </p> + </div> + </div> - <!-- SUBLIST_TRIGGER_I --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="SUBLIST_TRIGGER_I"> - <?= /* I18N: A configuration setting */ I18N::translate('Maximum number of surnames on individual list') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="SUBLIST_TRIGGER_I" - maxlength="5" - name="SUBLIST_TRIGGER_I" - required - type="text" - value="<?= e($tree->getPreference('SUBLIST_TRIGGER_I')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Maximum number of surnames on individual list” configuration setting */ I18N::translate('Long lists of individuals with the same surname can be broken into smaller sub-lists according to the first letter of the individual’s given name.<br><br>This option determines when sub-listing of surnames will occur. To disable sub-listing completely, set this option to zero.') ?> - </p> - </div> - </div> + <!-- SUBLIST_TRIGGER_I --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="SUBLIST_TRIGGER_I"> + <?= /* I18N: A configuration setting */ I18N::translate('Maximum number of surnames on individual list') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="SUBLIST_TRIGGER_I" + maxlength="5" + name="SUBLIST_TRIGGER_I" + required + type="text" + value="<?= e($tree->getPreference('SUBLIST_TRIGGER_I')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Maximum number of surnames on individual list” configuration setting */ I18N::translate('Long lists of individuals with the same surname can be broken into smaller sub-lists according to the first letter of the individual’s given name.<br><br>This option determines when sub-listing of surnames will occur. To disable sub-listing completely, set this option to zero.') ?> + </p> + </div> + </div> - <!-- SHOW_EST_LIST_DATES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Estimated dates for birth and death') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_EST_LIST_DATES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Estimated dates for birth and death') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_EST_LIST_DATES', 'value' => $tree->getPreference('SHOW_EST_LIST_DATES')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Estimated dates for birth and death” configuration setting */ I18N::translate('This option controls whether or not to show estimated dates for birth and death instead of leaving blanks on individual lists and charts for individuals whose dates are not known.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Estimated dates for birth and death” configuration setting */ I18N::translate('This option controls whether or not to show estimated dates for birth and death instead of leaving blanks on individual lists and charts for individuals whose dates are not known.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SHOW_LAST_CHANGE --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('The date and time of the last update') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_LAST_CHANGE --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('The date and time of the last update') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_LAST_CHANGE', 'value' => $tree->getPreference('SHOW_LAST_CHANGE')]) ?> - <p class="small text-muted"> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + </p> + </div> + </div> + </fieldset> - <h3><?= I18N::translate('Charts') ?></h3> + <h3><?= I18N::translate('Charts') ?></h3> - <!-- PEDIGREE_LAYOUT --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Default pedigree chart layout') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('PEDIGREE_LAYOUT', $page_layouts, $tree->getPreference('PEDIGREE_LAYOUT'), true) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Default pedigree chart layout” tree configuration setting */ I18N::translate('This option indicates whether the pedigree chart should be generated in landscape or portrait mode.') ?> - </p> - </div> - </div> - </fieldset> + <!-- PEDIGREE_LAYOUT --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Default pedigree chart layout') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('PEDIGREE_LAYOUT', $page_layouts, $tree->getPreference('PEDIGREE_LAYOUT'), true) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Default pedigree chart layout” tree configuration setting */ I18N::translate('This option indicates whether the pedigree chart should be generated in landscape or portrait mode.') ?> + </p> + </div> + </div> + </fieldset> - <!-- DEFAULT_PEDIGREE_GENERATIONS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="DEFAULT_PEDIGREE_GENERATIONS"> - <?= /* I18N: A configuration setting */ I18N::translate('Default pedigree generations') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="DEFAULT_PEDIGREE_GENERATIONS" - maxlength="5" - name="DEFAULT_PEDIGREE_GENERATIONS" - required - type="text" - value="<?= e($tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Default pedigree generations” configuration setting */ I18N::translate('Set the default number of generations to display on descendancy and pedigree charts.') ?> - </p> - </div> - </div> + <!-- DEFAULT_PEDIGREE_GENERATIONS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="DEFAULT_PEDIGREE_GENERATIONS"> + <?= /* I18N: A configuration setting */ I18N::translate('Default pedigree generations') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="DEFAULT_PEDIGREE_GENERATIONS" + maxlength="5" + name="DEFAULT_PEDIGREE_GENERATIONS" + required + type="text" + value="<?= e($tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Default pedigree generations” configuration setting */ I18N::translate('Set the default number of generations to display on descendancy and pedigree charts.') ?> + </p> + </div> + </div> - <!-- MAX_PEDIGREE_GENERATIONS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="MAX_PEDIGREE_GENERATIONS"> - <?= /* I18N: A configuration setting */ I18N::translate('Maximum pedigree generations') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="MAX_PEDIGREE_GENERATIONS" - maxlength="5" - name="MAX_PEDIGREE_GENERATIONS" - type="text" - value="<?= e($tree->getPreference('MAX_PEDIGREE_GENERATIONS')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Maximum pedigree generations” configuration setting */ I18N::translate('Set the maximum number of generations to display on pedigree charts.') ?> - </p> - </div> - </div> + <!-- MAX_PEDIGREE_GENERATIONS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="MAX_PEDIGREE_GENERATIONS"> + <?= /* I18N: A configuration setting */ I18N::translate('Maximum pedigree generations') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="MAX_PEDIGREE_GENERATIONS" + maxlength="5" + name="MAX_PEDIGREE_GENERATIONS" + type="text" + value="<?= e($tree->getPreference('MAX_PEDIGREE_GENERATIONS')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Maximum pedigree generations” configuration setting */ I18N::translate('Set the maximum number of generations to display on pedigree charts.') ?> + </p> + </div> + </div> - <!-- MAX_DESCENDANCY_GENERATIONS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="MAX_DESCENDANCY_GENERATIONS"> - <?= /* I18N: A configuration setting */ I18N::translate('Maximum descendancy generations') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - id="MAX_DESCENDANCY_GENERATIONS" - maxlength="5" - name="MAX_DESCENDANCY_GENERATIONS" - type="text" - value="<?= e($tree->getPreference('MAX_DESCENDANCY_GENERATIONS')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Maximum descendancy generations” configuration setting */ I18N::translate('Set the maximum number of generations to display on descendancy charts.') ?> - </p> - </div> - </div> + <!-- MAX_DESCENDANCY_GENERATIONS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="MAX_DESCENDANCY_GENERATIONS"> + <?= /* I18N: A configuration setting */ I18N::translate('Maximum descendancy generations') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + id="MAX_DESCENDANCY_GENERATIONS" + maxlength="5" + name="MAX_DESCENDANCY_GENERATIONS" + type="text" + value="<?= e($tree->getPreference('MAX_DESCENDANCY_GENERATIONS')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Maximum descendancy generations” configuration setting */ I18N::translate('Set the maximum number of generations to display on descendancy charts.') ?> + </p> + </div> + </div> - <!-- PEDIGREE_SHOW_GENDER --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Gender icon on charts') ?> - </legend> - <div class="col-sm-9"> + <!-- PEDIGREE_SHOW_GENDER --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Gender icon on charts') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'PEDIGREE_SHOW_GENDER', 'value' => $tree->getPreference('PEDIGREE_SHOW_GENDER')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Gender icon on charts” configuration setting */ I18N::translate('This option controls whether or not to show the individual’s gender icon on charts.<br><br>Since the gender is also indicated by the color of the box, this option doesn’t conceal the gender. The option simply removes some duplicate information from the box.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Gender icon on charts” configuration setting */ I18N::translate('This option controls whether or not to show the individual’s gender icon on charts.<br><br>Since the gender is also indicated by the color of the box, this option doesn’t conceal the gender. The option simply removes some duplicate information from the box.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SHOW_PARENTS_AGE --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Age of parents next to child’s birthdate') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_PARENTS_AGE --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Age of parents next to child’s birthdate') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_PARENTS_AGE', 'value' => $tree->getPreference('SHOW_PARENTS_AGE')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Age of parents next to child’s birthdate” configuration setting */ I18N::translate('This option controls whether or not to show age of father and mother next to child’s birthdate on charts.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Age of parents next to child’s birthdate” configuration setting */ I18N::translate('This option controls whether or not to show age of father and mother next to child’s birthdate on charts.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SHOW_LDS_AT_GLANCE --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('LDS ordinance codes in chart boxes') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_LDS_AT_GLANCE --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('LDS ordinance codes in chart boxes') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_LDS_AT_GLANCE', 'value' => $tree->getPreference('SHOW_LDS_AT_GLANCE')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “LDS ordinance codes in chart boxes” configuration setting. "B", "E", "S" and "P" should not be translated. */ I18N::translate('This is a summary of the <abbr title="The Church of Jesus Christ of Latter-day Saints">LDS</abbr> ordinances for the individual. “B” indicates an LDS baptism. “E” indicates an LDS endowment. “S” indicates an LDS spouse sealing. “P” indicates an LDS child-to-parent sealing.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “LDS ordinance codes in chart boxes” configuration setting. "B", "E", "S" and "P" should not be translated. */ I18N::translate('This is a summary of the <abbr title="The Church of Jesus Christ of Latter-day Saints">LDS</abbr> ordinances for the individual. “B” indicates an LDS baptism. “E” indicates an LDS endowment. “S” indicates an LDS spouse sealing. “P” indicates an LDS child-to-parent sealing.') ?> + </p> + </div> + </div> + </fieldset> - <!-- CHART_BOX_TAGS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="CHART_BOX_TAGS"> - <?= I18N::translate('Other facts to show in charts') ?> - </label> - <div class="col-sm-9"> - <div class="input-group"> - <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('CHART_BOX_TAGS')), ['id' => 'CHART_BOX_TAGS', 'name' => 'CHART_BOX_TAGS[]', 'class' => 'select2']) ?> - </div> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Other facts to show in charts” configuration setting */ I18N::translate('This should be a comma or space separated list of facts, in addition to birth and death, that you want to appear in chart boxes such as the pedigree chart. This list requires you to use fact tags as defined in the GEDCOM 5.5.1 standard. For example, if you wanted the occupation to show up in the box, you would add “OCCU” to this field.') ?> - </p> - </div> - </div> + <!-- CHART_BOX_TAGS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="CHART_BOX_TAGS"> + <?= I18N::translate('Other facts to show in charts') ?> + </label> + <div class="col-sm-9"> + <div class="input-group"> + <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('CHART_BOX_TAGS')), ['id' => 'CHART_BOX_TAGS', 'name' => 'CHART_BOX_TAGS[]', 'class' => 'select2']) ?> + </div> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Other facts to show in charts” configuration setting */ I18N::translate('This should be a comma or space separated list of facts, in addition to birth and death, that you want to appear in chart boxes such as the pedigree chart. This list requires you to use fact tags as defined in the GEDCOM 5.5.1 standard. For example, if you wanted the occupation to show up in the box, you would add “OCCU” to this field.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Individual pages') ?></h3> + <h3><?= I18N::translate('Individual pages') ?></h3> - <!-- SHOW_RELATIVES_EVENTS --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Show the events of close relatives on the individual page') ?> - </legend> - <div class="col-sm-3"> - <div class="form-check"> - <label for="_BIRT_GCHI"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_GCHI" value="_BIRT_GCHI" <?= in_array('_BIRT_GCHI', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Birth of a grandchild') ?> - </label> - </div> - <div class="form-check"> - <label for="_BIRT_CHIL"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_CHIL" value="_BIRT_CHIL" <?= in_array('_BIRT_CHIL', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Birth of a child') ?> - </label> - </div> - <div class="form-check"> - <label for="_BIRT_SIBL"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_SIBL" value="_BIRT_SIBL" <?= in_array('_BIRT_SIBL', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Birth of a sibling') ?> - </label> - </div> - </div> - <div class="col-sm-3"> - <div class="form-check"> - <label for="_MARR_GCHI"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_GCHI" value="_MARR_GCHI" <?= in_array('_MARR_GCHI', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Marriage of a grandchild') ?> - </label> - </div> - <div class="form-check"> - <label for="_MARR_CHIL"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_CHIL" value="_MARR_CHIL" <?= in_array('_MARR_CHIL', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Marriage of a child') ?> - </label> - </div> - <div class="form-check"> - <label for="_MARR_SIBL"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_SIBL" value="_MARR_SIBL" <?= in_array('_MARR_SIBL', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Marriage of a sibling') ?> - </label> - </div> - <div class="form-check"> - <label for="_MARR_PARE"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_PARE" value="_MARR_PARE" <?= in_array('_MARR_PARE', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Marriage of a parent') ?> - </label> - </div> - </div> - <div class="col-sm-3"> - <div class="form-check"> - <label for="_DEAT_GCHI"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GCHI" value="_DEAT_GCHI" <?= in_array('_DEAT_GCHI', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Death of a grandchild') ?> - </label> - </div> - <div class="form-check"> - <label for="_DEAT_CHIL"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_CHIL" value="_DEAT_CHIL" <?= in_array('_DEAT_CHIL', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Death of a child') ?> - </label> - </div> - <div class="form-check"> - <label for="_DEAT_SIBL"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SIBL" value="_DEAT_SIBL" <?= in_array('_DEAT_SIBL', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Death of a sibling') ?> - </label> - </div> - <div class="form-check"> - <label for="_DEAT_PARE"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_PARE" value="_DEAT_PARE" <?= in_array('_DEAT_PARE', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Death of a parent') ?> - </label> - </div> - <div class="form-check"> - <label for="_DEAT_SPOU"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SPOU" value="_DEAT_SPOU" <?= in_array('_DEAT_SPOU', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Death of a spouse') ?> - </label> - </div> - <div class="form-check"> - <label for="_DEAT_GPAR"> - <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GPAR" value="_DEAT_GPAR" <?= in_array('_DEAT_GPAR', $relatives_events) ? 'checked' : '' ?>> - <?= I18N::translate('Death of a grand-parent') ?> - </label> - </div> - </div> - </div> - </fieldset> + <!-- SHOW_RELATIVES_EVENTS --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Show the events of close relatives on the individual page') ?> + </legend> + <div class="col-sm-3"> + <div class="form-check"> + <label for="_BIRT_GCHI"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_GCHI" value="_BIRT_GCHI" <?= in_array('_BIRT_GCHI', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Birth of a grandchild') ?> + </label> + </div> + <div class="form-check"> + <label for="_BIRT_CHIL"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_CHIL" value="_BIRT_CHIL" <?= in_array('_BIRT_CHIL', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Birth of a child') ?> + </label> + </div> + <div class="form-check"> + <label for="_BIRT_SIBL"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_SIBL" value="_BIRT_SIBL" <?= in_array('_BIRT_SIBL', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Birth of a sibling') ?> + </label> + </div> + </div> + <div class="col-sm-3"> + <div class="form-check"> + <label for="_MARR_GCHI"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_GCHI" value="_MARR_GCHI" <?= in_array('_MARR_GCHI', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Marriage of a grandchild') ?> + </label> + </div> + <div class="form-check"> + <label for="_MARR_CHIL"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_CHIL" value="_MARR_CHIL" <?= in_array('_MARR_CHIL', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Marriage of a child') ?> + </label> + </div> + <div class="form-check"> + <label for="_MARR_SIBL"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_SIBL" value="_MARR_SIBL" <?= in_array('_MARR_SIBL', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Marriage of a sibling') ?> + </label> + </div> + <div class="form-check"> + <label for="_MARR_PARE"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_PARE" value="_MARR_PARE" <?= in_array('_MARR_PARE', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Marriage of a parent') ?> + </label> + </div> + </div> + <div class="col-sm-3"> + <div class="form-check"> + <label for="_DEAT_GCHI"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GCHI" value="_DEAT_GCHI" <?= in_array('_DEAT_GCHI', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Death of a grandchild') ?> + </label> + </div> + <div class="form-check"> + <label for="_DEAT_CHIL"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_CHIL" value="_DEAT_CHIL" <?= in_array('_DEAT_CHIL', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Death of a child') ?> + </label> + </div> + <div class="form-check"> + <label for="_DEAT_SIBL"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SIBL" value="_DEAT_SIBL" <?= in_array('_DEAT_SIBL', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Death of a sibling') ?> + </label> + </div> + <div class="form-check"> + <label for="_DEAT_PARE"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_PARE" value="_DEAT_PARE" <?= in_array('_DEAT_PARE', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Death of a parent') ?> + </label> + </div> + <div class="form-check"> + <label for="_DEAT_SPOU"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SPOU" value="_DEAT_SPOU" <?= in_array('_DEAT_SPOU', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Death of a spouse') ?> + </label> + </div> + <div class="form-check"> + <label for="_DEAT_GPAR"> + <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GPAR" value="_DEAT_GPAR" <?= in_array('_DEAT_GPAR', $relatives_events) ? 'checked' : '' ?>> + <?= I18N::translate('Death of a grand-parent') ?> + </label> + </div> + </div> + </div> + </fieldset> - <!-- SHOW_FACT_ICONS --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Fact icons') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_FACT_ICONS --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Fact icons') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_FACT_ICONS', 'value' => $tree->getPreference('SHOW_FACT_ICONS')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Fact icons” configuration setting */ I18N::translate('Some themes can display icons on the “Facts and events” tab.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Fact icons” configuration setting */ I18N::translate('Some themes can display icons on the “Facts and events” tab.') ?> + </p> + </div> + </div> + </fieldset> - <!-- EXPAND_NOTES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand notes') ?> - </legend> - <div class="col-sm-9"> + <!-- EXPAND_NOTES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand notes') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-no-yes', ['name' => 'EXPAND_NOTES', 'value' => $tree->getPreference('EXPAND_NOTES')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Automatically expand notes” configuration setting */ - I18N::translate('This option controls whether or not to automatically display content of a <i>Note</i> record on the Individual page.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Automatically expand notes” configuration setting */ + I18N::translate('This option controls whether or not to automatically display content of a <i>Note</i> record on the Individual page.') ?> + </p> + </div> + </div> + </fieldset> - <!-- EXPAND_SOURCES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand sources') ?> - </legend> - <div class="col-sm-9"> + <!-- EXPAND_SOURCES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand sources') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-no-yes', ['name' => 'EXPAND_SOURCES', 'value' => $tree->getPreference('EXPAND_SOURCES')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Automatically expand sources” configuration setting */ - I18N::translate('This option controls whether or not to automatically display content of a <i>Source</i> record on the Individual page.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Automatically expand sources” configuration setting */ + I18N::translate('This option controls whether or not to automatically display content of a <i>Source</i> record on the Individual page.') ?> + </p> + </div> + </div> + </fieldset> - <h3><?= I18N::translate('Places') ?></h3> + <h3><?= I18N::translate('Places') ?></h3> - <!-- SHOW_PEDIGREE_PLACES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> - <label class="sr-only" for="SHOW_PEDIGREE_PLACES_SUFFIX"> - <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> - <?= I18N::translate('first') ?> / <?= I18N::translate('last') ?> - </label> - <label class="sr-only" for="SHOW_PEDIGREE_PLACES"> - <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> - </label> - </legend> - <div class="col-sm-9"> - <?= /* I18N: The placeholders are edit controls. Show the [first/last] [1/2/3/4/5] parts of a place name */ I18N::translate( - 'Show the %1$s %2$s parts of a place name.', - Bootstrap4::select([ - '0' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'first'), - '1' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last'), - ], $tree->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX'), ['name' => 'SHOW_PEDIGREE_PLACES_SUFFIX']), - Bootstrap4::select(FunctionsEdit::numericOptions(range(1, 9)), $tree->getPreference('SHOW_PEDIGREE_PLACES'), ['name' => 'SHOW_PEDIGREE_PLACES']) - ) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Abbreviate place names” configuration setting */ I18N::translate('Place names are frequently too long to fit on charts, lists, etc. They can be abbreviated by showing just the first few parts of the name, such as <i>village, county</i>, or the last few part of it, such as <i>region, country</i>.') ?> - </p> - </div> - </div> - </fieldset> + <!-- SHOW_PEDIGREE_PLACES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> + <label class="sr-only" for="SHOW_PEDIGREE_PLACES_SUFFIX"> + <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> + <?= I18N::translate('first') ?> / <?= I18N::translate('last') ?> + </label> + <label class="sr-only" for="SHOW_PEDIGREE_PLACES"> + <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> + </label> + </legend> + <div class="col-sm-9"> + <?= /* I18N: The placeholders are edit controls. Show the [first/last] [1/2/3/4/5] parts of a place name */ I18N::translate( + 'Show the %1$s %2$s parts of a place name.', + Bootstrap4::select([ + '0' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'first'), + '1' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last'), + ], $tree->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX'), ['name' => 'SHOW_PEDIGREE_PLACES_SUFFIX']), + Bootstrap4::select(FunctionsEdit::numericOptions(range(1, 9)), $tree->getPreference('SHOW_PEDIGREE_PLACES'), ['name' => 'SHOW_PEDIGREE_PLACES']) + ) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Abbreviate place names” configuration setting */ I18N::translate('Place names are frequently too long to fit on charts, lists, etc. They can be abbreviated by showing just the first few parts of the name, such as <i>village, county</i>, or the last few part of it, such as <i>region, country</i>.') ?> + </p> + </div> + </div> + </fieldset> - <!-- GEONAMES_ACCOUNT --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="GEONAMES_ACCOUNT"> - <?= I18N::translate('Use the GeoNames database for autocomplete on places') ?> - </label> - <div class="col-sm-9"> - <input - class="form-control" - dir="ltr" - id="GEONAMES_ACCOUNT" - maxlength="255" - name="GEONAMES_ACCOUNT" - type="text" - value="<?= e($tree->getPreference('GEONAMES_ACCOUNT')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Use GeoNames database for autocomplete on places” configuration setting */ I18N::translate('The website www.geonames.org provides a large database of place names. This can be searched when entering new places. To use this feature, you must register for a free account at www.geonames.org and provide the username.') ?> - </p> - </div> - </div> + <!-- GEONAMES_ACCOUNT --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="GEONAMES_ACCOUNT"> + <?= I18N::translate('Use the GeoNames database for autocomplete on places') ?> + </label> + <div class="col-sm-9"> + <input + class="form-control" + dir="ltr" + id="GEONAMES_ACCOUNT" + maxlength="255" + name="GEONAMES_ACCOUNT" + type="text" + value="<?= e($tree->getPreference('GEONAMES_ACCOUNT')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Use GeoNames database for autocomplete on places” configuration setting */ I18N::translate('The website www.geonames.org provides a large database of place names. This can be searched when entering new places. To use this feature, you must register for a free account at www.geonames.org and provide the username.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Text') ?></h3> + <h3><?= I18N::translate('Text') ?></h3> - <!-- FORMAT_TEXT --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Format text and notes') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('FORMAT_TEXT', $formats, $tree->getPreference('FORMAT_TEXT'), true) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('To ensure compatibility with other genealogy applications, notes, text, and transcripts should be recorded in simple, unformatted text. However, formatting is often desirable to aid presentation, comprehension, etc.') ?> - </p> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('Markdown is a simple system of formatting, used on websites such as Wikipedia. It uses unobtrusive punctuation characters to create headings and sub-headings, bold and italic text, lists, tables, etc.') ?> - </p> - </div> - </div> - </fieldset> + <!-- FORMAT_TEXT --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Format text and notes') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('FORMAT_TEXT', $formats, $tree->getPreference('FORMAT_TEXT'), true) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('To ensure compatibility with other genealogy applications, notes, text, and transcripts should be recorded in simple, unformatted text. However, formatting is often desirable to aid presentation, comprehension, etc.') ?> + </p> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('Markdown is a simple system of formatting, used on websites such as Wikipedia. It uses unobtrusive punctuation characters to create headings and sub-headings, bold and italic text, lists, tables, etc.') ?> + </p> + </div> + </div> + </fieldset> - <h3><?= I18N::translate('General') ?></h3> + <h3><?= I18N::translate('General') ?></h3> - <!-- SHOW_GEDCOM_RECORD --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Allow users to see raw GEDCOM records') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_GEDCOM_RECORD --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Allow users to see raw GEDCOM records') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-no-yes', ['name' => 'SHOW_GEDCOM_RECORD', 'value' => $tree->getPreference('SHOW_GEDCOM_RECORD')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Allow users to see raw GEDCOM records” configuration setting */ I18N::translate('Setting this to <b>Yes</b> will place links on individuals, sources, and families to let users bring up another window containing the raw data taken right out of the GEDCOM file.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Allow users to see raw GEDCOM records” configuration setting */ I18N::translate('Setting this to <b>Yes</b> will place links on individuals, sources, and families to let users bring up another window containing the raw data taken right out of the GEDCOM file.') ?> + </p> + </div> + </div> + </fieldset> - <!-- HIDE_GEDCOM_ERRORS --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('GEDCOM errors') ?> - </legend> - <div class="col-sm-9"> + <!-- HIDE_GEDCOM_ERRORS --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('GEDCOM errors') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'HIDE_GEDCOM_ERRORS', 'value' => $tree->getPreference('HIDE_GEDCOM_ERRORS')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “GEDCOM errors” configuration setting */ I18N::translate('Many genealogy programs create GEDCOM files with custom tags, and webtrees understands most of them. When unrecognized tags are found, this option lets you choose whether to ignore them or display a warning message.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “GEDCOM errors” configuration setting */ I18N::translate('Many genealogy programs create GEDCOM files with custom tags, and webtrees understands most of them. When unrecognized tags are found, this option lets you choose whether to ignore them or display a warning message.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SHOW_COUNTER --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Hit counters') ?> - </legend> - <div class="col-sm-9"> + <!-- SHOW_COUNTER --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Hit counters') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-hide-show', ['name' => 'SHOW_COUNTER', 'value' => $tree->getPreference('SHOW_COUNTER')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Hit counters” configuration setting */ I18N::translate('Some pages can display the number of times that they have been visited.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Hit counters” configuration setting */ I18N::translate('Some pages can display the number of times that they have been visited.') ?> + </p> + </div> + </div> + </fieldset> - <h3><?= /* I18N: Options for editing */ I18N::translate('Edit preferences') ?></h3> + <h3><?= /* I18N: Options for editing */ I18N::translate('Edit preferences') ?></h3> - <h3><?= I18N::translate('Facts for individual records') ?></h3> + <h3><?= I18N::translate('Facts for individual records') ?></h3> - <!-- INDI_FACTS_ADD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="INDI_FACTS_ADD"> - <?= I18N::translate('All individual facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('INDI_FACTS_ADD')), ['id' => 'INDI_FACTS_ADD', 'name' => 'INDI_FACTS_ADD[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “All individual facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to individuals. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique individual facts” list.') ?> - </p> - </div> - </div> + <!-- INDI_FACTS_ADD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="INDI_FACTS_ADD"> + <?= I18N::translate('All individual facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('INDI_FACTS_ADD')), ['id' => 'INDI_FACTS_ADD', 'name' => 'INDI_FACTS_ADD[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “All individual facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to individuals. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique individual facts” list.') ?> + </p> + </div> + </div> - <!-- INDI_FACTS_UNIQUE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="INDI_FACTS_UNIQUE"> - <?= I18N::translate('Unique individual facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('INDI_FACTS_UNIQUE')), ['id' => 'INDI_FACTS_UNIQUE', 'name' => 'INDI_FACTS_UNIQUE[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Unique individual facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to individuals. For example, if BIRT is in this list, users will not be able to add more than one BIRT record to an individual. Fact names that appear in this list must not also appear in the “All individual facts” list.') ?> - </p> - </div> - </div> + <!-- INDI_FACTS_UNIQUE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="INDI_FACTS_UNIQUE"> + <?= I18N::translate('Unique individual facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('INDI_FACTS_UNIQUE')), ['id' => 'INDI_FACTS_UNIQUE', 'name' => 'INDI_FACTS_UNIQUE[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Unique individual facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to individuals. For example, if BIRT is in this list, users will not be able to add more than one BIRT record to an individual. Fact names that appear in this list must not also appear in the “All individual facts” list.') ?> + </p> + </div> + </div> - <!-- QUICK_REQUIRED_FACTS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FACTS"> - <?= I18N::translate('Facts for new individuals') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('QUICK_REQUIRED_FACTS')), ['id' => 'QUICK_REQUIRED_FACTS', 'name' => 'QUICK_REQUIRED_FACTS[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Facts for new individuals” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown when adding a new individual. For example, if BIRT is in the list, fields for birth date and birth place will be shown on the form.') ?> - </p> - </div> - </div> + <!-- QUICK_REQUIRED_FACTS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FACTS"> + <?= I18N::translate('Facts for new individuals') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('QUICK_REQUIRED_FACTS')), ['id' => 'QUICK_REQUIRED_FACTS', 'name' => 'QUICK_REQUIRED_FACTS[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Facts for new individuals” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown when adding a new individual. For example, if BIRT is in the list, fields for birth date and birth place will be shown on the form.') ?> + </p> + </div> + </div> - <!-- INDI_FACTS_QUICK --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="INDI_FACTS_QUICK"> - <?= I18N::translate('Quick individual facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('INDI_FACTS_QUICK')), ['id' => 'INDI_FACTS_QUICK', 'name' => 'INDI_FACTS_QUICK[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Quick individual facts” configuration setting */ I18N::translate('The most common individual facts and events are listed separately, so that they can be added more easily.') ?> - </p> - </div> - </div> + <!-- INDI_FACTS_QUICK --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="INDI_FACTS_QUICK"> + <?= I18N::translate('Quick individual facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_indi_facts, explode(',', $tree->getPreference('INDI_FACTS_QUICK')), ['id' => 'INDI_FACTS_QUICK', 'name' => 'INDI_FACTS_QUICK[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Quick individual facts” configuration setting */ I18N::translate('The most common individual facts and events are listed separately, so that they can be added more easily.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Facts for family records') ?></h3> + <h3><?= I18N::translate('Facts for family records') ?></h3> - <!-- FAM_FACTS_ADD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="FAM_FACTS_ADD"> - <?= I18N::translate('All family facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('FAM_FACTS_ADD')), ['id' => 'FAM_FACTS_ADD', 'name' => 'FAM_FACTS_ADD[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “All family facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to families. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique family facts” list.') ?> - </p> - </div> - </div> + <!-- FAM_FACTS_ADD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="FAM_FACTS_ADD"> + <?= I18N::translate('All family facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('FAM_FACTS_ADD')), ['id' => 'FAM_FACTS_ADD', 'name' => 'FAM_FACTS_ADD[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “All family facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to families. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique family facts” list.') ?> + </p> + </div> + </div> - <!-- FAM_FACTS_UNIQUE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="FAM_FACTS_UNIQUE"> - <?= I18N::translate('Unique family facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('FAM_FACTS_UNIQUE')), ['id' => 'FAM_FACTS_UNIQUE', 'name' => 'FAM_FACTS_UNIQUE[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Unique family facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to families. For example, if MARR is in this list, users will not be able to add more than one MARR record to a family. Fact names that appear in this list must not also appear in the “All family facts” list.') ?> - </p> - </div> - </div> + <!-- FAM_FACTS_UNIQUE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="FAM_FACTS_UNIQUE"> + <?= I18N::translate('Unique family facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('FAM_FACTS_UNIQUE')), ['id' => 'FAM_FACTS_UNIQUE', 'name' => 'FAM_FACTS_UNIQUE[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Unique family facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to families. For example, if MARR is in this list, users will not be able to add more than one MARR record to a family. Fact names that appear in this list must not also appear in the “All family facts” list.') ?> + </p> + </div> + </div> - <!-- QUICK_REQUIRED_FAMFACTS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FAMFACTS"> - <?= I18N::translate('Facts for new families') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('QUICK_REQUIRED_FAMFACTS')), ['id' => 'QUICK_REQUIRED_FAMFACTS', 'name' => 'QUICK_REQUIRED_FAMFACTS[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Facts for new families” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown when adding a new family. For example, if MARR is in the list, then fields for marriage date and marriage place will be shown on the form.') ?> - </p> - </div> - </div> + <!-- QUICK_REQUIRED_FAMFACTS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FAMFACTS"> + <?= I18N::translate('Facts for new families') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('QUICK_REQUIRED_FAMFACTS')), ['id' => 'QUICK_REQUIRED_FAMFACTS', 'name' => 'QUICK_REQUIRED_FAMFACTS[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Facts for new families” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown when adding a new family. For example, if MARR is in the list, then fields for marriage date and marriage place will be shown on the form.') ?> + </p> + </div> + </div> - <!-- FAM_FACTS_QUICK --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="FAM_FACTS_QUICK"> - <?= I18N::translate('Quick family facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('FAM_FACTS_QUICK')), ['id' => 'FAM_FACTS_QUICK', 'name' => 'FAM_FACTS_QUICK[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Quick family facts” configuration setting */ I18N::translate('The most common family facts and events are listed separately, so that they can be added more easily.') ?> - </p> - </div> - </div> + <!-- FAM_FACTS_QUICK --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="FAM_FACTS_QUICK"> + <?= I18N::translate('Quick family facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_fam_facts, explode(',', $tree->getPreference('FAM_FACTS_QUICK')), ['id' => 'FAM_FACTS_QUICK', 'name' => 'FAM_FACTS_QUICK[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Quick family facts” configuration setting */ I18N::translate('The most common family facts and events are listed separately, so that they can be added more easily.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Facts for source records') ?></h3> + <h3><?= I18N::translate('Facts for source records') ?></h3> - <!-- SOUR_FACTS_ADD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="SOUR_FACTS_ADD"> - <?= I18N::translate('All source facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_sour_facts, explode(',', $tree->getPreference('SOUR_FACTS_ADD')), ['id' => 'SOUR_FACTS_ADD', 'name' => 'SOUR_FACTS_ADD[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “All source facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to sources. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique source facts” list.') ?> - </p> - </div> - </div> + <!-- SOUR_FACTS_ADD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="SOUR_FACTS_ADD"> + <?= I18N::translate('All source facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_sour_facts, explode(',', $tree->getPreference('SOUR_FACTS_ADD')), ['id' => 'SOUR_FACTS_ADD', 'name' => 'SOUR_FACTS_ADD[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “All source facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to sources. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique source facts” list.') ?> + </p> + </div> + </div> - <!-- SOUR_FACTS_UNIQUE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="SOUR_FACTS_UNIQUE"> - <?= I18N::translate('Unique source facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_sour_facts, explode(',', $tree->getPreference('SOUR_FACTS_UNIQUE')), ['id' => 'SOUR_FACTS_UNIQUE', 'name' => 'SOUR_FACTS_UNIQUE[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Unique source facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to sources. For example, if TITL is in this list, users will not be able to add more than one TITL record to a source. Fact names that appear in this list must not also appear in the “All source facts” list.') ?> - </p> - </div> - </div> + <!-- SOUR_FACTS_UNIQUE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="SOUR_FACTS_UNIQUE"> + <?= I18N::translate('Unique source facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_sour_facts, explode(',', $tree->getPreference('SOUR_FACTS_UNIQUE')), ['id' => 'SOUR_FACTS_UNIQUE', 'name' => 'SOUR_FACTS_UNIQUE[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Unique source facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to sources. For example, if TITL is in this list, users will not be able to add more than one TITL record to a source. Fact names that appear in this list must not also appear in the “All source facts” list.') ?> + </p> + </div> + </div> - <!-- SOUR_FACTS_QUICK --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="SOUR_FACTS_QUICK"> - <?= I18N::translate('Quick source facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_sour_facts, explode(',', $tree->getPreference('SOUR_FACTS_QUICK')), ['id' => 'SOUR_FACTS_QUICK', 'name' => 'SOUR_FACTS_QUICK[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Quick source facts” configuration setting */ I18N::translate('The most common source facts are listed separately, so that they can be added more easily.') ?> - </p> - </div> - </div> + <!-- SOUR_FACTS_QUICK --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="SOUR_FACTS_QUICK"> + <?= I18N::translate('Quick source facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_sour_facts, explode(',', $tree->getPreference('SOUR_FACTS_QUICK')), ['id' => 'SOUR_FACTS_QUICK', 'name' => 'SOUR_FACTS_QUICK[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Quick source facts” configuration setting */ I18N::translate('The most common source facts are listed separately, so that they can be added more easily.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Facts for repository records') ?></h3> + <h3><?= I18N::translate('Facts for repository records') ?></h3> - <!-- REPO_FACTS_ADD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="REPO_FACTS_ADD"> - <?= I18N::translate('All repository facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_repo_facts, explode(',', $tree->getPreference('REPO_FACTS_ADD')), ['id' => 'REPO_FACTS_ADD', 'name' => 'REPO_FACTS_ADD[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “All repository facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to repositories. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique repository facts” list.') ?> - </p> - </div> - </div> + <!-- REPO_FACTS_ADD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="REPO_FACTS_ADD"> + <?= I18N::translate('All repository facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_repo_facts, explode(',', $tree->getPreference('REPO_FACTS_ADD')), ['id' => 'REPO_FACTS_ADD', 'name' => 'REPO_FACTS_ADD[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “All repository facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can add to repositories. You can modify this list by removing or adding fact names, even custom ones, as necessary. Fact names that appear in this list must not also appear in the “Unique repository facts” list.') ?> + </p> + </div> + </div> - <!-- REPO_FACTS_UNIQUE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="REPO_FACTS_UNIQUE"> - <?= I18N::translate('Unique repository facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_repo_facts, explode(',', $tree->getPreference('REPO_FACTS_UNIQUE')), ['id' => 'REPO_FACTS_UNIQUE', 'name' => 'REPO_FACTS_UNIQUE[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Unique repository facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to repositories. For example, if NAME is in this list, users will not be able to add more than one NAME record to a repository. Fact names that appear in this list must not also appear in the “All repository facts” list.') ?> - </p> - </div> - </div> + <!-- REPO_FACTS_UNIQUE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="REPO_FACTS_UNIQUE"> + <?= I18N::translate('Unique repository facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_repo_facts, explode(',', $tree->getPreference('REPO_FACTS_UNIQUE')), ['id' => 'REPO_FACTS_UNIQUE', 'name' => 'REPO_FACTS_UNIQUE[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Unique repository facts” configuration setting */ I18N::translate('This is the list of GEDCOM facts that your users can only add once to repositories. For example, if NAME is in this list, users will not be able to add more than one NAME record to a repository. Fact names that appear in this list must not also appear in the “All repository facts” list.') ?> + </p> + </div> + </div> - <!-- REPO_FACTS_QUICK --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="REPO_FACTS_QUICK"> - <?= I18N::translate('Quick repository facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_repo_facts, explode(',', $tree->getPreference('REPO_FACTS_QUICK')), ['id' => 'REPO_FACTS_QUICK', 'name' => 'REPO_FACTS_QUICK[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Quick repository facts” configuration setting */ I18N::translate('The most common repository facts are listed separately, so that they can be added more easily.') ?> - </p> - </div> - </div> + <!-- REPO_FACTS_QUICK --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="REPO_FACTS_QUICK"> + <?= I18N::translate('Quick repository facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_repo_facts, explode(',', $tree->getPreference('REPO_FACTS_QUICK')), ['id' => 'REPO_FACTS_QUICK', 'name' => 'REPO_FACTS_QUICK[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Quick repository facts” configuration setting */ I18N::translate('The most common repository facts are listed separately, so that they can be added more easily.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Advanced fact preferences') ?></h3> + <h3><?= I18N::translate('Advanced fact preferences') ?></h3> - <!-- ADVANCED_NAME_FACTS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="ADVANCED_NAME_FACTS"> - <?= I18N::translate('Advanced name facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_name_facts, explode(',', $tree->getPreference('ADVANCED_NAME_FACTS')), ['id' => 'ADVANCED_NAME_FACTS', 'name' => 'ADVANCED_NAME_FACTS[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Advanced name facts” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown on the add/edit name form. If you use non-Latin alphabets such as Hebrew, Greek, Cyrillic, or Arabic, you may want to add tags such as _HEB, ROMN, FONE, etc. to allow you to store names in several different alphabets.') ?> - </p> - </div> - </div> + <!-- ADVANCED_NAME_FACTS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="ADVANCED_NAME_FACTS"> + <?= I18N::translate('Advanced name facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_name_facts, explode(',', $tree->getPreference('ADVANCED_NAME_FACTS')), ['id' => 'ADVANCED_NAME_FACTS', 'name' => 'ADVANCED_NAME_FACTS[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Advanced name facts” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown on the add/edit name form. If you use non-Latin alphabets such as Hebrew, Greek, Cyrillic, or Arabic, you may want to add tags such as _HEB, ROMN, FONE, etc. to allow you to store names in several different alphabets.') ?> + </p> + </div> + </div> - <!-- ADVANCED_PLAC_FACTS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="ADVANCED_PLAC_FACTS"> - <?= I18N::translate('Advanced place name facts') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_plac_facts, explode(',', $tree->getPreference('ADVANCED_PLAC_FACTS')), ['id' => 'ADVANCED_PLAC_FACTS', 'name' => 'ADVANCED_PLAC_FACTS[]', 'class' => 'select2']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Advanced place name facts” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown when you add or edit place names. If you use non-Latin alphabets such as Hebrew, Greek, Cyrillic, or Arabic, you may want to add tags such as _HEB, ROMN, FONE, etc. to allow you to store place names in several different alphabets.') ?> - </p> - </div> - </div> + <!-- ADVANCED_PLAC_FACTS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="ADVANCED_PLAC_FACTS"> + <?= I18N::translate('Advanced place name facts') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_plac_facts, explode(',', $tree->getPreference('ADVANCED_PLAC_FACTS')), ['id' => 'ADVANCED_PLAC_FACTS', 'name' => 'ADVANCED_PLAC_FACTS[]', 'class' => 'select2']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Advanced place name facts” configuration setting */ I18N::translate('This is a comma separated list of GEDCOM fact tags that will be shown when you add or edit place names. If you use non-Latin alphabets such as Hebrew, Greek, Cyrillic, or Arabic, you may want to add tags such as _HEB, ROMN, FONE, etc. to allow you to store place names in several different alphabets.') ?> + </p> + </div> + </div> - <h3><?= I18N::translate('Other preferences') ?></h3> + <h3><?= I18N::translate('Other preferences') ?></h3> - <!-- SURNAME_TRADITION --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Surname tradition') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('SURNAME_TRADITION', $all_surname_traditions, $tree->getPreference('SURNAME_TRADITION'), false) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Surname tradition” configuration setting */ I18N::translate('When you add a new family member, a default surname can be provided. This surname will depend on the local tradition.') ?> - </p> - </div> - </div> - </fieldset> + <!-- SURNAME_TRADITION --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Surname tradition') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('SURNAME_TRADITION', $all_surname_traditions, $tree->getPreference('SURNAME_TRADITION'), false) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Surname tradition” configuration setting */ I18N::translate('When you add a new family member, a default surname can be provided. This surname will depend on the local tradition.') ?> + </p> + </div> + </div> + </fieldset> - <!-- FULL_SOURCES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Use full source citations') ?> - </legend> - <div class="col-sm-9"> + <!-- FULL_SOURCES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Use full source citations') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-no-yes', ['name' => 'FULL_SOURCES', 'value' => $tree->getPreference('FULL_SOURCES')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Use full source citations” configuration setting */ I18N::translate('Source citations can include fields to record the quality of the data (primary, secondary, etc.) and the date the event was recorded in the source. If you don’t use these fields, you can disable them when creating new source citations.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Use full source citations” configuration setting */ I18N::translate('Source citations can include fields to record the quality of the data (primary, secondary, etc.) and the date the event was recorded in the source. If you don’t use these fields, you can disable them when creating new source citations.') ?> + </p> + </div> + </div> + </fieldset> - <!-- PREFER_LEVEL2_SOURCES --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Source type') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('PREFER_LEVEL2_SOURCES', $source_types, $tree->getPreference('PREFER_LEVEL2_SOURCES'), true) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Source type” configuration setting */ I18N::translate('When adding new close relatives, you can add source citations to the records (individual and family) or to the facts and events (birth, marriage, and death). This option controls whether records or facts will be selected by default.') ?> - </p> - </div> - </div> - </fieldset> + <!-- PREFER_LEVEL2_SOURCES --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Source type') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('PREFER_LEVEL2_SOURCES', $source_types, $tree->getPreference('PREFER_LEVEL2_SOURCES'), true) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Source type” configuration setting */ I18N::translate('When adding new close relatives, you can add source citations to the records (individual and family) or to the facts and events (birth, marriage, and death). This option controls whether records or facts will be selected by default.') ?> + </p> + </div> + </div> + </fieldset> - <!-- NO_UPDATE_CHAN --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: A configuration setting */ I18N::translate('Keep the existing “last change” information') ?> - </legend> - <div class="col-sm-9"> + <!-- NO_UPDATE_CHAN --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: A configuration setting */ I18N::translate('Keep the existing “last change” information') ?> + </legend> + <div class="col-sm-9"> <?= view('components/radios-no-yes', ['name' => 'NO_UPDATE_CHAN', 'value' => $tree->getPreference('NO_UPDATE_CHAN')]) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Keep the existing ‘last change’ information” configuration setting */ I18N::translate('When a record is edited, the user and timestamp are recorded. Sometimes it is desirable to keep the existing “last change” information, for example when making minor corrections to someone else’s data. This option controls whether this feature is selected by default.') ?> - </p> - </div> - </div> - </fieldset> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Keep the existing ‘last change’ information” configuration setting */ I18N::translate('When a record is edited, the user and timestamp are recorded. Sometimes it is desirable to keep the existing “last change” information, for example when making minor corrections to someone else’s data. This option controls whether this feature is selected by default.') ?> + </p> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e(route('admin-trees', ['ged' => $tree->getName()])) ?>"> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e(route('admin-trees', ['ged' => $tree->getName()])) ?>"> <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - <!-- Coming soon - <div class="form-check"> - <?php if ($tree_count > 1): ?> - <label> - <input type="checkbox" name="all_trees"> - <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to all family trees') ?> - </label> - <?php endif ?> - </div> - <div class="form-check"> - <label> - <input type="checkbox" name="new_trees"> - <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to new family trees') ?> - </label> - </div> - </div> - --> - </div> + <?= I18N::translate('cancel') ?> + </a> + <!-- Coming soon + <div class="form-check"> + <?php if ($tree_count > 1) : ?> + <label> + <input type="checkbox" name="all_trees"> + <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to all family trees') ?> + </label> + <?php endif ?> + </div> + <div class="form-check"> + <label> + <input type="checkbox" name="new_trees"> + <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to new family trees') ?> + </label> + </div> + </div> + --> + </div> </form> diff --git a/resources/views/admin/trees-privacy.php b/resources/views/admin/trees-privacy.php index 3bc5298099..e9ef138ca2 100644 --- a/resources/views/admin/trees-privacy.php +++ b/resources/views/admin/trees-privacy.php @@ -9,291 +9,291 @@ <h1><?= $title ?></h1> <form method="POST"> - <input type="hidden" name="route" value="tree-privacy"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= csrf_field() ?> + <input type="hidden" name="route" value="tree-privacy"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> - <!-- REQUIRE_AUTHENTICATION --> - <div class="row form-group"> - <div class="col-form-label col-sm-4"> - <label> - <?= /* I18N: A configuration setting */ I18N::translate('Show the family tree') ?> - </label> - <div class="hidden-xs"> - <span class="badge visitors"><?= I18N::translate('visitors') ?></span> - <span class="badge members"><?= I18N::translate('members') ?></span> - </div> - </div> - <div class="col-sm-8"> - <?= Bootstrap4::select(['0' => I18N::translate('Show to visitors'), '1' => I18N::translate('Show to members')], $tree->getPreference('REQUIRE_AUTHENTICATION'), ['id' => 'REQUIRE_AUTHENTICATION', 'name' => 'REQUIRE_AUTHENTICATION']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Family tree” configuration setting */ I18N::translate('Enabling this option will force all visitors to sign in before they can view any data on the website.') ?> - </p> - <?php if (Site::getPreference('USE_REGISTRATION_MODULE') === '1'): ?> - <p class="small text-muted"> - <?= I18N::translate('If visitors can not see the family tree, they will not be able to sign up for an account. You will need to add their account manually.') ?> - </p> - <?php endif ?> - </div> - </div> + <!-- REQUIRE_AUTHENTICATION --> + <div class="row form-group"> + <div class="col-form-label col-sm-4"> + <label> + <?= /* I18N: A configuration setting */ I18N::translate('Show the family tree') ?> + </label> + <div class="hidden-xs"> + <span class="badge visitors"><?= I18N::translate('visitors') ?></span> + <span class="badge members"><?= I18N::translate('members') ?></span> + </div> + </div> + <div class="col-sm-8"> + <?= Bootstrap4::select(['0' => I18N::translate('Show to visitors'), '1' => I18N::translate('Show to members')], $tree->getPreference('REQUIRE_AUTHENTICATION'), ['id' => 'REQUIRE_AUTHENTICATION', 'name' => 'REQUIRE_AUTHENTICATION']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Family tree” configuration setting */ I18N::translate('Enabling this option will force all visitors to sign in before they can view any data on the website.') ?> + </p> + <?php if (Site::getPreference('USE_REGISTRATION_MODULE') === '1') : ?> + <p class="small text-muted"> + <?= I18N::translate('If visitors can not see the family tree, they will not be able to sign up for an account. You will need to add their account manually.') ?> + </p> + <?php endif ?> + </div> + </div> - <!-- SHOW_DEAD_PEOPLE --> - <div class="row form-group"> - <div class="col-form-label col-sm-4"> - <label for="SHOW_DEAD_PEOPLE"> - <?= /* I18N: A configuration setting */ I18N::translate('Show dead individuals') ?> - </label> - <div class="hidden-xs"> - <span class="badge visitors"><?= I18N::translate('visitors') ?></span> - <span class="badge members"><?= I18N::translate('members') ?></span> - </div> - </div> - <div class="col-sm-8"> - <?= Bootstrap4::select(array_slice(FunctionsEdit::optionsAccessLevels(), 0, 2, true), $tree->getPreference('SHOW_DEAD_PEOPLE'), ['id' => 'SHOW_DEAD_PEOPLE', 'name' => 'SHOW_DEAD_PEOPLE']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Show dead individuals” configuration setting */ I18N::translate('Set the privacy access level for all dead individuals.') ?> - </p> - </div> - </div> + <!-- SHOW_DEAD_PEOPLE --> + <div class="row form-group"> + <div class="col-form-label col-sm-4"> + <label for="SHOW_DEAD_PEOPLE"> + <?= /* I18N: A configuration setting */ I18N::translate('Show dead individuals') ?> + </label> + <div class="hidden-xs"> + <span class="badge visitors"><?= I18N::translate('visitors') ?></span> + <span class="badge members"><?= I18N::translate('members') ?></span> + </div> + </div> + <div class="col-sm-8"> + <?= Bootstrap4::select(array_slice(FunctionsEdit::optionsAccessLevels(), 0, 2, true), $tree->getPreference('SHOW_DEAD_PEOPLE'), ['id' => 'SHOW_DEAD_PEOPLE', 'name' => 'SHOW_DEAD_PEOPLE']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Show dead individuals” configuration setting */ I18N::translate('Set the privacy access level for all dead individuals.') ?> + </p> + </div> + </div> - <!-- MAX_ALIVE_AGE --> - <div class="row form-group"> - <label class="col-form-label col-sm-4" for="MAX_ALIVE_AGE"> - <?= I18N::translate('Age at which to assume an individual is dead') ?> - </label> - <div class="col-sm-8"> - <input - class="form-control" - id="MAX_ALIVE_AGE" - maxlength="5" - name="MAX_ALIVE_AGE" - type="text" - value="<?= e($tree->getPreference('MAX_ALIVE_AGE')) ?>" - > - <p class="small text-muted"> - <?= /* I18N: Help text for the “Age at which to assume an individual is dead” configuration setting */ I18N::translate('If this individual has any events other than death, burial, or cremation more recent than this number of years, they are considered to be “alive”. Children’s birth dates are considered to be such events for this purpose.') ?> - </p> - </div> - </div> + <!-- MAX_ALIVE_AGE --> + <div class="row form-group"> + <label class="col-form-label col-sm-4" for="MAX_ALIVE_AGE"> + <?= I18N::translate('Age at which to assume an individual is dead') ?> + </label> + <div class="col-sm-8"> + <input + class="form-control" + id="MAX_ALIVE_AGE" + maxlength="5" + name="MAX_ALIVE_AGE" + type="text" + value="<?= e($tree->getPreference('MAX_ALIVE_AGE')) ?>" + > + <p class="small text-muted"> + <?= /* I18N: Help text for the “Age at which to assume an individual is dead” configuration setting */ I18N::translate('If this individual has any events other than death, burial, or cremation more recent than this number of years, they are considered to be “alive”. Children’s birth dates are considered to be such events for this purpose.') ?> + </p> + </div> + </div> - <!-- HIDE_LIVE_PEOPLE --> - <fieldset class="form-group"> - <div class="row"> - <div class="col-sm-4"> - <legend class="col-form-label"> - <?= /* I18N: A configuration setting */ I18N::translate('Show living individuals') ?> - <div class="hidden-xs"> - <span class="badge visitors"><?= I18N::translate('visitors') ?></span> - <span class="badge members"><?= I18N::translate('members') ?></span> - </div> - </legend> - </div> - <div class="col-sm-8"> - <?= Bootstrap4::select(['0' => I18N::translate('Show to visitors'), '1' => I18N::translate('Show to members')], $tree->getPreference('HIDE_LIVE_PEOPLE'), ['id' => 'HIDE_LIVE_PEOPLE', 'name' => 'HIDE_LIVE_PEOPLE']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Show living individuals” configuration setting */ I18N::translate('If you show living individuals to visitors, all other privacy restrictions are ignored. Do this only if all the data in your tree is public.') ?> - </p> - </div> - </div> - </fieldset> + <!-- HIDE_LIVE_PEOPLE --> + <fieldset class="form-group"> + <div class="row"> + <div class="col-sm-4"> + <legend class="col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Show living individuals') ?> + <div class="hidden-xs"> + <span class="badge visitors"><?= I18N::translate('visitors') ?></span> + <span class="badge members"><?= I18N::translate('members') ?></span> + </div> + </legend> + </div> + <div class="col-sm-8"> + <?= Bootstrap4::select(['0' => I18N::translate('Show to visitors'), '1' => I18N::translate('Show to members')], $tree->getPreference('HIDE_LIVE_PEOPLE'), ['id' => 'HIDE_LIVE_PEOPLE', 'name' => 'HIDE_LIVE_PEOPLE']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Show living individuals” configuration setting */ I18N::translate('If you show living individuals to visitors, all other privacy restrictions are ignored. Do this only if all the data in your tree is public.') ?> + </p> + </div> + </div> + </fieldset> - <!-- KEEP_ALIVE_YEARS_BIRTH / KEEP_ALIVE_YEARS_DEATH --> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-4"> - <?= /* I18N: A configuration setting. …who were born in the last XX years or died in the last YY years */ I18N::translate('Extend privacy to dead individuals') ?> - </legend> - <div class="col-sm-8"> - <?php - echo - /* I18N: Extend privacy to dead individuals who were… */ I18N::translate( - 'born in the last %1$s years or died in the last %2$s years', - '<input type="text" name="KEEP_ALIVE_YEARS_BIRTH" value="' . $tree->getPreference('KEEP_ALIVE_YEARS_BIRTH') . '" size="5" maxlength="3">', - '<input type="text" name="KEEP_ALIVE_YEARS_DEATH" value="' . $tree->getPreference('KEEP_ALIVE_YEARS_DEATH') . '" size="5" maxlength="3">' - ) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Extend privacy to dead individuals” configuration setting */ I18N::translate('In some countries, privacy laws apply not only to living individuals, but also to those who have died recently. This option will allow you to extend the privacy rules for living individuals to those who were born or died within a specified number of years. Leave these values empty to disable this feature.') ?> - </p> - </div> - </div> - </fieldset> + <!-- KEEP_ALIVE_YEARS_BIRTH / KEEP_ALIVE_YEARS_DEATH --> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-4"> + <?= /* I18N: A configuration setting. …who were born in the last XX years or died in the last YY years */ I18N::translate('Extend privacy to dead individuals') ?> + </legend> + <div class="col-sm-8"> + <?php + echo + /* I18N: Extend privacy to dead individuals who were… */ I18N::translate( + 'born in the last %1$s years or died in the last %2$s years', + '<input type="text" name="KEEP_ALIVE_YEARS_BIRTH" value="' . $tree->getPreference('KEEP_ALIVE_YEARS_BIRTH') . '" size="5" maxlength="3">', + '<input type="text" name="KEEP_ALIVE_YEARS_DEATH" value="' . $tree->getPreference('KEEP_ALIVE_YEARS_DEATH') . '" size="5" maxlength="3">' + ) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Extend privacy to dead individuals” configuration setting */ I18N::translate('In some countries, privacy laws apply not only to living individuals, but also to those who have died recently. This option will allow you to extend the privacy rules for living individuals to those who were born or died within a specified number of years. Leave these values empty to disable this feature.') ?> + </p> + </div> + </div> + </fieldset> - <!-- SHOW_LIVING_NAMES --> - <div class="row form-group"> - <div class="col-form-label col-sm-4"> - <label for="SHOW_LIVING_NAMES"> - <?= /* I18N: A configuration setting */ I18N::translate('Show names of private individuals') ?> - </label> - <div class="hidden-xs"> - <span class="badge visitors"><?= I18N::translate('visitors') ?></span> - <span class="badge members"><?= I18N::translate('members') ?></span> - <span class="badge managers"><?= I18N::translate('managers') ?></span> - </div> - </div> - <div class="col-sm-8"> - <?= Bootstrap4::select(array_slice(FunctionsEdit::optionsAccessLevels(), 0, 3, true), $tree->getPreference('SHOW_LIVING_NAMES'), ['id' => 'SHOW_LIVING_NAMES', 'name' => 'SHOW_LIVING_NAMES']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Show names of private individuals” configuration setting */ I18N::translate('This option will show the names (but no other details) of private individuals. Individuals are private if they are still alive or if a privacy restriction has been added to their individual record. To hide a specific name, add a privacy restriction to that name record.') ?> - </p> - </div> - </div> + <!-- SHOW_LIVING_NAMES --> + <div class="row form-group"> + <div class="col-form-label col-sm-4"> + <label for="SHOW_LIVING_NAMES"> + <?= /* I18N: A configuration setting */ I18N::translate('Show names of private individuals') ?> + </label> + <div class="hidden-xs"> + <span class="badge visitors"><?= I18N::translate('visitors') ?></span> + <span class="badge members"><?= I18N::translate('members') ?></span> + <span class="badge managers"><?= I18N::translate('managers') ?></span> + </div> + </div> + <div class="col-sm-8"> + <?= Bootstrap4::select(array_slice(FunctionsEdit::optionsAccessLevels(), 0, 3, true), $tree->getPreference('SHOW_LIVING_NAMES'), ['id' => 'SHOW_LIVING_NAMES', 'name' => 'SHOW_LIVING_NAMES']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Show names of private individuals” configuration setting */ I18N::translate('This option will show the names (but no other details) of private individuals. Individuals are private if they are still alive or if a privacy restriction has been added to their individual record. To hide a specific name, add a privacy restriction to that name record.') ?> + </p> + </div> + </div> - <!-- SHOW_PRIVATE_RELATIONSHIPS --> - <div class="row form-group"> - <div class="col-form-label col-sm-4"> - <label for="SHOW_PRIVATE_RELATIONSHIPS"> - <?= /* I18N: A configuration setting */ I18N::translate('Show private relationships') ?> - </label> - <div class="hidden-xs"> - <span class="badge visitors"><?= I18N::translate('visitors') ?></span> - <span class="badge members"><?= I18N::translate('members') ?></span> - </div> - </div> - <div class="col-sm-8"> - <?= Bootstrap4::select(['0' => I18N::translate('Hide from everyone'), '1' => I18N::translate('Show to visitors')], $tree->getPreference('SHOW_PRIVATE_RELATIONSHIPS'), ['id' => 'SHOW_PRIVATE_RELATIONSHIPS', 'name' => 'SHOW_PRIVATE_RELATIONSHIPS']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Show private relationships” configuration setting */ I18N::translate('This option will retain family links in private records. This means that you will see empty “private” boxes on the pedigree chart and on other charts with private individuals.') ?> - </p> - </div> - </div> - <h2><?= /* I18N: Privacy restrictions are set by RESN tags in GEDCOM. */ I18N::translate('Privacy restrictions') ?></h2> - <p> - <?= /* I18N: Privacy restrictions are RESN tags in GEDCOM. */ I18N::translate('You can set the access for a specific record, fact, or event by adding a restriction to it. If a record, fact, or event does not have a restriction, the following default restrictions will be used.') ?> - </p> + <!-- SHOW_PRIVATE_RELATIONSHIPS --> + <div class="row form-group"> + <div class="col-form-label col-sm-4"> + <label for="SHOW_PRIVATE_RELATIONSHIPS"> + <?= /* I18N: A configuration setting */ I18N::translate('Show private relationships') ?> + </label> + <div class="hidden-xs"> + <span class="badge visitors"><?= I18N::translate('visitors') ?></span> + <span class="badge members"><?= I18N::translate('members') ?></span> + </div> + </div> + <div class="col-sm-8"> + <?= Bootstrap4::select(['0' => I18N::translate('Hide from everyone'), '1' => I18N::translate('Show to visitors')], $tree->getPreference('SHOW_PRIVATE_RELATIONSHIPS'), ['id' => 'SHOW_PRIVATE_RELATIONSHIPS', 'name' => 'SHOW_PRIVATE_RELATIONSHIPS']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Show private relationships” configuration setting */ I18N::translate('This option will retain family links in private records. This means that you will see empty “private” boxes on the pedigree chart and on other charts with private individuals.') ?> + </p> + </div> + </div> + <h2><?= /* I18N: Privacy restrictions are set by RESN tags in GEDCOM. */ I18N::translate('Privacy restrictions') ?></h2> + <p> + <?= /* I18N: Privacy restrictions are RESN tags in GEDCOM. */ I18N::translate('You can set the access for a specific record, fact, or event by adding a restriction to it. If a record, fact, or event does not have a restriction, the following default restrictions will be used.') ?> + </p> - <script id="new-resn-template" type="text/html"> - <tr> - <td> - <select class="form-control" id="record-type"> - <option value="individual"><?= I18N::translate('Individual') ?></option> - <option value="family"><?= I18N::translate('Family') ?></option> - <option value="source"><?= I18N::translate('Source') ?></option> - <option value="repository"><?= I18N::translate('Repository') ?></option> - <option value="note"><?= I18N::translate('Note') ?></option> - <option value="media"><?= I18N::translate('Media object') ?></option> - </select> - <span class="select-record select-individual"> - <?= FunctionsEdit::formControlIndividual($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;']) ?> - </span> - <span class="select-record select-family d-none"> - <?= FunctionsEdit::formControlFamily($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="select-record select-source d-none"> - <?= FunctionsEdit::formControlSource($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="select-record select-repository d-none"> - <?= FunctionsEdit::formControlRepository($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="select-record select-note d-none"> - <?= FunctionsEdit::formControlNote($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <span class="select-record select-media d-none"> - <?= FunctionsEdit::formControlMediaObject($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> - </span> - <input data-autocomplete-type="IFSRO" id="xref" maxlength="20" name="xref[]" type="text"> - </td> - <td> - <?= Bootstrap4::select($all_tags, '', ['name' => 'tag_type[]']) ?> - </td> - <td> - <?= Bootstrap4::select($privacy_constants, 'privacy', ['name' => 'resn[]']) ?> - </td> - <td> - </td> - </tr> - </script> + <script id="new-resn-template" type="text/html"> + <tr> + <td> + <select class="form-control" id="record-type"> + <option value="individual"><?= I18N::translate('Individual') ?></option> + <option value="family"><?= I18N::translate('Family') ?></option> + <option value="source"><?= I18N::translate('Source') ?></option> + <option value="repository"><?= I18N::translate('Repository') ?></option> + <option value="note"><?= I18N::translate('Note') ?></option> + <option value="media"><?= I18N::translate('Media object') ?></option> + </select> + <span class="select-record select-individual"> + <?= FunctionsEdit::formControlIndividual($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;']) ?> + </span> + <span class="select-record select-family d-none"> + <?= FunctionsEdit::formControlFamily($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="select-record select-source d-none"> + <?= FunctionsEdit::formControlSource($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="select-record select-repository d-none"> + <?= FunctionsEdit::formControlRepository($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="select-record select-note d-none"> + <?= FunctionsEdit::formControlNote($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <span class="select-record select-media d-none"> + <?= FunctionsEdit::formControlMediaObject($tree, null, ['name' => 'xref', 'class' => 'form-control', 'style' => 'width:100%;', 'disabled' => true]) ?> + </span> + <input data-autocomplete-type="IFSRO" id="xref" maxlength="20" name="xref[]" type="text"> + </td> + <td> + <?= Bootstrap4::select($all_tags, '', ['name' => 'tag_type[]']) ?> + </td> + <td> + <?= Bootstrap4::select($privacy_constants, 'privacy', ['name' => 'resn[]']) ?> + </td> + <td> + </td> + </tr> + </script> - <table class="table table-bordered table-sm table-hover" id="default-resn"> - <caption class="sr-only"> - <?= I18N::translate('Privacy restrictions - these apply to records and facts that do not contain a GEDCOM RESN tag') ?> - </caption> - <thead> - <tr> - <th> - <?= I18N::translate('Record') ?> - </th> - <th> - <?= I18N::translate('Fact or event') ?> - </th> - <th> - <?= I18N::translate('Access level') ?> - </th> - <th> - <button class="btn btn-primary" id="add-resn" type="button"> - <?= view('icons/add') ?> - <?= /* I18N: A button label. */ I18N::translate('add') ?> - </button> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($privacy_restrictions as $privacy_restriction): ?> - <tr> - <td> - <?php if ($privacy_restriction->record): ?> - <a href="<?= e($privacy_restriction->record->url()) ?>"><?= $privacy_restriction->record->getFullName() ?></a> - <?php elseif ($privacy_restriction->xref): ?> - <div class="text-danger"> - <?= $privacy_restriction->xref ?> — <?= I18N::translate('This record does not exist.') ?> - </div> - <?php else: ?> - <div class="text-muted"> - <?= I18N::translate('All records') ?> - </div> - <?php endif ?> - </td> - <td> - <?php if ($privacy_restriction->tag_label): ?> - <?= $privacy_restriction->tag_label ?> - <?php else: ?> - <div class="text-muted"> - <?= I18N::translate('All facts and events') ?> - </div> - <?php endif ?> - </td> - <td> - <?= FunctionsEdit::optionsRestrictions(false)[$privacy_restriction->resn] ?> - </td> - <td> - <label for="delete-<?= $privacy_restriction->default_resn_id ?>"> - <input id="delete-<?= $privacy_restriction->default_resn_id ?>" name="delete[]" type="checkbox" value="<?= $privacy_restriction->default_resn_id ?>"> - <?= I18N::translate('Delete') ?> - </label> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> + <table class="table table-bordered table-sm table-hover" id="default-resn"> + <caption class="sr-only"> + <?= I18N::translate('Privacy restrictions - these apply to records and facts that do not contain a GEDCOM RESN tag') ?> + </caption> + <thead> + <tr> + <th> + <?= I18N::translate('Record') ?> + </th> + <th> + <?= I18N::translate('Fact or event') ?> + </th> + <th> + <?= I18N::translate('Access level') ?> + </th> + <th> + <button class="btn btn-primary" id="add-resn" type="button"> + <?= view('icons/add') ?> + <?= /* I18N: A button label. */ I18N::translate('add') ?> + </button> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($privacy_restrictions as $privacy_restriction) : ?> + <tr> + <td> + <?php if ($privacy_restriction->record) : ?> + <a href="<?= e($privacy_restriction->record->url()) ?>"><?= $privacy_restriction->record->getFullName() ?></a> + <?php elseif ($privacy_restriction->xref) : ?> + <div class="text-danger"> + <?= $privacy_restriction->xref ?> — <?= I18N::translate('This record does not exist.') ?> + </div> + <?php else : ?> + <div class="text-muted"> + <?= I18N::translate('All records') ?> + </div> + <?php endif ?> + </td> + <td> + <?php if ($privacy_restriction->tag_label) : ?> + <?= $privacy_restriction->tag_label ?> + <?php else : ?> + <div class="text-muted"> + <?= I18N::translate('All facts and events') ?> + </div> + <?php endif ?> + </td> + <td> + <?= FunctionsEdit::optionsRestrictions(false)[$privacy_restriction->resn] ?> + </td> + <td> + <label for="delete-<?= $privacy_restriction->default_resn_id ?>"> + <input id="delete-<?= $privacy_restriction->default_resn_id ?>" name="delete[]" type="checkbox" value="<?= $privacy_restriction->default_resn_id ?>"> + <?= I18N::translate('Delete') ?> + </label> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> - <div class="row form-group"> - <div class="offset-sm-4 col-sm-8"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= route('admin-trees', ['ged' => $tree->getName()]) ?>"> - <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - <!-- Coming soon - <div class="form-check"> - <?php if ($count_trees > 1): ?> - <label> - <input type="checkbox" name="all_trees"> - <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to all family trees') ?> - </label> - <?php endif ?> - </div> - <div class="form-check"> - <label> - <input type="checkbox" name="new_trees"> - <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to new family trees') ?> - </label> - </div> - </div> - --> - </div> + <div class="row form-group"> + <div class="offset-sm-4 col-sm-8"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= route('admin-trees', ['ged' => $tree->getName()]) ?>"> + <?= view('icons/cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + <!-- Coming soon + <div class="form-check"> + <?php if ($count_trees > 1) : ?> + <label> + <input type="checkbox" name="all_trees"> + <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to all family trees') ?> + </label> + <?php endif ?> + </div> + <div class="form-check"> + <label> + <input type="checkbox" name="new_trees"> + <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to new family trees') ?> + </label> + </div> + </div> + --> + </div> </form> diff --git a/resources/views/admin/trees-renumber.php b/resources/views/admin/trees-renumber.php index 148ab76b28..8bacaac9bd 100644 --- a/resources/views/admin/trees-renumber.php +++ b/resources/views/admin/trees-renumber.php @@ -5,30 +5,30 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?> + <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?> </p> <p> - <?= I18N::translate('You can renumber the records in a family tree, so that these internal reference numbers are not duplicated in any other family tree.') ?> + <?= I18N::translate('You can renumber the records in a family tree, so that these internal reference numbers are not duplicated in any other family tree.') ?> </p> <p> - <?= I18N::plural('This family tree has %s record which uses the same “XREF” as another family tree.', 'This family tree has %s records which use the same “XREF” as another family tree.', count($xrefs), I18N::number(count($xrefs))) ?> + <?= I18N::plural('This family tree has %s record which uses the same “XREF” as another family tree.', 'This family tree has %s records which use the same “XREF” as another family tree.', count($xrefs), I18N::number(count($xrefs))) ?> </p> -<?php if (!empty($xrefs)): ?> - <p> - <?= I18N::translate('You can renumber this family tree.') ?> - </p> +<?php if (!empty($xrefs)) : ?> + <p> + <?= I18N::translate('You can renumber this family tree.') ?> + </p> - <form method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= /* I18N: A button label. */ - I18N::translate('continue') ?> - </button> + <form method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= /* I18N: A button label. */ + I18N::translate('continue') ?> + </button> - <?= I18N::translate('Caution! This may take a long time. Be patient.') ?> - </form> + <?= I18N::translate('Caution! This may take a long time. Be patient.') ?> + </form> <?php endif ?> diff --git a/resources/views/admin/trees-unconnected.php b/resources/views/admin/trees-unconnected.php index 3447c32ad1..f8d6a7557b 100644 --- a/resources/views/admin/trees-unconnected.php +++ b/resources/views/admin/trees-unconnected.php @@ -6,23 +6,23 @@ <h1><?= $title ?></h1> <form class="form-inline"> - <input type="hidden" name="route" value="admin-trees-unconnected""> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= Bootstrap4::checkbox(I18N::translate('Include associates'), true, ['checked' => $associates, 'name' => 'associates']) ?> - <button type="submit"> - <?= I18N::translate('update') ?> - </button> + <input type="hidden" name="route" value="admin-trees-unconnected""> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= Bootstrap4::checkbox(I18N::translate('Include associates'), true, ['checked' => $associates, 'name' => 'associates']) ?> + <button type="submit"> + <?= I18N::translate('update') ?> + </button> </form> <p><?= I18N::translate('These groups of individuals are not related to %s.', $root->getFullName()) ?></p> -<?php foreach ($individual_groups as $group): ?> - <h2><?= I18N::plural('%s individual', '%s individuals', count($group), I18N::number(count($group))) ?></h2> - <ul> - <?php foreach ($group as $individual): ?> - <li> - <a href="<?= e($individual->url()) ?>"><?= $individual->getFullName() ?></a> - </li> - <?php endforeach ?> - </ul> +<?php foreach ($individual_groups as $group) : ?> + <h2><?= I18N::plural('%s individual', '%s individuals', count($group), I18N::number(count($group))) ?></h2> + <ul> + <?php foreach ($group as $individual) : ?> + <li> + <a href="<?= e($individual->url()) ?>"><?= $individual->getFullName() ?></a> + </li> + <?php endforeach ?> + </ul> <?php endforeach ?> diff --git a/resources/views/admin/trees.php b/resources/views/admin/trees.php index b597aed36b..c146b0e2bf 100644 --- a/resources/views/admin/trees.php +++ b/resources/views/admin/trees.php @@ -8,428 +8,428 @@ <h1><?= $title ?></h1> -<?php if (empty($all_trees)): ?> - <div class="alert alert-info"> - <?= I18N::translate('You need to create a family tree.') ?> - </div> +<?php if (empty($all_trees)) : ?> + <div class="alert alert-info"> + <?= I18N::translate('You need to create a family tree.') ?> + </div> <?php endif ?> <div id="accordion" role="tablist" aria-multiselectable="true"> - <?php foreach ($all_trees as $managed_tree): ?> - <?php if (Auth::isManager($managed_tree)): ?> - <div class="card"> - <div class="card-header" role="tab" id="card-tree-header-<?= $managed_tree->getTreeId() ?>"> - <h2 class="mb-0"> + <?php foreach ($all_trees as $managed_tree) : ?> + <?php if (Auth::isManager($managed_tree)) : ?> + <div class="card"> + <div class="card-header" role="tab" id="card-tree-header-<?= $managed_tree->getTreeId() ?>"> + <h2 class="mb-0"> <?= view('icons/tree') ?> - <a data-toggle="collapse" data-parent="#accordion" href="#card-tree-content-<?= $managed_tree->getTreeId() ?>" <?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? 'aria-expanded="true"' : '' ?> aria-controls="card-tree-content-<?= $managed_tree->getTreeId() ?>"> - <?= e($managed_tree->getName()) ?> — <?= e($managed_tree->getTitle()) ?> - </a> - </h2> - </div> - <div id="card-tree-content-<?= $managed_tree->getTreeId() ?>" class="collapse<?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? ' show' : '' ?>" role="tabpanel" aria-labelledby="panel-tree-header-<?= $managed_tree->getTreeId() ?>"> - <div class="card-body"> - <?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1")->execute([$managed_tree->getTreeId()])->fetchOne() ?> - <?php if ($importing): ?> - <div id="import<?= $managed_tree->getTreeId() ?>" class="col-xs-12"> - <div class="progress"> - <?= I18N::translate('Calculating…') ?> - </div> - </div> - <?php View::push('javascript'); ?> - <script> + <a data-toggle="collapse" data-parent="#accordion" href="#card-tree-content-<?= $managed_tree->getTreeId() ?>" <?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? 'aria-expanded="true"' : '' ?> aria-controls="card-tree-content-<?= $managed_tree->getTreeId() ?>"> + <?= e($managed_tree->getName()) ?> — <?= e($managed_tree->getTitle()) ?> + </a> + </h2> + </div> + <div id="card-tree-content-<?= $managed_tree->getTreeId() ?>" class="collapse<?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? ' show' : '' ?>" role="tabpanel" aria-labelledby="panel-tree-header-<?= $managed_tree->getTreeId() ?>"> + <div class="card-body"> + <?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1")->execute([$managed_tree->getTreeId()])->fetchOne() ?> + <?php if ($importing) : ?> + <div id="import<?= $managed_tree->getTreeId() ?>" class="col-xs-12"> + <div class="progress"> + <?= I18N::translate('Calculating…') ?> + </div> + </div> + <?php View::push('javascript'); ?> + <script> $("#import<?= $managed_tree->getTreeId() ?>").load("<?= route('import', ['ged' => $managed_tree->getName()]) ?>", {}); - </script> - <?php View::endpush() ?> - <?php endif ?> - <div class="row<?= $importing ? ' d-none' : '' ?>" id="actions<?= $managed_tree->getTreeId() ?>"> - <div class="col-sm-6 col-md-3"> - <h3> - <a href="<?= e(route('tree-page', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Family tree') ?> - </a> - </h3> - <ul class="fa-ul"> - <!-- PREFERENCES --> - <li> - <span class="fa-li"><?= view('icons/preferences') ?></span> - <a href="<?= e(route('admin-trees-preferences', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Preferences') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- PRIVACY --> - <li> - <span class="fa-li"><?= view('icons/lock') ?></span> - <a href="<?= e(route('tree-privacy', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Privacy') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- HOME PAGE BLOCKS--> - <li> - <span class="fa-li"><?= view('icons/block') ?></span> - <a href="<?= e(route('tree-page-edit', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Change the “Home page” blocks') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- DELETE --> - <li> - <span class="fa-li"><?= view('icons/delete') ?></span> - <a href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($managed_tree->getTitle())) ?>" onclick="if (confirm(this.dataset.confirm)) { document.delete_form<?= $managed_tree->getTreeId() ?>.submit(); } return false;"> - <?= I18N::translate('Delete') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - <form name="delete_form<?= $managed_tree->getTreeId() ?>" method="post" action="<?= route('admin-trees-delete', ['ged' => $managed_tree->getName()]) ?>"> - <?= csrf_field() ?> - <!-- A11Y - forms need submit buttons, but they look ugly here --> - <button class="sr-only" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($managed_tree->getTitle())) ?>" onclick="return confirm(this.dataset.confirm)" type="submit"> - <?= I18N::translate('Delete') ?> - </button> - </form> - </li> - <!-- SET AS DEFAULT --> - <?php if (count($all_trees) > 1): ?> - <li> - <span class="fa-li"><?= view('icons/favorite') ?></span> - <?php if ($managed_tree->getName() === Site::getPreference('DEFAULT_GEDCOM')): ?> - <?= I18N::translate('Default family tree') ?> - <?php else: ?> - <a href="#" onclick="document.defaultform<?= $managed_tree->getTreeId() ?>.submit();"> - <?= I18N::translate('Set as default') ?> - <span class="sr-only"><?= e($managed_tree->getTitle()) ?></span> - </a> - <form name="defaultform<?= $managed_tree->getTreeId() ?>" method="post" action="<?= route('admin-trees-default', ['ged' => $managed_tree->getName()]) ?>"> - <?= csrf_field() ?> - <!-- A11Y - forms need submit buttons, but they look ugly here --> - <button class="sr-only" type="submit"> - <?= I18N::translate('Set as default') ?> - </button> - </form> - <?php endif ?> - </li> - <?php endif ?> - </ul> - </div> - <div class="col-sm-6 col-md-3"> - <h3> - <?= /* I18N: Individuals, sources, dates, places, etc. */ I18N::translate('Genealogy data') ?> - </h3> - <ul class="fa-ul"> - <!-- FIND DUPLICATES --> - <li> - <span class="fa-li"><?= view('icons/copy') ?></span> - <a href="<?= e(route('admin-trees-duplicates', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Find duplicates') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- MERGE --> - <li> - <span class="fa-li"><?= view('icons/merge') ?></span> - <a href="<?= e(route('merge-records', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Merge records') ?> - <span class="sr-only"> + </script> + <?php View::endpush() ?> + <?php endif ?> + <div class="row<?= $importing ? ' d-none' : '' ?>" id="actions<?= $managed_tree->getTreeId() ?>"> + <div class="col-sm-6 col-md-3"> + <h3> + <a href="<?= e(route('tree-page', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Family tree') ?> + </a> + </h3> + <ul class="fa-ul"> + <!-- PREFERENCES --> + <li> + <span class="fa-li"><?= view('icons/preferences') ?></span> + <a href="<?= e(route('admin-trees-preferences', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Preferences') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- PRIVACY --> + <li> + <span class="fa-li"><?= view('icons/lock') ?></span> + <a href="<?= e(route('tree-privacy', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Privacy') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- HOME PAGE BLOCKS--> + <li> + <span class="fa-li"><?= view('icons/block') ?></span> + <a href="<?= e(route('tree-page-edit', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Change the “Home page” blocks') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- DELETE --> + <li> + <span class="fa-li"><?= view('icons/delete') ?></span> + <a href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($managed_tree->getTitle())) ?>" onclick="if (confirm(this.dataset.confirm)) { document.delete_form<?= $managed_tree->getTreeId() ?>.submit(); } return false;"> + <?= I18N::translate('Delete') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + <form name="delete_form<?= $managed_tree->getTreeId() ?>" method="post" action="<?= route('admin-trees-delete', ['ged' => $managed_tree->getName()]) ?>"> + <?= csrf_field() ?> + <!-- A11Y - forms need submit buttons, but they look ugly here --> + <button class="sr-only" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($managed_tree->getTitle())) ?>" onclick="return confirm(this.dataset.confirm)" type="submit"> + <?= I18N::translate('Delete') ?> + </button> + </form> + </li> + <!-- SET AS DEFAULT --> + <?php if (count($all_trees) > 1) : ?> + <li> + <span class="fa-li"><?= view('icons/favorite') ?></span> + <?php if ($managed_tree->getName() === Site::getPreference('DEFAULT_GEDCOM')) : ?> + <?= I18N::translate('Default family tree') ?> + <?php else : ?> + <a href="#" onclick="document.defaultform<?= $managed_tree->getTreeId() ?>.submit();"> + <?= I18N::translate('Set as default') ?> + <span class="sr-only"><?= e($managed_tree->getTitle()) ?></span> + </a> + <form name="defaultform<?= $managed_tree->getTreeId() ?>" method="post" action="<?= route('admin-trees-default', ['ged' => $managed_tree->getName()]) ?>"> + <?= csrf_field() ?> + <!-- A11Y - forms need submit buttons, but they look ugly here --> + <button class="sr-only" type="submit"> + <?= I18N::translate('Set as default') ?> + </button> + </form> + <?php endif ?> + </li> + <?php endif ?> + </ul> + </div> + <div class="col-sm-6 col-md-3"> + <h3> + <?= /* I18N: Individuals, sources, dates, places, etc. */ I18N::translate('Genealogy data') ?> + </h3> + <ul class="fa-ul"> + <!-- FIND DUPLICATES --> + <li> + <span class="fa-li"><?= view('icons/copy') ?></span> + <a href="<?= e(route('admin-trees-duplicates', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Find duplicates') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- MERGE --> + <li> + <span class="fa-li"><?= view('icons/merge') ?></span> + <a href="<?= e(route('merge-records', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Merge records') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- UPDATE PLACE NAMES --> - <li> - <span class="fa-li"><?= view('icons/location') ?></span> - <a href="<?= e(route('admin-trees-places', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Update place names') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- CHECK FOR ERRORS --> - <li> - <span class="fa-li"><?= view('icons/warning') ?></span> - <a href="<?= e(route('admin-trees-check', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Check for errors') ?> - <span class="sr-only"> + </a> + </li> + <!-- UPDATE PLACE NAMES --> + <li> + <span class="fa-li"><?= view('icons/location') ?></span> + <a href="<?= e(route('admin-trees-places', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Update place names') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- CHECK FOR ERRORS --> + <li> + <span class="fa-li"><?= view('icons/warning') ?></span> + <a href="<?= e(route('admin-trees-check', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Check for errors') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- UNCONNECTED INDIVIDUALS --> - <li> - <span class="fa-li"><?= view('icons/unlink') ?></span> - <a href="<?= e(route('admin-trees-unconnected', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Find unrelated individuals') ?> - <span class="sr-only"> + </a> + </li> + <!-- UNCONNECTED INDIVIDUALS --> + <li> + <span class="fa-li"><?= view('icons/unlink') ?></span> + <a href="<?= e(route('admin-trees-unconnected', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Find unrelated individuals') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- RENUMBER --> - <li> - <span class="fa-li"><?= view('icons/sort') ?></span> - <a href="<?= e(route('admin-trees-renumber', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Renumber') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- CHANGES --> - <li> - <span class="fa-li"><?= view('icons/edit') ?></span> - <a href="<?= route('admin-changes-log', ['ged' => $managed_tree->getName()]) ?>"> - <?= I18N::translate('Changes log') ?> - <span class="sr-only"> + </a> + </li> + <!-- RENUMBER --> + <li> + <span class="fa-li"><?= view('icons/sort') ?></span> + <a href="<?= e(route('admin-trees-renumber', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Renumber') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- CHANGES --> + <li> + <span class="fa-li"><?= view('icons/edit') ?></span> + <a href="<?= route('admin-changes-log', ['ged' => $managed_tree->getName()]) ?>"> + <?= I18N::translate('Changes log') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - </ul> - </div> - <div class="clearfix visible-sm-block"></div> - <div class="col-sm-6 col-md-3"> - <h3> - <?= I18N::translate('Add unlinked records') ?> - </h3> - <ul class="fa-ul"> - <!-- UNLINKED INDIVIDUAL --> - <li> - <span class="fa-li"><?= view('icons/individual') ?></span> - <a href="<?= e(route('add-unlinked-individual', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Individual') ?> - <span class="sr-only"> + </a> + </li> + </ul> + </div> + <div class="clearfix visible-sm-block"></div> + <div class="col-sm-6 col-md-3"> + <h3> + <?= I18N::translate('Add unlinked records') ?> + </h3> + <ul class="fa-ul"> + <!-- UNLINKED INDIVIDUAL --> + <li> + <span class="fa-li"><?= view('icons/individual') ?></span> + <a href="<?= e(route('add-unlinked-individual', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Individual') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- UNLINKED SOURCE --> - <li> - <span class="fa-li"><?= view('icons/source') ?></span> - <a href="#" data-href="<?= e(route('create-source', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Source') ?> - <span class="sr-only"> + </a> + </li> + <!-- UNLINKED SOURCE --> + <li> + <span class="fa-li"><?= view('icons/source') ?></span> + <a href="#" data-href="<?= e(route('create-source', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Source') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- UNLINKED REPOSITORY --> - <li> - <span class="fa-li"><?= view('icons/repository') ?></span> - <a href="#" data-href="<?= e(route('create-repository', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Repository') ?> - <span class="sr-only"> + </a> + </li> + <!-- UNLINKED REPOSITORY --> + <li> + <span class="fa-li"><?= view('icons/repository') ?></span> + <a href="#" data-href="<?= e(route('create-repository', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Repository') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- UNLINKED MEDIA OBJECT --> - <li> - <span class="fa-li"><?= view('icons/media') ?></span> - <a href="#" data-href="<?= e(route('create-media-object', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + </a> + </li> + <!-- UNLINKED MEDIA OBJECT --> + <li> + <span class="fa-li"><?= view('icons/media') ?></span> + <a href="#" data-href="<?= e(route('create-media-object', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Media object') ?> - <span class="sr-only"> + <?= I18N::translate('Media object') ?> + <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - </a> - </li> - <!-- UNLINKED NOTE --> - <li> - <span class="fa-li"><?= view('icons/note') ?></span> - <a href="#" data-href="<?= e(route('create-note-object', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + </a> + </li> + <!-- UNLINKED NOTE --> + <li> + <span class="fa-li"><?= view('icons/note') ?></span> + <a href="#" data-href="<?= e(route('create-note-object', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - <?= I18N::translate('Shared note') ?> - </a> - </li> - <!-- UNLINKED SUBMITTER --> - <li> - <span class="fa-li"><?= view('icons/submitter') ?></span> - <a href="#" data-href="<?= e(route('create-submitter', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Shared note') ?> + </a> + </li> + <!-- UNLINKED SUBMITTER --> + <li> + <span class="fa-li"><?= view('icons/submitter') ?></span> + <a href="#" data-href="<?= e(route('create-submitter', ['ged' => $managed_tree->getName()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> <span class="sr-only"> <?= e($managed_tree->getTitle()) ?> </span> - <?= I18N::translate('Submitter') ?> - </a> - </li> - </ul> - </div> - <div class="col-sm-6 col-md-3"> - <h3> - <?= I18N::translate('GEDCOM file') ?> - </h3> - <ul class="fa-ul"> - <!-- DOWNLOAD/Export --> - <li> - <span class="fa-li"><?= view('icons/download') ?></span> - <a href="<?= e(route('admin-trees-export', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Export') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - <!-- UPLOAD/IMPORT --> - <li> - <span class="fa-li"><?= view('icons/upload') ?></span> - <a href="<?= e(route('admin-trees-import', ['ged' => $managed_tree->getName()])) ?>"> - <?= I18N::translate('Import') ?> - <span class="sr-only"> - <?= e($managed_tree->getTitle()) ?> - </span> - </a> - </li> - </ul> - </div> - </div> - </div> - </div> - </div> - <?php endif ?> - <?php endforeach ?> + <?= I18N::translate('Submitter') ?> + </a> + </li> + </ul> + </div> + <div class="col-sm-6 col-md-3"> + <h3> + <?= I18N::translate('GEDCOM file') ?> + </h3> + <ul class="fa-ul"> + <!-- DOWNLOAD/Export --> + <li> + <span class="fa-li"><?= view('icons/download') ?></span> + <a href="<?= e(route('admin-trees-export', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Export') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + <!-- UPLOAD/IMPORT --> + <li> + <span class="fa-li"><?= view('icons/upload') ?></span> + <a href="<?= e(route('admin-trees-import', ['ged' => $managed_tree->getName()])) ?>"> + <?= I18N::translate('Import') ?> + <span class="sr-only"> + <?= e($managed_tree->getTitle()) ?> + </span> + </a> + </li> + </ul> + </div> + </div> + </div> + </div> + </div> + <?php endif ?> + <?php endforeach ?> - <?php if (Auth::isAdmin()): ?> - <div class="card"> - <div class="card-header" id="card-tree-create-header"> - <h2 class="mb-0"> + <?php if (Auth::isAdmin()) : ?> + <div class="card"> + <div class="card-header" id="card-tree-create-header"> + <h2 class="mb-0"> <?= view('icons/add') ?> - <a data-toggle="collapse" data-parent="#accordion" href="#card-tree-create-content" aria-controls="card-tree-create-content"> - <?= I18N::translate('Create a family tree') ?> - </a> - </h2> - </div> - <div id="card-tree-create-content" class="collapse<?= empty($all_trees) ? ' show' : '' ?>" role="tabpanel" aria-labelledby="card-tree-create-header"> - <div class="card-body"> - <form class="form-horizontal" method="post" action="<?= e(route('admin-trees-create')) ?>"> - <?= csrf_field() ?> - <div class="row form-group"> - <label for="tree_title" class="col-sm-2 col-form-label"> - <?= I18N::translate('Family tree title') ?> - </label> - <div class="col-sm-10"> - <input class="form-control" id="tree_title" maxlength="255" name="tree_title" required type="text" placeholder="<?= $default_tree_title ?>"> - </div> - </div> - <div class="row form-group"> - <label for="tree_name" class="col-sm-2 col-form-label"> - <?= I18N::translate('URL') ?> - </label> - <div class="col-sm-10"> - <div class="input-group" dir="ltr"> - <div class="input-group-prepend"> - <span class="input-group-text"> - <?= WT_BASE_URL ?>?ged= - </span> - </div> - <input class="form-control" id="tree_name" maxlength="31" name="tree_name" pattern="[^<>&"#^$*?{}()\[\]/\\]*" required type="text" value="<?= $default_tree_name ?>"> - </div> - <p class="small text-muted"> - <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?> - </p> - </div> - </div> - <div class="row form-group"> - <div class="offset-sm-2 col-sm-10"> - <button type="submit" class="btn btn-primary"> - <?= view('icons/save') ?> - <?= /* I18N: A button label. */ I18N::translate('create') ?> - </button> - <p class="small text-muted"> - <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?> - </p> - </div> - </div> - </form> - </div> - </div> - </div> - <?php endif ?> + <a data-toggle="collapse" data-parent="#accordion" href="#card-tree-create-content" aria-controls="card-tree-create-content"> + <?= I18N::translate('Create a family tree') ?> + </a> + </h2> + </div> + <div id="card-tree-create-content" class="collapse<?= empty($all_trees) ? ' show' : '' ?>" role="tabpanel" aria-labelledby="card-tree-create-header"> + <div class="card-body"> + <form class="form-horizontal" method="post" action="<?= e(route('admin-trees-create')) ?>"> + <?= csrf_field() ?> + <div class="row form-group"> + <label for="tree_title" class="col-sm-2 col-form-label"> + <?= I18N::translate('Family tree title') ?> + </label> + <div class="col-sm-10"> + <input class="form-control" id="tree_title" maxlength="255" name="tree_title" required type="text" placeholder="<?= $default_tree_title ?>"> + </div> + </div> + <div class="row form-group"> + <label for="tree_name" class="col-sm-2 col-form-label"> + <?= I18N::translate('URL') ?> + </label> + <div class="col-sm-10"> + <div class="input-group" dir="ltr"> + <div class="input-group-prepend"> + <span class="input-group-text"> + <?= WT_BASE_URL ?>?ged= + </span> + </div> + <input class="form-control" id="tree_name" maxlength="31" name="tree_name" pattern="[^<>&"#^$*?{}()\[\]/\\]*" required type="text" value="<?= $default_tree_name ?>"> + </div> + <p class="small text-muted"> + <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?> + </p> + </div> + </div> + <div class="row form-group"> + <div class="offset-sm-2 col-sm-10"> + <button type="submit" class="btn btn-primary"> + <?= view('icons/save') ?> + <?= /* I18N: A button label. */ I18N::translate('create') ?> + </button> + <p class="small text-muted"> + <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?> + </p> + </div> + </div> + </form> + </div> + </div> + </div> + <?php endif ?> - <!-- display link to PhpGedView-WT transfer wizard on first visit to this page, before any GEDCOM is loaded --> - <?php if (empty($all_trees) && count($all_users) === 1): ?> - <div class="card"> - <div class="card-header" id="card-pgv-wizard-header"> - <h2 class="mb-0"> - <?= view('icons/wizard') ?> - <a data-toggle="collapse" data-parent="#accordion" href="#card-pgv-wizard-content" aria-controls="card-pgv-wizard-content"> - <?= I18N::translate('PhpGedView to webtrees transfer wizard') ?> - </a> - </h2> - </div> - <div id="card-pgv-wizard-content" class="collapse show" role="tabpanel" aria-labelledby="card-pgv-wizard-header"> - <div class="card-body"> - <p> - <?= I18N::translate('The PhpGedView to webtrees wizard is an automated process to assist administrators make the move from a PhpGedView installation to a new webtrees one. It will transfer all PhpGedView GEDCOM and other database information directly to your new webtrees database. The following requirements are necessary:') ?> - </p> - <ul> - <li> - <?= I18N::translate('webtrees’ database must be on the same server as PhpGedView’s') ?> - </li> - <li> - <?= /* I18N: %s is a number */ I18N::translate('PhpGedView must be version 4.2.3, or any SVN up to #%s', I18N::digits(7101)) ?> - </li> - <li> - <?= I18N::translate('All changes in PhpGedView must be accepted') ?> - </li> - <li> - <?= I18N::translate('All existing PhpGedView users must have distinct email addresses') ?> - </li> - </ul> - <p> - <?= I18N::translate('<b>Important note:</b> The transfer wizard is not able to assist with moving media items. You will need to set up and move or copy your media configuration and objects separately after the transfer wizard is finished.') ?> - </p> - <p> - <a href="<?= route('phpgedview-wizard') ?>"> - <?= I18N::translate('PhpGedView to webtrees transfer wizard') ?> - </a> - </p> - </div> - </div> - </div> - <?php endif ?> + <!-- display link to PhpGedView-WT transfer wizard on first visit to this page, before any GEDCOM is loaded --> + <?php if (empty($all_trees) && count($all_users) === 1) : ?> + <div class="card"> + <div class="card-header" id="card-pgv-wizard-header"> + <h2 class="mb-0"> + <?= view('icons/wizard') ?> + <a data-toggle="collapse" data-parent="#accordion" href="#card-pgv-wizard-content" aria-controls="card-pgv-wizard-content"> + <?= I18N::translate('PhpGedView to webtrees transfer wizard') ?> + </a> + </h2> + </div> + <div id="card-pgv-wizard-content" class="collapse show" role="tabpanel" aria-labelledby="card-pgv-wizard-header"> + <div class="card-body"> + <p> + <?= I18N::translate('The PhpGedView to webtrees wizard is an automated process to assist administrators make the move from a PhpGedView installation to a new webtrees one. It will transfer all PhpGedView GEDCOM and other database information directly to your new webtrees database. The following requirements are necessary:') ?> + </p> + <ul> + <li> + <?= I18N::translate('webtrees’ database must be on the same server as PhpGedView’s') ?> + </li> + <li> + <?= /* I18N: %s is a number */ I18N::translate('PhpGedView must be version 4.2.3, or any SVN up to #%s', I18N::digits(7101)) ?> + </li> + <li> + <?= I18N::translate('All changes in PhpGedView must be accepted') ?> + </li> + <li> + <?= I18N::translate('All existing PhpGedView users must have distinct email addresses') ?> + </li> + </ul> + <p> + <?= I18N::translate('<b>Important note:</b> The transfer wizard is not able to assist with moving media items. You will need to set up and move or copy your media configuration and objects separately after the transfer wizard is finished.') ?> + </p> + <p> + <a href="<?= route('phpgedview-wizard') ?>"> + <?= I18N::translate('PhpGedView to webtrees transfer wizard') ?> + </a> + </p> + </div> + </div> + </div> + <?php endif ?> - <!-- BULK LOAD/SYNCHRONISE GEDCOM FILES --> - <?php if (count($gedcom_files) >= $multiple_tree_threshold): ?> - <div class="card"> - <div class="card-header" id="card-tree-create-header"> - <h2 class="mb-0"> - <?= view('icons/sync') ?> - <a data-toggle="collapse" data-parent="#accordion" href="#synchronize-gedcom-files"> - <?= I18N::translate('Synchronize family trees with GEDCOM files') ?> - </a> - </h2> - </div> + <!-- BULK LOAD/SYNCHRONISE GEDCOM FILES --> + <?php if (count($gedcom_files) >= $multiple_tree_threshold) : ?> + <div class="card"> + <div class="card-header" id="card-tree-create-header"> + <h2 class="mb-0"> + <?= view('icons/sync') ?> + <a data-toggle="collapse" data-parent="#accordion" href="#synchronize-gedcom-files"> + <?= I18N::translate('Synchronize family trees with GEDCOM files') ?> + </a> + </h2> + </div> - <div id="synchronize-gedcom-files" class="panel-collapse collapse"> - <div class="card-body"> - <p> - <?= I18N::translate('Create, update, and delete a family tree for every GEDCOM file in the data folder.') ?> - </p> - <form method="post" class="form form-horizontal" action="<?= e(route('admin-trees-sync', ['ged' => $tree->getName()])) ?>"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-danger"> + <div id="synchronize-gedcom-files" class="panel-collapse collapse"> + <div class="card-body"> + <p> + <?= I18N::translate('Create, update, and delete a family tree for every GEDCOM file in the data folder.') ?> + </p> + <form method="post" class="form form-horizontal" action="<?= e(route('admin-trees-sync', ['ged' => $tree->getName()])) ?>"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-danger"> <?= view('icons/save') ?> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> - <p class="small text-muted"> - <?= I18N::translate('Caution! This may take a long time. Be patient.') ?> - </p> - </form> - </div> - </div> - </div> - <?php endif ?> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> + <p class="small text-muted"> + <?= I18N::translate('Caution! This may take a long time. Be patient.') ?> + </p> + </form> + </div> + </div> + </div> + <?php endif ?> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/admin/upgrade/steps.php b/resources/views/admin/upgrade/steps.php index 21b9ff809a..bb5753f93e 100644 --- a/resources/views/admin/upgrade/steps.php +++ b/resources/views/admin/upgrade/steps.php @@ -6,14 +6,14 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('It can take several minutes to download and install the upgrade. Be patient.') ?> + <?= I18N::translate('It can take several minutes to download and install the upgrade. Be patient.') ?> </p> <dl> - <?php foreach ($steps as $url => $text): ?> - <dt><?= $text ?></dt> - <dd class="wt-ajax-load" data-url="<?= e($url) ?>"></dd> - <?php endforeach ?> + <?php foreach ($steps as $url => $text) : ?> + <dt><?= $text ?></dt> + <dd class="wt-ajax-load" data-url="<?= e($url) ?>"></dd> + <?php endforeach ?> </dl> <?php View::push('javascript') ?> diff --git a/resources/views/admin/upgrade/wizard.php b/resources/views/admin/upgrade/wizard.php index c31e5d6d86..42d7ec9859 100644 --- a/resources/views/admin/upgrade/wizard.php +++ b/resources/views/admin/upgrade/wizard.php @@ -4,28 +4,28 @@ <h1><?= $title ?></h1> -<?php if ($latest_version === ''): ?> - <div class="alert alert-warning"> - <?= I18N::translate('No upgrade information is available.') ?> - </div> -<?php elseif (version_compare($current_version, $latest_version) >= 0): ?> - <div class="alert alert-info"> - <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?> - </div> -<?php else: ?> - <p> - <?= I18N::translate('A new version of webtrees is available.') ?> - </p> +<?php if ($latest_version === '') : ?> + <div class="alert alert-warning"> + <?= I18N::translate('No upgrade information is available.') ?> + </div> +<?php elseif (version_compare($current_version, $latest_version) >= 0) : ?> + <div class="alert alert-info"> + <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?> + </div> +<?php else : ?> + <p> + <?= I18N::translate('A new version of webtrees is available.') ?> + </p> - <p> - <?= I18N::translate('Depending on your server configuration, you may be able to upgrade automatically.') ?> - </p> + <p> + <?= I18N::translate('Depending on your server configuration, you may be able to upgrade automatically.') ?> + </p> - <form class="form-horizontal"> - <input type="hidden" name="route" value="upgrade"> + <form class="form-horizontal"> + <input type="hidden" name="route" value="upgrade"> - <button type="submit" class="btn btn-primary" name="continue" value="1"> - <?= I18N::translate('continue') ?> - </button> - </form> + <button type="submit" class="btn btn-primary" name="continue" value="1"> + <?= I18N::translate('continue') ?> + </button> + </form> <?php endif ?> diff --git a/resources/views/admin/users-cleanup.php b/resources/views/admin/users-cleanup.php index 84d504ce4d..c272b11670 100644 --- a/resources/views/admin/users-cleanup.php +++ b/resources/views/admin/users-cleanup.php @@ -7,73 +7,73 @@ <h1><?= $title ?></h1> <form> - <input type="hidden" name="route" value="admin-users-cleanup"> - <div class="form-group row"> - <label for="months" class="col-sm-8 col-form-label"> - <?= I18N::translate('Number of months since the last sign-in for a user’s account to be considered inactive: ') ?> - </label> - <div class="col-sm-2"> - <?= Bootstrap4::select($options, $months, ['id' => 'months', 'name' => 'months']) ?> - </div> - <div class="col-sm-2"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('update') ?> - </button> - </div> - </div> + <input type="hidden" name="route" value="admin-users-cleanup"> + <div class="form-group row"> + <label for="months" class="col-sm-8 col-form-label"> + <?= I18N::translate('Number of months since the last sign-in for a user’s account to be considered inactive: ') ?> + </label> + <div class="col-sm-2"> + <?= Bootstrap4::select($options, $months, ['id' => 'months', 'name' => 'months']) ?> + </div> + <div class="col-sm-2"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('update') ?> + </button> + </div> + </div> </form> <form method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <table class="table table-bordered"> - <?php foreach ($inactive_users as $user): ?> - <tr> - <td> - <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>"> - <?= e($user->getUserName()) ?> - — - <span dir="auto"><?= e($user->getRealName()) ?></span> - </a> - </td> - <td> - <?= I18N::translate('User’s account has been inactive too long: ') . FunctionsDate::timestampToGedcomDate(max((int) $user->getPreference('reg_timestamp'), (int) $user->getPreference('sessiontime')))->display() ?> - </td> - <td> - <input type="checkbox" name="del_<?= $user->getUserId() ?>"> - </td> - </tr> - <?php endforeach ?> + <table class="table table-bordered"> + <?php foreach ($inactive_users as $user) : ?> + <tr> + <td> + <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>"> + <?= e($user->getUserName()) ?> + — + <span dir="auto"><?= e($user->getRealName()) ?></span> + </a> + </td> + <td> + <?= I18N::translate('User’s account has been inactive too long: ') . FunctionsDate::timestampToGedcomDate(max((int) $user->getPreference('reg_timestamp'), (int) $user->getPreference('sessiontime')))->display() ?> + </td> + <td> + <input type="checkbox" name="del_<?= $user->getUserId() ?>"> + </td> + </tr> + <?php endforeach ?> - <?php foreach ($unverified_users as $user): ?> - <tr> - <td> - <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>"> - <?= e($user->getUserName()) ?> - — - <span dir="auto"><?= e($user->getRealName()) ?></span> - </a> - </td> - <td> - <?= I18N::translate('User didn’t verify within 7 days.') ?> - <?php if ($user->getPreference('verified_by_admin') !== '1'): ?> - <?= I18N::translate('User not verified by administrator.') ?> - <?php endif ?> - </td> - <td> - <input type="checkbox" name="del_<?= $user->getUserId() ?>"> - </td> - </tr> - <?php endforeach ?> - </table> + <?php foreach ($unverified_users as $user) : ?> + <tr> + <td> + <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>"> + <?= e($user->getUserName()) ?> + — + <span dir="auto"><?= e($user->getRealName()) ?></span> + </a> + </td> + <td> + <?= I18N::translate('User didn’t verify within 7 days.') ?> + <?php if ($user->getPreference('verified_by_admin') !== '1') : ?> + <?= I18N::translate('User not verified by administrator.') ?> + <?php endif ?> + </td> + <td> + <input type="checkbox" name="del_<?= $user->getUserId() ?>"> + </td> + </tr> + <?php endforeach ?> + </table> - <p> - <?php if (empty($inactive_users) && empty($unverified_users)): ?> - <?= I18N::translate('Nothing found to cleanup') ?> - <?php else: ?> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('delete') ?> - </button> - <?php endif ?> - </p> + <p> + <?php if (empty($inactive_users) && empty($unverified_users)) : ?> + <?= I18N::translate('Nothing found to cleanup') ?> + <?php else : ?> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('delete') ?> + </button> + <?php endif ?> + </p> </form> diff --git a/resources/views/admin/users-create.php b/resources/views/admin/users-create.php index 094bce9302..47b3443ed1 100644 --- a/resources/views/admin/users-create.php +++ b/resources/views/admin/users-create.php @@ -6,77 +6,77 @@ <h1><?= $title ?></h1> <form class="form-horizontal" name="newform" method="post" autocomplete="off" action="<?= e(route('admin-users-create')) ?>"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <!-- REAL NAME --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="real_name"> - <?= I18N::translate('Real name') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" id="real_name" name="real_name" required maxlength="64" value="<?= e($real_name) ?>" dir="auto"> - <p class="small text-muted"> - <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> - </p> - </div> - </div> + <!-- REAL NAME --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="real_name"> + <?= I18N::translate('Real name') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" id="real_name" name="real_name" required maxlength="64" value="<?= e($real_name) ?>" dir="auto"> + <p class="small text-muted"> + <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> + </p> + </div> + </div> - <!-- USER NAME --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="username"> - <?= I18N::translate('Username') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($username) ?>" dir="auto"> - <p class="small text-muted"> - <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> - </p> - </div> - </div> + <!-- USER NAME --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="username"> + <?= I18N::translate('Username') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($username) ?>" dir="auto"> + <p class="small text-muted"> + <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> + </p> + </div> + </div> - <!-- PASSWORD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="pass1"> - <?= I18N::translate('Password') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="password" id="pass1" name="pass1" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" required onchange="form.pass2.pattern = regex_quote(this.value);" autocomplete="new-password"> - <p class="small text-muted"> - <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> - </p> - </div> - </div> + <!-- PASSWORD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="pass1"> + <?= I18N::translate('Password') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="password" id="pass1" name="pass1" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" required onchange="form.pass2.pattern = regex_quote(this.value);" autocomplete="new-password"> + <p class="small text-muted"> + <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> + </p> + </div> + </div> - <!-- CONFIRM PASSWORD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="pass2"> - <?= I18N::translate('Confirm password') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="password" id="pass2" name="pass2" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::translate('Type the password again.') ?>" required autocomplete="new-password"> - </div> - </div> + <!-- CONFIRM PASSWORD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="pass2"> + <?= I18N::translate('Confirm password') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="password" id="pass2" name="pass2" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::translate('Type the password again.') ?>" required autocomplete="new-password"> + </div> + </div> - <!-- EMAIL ADDRESS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="email"> - <?= I18N::translate('Email address') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> - </p> - </div> - </div> + <!-- EMAIL ADDRESS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="email"> + <?= I18N::translate('Email address') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('save') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('save') ?> + </button> + </div> + </div> </form> <?php View::push('javascript') ?> diff --git a/resources/views/admin/users-edit.php b/resources/views/admin/users-edit.php index b03890e480..3d96379fb0 100644 --- a/resources/views/admin/users-edit.php +++ b/resources/views/admin/users-edit.php @@ -10,342 +10,342 @@ <h1><?= $title ?></h1> <form class="form-horizontal" name="newform" method="post" autocomplete="off" action="<?= e(route('admin-users-edit')) ?>"> - <?= csrf_field() ?> - <input type="hidden" name="user_id" value="<?= $user->getUserId() ?>"> + <?= csrf_field() ?> + <input type="hidden" name="user_id" value="<?= $user->getUserId() ?>"> - <!-- REAL NAME --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="real_name"> - <?= I18N::translate('Real name') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" id="real_name" name="real_name" required maxlength="64" value="<?= e($user->getRealName()) ?>" dir="auto"> - <p class="small text-muted"> - <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> - </p> - </div> - </div> + <!-- REAL NAME --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="real_name"> + <?= I18N::translate('Real name') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" id="real_name" name="real_name" required maxlength="64" value="<?= e($user->getRealName()) ?>" dir="auto"> + <p class="small text-muted"> + <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> + </p> + </div> + </div> - <!-- USER NAME --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="username"> - <?= I18N::translate('Username') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($user->getUserName()) ?>" dir="auto"> - <p class="small text-muted"> - <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> - </p> - </div> - </div> + <!-- USER NAME --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="username"> + <?= I18N::translate('Username') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($user->getUserName()) ?>" dir="auto"> + <p class="small text-muted"> + <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> + </p> + </div> + </div> - <!-- PASSWORD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="pass1"> - <?= I18N::translate('Password') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="password" id="pass1" name="pass1" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" <?= $user->getUserId() ? '' : 'required' ?> onchange="form.pass2.pattern = regex_quote(this.value);" autocomplete="new-password"> - <p class="small text-muted"> - <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> - </p> - </div> - </div> + <!-- PASSWORD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="pass1"> + <?= I18N::translate('Password') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="password" id="pass1" name="pass1" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" <?= $user->getUserId() ? '' : 'required' ?> onchange="form.pass2.pattern = regex_quote(this.value);" autocomplete="new-password"> + <p class="small text-muted"> + <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> + </p> + </div> + </div> - <!-- CONFIRM PASSWORD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="pass2"> - <?= I18N::translate('Confirm password') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="password" id="pass2" name="pass2" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::translate('Type the password again.') ?>" <?= $user->getUserId() ? '' : 'required' ?> autocomplete="new-password"> - </div> - </div> + <!-- CONFIRM PASSWORD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="pass2"> + <?= I18N::translate('Confirm password') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="password" id="pass2" name="pass2" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::translate('Type the password again.') ?>" <?= $user->getUserId() ? '' : 'required' ?> autocomplete="new-password"> + </div> + </div> - <!-- EMAIL ADDRESS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="email"> - <?= I18N::translate('Email address') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($user->getEmail()) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> - </p> - </div> - </div> + <!-- EMAIL ADDRESS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="email"> + <?= I18N::translate('Email address') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($user->getEmail()) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> + </p> + </div> + </div> - <!-- EMAIL VERIFIED --> - <!-- ACCOUNT APPROVED --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="verified"> - <?= I18N::translate('Account approval and email verification') ?> - </label> - <div class="col-sm-9"> - <div class="form-check"> - <label> - <input type="checkbox" name="verified" value="1" <?= $user->getPreference('verified') ? 'checked' : '' ?>> - <?= I18N::translate('Email verified') ?> - </label> - <label> - <input type="checkbox" name="approved" value="1" <?= $user->getPreference('verified_by_admin') ? 'checked' : '' ?>> - <?= I18N::translate('Approved by administrator') ?> - </label> - <p class="small text-muted"> - <?= I18N::translate('When a user registers for an account, an email is sent to their email address with a verification link. When they follow this link, we know the email address is correct, and the “email verified” option is selected automatically.') ?> - </p> - <p class="small text-muted"> - <?= I18N::translate('If an administrator creates a user account, the verification email is not sent, and the email must be verified manually.') ?> - </p> - <p class="small text-muted"> - <?= I18N::translate('You should not approve an account unless you know that the email address is correct.') ?> - </p> - <p class="small text-muted"> - <?= I18N::translate('A user will not be able to sign in until both “email verified” and “approved by administrator” are selected.') ?> - </p> - </div> - </div> - </div> + <!-- EMAIL VERIFIED --> + <!-- ACCOUNT APPROVED --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="verified"> + <?= I18N::translate('Account approval and email verification') ?> + </label> + <div class="col-sm-9"> + <div class="form-check"> + <label> + <input type="checkbox" name="verified" value="1" <?= $user->getPreference('verified') ? 'checked' : '' ?>> + <?= I18N::translate('Email verified') ?> + </label> + <label> + <input type="checkbox" name="approved" value="1" <?= $user->getPreference('verified_by_admin') ? 'checked' : '' ?>> + <?= I18N::translate('Approved by administrator') ?> + </label> + <p class="small text-muted"> + <?= I18N::translate('When a user registers for an account, an email is sent to their email address with a verification link. When they follow this link, we know the email address is correct, and the “email verified” option is selected automatically.') ?> + </p> + <p class="small text-muted"> + <?= I18N::translate('If an administrator creates a user account, the verification email is not sent, and the email must be verified manually.') ?> + </p> + <p class="small text-muted"> + <?= I18N::translate('You should not approve an account unless you know that the email address is correct.') ?> + </p> + <p class="small text-muted"> + <?= I18N::translate('A user will not be able to sign in until both “email verified” and “approved by administrator” are selected.') ?> + </p> + </div> + </div> + </div> - <!-- LANGUAGE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="language"> - <?= /* I18N: A configuration setting */ I18N::translate('Language') ?> - </label> - <div class="col-sm-9"> - <select id="language" name="language" class="form-control"> - <?php foreach ($locales as $locale): ?> - <option value="<?= $locale->languageTag() ?>" <?= $user->getPreference('language', $default_locale) === $locale->languageTag() ? 'selected' : '' ?>> - <?= $locale->endonym() ?> - </option> - <?php endforeach ?> - </select> - </div> - </div> + <!-- LANGUAGE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="language"> + <?= /* I18N: A configuration setting */ I18N::translate('Language') ?> + </label> + <div class="col-sm-9"> + <select id="language" name="language" class="form-control"> + <?php foreach ($locales as $locale) : ?> + <option value="<?= $locale->languageTag() ?>" <?= $user->getPreference('language', $default_locale) === $locale->languageTag() ? 'selected' : '' ?>> + <?= $locale->endonym() ?> + </option> + <?php endforeach ?> + </select> + </div> + </div> - <!-- TIMEZONE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="timezone"> - <?= /* I18N: A configuration setting */ I18N::translate('Time zone') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select(array_combine(\DateTimeZone::listIdentifiers(), \DateTimeZone::listIdentifiers()), $user->getPreference('TIMEZONE', 'UTC'), ['id' => 'timezone', 'name' => 'timezone']) ?> - <p class="small text-muted"> - <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> - </p> - </div> - </div> + <!-- TIMEZONE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="timezone"> + <?= /* I18N: A configuration setting */ I18N::translate('Time zone') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select(array_combine(\DateTimeZone::listIdentifiers(), \DateTimeZone::listIdentifiers()), $user->getPreference('TIMEZONE', 'UTC'), ['id' => 'timezone', 'name' => 'timezone']) ?> + <p class="small text-muted"> + <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> + </p> + </div> + </div> - <!-- AUTO ACCEPT --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="auto_accept"> - <?= I18N::translate('Changes') ?> - </label> - <div class="col-sm-9"> - <div class="form-check"> - <label> - <input type="checkbox" name="auto_accept" value="1" <?= $user->getPreference('auto_accept') ? 'checked' : '' ?>> - <?= I18N::translate('Automatically accept changes made by this user') ?> - </label> - <p class="small text-muted"> - <?= I18N::translate('Normally, any changes made to a family tree need to be reviewed by a moderator. This option allows a user to make changes without needing a moderator.') ?> - </p> - </div> - </div> - </div> + <!-- AUTO ACCEPT --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="auto_accept"> + <?= I18N::translate('Changes') ?> + </label> + <div class="col-sm-9"> + <div class="form-check"> + <label> + <input type="checkbox" name="auto_accept" value="1" <?= $user->getPreference('auto_accept') ? 'checked' : '' ?>> + <?= I18N::translate('Automatically accept changes made by this user') ?> + </label> + <p class="small text-muted"> + <?= I18N::translate('Normally, any changes made to a family tree need to be reviewed by a moderator. This option allows a user to make changes without needing a moderator.') ?> + </p> + </div> + </div> + </div> - <!-- VISIBLE ONLINE --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="visible_online"> - <?= /* I18N: A configuration setting */ I18N::translate('Visible online') ?> - </label> - <div class="col-sm-9"> - <div class="form-check"> - <label> - <input type="checkbox" id="visible_online" name="visible_online" value="1" <?= $user->getPreference('visibleonline') ? 'checked' : '' ?>> - <?= /* I18N: A configuration setting */ I18N::translate('Visible to other users when online') ?> - </label> - <p class="small text-muted"> - <?= I18N::translate('You can choose whether to appear in the list of users who are currently signed-in.') ?> - </p> - </div> - </div> - </div> + <!-- VISIBLE ONLINE --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="visible_online"> + <?= /* I18N: A configuration setting */ I18N::translate('Visible online') ?> + </label> + <div class="col-sm-9"> + <div class="form-check"> + <label> + <input type="checkbox" id="visible_online" name="visible_online" value="1" <?= $user->getPreference('visibleonline') ? 'checked' : '' ?>> + <?= /* I18N: A configuration setting */ I18N::translate('Visible to other users when online') ?> + </label> + <p class="small text-muted"> + <?= I18N::translate('You can choose whether to appear in the list of users who are currently signed-in.') ?> + </p> + </div> + </div> + </div> - <!-- CONTACT METHOD --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="contactmethod"> - <?= /* I18N: A configuration setting */ I18N::translate('Preferred contact method') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($contact_methods, $user->getPreference('contactmethod'), ['id' => 'contact_method', 'name' => 'contact_method']) ?> - <p class="small text-muted"> - <?= /* I18N: Help text for the “Preferred contact method” configuration setting */ - I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?> - </p> - </div> - </div> + <!-- CONTACT METHOD --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="contactmethod"> + <?= /* I18N: A configuration setting */ I18N::translate('Preferred contact method') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($contact_methods, $user->getPreference('contactmethod'), ['id' => 'contact_method', 'name' => 'contact_method']) ?> + <p class="small text-muted"> + <?= /* I18N: Help text for the “Preferred contact method” configuration setting */ + I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?> + </p> + </div> + </div> - <!-- THEME --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="theme"> - <?= I18N::translate('Theme') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($theme_options, $user->getPreference('theme'), ['id' => 'theme', 'name' => 'theme']) ?> - </div> - </div> + <!-- THEME --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="theme"> + <?= I18N::translate('Theme') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($theme_options, $user->getPreference('theme'), ['id' => 'theme', 'name' => 'theme']) ?> + </div> + </div> - <!-- COMMENTS --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="comment"> - <?= I18N::translate('Administrator comments on user') ?> - </label> - <div class="col-sm-9"> - <textarea class="form-control" id="comment" name="comment" rows="5" maxlength="255"><?= e($user->getPreference('comment')) ?></textarea> - </div> - </div> + <!-- COMMENTS --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="comment"> + <?= I18N::translate('Administrator comments on user') ?> + </label> + <div class="col-sm-9"> + <textarea class="form-control" id="comment" name="comment" rows="5" maxlength="255"><?= e($user->getPreference('comment')) ?></textarea> + </div> + </div> - <!-- ADMINISTRATOR --> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="admin"> - </label> - <div class="col-sm-9"> - <div class="form-check"> - <label> - <input type="checkbox" id="admin" name="canadmin" value="1" <?= $user->getPreference('canadmin') ? 'checked' : '' ?> <?= $user->getUserId() === Auth::id() ? 'disabled' : '' ?>> - <?= I18N::translate('Administrator') ?> - </label> - </div> - </div> - </div> + <!-- ADMINISTRATOR --> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="admin"> + </label> + <div class="col-sm-9"> + <div class="form-check"> + <label> + <input type="checkbox" id="admin" name="canadmin" value="1" <?= $user->getPreference('canadmin') ? 'checked' : '' ?> <?= $user->getUserId() === Auth::id() ? 'disabled' : '' ?>> + <?= I18N::translate('Administrator') ?> + </label> + </div> + </div> + </div> - <h3><?= I18N::translate('Access to family trees') ?></h3> + <h3><?= I18N::translate('Access to family trees') ?></h3> - <p> - <?= I18N::translate('A role is a set of access rights, which give permission to view data, change preferences, etc. Access rights are assigned to roles, and roles are granted to users. Each family tree can assign different access to each role, and users can have a different role in each family tree.') ?> - </p> + <p> + <?= I18N::translate('A role is a set of access rights, which give permission to view data, change preferences, etc. Access rights are assigned to roles, and roles are granted to users. Each family tree can assign different access to each role, and users can have a different role in each family tree.') ?> + </p> - <div class="row"> - <div class="col-xs-4"> - <h4> - <?= I18N::translate('Visitor') ?> - </h4> - <p class="small text-muted"> - <?= I18N::translate('Everybody has this role, including visitors to the website and search engines.') ?> - </p> - <h4> - <?= I18N::translate('Member') ?> - </h4> - <p class="small text-muted"> - <?= I18N::translate('This role has all the permissions of the visitor role, plus any additional access granted by the family tree configuration.') ?> - </p> - </div> - <div class="col-xs-4"> - <h4> - <?= I18N::translate('Editor') ?> - </h4> - <p class="small text-muted"> - <?= I18N::translate('This role has all the permissions of the member role, plus permission to add/change/delete data. Any changes will need to be reviewed by a moderator, unless the user has the “automatically accept changes” option enabled.') ?> - </p> - <h4> - <?= I18N::translate('Moderator') ?> - </h4> - <p class="small text-muted"> - <?= I18N::translate('This role has all the permissions of the editor role, plus permission to accept/reject changes made by other users.') ?> - </p> - </div> - <div class="col-xs-4"> - <h4> - <?= I18N::translate('Manager') ?> - </h4> - <p class="small text-muted"> - <?= I18N::translate('This role has all the permissions of the moderator role, plus any additional access granted by the family tree configuration, plus permission to change the settings/configuration of a family tree.') ?> - </p> - <h4> - <?= I18N::translate('Administrator') ?> - </h4> - <p class="small text-muted"> - <?= I18N::translate('This role has all the permissions of the manager role in all family trees, plus permission to change the settings/configuration of the website, users, and modules.') ?> - </p> - </div> - </div> + <div class="row"> + <div class="col-xs-4"> + <h4> + <?= I18N::translate('Visitor') ?> + </h4> + <p class="small text-muted"> + <?= I18N::translate('Everybody has this role, including visitors to the website and search engines.') ?> + </p> + <h4> + <?= I18N::translate('Member') ?> + </h4> + <p class="small text-muted"> + <?= I18N::translate('This role has all the permissions of the visitor role, plus any additional access granted by the family tree configuration.') ?> + </p> + </div> + <div class="col-xs-4"> + <h4> + <?= I18N::translate('Editor') ?> + </h4> + <p class="small text-muted"> + <?= I18N::translate('This role has all the permissions of the member role, plus permission to add/change/delete data. Any changes will need to be reviewed by a moderator, unless the user has the “automatically accept changes” option enabled.') ?> + </p> + <h4> + <?= I18N::translate('Moderator') ?> + </h4> + <p class="small text-muted"> + <?= I18N::translate('This role has all the permissions of the editor role, plus permission to accept/reject changes made by other users.') ?> + </p> + </div> + <div class="col-xs-4"> + <h4> + <?= I18N::translate('Manager') ?> + </h4> + <p class="small text-muted"> + <?= I18N::translate('This role has all the permissions of the moderator role, plus any additional access granted by the family tree configuration, plus permission to change the settings/configuration of a family tree.') ?> + </p> + <h4> + <?= I18N::translate('Administrator') ?> + </h4> + <p class="small text-muted"> + <?= I18N::translate('This role has all the permissions of the manager role in all family trees, plus permission to change the settings/configuration of the website, users, and modules.') ?> + </p> + </div> + </div> - <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Family tree') ?> - </th> - <th> - <?= I18N::translate('Role') ?> - </th> - <th> - <?= I18N::translate('Individual record') ?> - </th> - <th> - <?= I18N::translate('Restrict to immediate family') ?> - </th> - </tr> - <tr> - <td> - </td> - <td> - </td> - <td> - <p class="small text-muted"> - <?= I18N::translate('Link this user to an individual in the family tree.') ?> - </p> - </td> - <td> - <p class="small text-muted"> - <?= I18N::translate('Where a user is associated to an individual record in a family tree and has a role of member, editor, or moderator, you can prevent them from accessing the details of distant, living relations. You specify the number of relationship steps that the user is allowed to see.') ?> - <?= I18N::translate('For example, if you specify a path length of 2, the individual will be able to see their grandson (child, child), their aunt (parent, sibling), their step-daughter (spouse, child), but not their first cousin (parent, sibling, child).') ?> - <?= I18N::translate('Note: longer path lengths require a lot of calculation, which can make your website run slowly for these users.') ?> - </p> - </td> - </tr> - </thead> - <tbody> - <?php foreach ($trees as $tree): ?> - <tr> - <td> - <?= e($tree->getTitle()) ?> - </td> - <td> - <select class="form-control" name="canedit<?= $tree->getTreeId() ?>"> - <?php foreach ($roles as $role => $description): ?> - <option value="<?= $role ?>" - <?= $role === $tree->getUserPreference($user, 'canedit') ? 'selected' : '' ?>> - <?= $description ?> - </option> - <?php endforeach ?> - </select> - </td> - <td> - <?= FunctionsEdit::formControlIndividual($tree, Individual::getInstance($tree->getUserPreference($user, 'gedcomid'), $tree), ['id' => 'gedcomid' . $tree->getTreeId(), 'name' => 'gedcomid' . $tree->getTreeId()]) ?> - </td> - <td> - <select class="form-control" name="RELATIONSHIP_PATH_LENGTH<?= $tree->getTreeId() ?>" id="RELATIONSHIP_PATH_LENGTH<?= $tree->getTreeId() ?>" class="relpath"> - <?php for ($n = 0; $n <= 10; ++$n): ?> - <option value="<?= $n ?>" <?= $tree->getUserPreference($user, 'RELATIONSHIP_PATH_LENGTH') == $n ? 'selected' : '' ?>> - <?= $n ?: I18N::translate('No') ?> - </option> - <?php endfor ?> - </select> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> + <table class="table table-bordered table-sm"> + <thead> + <tr> + <th> + <?= I18N::translate('Family tree') ?> + </th> + <th> + <?= I18N::translate('Role') ?> + </th> + <th> + <?= I18N::translate('Individual record') ?> + </th> + <th> + <?= I18N::translate('Restrict to immediate family') ?> + </th> + </tr> + <tr> + <td> + </td> + <td> + </td> + <td> + <p class="small text-muted"> + <?= I18N::translate('Link this user to an individual in the family tree.') ?> + </p> + </td> + <td> + <p class="small text-muted"> + <?= I18N::translate('Where a user is associated to an individual record in a family tree and has a role of member, editor, or moderator, you can prevent them from accessing the details of distant, living relations. You specify the number of relationship steps that the user is allowed to see.') ?> + <?= I18N::translate('For example, if you specify a path length of 2, the individual will be able to see their grandson (child, child), their aunt (parent, sibling), their step-daughter (spouse, child), but not their first cousin (parent, sibling, child).') ?> + <?= I18N::translate('Note: longer path lengths require a lot of calculation, which can make your website run slowly for these users.') ?> + </p> + </td> + </tr> + </thead> + <tbody> + <?php foreach ($trees as $tree) : ?> + <tr> + <td> + <?= e($tree->getTitle()) ?> + </td> + <td> + <select class="form-control" name="canedit<?= $tree->getTreeId() ?>"> + <?php foreach ($roles as $role => $description) : ?> + <option value="<?= $role ?>" + <?= $role === $tree->getUserPreference($user, 'canedit') ? 'selected' : '' ?>> + <?= $description ?> + </option> + <?php endforeach ?> + </select> + </td> + <td> + <?= FunctionsEdit::formControlIndividual($tree, Individual::getInstance($tree->getUserPreference($user, 'gedcomid'), $tree), ['id' => 'gedcomid' . $tree->getTreeId(), 'name' => 'gedcomid' . $tree->getTreeId()]) ?> + </td> + <td> + <select class="form-control" name="RELATIONSHIP_PATH_LENGTH<?= $tree->getTreeId() ?>" id="RELATIONSHIP_PATH_LENGTH<?= $tree->getTreeId() ?>" class="relpath"> + <?php for ($n = 0; $n <= 10; ++$n) : ?> + <option value="<?= $n ?>" <?= $tree->getUserPreference($user, 'RELATIONSHIP_PATH_LENGTH') == $n ? 'selected' : '' ?>> + <?= $n ?: I18N::translate('No') ?> + </option> + <?php endfor ?> + </select> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('save') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('save') ?> + </button> + </div> + </div> </form> <?php View::push('javascript') ?> diff --git a/resources/views/admin/users.php b/resources/views/admin/users.php index c436532de9..3635ed65bc 100644 --- a/resources/views/admin/users.php +++ b/resources/views/admin/users.php @@ -6,24 +6,24 @@ <h1><?= $title ?></h1> <table class="table table-sm table-bordered table-user-list"> - <thead> - <tr> - <th><?= I18N::translate('Edit') ?></th> - <th><!-- user id --></th> - <th><?= I18N::translate('Username') ?></th> - <th><?= I18N::translate('Real name') ?></th> - <th><?= I18N::translate('Email address') ?></th> - <th><?= I18N::translate('Language') ?></th> - <th><!-- date registered --></th> - <th><?= I18N::translate('Date registered') ?></th> - <th><!-- last login --></th> - <th><?= I18N::translate('Last signed in') ?></th> - <th><?= I18N::translate('Verified') ?></th> - <th><?= I18N::translate('Approved') ?></th> - </tr> - </thead> - <tbody> - </tbody> + <thead> + <tr> + <th><?= I18N::translate('Edit') ?></th> + <th><!-- user id --></th> + <th><?= I18N::translate('Username') ?></th> + <th><?= I18N::translate('Real name') ?></th> + <th><?= I18N::translate('Email address') ?></th> + <th><?= I18N::translate('Language') ?></th> + <th><!-- date registered --></th> + <th><?= I18N::translate('Date registered') ?></th> + <th><!-- last login --></th> + <th><?= I18N::translate('Last signed in') ?></th> + <th><?= I18N::translate('Verified') ?></th> + <th><?= I18N::translate('Approved') ?></th> + </tr> + </thead> + <tbody> + </tbody> </table> <?php View::push('javascript') ?> @@ -53,7 +53,7 @@ /* verified */ null, /* approved */ null ], - <?= I18N::datatablesI18N() ?> + <?= I18N::datatablesI18N() ?> }).fnFilter("<?= e($filter) ?>"); // Pre-fill the search box </script> <?php View::endpush() ?> diff --git a/resources/views/admin/webtrees1-thumbnails-form.php b/resources/views/admin/webtrees1-thumbnails-form.php index dc0ea9e5cf..184c614005 100644 --- a/resources/views/admin/webtrees1-thumbnails-form.php +++ b/resources/views/admin/webtrees1-thumbnails-form.php @@ -1,24 +1,24 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('admin-webtrees1-thumbs-action')) ?>" method="POST"> - <input type="hidden" name="thumbnail" value="<?= e($thumbnail) ?>"> - <?php foreach ($media as $medium): ?> - <input type="hidden" name="ged[]" value="<?= e($medium->getTree()->getName()) ?>"> - <input type="hidden" name="xref[]" value="<?= e($medium->getXref()) ?>"> - <?php endforeach ?> - <div class="btn-group"> - <?php if (!empty($media)): ?> - <button class="btn <?= $difference < 99 ? 'btn-primary' : 'btn-secondary' ?> wt-fix-button" type="button" data-action="add"> - <?= view('icons/add') ?> - <?= I18N::translate('add') ?> - <?php if (count($media) > 1): ?> - <?= I18N::number(count($media)) ?> - <?php endif ?> - </button> - <?php endif ?> - <button class="btn <?= $difference >= 99 ? 'btn-primary' : 'btn-secondary' ?> wt-fix-button" type="button" data-action="delete"> + <input type="hidden" name="thumbnail" value="<?= e($thumbnail) ?>"> + <?php foreach ($media as $medium) : ?> + <input type="hidden" name="ged[]" value="<?= e($medium->getTree()->getName()) ?>"> + <input type="hidden" name="xref[]" value="<?= e($medium->getXref()) ?>"> + <?php endforeach ?> + <div class="btn-group"> + <?php if (!empty($media)) : ?> + <button class="btn <?= $difference < 99 ? 'btn-primary' : 'btn-secondary' ?> wt-fix-button" type="button" data-action="add"> + <?= view('icons/add') ?> + <?= I18N::translate('add') ?> + <?php if (count($media) > 1) : ?> + <?= I18N::number(count($media)) ?> + <?php endif ?> + </button> + <?php endif ?> + <button class="btn <?= $difference >= 99 ? 'btn-primary' : 'btn-secondary' ?> wt-fix-button" type="button" data-action="delete"> <?= view('icons/delete') ?> - <?= I18N::translate('delete') ?> - </button> - </div> + <?= I18N::translate('delete') ?> + </button> + </div> </form> diff --git a/resources/views/admin/webtrees1-thumbnails.php b/resources/views/admin/webtrees1-thumbnails.php index aae045f857..3a88838c3a 100644 --- a/resources/views/admin/webtrees1-thumbnails.php +++ b/resources/views/admin/webtrees1-thumbnails.php @@ -6,26 +6,26 @@ <h1><?= $title ?></h1> <p> - <?= /* I18N: "thumbs" is fixed text. Do not change it. */ I18N::translate('In webtrees version 1, you could add custom thumbnails to media objects by creating files in the “thumbs” folders.') ?> - <br> - <?= I18N::translate('In webtrees version 2, custom thumbnails are stored as a second media file in the same media object.') ?> - <br> - <?= I18N::translate('If the thumbnail image is the same as the original image, it is no longer needed and you should delete it. If it is a custom image, you should add it to the media object.') ?> + <?= /* I18N: "thumbs" is fixed text. Do not change it. */ I18N::translate('In webtrees version 1, you could add custom thumbnails to media objects by creating files in the “thumbs” folders.') ?> + <br> + <?= I18N::translate('In webtrees version 2, custom thumbnails are stored as a second media file in the same media object.') ?> + <br> + <?= I18N::translate('If the thumbnail image is the same as the original image, it is no longer needed and you should delete it. If it is a custom image, you should add it to the media object.') ?> </p> <table class="table table-bordered table-sm table-hover datatables wt-fix-table" data-ajax="<?= e(json_encode(['url' => route('admin-webtrees1-thumbs-data')])) ?>" data-server-side="true" data-state-save="true" data-sort="false" data-auto-width="false" data-save-state="true"> - <caption class="sr-only"> - <?= I18N::translate('Media objects') ?> - </caption> - <thead class="thead-dark"> - <tr> - <th data-sortable="false"><?= I18N::translate('Thumbnail image') ?></th> - <th data-sortable="false"><?= I18N::translate('Media file') ?></th> - <th data-sortable="false"><?= I18N::translate('Media object') ?></th> - <th data-sortable="false"><?= I18N::translate('Comparison') ?></th> - <th data-sortable="false"><?= I18N::translate('Action') ?></th> - </tr> - </thead> + <caption class="sr-only"> + <?= I18N::translate('Media objects') ?> + </caption> + <thead class="thead-dark"> + <tr> + <th data-sortable="false"><?= I18N::translate('Thumbnail image') ?></th> + <th data-sortable="false"><?= I18N::translate('Media file') ?></th> + <th data-sortable="false"><?= I18N::translate('Media object') ?></th> + <th data-sortable="false"><?= I18N::translate('Comparison') ?></th> + <th data-sortable="false"><?= I18N::translate('Action') ?></th> + </tr> + </thead> </table> <?php View::push('javascript') ?> diff --git a/resources/views/ancestors-page.php b/resources/views/ancestors-page.php index fc08f296db..35e8a0ebaa 100644 --- a/resources/views/ancestors-page.php +++ b/resources/views/ancestors-page.php @@ -3,49 +3,49 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-ancestors-chart d-print-none"> - <input type="hidden" name="route" value="ancestors"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="ancestors"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - <?= I18N::translate('Layout') ?> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::radioButtons('chart_style', $chart_styles, $chart_style, true, ['onchange' => '$("input[name=show_cousins]").prop("disabled", $(this).val() !== "1")']) ?> - <?= Bootstrap4::checkbox(I18N::translate('Show cousins'), false, ['name' => 'show_cousins', 'disabled' => $chart_style !== '1', 'checked' => $show_cousins]) ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + <?= I18N::translate('Layout') ?> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::radioButtons('chart_style', $chart_styles, $chart_style, true, ['onchange' => '$("input[name=show_cousins]").prop("disabled", $(this).val() !== "1")']) ?> + <?= Bootstrap4::checkbox(I18N::translate('Show cousins'), false, ['name' => 'show_cousins', 'disabled' => $chart_style !== '1', 'checked' => $show_cousins]) ?> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-ancestors-chart" data-ajax-url="<?= e(route('ancestors-chart', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName(), 'generations' => $generations, 'chart_style' => $chart_style, 'show_cousins' => $show_cousins])) ?>"></div> diff --git a/resources/views/branches-page.php b/resources/views/branches-page.php index dd18b1962e..d8ba95276c 100644 --- a/resources/views/branches-page.php +++ b/resources/views/branches-page.php @@ -2,45 +2,45 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-branches d-print-none"> - <input type="hidden" name="route" value="branches"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="branches"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="form-group row"> - <label class="col-form-label col-sm-3 wt-page-options-label" for="surname"> - <?= I18N::translate('Surname') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" data-autocomplete-type="SURN" type="text" name="surname" id="surname" value="<?= e($surname) ?>" dir="auto"> - </div> - </div> + <div class="form-group row"> + <label class="col-form-label col-sm-3 wt-page-options-label" for="surname"> + <?= I18N::translate('Surname') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" data-autocomplete-type="SURN" type="text" name="surname" id="surname" value="<?= e($surname) ?>" dir="auto"> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - <?= I18N::translate('Phonetic search') ?> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::checkbox(I18N::translate('Russell'), true, ['name' => 'soundex_std', 'checked' => $soundex_std]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Daitch-Mokotoff'), true, ['name' => 'soundex_dm', 'checked' => $soundex_dm]) ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + <?= I18N::translate('Phonetic search') ?> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::checkbox(I18N::translate('Russell'), true, ['name' => 'soundex_std', 'checked' => $soundex_std]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Daitch-Mokotoff'), true, ['name' => 'soundex_dm', 'checked' => $soundex_dm]) ?> + </div> + </div> + </fieldset> - <div class="form-group row"> - <div class="col-sm-3 wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('view') ?> - </button> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('view') ?> + </button> + </div> + </div> </form> -<?php if ($surname !== ''): ?> - <div class="wt-ajax-load wt-page-content wt-chart wt-branches" data-ajax-url="<?= e(route('branches-list', ['surname' => $surname, 'soundex_std' => $soundex_std, 'soundex_dm' => $soundex_dm, 'ged' => $tree->getName()])) ?>"></div> +<?php if ($surname !== '') : ?> + <div class="wt-ajax-load wt-page-content wt-chart wt-branches" data-ajax-url="<?= e(route('branches-list', ['surname' => $surname, 'soundex_std' => $soundex_std, 'soundex_dm' => $soundex_dm, 'ged' => $tree->getName()])) ?>"></div> <?php endif ?> diff --git a/resources/views/calendar-page.php b/resources/views/calendar-page.php index 825ea8fc97..590a7c8145 100644 --- a/resources/views/calendar-page.php +++ b/resources/views/calendar-page.php @@ -5,173 +5,173 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form name="dateform"> - <input type="hidden" name="route" value="calendar"> - <input type="hidden" name="cal" value="<?= e($cal) ?>"> - <input type="hidden" name="day" value="<?= e($cal_date->d) ?>"> - <input type="hidden" name="month" value="<?= e($cal_month) ?>"> - <input type="hidden" name="year" value="<?= e($cal_date->y) ?>"> - <input type="hidden" name="view" value="<?= e($view) ?>"> - <input type="hidden" name="filterev" value="<?= e($filterev) ?>"> - <input type="hidden" name="filtersx" value="<?= e($filtersx) ?>"> - <input type="hidden" name="filterof" value="<?= e($filterof) ?>"> + <input type="hidden" name="route" value="calendar"> + <input type="hidden" name="cal" value="<?= e($cal) ?>"> + <input type="hidden" name="day" value="<?= e($cal_date->d) ?>"> + <input type="hidden" name="month" value="<?= e($cal_month) ?>"> + <input type="hidden" name="year" value="<?= e($cal_date->y) ?>"> + <input type="hidden" name="view" value="<?= e($view) ?>"> + <input type="hidden" name="filterev" value="<?= e($filterev) ?>"> + <input type="hidden" name="filtersx" value="<?= e($filtersx) ?>"> + <input type="hidden" name="filterof" value="<?= e($filterof) ?>"> - <table class="table-sm wt-page-options w-100" role="presentation"> - <tr> - <th class="wt-page-options-label"> - <?= I18N::translate('Day') ?> - </th> - <td class="wt-page-options-value" colspan="3"> - <?php for ($d = 1; $d <= $days_in_month; $d++): ?> - <a <?= $d === $cal_date->d ? 'class="error"' : '' ?> href="<?= e(route('calendar', ['cal' => $cal, 'day' => $d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <?= (new Date($cal_date->format("%@ {$d} %O %E")))->minimumDate()->format('%j') ?> - </a> - | - <?php endfor ?> - <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $today->d, 'month' => $today_month, 'year' => $today->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <b><?php $tmp = new Date($today->format('%@ %A %O %E')); echo $tmp->display() ?></b> - </a> - </td> - </tr> - <tr> - <th class="wt-page-options-label"> - <?= I18N::translate('Month') ?> - </th> - <td class="wt-page-options-value" colspan="3"> - <?php foreach ($months as $m => $month_name): ?> + <table class="table-sm wt-page-options w-100" role="presentation"> + <tr> + <th class="wt-page-options-label"> + <?= I18N::translate('Day') ?> + </th> + <td class="wt-page-options-value" colspan="3"> + <?php for ($d = 1; $d <= $days_in_month; $d++) : ?> + <a <?= $d === $cal_date->d ? 'class="error"' : '' ?> href="<?= e(route('calendar', ['cal' => $cal, 'day' => $d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <?= (new Date($cal_date->format("%@ {$d} %O %E")))->minimumDate()->format('%j') ?> + </a> + | + <?php endfor ?> + <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $today->d, 'month' => $today_month, 'year' => $today->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <b><?php $tmp = new Date($today->format('%@ %A %O %E')); echo $tmp->display() ?></b> + </a> + </td> + </tr> + <tr> + <th class="wt-page-options-label"> + <?= I18N::translate('Month') ?> + </th> + <td class="wt-page-options-value" colspan="3"> + <?php foreach ($months as $m => $month_name) : ?> <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $m, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <?php if ($m === $cal_month): ?> + <?php if ($m === $cal_month) : ?> <span class="error"><?= e($month_name) ?></span> - <?php else: ?> + <?php else : ?> <?= e($month_name) ?> <?php endif ?> </a> | <?php endforeach ?> - <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => min($cal_date->d, $today->daysInMonth()), 'month' => $today_month, 'year' => $today->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <b><?= $today->format('%F %Y') ?></b> - </a> - </td> - </tr> - <tr> - <th class="wt-page-options-label"> - <label for="year"><?= I18N::translate('Year') ?></label> - </th> - <td class="wt-page-options-value"> - <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y === 1 ? -1 : $cal_date->y - 1, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> - -1 - </a> - <input type="text" id="year" name="year" value="<?= $year ?>" size="4"> - <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y === -1 ? 1 : $cal_date->y + 1, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> - +1 - </a> - | - <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $today->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <?= $today->format('%Y') ?> - </a> - <?= FunctionsPrint::helpLink('annivers_year_select') ?> - </td> + <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => min($cal_date->d, $today->daysInMonth()), 'month' => $today_month, 'year' => $today->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <b><?= $today->format('%F %Y') ?></b> + </a> + </td> + </tr> + <tr> + <th class="wt-page-options-label"> + <label for="year"><?= I18N::translate('Year') ?></label> + </th> + <td class="wt-page-options-value"> + <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y === 1 ? -1 : $cal_date->y - 1, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> + -1 + </a> + <input type="text" id="year" name="year" value="<?= $year ?>" size="4"> + <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y === -1 ? 1 : $cal_date->y + 1, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> + +1 + </a> + | + <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $today->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <?= $today->format('%Y') ?> + </a> + <?= FunctionsPrint::helpLink('annivers_year_select') ?> + </td> - <th class="wt-page-options-label"> - <?= I18N::translate('Show') ?> - </th> + <th class="wt-page-options-label"> + <?= I18N::translate('Show') ?> + </th> - <td class="wt-page-options-value"> - <?php if (!$tree->getPreference('HIDE_LIVE_PEOPLE') || Auth::check()): ?> - <select class="list_value" name="filterof" onchange="document.dateform.submit();"> - <option value="all" <?= $filterof === 'all' ? 'selected' : '' ?>> - <?= I18N::translate('All individuals') ?> - </option> - <option value="living" <?= $filterof === 'living' ? 'selected' : '' ?>> - <?= I18N::translate('Living individuals') ?> - </option> - <option value="recent" <?= $filterof === 'recent' ? 'selected' : '' ?>> - <?= I18N::translate('Recent years (< 100 yrs)') ?> - </option> - </select> - <?php endif ?> + <td class="wt-page-options-value"> + <?php if (!$tree->getPreference('HIDE_LIVE_PEOPLE') || Auth::check()) : ?> + <select class="list_value" name="filterof" onchange="document.dateform.submit();"> + <option value="all" <?= $filterof === 'all' ? 'selected' : '' ?>> + <?= I18N::translate('All individuals') ?> + </option> + <option value="living" <?= $filterof === 'living' ? 'selected' : '' ?>> + <?= I18N::translate('Living individuals') ?> + </option> + <option value="recent" <?= $filterof === 'recent' ? 'selected' : '' ?>> + <?= I18N::translate('Recent years (< 100 yrs)') ?> + </option> + </select> + <?php endif ?> - <a title="<?= I18N::translate('All individuals') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => '', 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <i class="<?= $filtersx === '' ? 'icon-sex_m_15x15' : 'icon-sex_m_9x9' ?>"></i> - <i class="<?= $filtersx === '' ? 'icon-sex_f_15x15' : 'icon-sex_f_9x9' ?>"></i> - </a> - | - <a title="<?= I18N::translate('Males') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => 'M', 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <i class="<?= $filtersx === 'M' ? 'icon-sex_m_15x15' : 'icon-sex_m_9x9' ?>"></i> - </a> - | - <a title="<?= I18N::translate('Females') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => 'F', 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <i class="<?= $filtersx === 'F' ? 'icon-sex_f_15x15' : 'icon-sex_f_9x9' ?>"></i> - </a> + <a title="<?= I18N::translate('All individuals') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => '', 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <i class="<?= $filtersx === '' ? 'icon-sex_m_15x15' : 'icon-sex_m_9x9' ?>"></i> + <i class="<?= $filtersx === '' ? 'icon-sex_f_15x15' : 'icon-sex_f_9x9' ?>"></i> + </a> + | + <a title="<?= I18N::translate('Males') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => 'M', 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <i class="<?= $filtersx === 'M' ? 'icon-sex_m_15x15' : 'icon-sex_m_9x9' ?>"></i> + </a> + | + <a title="<?= I18N::translate('Females') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => 'F', 'view' => $view, 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <i class="<?= $filtersx === 'F' ? 'icon-sex_f_15x15' : 'icon-sex_f_9x9' ?>"></i> + </a> - <select class="list_value" name="filterev" onchange="document.dateform.submit();"> - <option value="BIRT-MARR-DEAT" <?= $filterev === 'BIRT-MARR-DEAT' ? 'selected' : '' ?>> - <?= I18N::translate('Vital records') ?> - </option> - <option value="" <?= $filterev === '' ? 'selected' : '' ?>> - <?= I18N::translate('All') ?> - </option> - <option value="BIRT" <?= $filterev === 'BIRT' ? 'selected' : '' ?>> - <?= I18N::translate('Birth') ?> - </option> - <option value="BAPM-CHR-CHRA" <?= $filterev === 'BAPM-CHR-CHRA' ? 'selected' : '' ?>> - <?= I18N::translate('Baptism') ?> - </option> - <option value="MARR-_COML-_NMR" <?= $filterev === 'MARR-_COML-_NMR' ? 'selected' : '' ?>> - <?= I18N::translate('Marriage') ?> - </option> - <option value="DIV-_SEPR" <?= $filterev === 'DIV-_SEPR' ? 'selected' : '' ?>> - <?= I18N::translate('Divorce') ?> - </option> - <option value="DEAT" <?= $filterev === 'DEAT' ? 'selected' : '' ?>> - <?= I18N::translate('Death') ?> - </option> - <option value="BURI" <?= $filterev === 'BURI' ? 'selected' : '' ?>> - <?= I18N::translate('Burial') ?> - </option> - <option value="IMMI,EMIG" <?= $filterev === 'IMMI,EMIG' ? 'selected' : '' ?>> - <?= I18N::translate('Emigration') ?> - </option> - <option value="EVEN" <?= $filterev === 'EVEN' ? 'selected' : '' ?>> - <?= I18N::translate('Custom event') ?> - </option> - </select> - </td> - </tr> - </table> + <select class="list_value" name="filterev" onchange="document.dateform.submit();"> + <option value="BIRT-MARR-DEAT" <?= $filterev === 'BIRT-MARR-DEAT' ? 'selected' : '' ?>> + <?= I18N::translate('Vital records') ?> + </option> + <option value="" <?= $filterev === '' ? 'selected' : '' ?>> + <?= I18N::translate('All') ?> + </option> + <option value="BIRT" <?= $filterev === 'BIRT' ? 'selected' : '' ?>> + <?= I18N::translate('Birth') ?> + </option> + <option value="BAPM-CHR-CHRA" <?= $filterev === 'BAPM-CHR-CHRA' ? 'selected' : '' ?>> + <?= I18N::translate('Baptism') ?> + </option> + <option value="MARR-_COML-_NMR" <?= $filterev === 'MARR-_COML-_NMR' ? 'selected' : '' ?>> + <?= I18N::translate('Marriage') ?> + </option> + <option value="DIV-_SEPR" <?= $filterev === 'DIV-_SEPR' ? 'selected' : '' ?>> + <?= I18N::translate('Divorce') ?> + </option> + <option value="DEAT" <?= $filterev === 'DEAT' ? 'selected' : '' ?>> + <?= I18N::translate('Death') ?> + </option> + <option value="BURI" <?= $filterev === 'BURI' ? 'selected' : '' ?>> + <?= I18N::translate('Burial') ?> + </option> + <option value="IMMI,EMIG" <?= $filterev === 'IMMI,EMIG' ? 'selected' : '' ?>> + <?= I18N::translate('Emigration') ?> + </option> + <option value="EVEN" <?= $filterev === 'EVEN' ? 'selected' : '' ?>> + <?= I18N::translate('Custom event') ?> + </option> + </select> + </td> + </tr> + </table> - <table class="width100"> - <tr> - <td class="topbottombar width50"> - <a class="<?= $view === 'day' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <?= I18N::translate('View this day') ?> - </a> - | - <a class="<?= $view === 'month' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <?= I18N::translate('View this month') ?> - </a> - | - <a class="<?= $view === 'year' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'year', 'ged' => $tree->getName()])) ?>" rel="nofollow"> - <?= I18N::translate('View this year') ?> - </a> - </td> - <td class="topbottombar width50"> - <?php - $n = 0; - foreach (Date::calendarNames() as $newcal => $cal_name) { - $tmp = $cal_date->convertToCalendar($newcal); - if ($tmp->inValidRange()) { - if ($n++) { - echo ' | '; - } - echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->d, 'month' => $tmp->format('%O'), 'year' => $tmp->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) . '" rel="nofollow">', $cal_name, '</a>'; - } - } ?> - </td> - </tr> - </table> + <table class="width100"> + <tr> + <td class="topbottombar width50"> + <a class="<?= $view === 'day' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <?= I18N::translate('View this day') ?> + </a> + | + <a class="<?= $view === 'month' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <?= I18N::translate('View this month') ?> + </a> + | + <a class="<?= $view === 'year' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $cal_month, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'year', 'ged' => $tree->getName()])) ?>" rel="nofollow"> + <?= I18N::translate('View this year') ?> + </a> + </td> + <td class="topbottombar width50"> + <?php + $n = 0; + foreach (Date::calendarNames() as $newcal => $cal_name) { + $tmp = $cal_date->convertToCalendar($newcal); + if ($tmp->inValidRange()) { + if ($n++) { + echo ' | '; + } + echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->d, 'month' => $tmp->format('%O'), 'year' => $tmp->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) . '" rel="nofollow">', $cal_name, '</a>'; + } + } ?> + </td> + </tr> + </table> </form> <div class="wt-ajax-load wt-page-content" data-ajax-url="<?= e(route('calendar-events', ['ged' => $tree->getName(), 'cal' => $cal, 'day' => $day, 'month' => $month, 'year' => $year, 'view' => $view, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx])) ?>"></div> diff --git a/resources/views/cards/add-associate.php b/resources/views/cards/add-associate.php index 2a660c2496..4951029ad5 100644 --- a/resources/views/cards/add-associate.php +++ b/resources/views/cards/add-associate.php @@ -2,16 +2,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4"> - <div class="card-header"> - <a href="#" data-toggle="collapse" data-target="#add-associate-<?= e($id) ?>" aria-expanded="false" aria-controls="add-associate"> - <?= I18N::translate('Add an associate') ?> - </a> - </div> + <div class="card-header"> + <a href="#" data-toggle="collapse" data-target="#add-associate-<?= e($id) ?>" aria-expanded="false" aria-controls="add-associate"> + <?= I18N::translate('Add an associate') ?> + </a> + </div> - <div class="card-body collapse" id="add-associate-<?= e($id) ?>"> - <?= FunctionsEdit::addSimpleTag($tree, $level . ' _ASSO @') ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' RELA') ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' NOTE') ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' SHARED_NOTE') ?> - </div> + <div class="card-body collapse" id="add-associate-<?= e($id) ?>"> + <?= FunctionsEdit::addSimpleTag($tree, $level . ' _ASSO @') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' RELA') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' NOTE') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' SHARED_NOTE') ?> + </div> </div> diff --git a/resources/views/cards/add-media-object.php b/resources/views/cards/add-media-object.php index bca793aac3..2ea0b00c9c 100644 --- a/resources/views/cards/add-media-object.php +++ b/resources/views/cards/add-media-object.php @@ -2,13 +2,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4"> - <div class="card-header"> - <a href="#" data-toggle="collapse" data-target="#add-media-object" aria-expanded="false" aria-controls="add-media-object"> - <?= I18N::translate('Add a media object') ?> - </a> - </div> + <div class="card-header"> + <a href="#" data-toggle="collapse" data-target="#add-media-object" aria-expanded="false" aria-controls="add-media-object"> + <?= I18N::translate('Add a media object') ?> + </a> + </div> - <div class="card-body collapse" id="add-media-object"> - <?= FunctionsEdit::addSimpleTag($tree, $level . ' OBJE') ?> - </div> + <div class="card-body collapse" id="add-media-object"> + <?= FunctionsEdit::addSimpleTag($tree, $level . ' OBJE') ?> + </div> </div> diff --git a/resources/views/cards/add-note.php b/resources/views/cards/add-note.php index 42340ef7c8..37ed5355a6 100644 --- a/resources/views/cards/add-note.php +++ b/resources/views/cards/add-note.php @@ -2,13 +2,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4"> - <div class="card-header"> - <a href="#" data-toggle="collapse" data-target="#add-note" aria-expanded="false" aria-controls="add-note"> - <?= I18N::translate('Add a note') ?> - </a> - </div> + <div class="card-header"> + <a href="#" data-toggle="collapse" data-target="#add-note" aria-expanded="false" aria-controls="add-note"> + <?= I18N::translate('Add a note') ?> + </a> + </div> - <div class="card-body collapse" id="add-note"> - <?= FunctionsEdit::addSimpleTag($tree, $level . ' NOTE') ?> - </div> + <div class="card-body collapse" id="add-note"> + <?= FunctionsEdit::addSimpleTag($tree, $level . ' NOTE') ?> + </div> </div> diff --git a/resources/views/cards/add-restriction.php b/resources/views/cards/add-restriction.php index ec71e9dbd6..6f5698212d 100644 --- a/resources/views/cards/add-restriction.php +++ b/resources/views/cards/add-restriction.php @@ -2,13 +2,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4"> - <div class="card-header"> - <a href="#" data-toggle="collapse" data-target="#add-restriction" aria-expanded="false" aria-controls="add-restriction"> - <?= I18N::translate('Add a restriction') ?> - </a> - </div> + <div class="card-header"> + <a href="#" data-toggle="collapse" data-target="#add-restriction" aria-expanded="false" aria-controls="add-restriction"> + <?= I18N::translate('Add a restriction') ?> + </a> + </div> - <div class="card-body collapse" id="add-restriction"> - <?= FunctionsEdit::addSimpleTag($tree, $level . ' RESN') ?> - </div> + <div class="card-body collapse" id="add-restriction"> + <?= FunctionsEdit::addSimpleTag($tree, $level . ' RESN') ?> + </div> </div> diff --git a/resources/views/cards/add-shared-note.php b/resources/views/cards/add-shared-note.php index 37a4504aa2..6226183257 100644 --- a/resources/views/cards/add-shared-note.php +++ b/resources/views/cards/add-shared-note.php @@ -2,13 +2,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4"> - <div class="card-header"> - <a href="#" data-toggle="collapse" data-target="#add-note-object" aria-expanded="false" aria-controls="add-note-object"> - <?= I18N::translate('Add a shared note') ?> - </a> - </div> + <div class="card-header"> + <a href="#" data-toggle="collapse" data-target="#add-note-object" aria-expanded="false" aria-controls="add-note-object"> + <?= I18N::translate('Add a shared note') ?> + </a> + </div> - <div class="card-body collapse" id="add-note-object"> - <?= FunctionsEdit::addSimpleTag($tree, $level . ' SHARED_NOTE') ?> - </div> + <div class="card-body collapse" id="add-note-object"> + <?= FunctionsEdit::addSimpleTag($tree, $level . ' SHARED_NOTE') ?> + </div> </div> diff --git a/resources/views/cards/add-source-citation.php b/resources/views/cards/add-source-citation.php index cf495345c8..6481f36e47 100644 --- a/resources/views/cards/add-source-citation.php +++ b/resources/views/cards/add-source-citation.php @@ -3,77 +3,77 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4"> - <div class="card-header"> - <a href="#" data-toggle="collapse" data-target="#add-source-citation" aria-expanded="false" aria-controls="add-source-citation"> - <?= I18N::translate('Add a source citation') ?> - </a> - </div> + <div class="card-header"> + <a href="#" data-toggle="collapse" data-target="#add-source-citation" aria-expanded="false" aria-controls="add-source-citation"> + <?= I18N::translate('Add a source citation') ?> + </a> + </div> - <div class="card-body collapse" id="add-source-citation"> - <?= FunctionsEdit::addSimpleTag($tree, $level . ' SOUR @') ?> + <div class="card-body collapse" id="add-source-citation"> + <?= FunctionsEdit::addSimpleTag($tree, $level . ' SOUR @') ?> - <?php if ($level === 1): ?> - <div class="row"> - <div class="col-sm-3"></div> - <div class="col-sm-9"> - <?php if (strpos($bdm, 'B') !== false): ?> - <label> - <input type="checkbox" name="SOUR_INDI" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1"> - <?= I18N::translate('Individual') ?> - </label> - <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)): ?> - <?php foreach ($matches[1] as $match): ?> - <?php if (!in_array($match, explode('|', WT_EVENTS_DEAT))): ?> - <label> - <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> - <?= GedcomTag::getLabel($match) ?> - </label> - <?php endif ?> - <?php endforeach ?> - <?php endif ?> - <?php endif ?> + <?php if ($level === 1) : ?> + <div class="row"> + <div class="col-sm-3"></div> + <div class="col-sm-9"> + <?php if (strpos($bdm, 'B') !== false) : ?> + <label> + <input type="checkbox" name="SOUR_INDI" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1"> + <?= I18N::translate('Individual') ?> + </label> + <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)) : ?> + <?php foreach ($matches[1] as $match) : ?> + <?php if (!in_array($match, explode('|', WT_EVENTS_DEAT))) : ?> + <label> + <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> + <?= GedcomTag::getLabel($match) ?> + </label> + <?php endif ?> + <?php endforeach ?> + <?php endif ?> + <?php endif ?> - <?php if (strpos($bdm, 'D') !== false): ?> - <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)): ?> - <?php foreach ($matches[1] as $match): ?> - <?php if (in_array($match, explode('|', WT_EVENTS_DEAT))): ?> - <label> - <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> - <?= GedcomTag::getLabel($match) ?> - </label> - <?php endif ?> - <?php endforeach ?> - <?php endif ?> - <?php endif ?> + <?php if (strpos($bdm, 'D') !== false) : ?> + <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)) : ?> + <?php foreach ($matches[1] as $match) : ?> + <?php if (in_array($match, explode('|', WT_EVENTS_DEAT))) : ?> + <label> + <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> + <?= GedcomTag::getLabel($match) ?> + </label> + <?php endif ?> + <?php endforeach ?> + <?php endif ?> + <?php endif ?> - <?php if (strpos($bdm, 'M') !== false): ?> - <label> - <input type="checkbox" name="SOUR_FAM" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1"> - <?= I18N::translate('Family') ?> - </label> - <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_famfacts, $matches)): ?> - <?php foreach ($matches[1] as $match): ?> - <label> - <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> - <?= GedcomTag::getLabel($match) ?> - </label> - <?php endforeach ?> - <?php endif ?> - <?php endif ?> - </div> - </div> - <?php endif ?> + <?php if (strpos($bdm, 'M') !== false) : ?> + <label> + <input type="checkbox" name="SOUR_FAM" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1"> + <?= I18N::translate('Family') ?> + </label> + <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_famfacts, $matches)) : ?> + <?php foreach ($matches[1] as $match) : ?> + <label> + <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> + <?= GedcomTag::getLabel($match) ?> + </label> + <?php endforeach ?> + <?php endif ?> + <?php endif ?> + </div> + </div> + <?php endif ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' PAGE') ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' DATA') ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 2) . ' TEXT') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' PAGE') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' DATA') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 2) . ' TEXT') ?> - <?php if ($full_citations): ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 2) . ' DATE', '', I18N::translate('Date of entry in original source')) ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' QUAY') ?> - <?php endif ?> + <?php if ($full_citations) : ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 2) . ' DATE', '', I18N::translate('Date of entry in original source')) ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' QUAY') ?> + <?php endif ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' OBJE') ?> - <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' SHARED_NOTE') ?> - </div> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' OBJE') ?> + <?= FunctionsEdit::addSimpleTag($tree, ($level + 1) . ' SHARED_NOTE') ?> + </div> </div> diff --git a/resources/views/compact-tree-arrow.php b/resources/views/compact-tree-arrow.php index f64d39e800..6f6b14cd36 100644 --- a/resources/views/compact-tree-arrow.php +++ b/resources/views/compact-tree-arrow.php @@ -1,8 +1,8 @@ <?php use Fisharebest\Webtrees\FontAwesome; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($individual === null): ?> - <?= FontAwesome::decorativeIcon($class) ?> -<?php else: ?> - <?= FontAwesome::linkIcon($class, I18N::translate('Compact tree of %s', strip_tags($individual->getFullName())), ['href' => route('compact-tree', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName()])]) ?> -<?php endif ?> +<?php if ($individual === null) : ?> + <?= FontAwesome::decorativeIcon($class) ?> +<?php else : ?> + <?= FontAwesome::linkIcon($class, I18N::translate('Compact tree of %s', strip_tags($individual->getFullName())), ['href' => route('compact-tree', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName()])]) ?> +<?php endif; diff --git a/resources/views/compact-tree-individual.php b/resources/views/compact-tree-individual.php index 95c320c95d..a93a18fc29 100644 --- a/resources/views/compact-tree-individual.php +++ b/resources/views/compact-tree-individual.php @@ -1,12 +1,12 @@ -<?php if ($individual === null): ?> - <div class="h-100 person_boxNN person_box_template"> </div> -<?php else: ?> - <div class="h-100 person_box<?= ['M' => '', 'F' => 'F', 'U' => 'NN'][$individual->getSex()]?> person_box_template"> - <a href="<?= e($individual->url()) ?>"> - <?= $individual->getFullName() ?> - </a> - <div class="small"> - <?= $individual->getLifeSpan() ?> - </div> - </div> +<?php if ($individual === null) : ?> + <div class="h-100 person_boxNN person_box_template"> </div> +<?php else : ?> + <div class="h-100 person_box<?= ['M' => '', 'F' => 'F', 'U' => 'NN'][$individual->getSex()]?> person_box_template"> + <a href="<?= e($individual->url()) ?>"> + <?= $individual->getFullName() ?> + </a> + <div class="small"> + <?= $individual->getLifeSpan() ?> + </div> + </div> <?php endif ?> diff --git a/resources/views/compact-tree-page.php b/resources/views/compact-tree-page.php index f42a0b5721..1662639fd9 100644 --- a/resources/views/compact-tree-page.php +++ b/resources/views/compact-tree-page.php @@ -2,28 +2,28 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-compact-chart d-print-none"> - <input type="hidden" name="route" value="compact-tree"> - <input type="hidden" name="ged" value="<?= e($individual->getTree()->getName()) ?>"> + <input type="hidden" name="route" value="compact-tree"> + <input type="hidden" name="ged" value="<?= e($individual->getTree()->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-compact-chart" data-ajax-url="<?= e(route('compact-tree-chart', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName()])) ?>"></div> diff --git a/resources/views/components/alert-warning-dismissible.php b/resources/views/components/alert-warning-dismissible.php index 72b06d27f2..c1e00ff861 100644 --- a/resources/views/components/alert-warning-dismissible.php +++ b/resources/views/components/alert-warning-dismissible.php @@ -1,9 +1,9 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="alert alert-warning alert-dismissible fade show" role="alert"> - <?= $alert ?> + <?= $alert ?> - <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> </div> diff --git a/resources/views/components/breadcrumbs.php b/resources/views/components/breadcrumbs.php index 59cc38ee92..f61a17c781 100644 --- a/resources/views/components/breadcrumbs.php +++ b/resources/views/components/breadcrumbs.php @@ -1,17 +1,17 @@ <nav class="wt-breadcrumbs" aria-label="breadcrumb" role="navigation"> - <ol class="breadcrumb small py-2"> - <?php foreach ($links as $url => $label): ?> - <?php if (is_int($url)): ?> - <li class="breadcrumb-item active"> - <?= $label ?> - </li> - <?php else: ?> - <li class="breadcrumb-item"> - <a href="<?= e($url) ?>"> - <?= $label ?> - </a> - </li> - <?php endif ?> - <?php endforeach ?> - </ol> + <ol class="breadcrumb small py-2"> + <?php foreach ($links as $url => $label) : ?> + <?php if (is_int($url)) : ?> + <li class="breadcrumb-item active"> + <?= $label ?> + </li> + <?php else : ?> + <li class="breadcrumb-item"> + <a href="<?= e($url) ?>"> + <?= $label ?> + </a> + </li> + <?php endif ?> + <?php endforeach ?> + </ol> </nav> diff --git a/resources/views/components/radios-hide-show.php b/resources/views/components/radios-hide-show.php index 620fd204b4..77bc12c3dc 100644 --- a/resources/views/components/radios-hide-show.php +++ b/resources/views/components/radios-hide-show.php @@ -1,15 +1,15 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-false" value="" <?= $value ? '' : 'checked' ?>> - <label class="form-check-label" for="radio-<?= e($name) ?>-false"> + <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-false" value="" <?= $value ? '' : 'checked' ?>> + <label class="form-check-label" for="radio-<?= e($name) ?>-false"> <?= I18N::translate('hide') ?> - </label> + </label> </div> <div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-true" value="1" <?= $value ? 'checked' : '' ?>> - <label class="form-check-label" for="radio-<?= e($name) ?>-true"> + <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-true" value="1" <?= $value ? 'checked' : '' ?>> + <label class="form-check-label" for="radio-<?= e($name) ?>-true"> <?= I18N::translate('show') ?> - </label> + </label> </div> diff --git a/resources/views/components/radios-no-yes.php b/resources/views/components/radios-no-yes.php index d3b363c1f5..bbf638b99b 100644 --- a/resources/views/components/radios-no-yes.php +++ b/resources/views/components/radios-no-yes.php @@ -1,15 +1,15 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-false" value="" <?= $value ? '' : 'checked' ?>> - <label class="form-check-label" for="radio-<?= e($name) ?>-false"> + <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-false" value="" <?= $value ? '' : 'checked' ?>> + <label class="form-check-label" for="radio-<?= e($name) ?>-false"> <?= I18N::translate('no') ?> - </label> + </label> </div> <div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-true" value="1" <?= $value ? 'checked' : '' ?>> - <label class="form-check-label" for="radio-<?= e($name) ?>-true"> + <input class="form-check-input" type="radio" name="<?= e($name) ?>" id="radio-<?= e($name) ?>-true" value="1" <?= $value ? 'checked' : '' ?>> + <label class="form-check-label" for="radio-<?= e($name) ?>-true"> <?= I18N::translate('yes') ?> - </label> + </label> </div> diff --git a/resources/views/contact-page.php b/resources/views/contact-page.php index a8b9e4b31c..e0d3ce9dc1 100644 --- a/resources/views/contact-page.php +++ b/resources/views/contact-page.php @@ -3,64 +3,64 @@ <h2><?= $title ?></h2> <form method="post" action="<?= e(route('contact')) ?>"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="url" value="<?= e($url) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="url" value="<?= e($url) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="to"> - <?= I18N::translate('To') ?> - </label> - <div class="col-sm-9"> - <input type="hidden" name="to" value="<?= e($to) ?>"> - <input class="form-control" id="to" type="text" value="<?= e($to_name) ?>" disabled> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="to"> + <?= I18N::translate('To') ?> + </label> + <div class="col-sm-9"> + <input type="hidden" name="to" value="<?= e($to) ?>"> + <input class="form-control" id="to" type="text" value="<?= e($to_name) ?>" disabled> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="from-name"> - <?= I18N::translate('Your name') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="from-name" type="text" name="from_name" value="<?= e($from_name) ?>" required> - </div> - </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="from-email"> - <?= I18N::translate('Email address') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="from-email" type="email" name="from_email" value="<?= e($from_email) ?>" required> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="from-name"> + <?= I18N::translate('Your name') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="from-name" type="text" name="from_name" value="<?= e($from_name) ?>" required> + </div> + </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="from-email"> + <?= I18N::translate('Email address') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="from-email" type="email" name="from_email" value="<?= e($from_email) ?>" required> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="subject"> - <?= I18N::translate('Subject') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="subject"> + <?= I18N::translate('Subject') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="body"> - <?= I18N::translate('Message') ?> - </label> - <div class="col-sm-9"> - <textarea class="form-control" id="body" rows="5" type="text" name="body" required><?= e($body) ?></textarea> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="body"> + <?= I18N::translate('Message') ?> + </label> + <div class="col-sm-9"> + <textarea class="form-control" id="body" rows="5" type="text" name="body" required><?= e($body) ?></textarea> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 col-form-label"></div> - <div class="col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('Send') ?> - </button> - <a class="btn btn-link" href="<?= e($url) ?>"> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 col-form-label"></div> + <div class="col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('Send') ?> + </button> + <a class="btn btn-link" href="<?= e($url) ?>"> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/descendants-page.php b/resources/views/descendants-page.php index 3c09ad9931..475639592c 100644 --- a/resources/views/descendants-page.php +++ b/resources/views/descendants-page.php @@ -3,49 +3,49 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-descendants-chart d-print-none"> - <input type="hidden" name="route" value="descendants"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="descendants"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - <?= I18N::translate('Layout') ?> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::radioButtons('chart_style', $chart_styles, $chart_style, true, []) ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + <?= I18N::translate('Layout') ?> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::radioButtons('chart_style', $chart_styles, $chart_style, true, []) ?> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ - I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ + I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-descendants-chart" data-ajax-url="<?= e(route('descendants-chart', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName(), 'generations' => $generations, 'chart_style' => $chart_style])) ?>"></div> diff --git a/resources/views/edit-account-page.php b/resources/views/edit-account-page.php index 7f70e00896..f4b807db06 100644 --- a/resources/views/edit-account-page.php +++ b/resources/views/edit-account-page.php @@ -19,184 +19,184 @@ </script> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-my-account" method="post" onsubmit="return checkform(this);"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="user-name"> - <?= I18N::translate('Username') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input type="text" class="form-control" id="user-name" name="user_name" value="<?= e($user->getUserName()) ?>" dir="auto" aria-describedby="username-description" required> - <p class="small text-muted" id="username-description"> - <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="user-name"> + <?= I18N::translate('Username') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input type="text" class="form-control" id="user-name" name="user_name" value="<?= e($user->getUserName()) ?>" dir="auto" aria-describedby="username-description" required> + <p class="small text-muted" id="username-description"> + <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="real-name"> - <?= I18N::translate('Real name') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input type="text" class="form-control" id="real-name" name="real_name" value="<?= e($user->getRealName()) ?>" dir="auto" aria-describedby="real-name-description" required> - <p class="small text-muted" id="username-description"> - <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="real-name"> + <?= I18N::translate('Real name') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input type="text" class="form-control" id="real-name" name="real_name" value="<?= e($user->getRealName()) ?>" dir="auto" aria-describedby="real-name-description" required> + <p class="small text-muted" id="username-description"> + <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="gedcom-id"> - <?= I18N::translate('Individual record') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <select class="form-control" id="gedcom-id" aria-describedby="gedcom-id-description" disabled> - <?php if ($my_individual_record !== null): ?> - <option value=""><?= $my_individual_record->getFullName() ?></option> - <?php else: ?> - <option value=""><?= I18N::translateContext('unknown people', 'Unknown') ?></option> - <?php endif ?> - </select> - <p class="small text-muted" id="gedcom-id-description"> - <?= I18N::translate('This is a link to your own record in the family tree. If this is the wrong individual, contact an administrator.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="gedcom-id"> + <?= I18N::translate('Individual record') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <select class="form-control" id="gedcom-id" aria-describedby="gedcom-id-description" disabled> + <?php if ($my_individual_record !== null) : ?> + <option value=""><?= $my_individual_record->getFullName() ?></option> + <?php else : ?> + <option value=""><?= I18N::translateContext('unknown people', 'Unknown') ?></option> + <?php endif ?> + </select> + <p class="small text-muted" id="gedcom-id-description"> + <?= I18N::translate('This is a link to your own record in the family tree. If this is the wrong individual, contact an administrator.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="root-id"> - <?= I18N::translate('Default individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $default_individual, ['id' => 'root-id', - 'name' => 'root_id', 'aria-describedby' => 'root-id-description']) ?> - <p class="small text-muted" id="root-id-description"> - <?= I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="root-id"> + <?= I18N::translate('Default individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $default_individual, ['id' => 'root-id', + 'name' => 'root_id', 'aria-describedby' => 'root-id-description']) ?> + <p class="small text-muted" id="root-id-description"> + <?= I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> - <?= I18N::translate('Password') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="password" id="password" name="password" aria-describedby="password-description" autocomplete="new-password"> - <p class="small text-muted" id="password-description"> - <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> - <br> - <?= I18N::translate('Leave the password blank if you want to keep the current password.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> + <?= I18N::translate('Password') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="password" id="password" name="password" aria-describedby="password-description" autocomplete="new-password"> + <p class="small text-muted" id="password-description"> + <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> + <br> + <?= I18N::translate('Leave the password blank if you want to keep the current password.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="password2"> - <?= I18N::translate('Confirm password') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="password" id="password2" name="password2" aria-describedby="password2-description" autocomplete="new-password"> - <p class="small text-muted" id="password2-description"> - <?= I18N::translate('Type your password again, to make sure you have typed it correctly.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="password2"> + <?= I18N::translate('Confirm password') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="password" id="password2" name="password2" aria-describedby="password2-description" autocomplete="new-password"> + <p class="small text-muted" id="password2-description"> + <?= I18N::translate('Type your password again, to make sure you have typed it correctly.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="language"> - <?= I18N::translate('Language') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($installed_languages, $user->getPreference('language'), ['id' => 'language', 'name' => 'language']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="language"> + <?= I18N::translate('Language') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($installed_languages, $user->getPreference('language'), ['id' => 'language', 'name' => 'language']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="timezone"> - <?= I18N::translate('Time zone') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($timezones, $user->getPreference('TIMEZONE', 'UTC'), ['id' => 'timezone', 'name' => 'timezone', 'aria-describedby' => 'timezone-description']) ?> - <p class="small text-muted" id="timezone-description"> - <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="timezone"> + <?= I18N::translate('Time zone') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($timezones, $user->getPreference('TIMEZONE', 'UTC'), ['id' => 'timezone', 'name' => 'timezone', 'aria-describedby' => 'timezone-description']) ?> + <p class="small text-muted" id="timezone-description"> + <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> - <?= I18N::translate('Email address') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="email" id="email" name="email" value="<?= e($user->getEmail()) ?>" aria-describedby="email-description"> - <p class="small text-muted" id="email-description"> - <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> + <?= I18N::translate('Email address') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="email" id="email" name="email" value="<?= e($user->getEmail()) ?>" aria-describedby="email-description"> + <p class="small text-muted" id="email-description"> + <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> + </p> + </div> + </div> - <?php if ($allow_user_themes): ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="theme"> - <?= I18N::translate('Theme') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($themes, $user->getPreference('theme'), ['id' => 'theme', 'name' => 'theme', 'aria-describedby' => 'theme-description']) ?> - <p class="small text-muted" id="theme-description"> - <?= /* I18N: Help text for the "Default theme" site configuration setting */ - I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> - </p> - </div> - </div> - <?php endif ?> + <?php if ($allow_user_themes) : ?> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="theme"> + <?= I18N::translate('Theme') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($themes, $user->getPreference('theme'), ['id' => 'theme', 'name' => 'theme', 'aria-describedby' => 'theme-description']) ?> + <p class="small text-muted" id="theme-description"> + <?= /* I18N: Help text for the "Default theme" site configuration setting */ + I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> + </p> + </div> + </div> + <?php endif ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="contact-method"> - <?= I18N::translate('Contact method') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($contact_methods, $user->getPreference('contactmethod'), ['id' => 'contact-method', 'name' => 'contact_method', 'aria-describedby' => 'contact-method-description']) ?> - <p class="small text-muted" id="contact-method-description"> - <?= I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="contact-method"> + <?= I18N::translate('Contact method') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($contact_methods, $user->getPreference('contactmethod'), ['id' => 'contact-method', 'name' => 'contact_method', 'aria-describedby' => 'contact-method-description']) ?> + <p class="small text-muted" id="contact-method-description"> + <?= I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.') ?> + </p> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Visible online') ?> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::checkbox(I18N::translate('Visible to other users when online'), false, ['name' => 'visible_online', 'checked' => (bool) $user->getPreference('visibleonline'), 'aria-describedby' => 'visible-online-description']) ?> - <p class="small text-muted" id="visible-online-description"> - <?= I18N::translate('You can choose whether to appear in the list of users who are currently signed-in.') ?> - </p> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Visible online') ?> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::checkbox(I18N::translate('Visible to other users when online'), false, ['name' => 'visible_online', 'checked' => (bool) $user->getPreference('visibleonline'), 'aria-describedby' => 'visible-online-description']) ?> + <p class="small text-muted" id="visible-online-description"> + <?= I18N::translate('You can choose whether to appear in the list of users who are currently signed-in.') ?> + </p> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= I18N::translate('save') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= I18N::translate('save') ?>"> + </div> + </div> </form> -<?php if ($show_delete_option): ?> - <form action="<?= e(route('delete-account', ['ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-danger" type="submit" value="<?= I18N::translate('Delete your account') ?>" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($user->getUserName())) ?>" onclick="return confirm(this.dataset.confirm);"> - </div> - </div> - </form> +<?php if ($show_delete_option) : ?> + <form action="<?= e(route('delete-account', ['ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-danger" type="submit" value="<?= I18N::translate('Delete your account') ?>" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($user->getUserName())) ?>" onclick="return confirm(this.dataset.confirm);"> + </div> + </div> + </form> <?php endif ?> diff --git a/resources/views/edit-blocks-page.php b/resources/views/edit-blocks-page.php index 3d528da733..d46e1b447f 100644 --- a/resources/views/edit-blocks-page.php +++ b/resources/views/edit-blocks-page.php @@ -119,123 +119,123 @@ } } var block_descr = { advice1: " "}; - <?php foreach ($all_blocks as $block_name => $block): ?> + <?php foreach ($all_blocks as $block_name => $block) : ?> block_descr[<?= json_encode($block_name) ?>] = <?= json_encode($block->getDescription()) ?>; - <?php endforeach ?> + <?php endforeach ?> </script> <h2><?= $title ?></h2> <p> - <?= I18N::translate('Select a block and use the arrows to move it.') ?> + <?= I18N::translate('Select a block and use the arrows to move it.') ?> </p> <form name="config_setup" method="post" action="<?= e($url_save) ?>" onsubmit="select_options();" > - <?= csrf_field() ?> - <table border="1" id="change_blocks"> - <thead> - <tr> - <th class="descriptionbox center vmiddle" colspan="2"> - <label for="main_select"> - <?= I18N::translate('Main section blocks') ?> - </label> - </th> - <th class="descriptionbox center vmiddle" colspan="3"> - <label for="available_select"> - <?= I18N::translate('Available blocks') ?> - </label> - </th> - <th class="descriptionbox center vmiddle" colspan="2"> - <label for="side_select"> - <?= I18N::translate('Right section blocks') ?> - </label> - </th> - </tr> - </thead> - <tbody> - <tr> - <td class="optionbox center vmiddle"> - <?= FontAwesome::linkIcon('arrow-up', I18N::translate('Move up'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_up_block("main_select");']) ?> - <br> - <?= FontAwesome::linkIcon('arrow-end', I18N::translate('Move right'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("main_select", "side_select");']) ?> - <br> - <?= FontAwesome::linkIcon('delete', I18N::translate('Remove'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("main_select", "available_select");']) ?> - <br> - <?= FontAwesome::linkIcon('arrow-down', I18N::translate('Move down'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_down_block("main_select");']) ?> - </td> - <td class="optionbox center"> - <select multiple="multiple" id="main_select" name="main[]" size="10" onchange="show_description('main_select');"> - <?php foreach ($main_blocks as $block_id => $block): ?> - <option value="<?= $block_id ?>"> - <?= $all_blocks[$block->getName()]->getTitle() ?> - </option> - <?php endforeach ?> - </select> - </td> - <td class="optionbox center vmiddle"> - <?= FontAwesome::linkIcon('arrow-start', I18N::translate('Add'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("available_select", "main_select");']) ?> - </td> - <td class="optionbox center"> - <select multiple id="available_select" size="10" onchange="show_description('available_select');"> - <?php foreach ($all_blocks as $block_name => $block): ?> - <option value="<?= $block_name ?>"> - <?= $block->getTitle() ?> - </option> - <?php endforeach ?> - </select> - </td> - <td class="optionbox center vmiddle"> - <?= FontAwesome::linkIcon('arrow-end', I18N::translate('Add'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("available_select", "side_select");']) ?> - </td> - <td class="optionbox center"> - <select multiple="multiple" id="side_select" name="side[]" size="10" onchange="show_description('side_select');"> - <?php foreach ($side_blocks as $block_id => $block): ?> - <option value="<?= $block_id ?>"> - <?= $all_blocks[$block->getName()]->getTitle() ?> - </option> - <?php endforeach ?> - </select> - </td> - <td class="optionbox center vmiddle"> - <?= FontAwesome::linkIcon('arrow-up', I18N::translate('Move up'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_up_block("side_select");']) ?> - <br> - <?= FontAwesome::linkIcon('arrow-start', I18N::translate('Move left'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("side_select", "main_select");']) ?> - <br> - <?= FontAwesome::linkIcon('delete', I18N::translate('Remove'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("side_select", "available_select");']) ?> - <br> - <?= FontAwesome::linkIcon('arrow-down', I18N::translate('Move down'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_down_block("side_select");']) ?> - </td> - </tr> - </tbody> - <tfoot> - <tr> - <td class="descriptionbox wrap" colspan="7"> - <div id="instructions"> - - </div> - </td> - </tr> - <tr> - <td class="topbottombar" colspan="4"> - <?php if ($can_reset): ?> - <label> - <input type="checkbox" name="default"> - <?= I18N::translate('Restore the default block layout') ?> - </label> - <?php endif ?> - </td> - <td class="topbottombar" colspan="3"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($url_cancel) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </td> - </tr> - </tfoot> - </table> + <?= csrf_field() ?> + <table border="1" id="change_blocks"> + <thead> + <tr> + <th class="descriptionbox center vmiddle" colspan="2"> + <label for="main_select"> + <?= I18N::translate('Main section blocks') ?> + </label> + </th> + <th class="descriptionbox center vmiddle" colspan="3"> + <label for="available_select"> + <?= I18N::translate('Available blocks') ?> + </label> + </th> + <th class="descriptionbox center vmiddle" colspan="2"> + <label for="side_select"> + <?= I18N::translate('Right section blocks') ?> + </label> + </th> + </tr> + </thead> + <tbody> + <tr> + <td class="optionbox center vmiddle"> + <?= FontAwesome::linkIcon('arrow-up', I18N::translate('Move up'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_up_block("main_select");']) ?> + <br> + <?= FontAwesome::linkIcon('arrow-end', I18N::translate('Move right'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("main_select", "side_select");']) ?> + <br> + <?= FontAwesome::linkIcon('delete', I18N::translate('Remove'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("main_select", "available_select");']) ?> + <br> + <?= FontAwesome::linkIcon('arrow-down', I18N::translate('Move down'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_down_block("main_select");']) ?> + </td> + <td class="optionbox center"> + <select multiple="multiple" id="main_select" name="main[]" size="10" onchange="show_description('main_select');"> + <?php foreach ($main_blocks as $block_id => $block) : ?> + <option value="<?= $block_id ?>"> + <?= $all_blocks[$block->getName()]->getTitle() ?> + </option> + <?php endforeach ?> + </select> + </td> + <td class="optionbox center vmiddle"> + <?= FontAwesome::linkIcon('arrow-start', I18N::translate('Add'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("available_select", "main_select");']) ?> + </td> + <td class="optionbox center"> + <select multiple id="available_select" size="10" onchange="show_description('available_select');"> + <?php foreach ($all_blocks as $block_name => $block) : ?> + <option value="<?= $block_name ?>"> + <?= $block->getTitle() ?> + </option> + <?php endforeach ?> + </select> + </td> + <td class="optionbox center vmiddle"> + <?= FontAwesome::linkIcon('arrow-end', I18N::translate('Add'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("available_select", "side_select");']) ?> + </td> + <td class="optionbox center"> + <select multiple="multiple" id="side_select" name="side[]" size="10" onchange="show_description('side_select');"> + <?php foreach ($side_blocks as $block_id => $block) : ?> + <option value="<?= $block_id ?>"> + <?= $all_blocks[$block->getName()]->getTitle() ?> + </option> + <?php endforeach ?> + </select> + </td> + <td class="optionbox center vmiddle"> + <?= FontAwesome::linkIcon('arrow-up', I18N::translate('Move up'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_up_block("side_select");']) ?> + <br> + <?= FontAwesome::linkIcon('arrow-start', I18N::translate('Move left'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("side_select", "main_select");']) ?> + <br> + <?= FontAwesome::linkIcon('delete', I18N::translate('Remove'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_left_right_block("side_select", "available_select");']) ?> + <br> + <?= FontAwesome::linkIcon('arrow-down', I18N::translate('Move down'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return move_down_block("side_select");']) ?> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td class="descriptionbox wrap" colspan="7"> + <div id="instructions"> + + </div> + </td> + </tr> + <tr> + <td class="topbottombar" colspan="4"> + <?php if ($can_reset) : ?> + <label> + <input type="checkbox" name="default"> + <?= I18N::translate('Restore the default block layout') ?> + </label> + <?php endif ?> + </td> + <td class="topbottombar" colspan="3"> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($url_cancel) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </td> + </tr> + </tfoot> + </table> </form> diff --git a/resources/views/edit/add-fact.php b/resources/views/edit/add-fact.php index 04d3f0fd5a..aa4a6952e3 100644 --- a/resources/views/edit/add-fact.php +++ b/resources/views/edit/add-fact.php @@ -10,82 +10,82 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" action="<?= e(route('update-fact', ['ged' => $tree->getName(), 'xref' => $record->getXref()])) ?>" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <?php FunctionsEdit::createAddForm($tree, $fact) ?> + <?php FunctionsEdit::createAddForm($tree, $fact) ?> - <?php if (($record::RECORD_TYPE === 'INDI' || $record::RECORD_TYPE === 'FAM') && $fact !== 'OBJE' && $fact !== 'NOTE' && $fact !== 'SHARED_NOTE' && $fact !== 'REPO' && $fact !== 'SOUR' && $fact !== 'SUBM' && $fact !== 'ASSO' && $fact !== 'ALIA' && $fact !== 'SEX'): ?> - <?= view('cards/add-source-citation', [ - 'level' => 2, - 'full_citations' => $tree->getPreference('FULL_SOURCES'), - 'tree' => $tree, - ]); ?> + <?php if (($record::RECORD_TYPE === 'INDI' || $record::RECORD_TYPE === 'FAM') && $fact !== 'OBJE' && $fact !== 'NOTE' && $fact !== 'SHARED_NOTE' && $fact !== 'REPO' && $fact !== 'SOUR' && $fact !== 'SUBM' && $fact !== 'ASSO' && $fact !== 'ALIA' && $fact !== 'SEX') : ?> + <?= view('cards/add-source-citation', [ + 'level' => 2, + 'full_citations' => $tree->getPreference('FULL_SOURCES'), + 'tree' => $tree, + ]); ?> - <?php if ($tree->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($tree)): ?> - <?= view('cards/add-media-object', [ - 'level' => 2, - 'tree' => $tree, - ]) ?> - <?php endif ?> + <?php if ($tree->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($tree)) : ?> + <?= view('cards/add-media-object', [ + 'level' => 2, + 'tree' => $tree, + ]) ?> + <?php endif ?> - <?php if ($fact !== 'NOTE'): ?> - <?= view('cards/add-note', [ - 'level' => 2, - 'tree' => $tree, - ]) ?> + <?php if ($fact !== 'NOTE') : ?> + <?= view('cards/add-note', [ + 'level' => 2, + 'tree' => $tree, + ]) ?> - <?= view('cards/add-shared-note', [ - 'level' => 2, - 'tree' => $tree, - ]) ?> - <?php endif ?> + <?= view('cards/add-shared-note', [ + 'level' => 2, + 'tree' => $tree, + ]) ?> + <?php endif ?> - <?= view('cards/add-associate', [ - 'id' => Uuid::uuid4()->toString(), - 'level' => 2, - 'tree' => $tree, - ]) ?> - <?php if (in_array($fact, Config::twoAssociates())): ?> - <?= view('cards/add-associate', [ - 'id' => Uuid::uuid4()->toString(), - 'level' => 2, - 'tree' => $tree, - ]) ?> - <?php endif ?> + <?= view('cards/add-associate', [ + 'id' => Uuid::uuid4()->toString(), + 'level' => 2, + 'tree' => $tree, + ]) ?> + <?php if (in_array($fact, Config::twoAssociates())) : ?> + <?= view('cards/add-associate', [ + 'id' => Uuid::uuid4()->toString(), + 'level' => 2, + 'tree' => $tree, + ]) ?> + <?php endif ?> - <?= view('cards/add-restriction', [ - 'level' => 2, - 'tree' => $tree, - ]) ?> - <?php endif ?> + <?= view('cards/add-restriction', [ + 'level' => 2, + 'tree' => $tree, + ]) ?> + <?php endif ?> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="keep_chan"> - <?= I18N::translate('Last change') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::checkbox(I18N::translate('Keep the existing “last change” information'), true, ['name' => 'keep_chan', 'checked' => (bool) $tree->getPreference('NO_UPDATE_CHAN')]) ?> - <?= GedcomTag::getLabelValue('DATE', $record->lastChangeTimestamp()) ?> - <?= GedcomTag::getLabelValue('_WT_USER', e($record->lastChangeUser())) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="keep_chan"> + <?= I18N::translate('Last change') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::checkbox(I18N::translate('Keep the existing “last change” information'), true, ['name' => 'keep_chan', 'checked' => (bool) $tree->getPreference('NO_UPDATE_CHAN')]) ?> + <?= GedcomTag::getLabelValue('DATE', $record->lastChangeTimestamp()) ?> + <?= GedcomTag::getLabelValue('_WT_USER', e($record->lastChangeUser())) ?> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> + </div> + </div> </form> <?= view('modals/on-screen-keyboard') ?> diff --git a/resources/views/edit/change-family-members.php b/resources/views/edit/change-family-members.php index 55ceeb65d7..011182c042 100644 --- a/resources/views/edit/change-family-members.php +++ b/resources/views/edit/change-family-members.php @@ -5,81 +5,81 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" name="changefamform" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="xref" value="<?= e($family->getXref()) ?>"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="xref" value="<?= e($family->getXref()) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="HUSB"> - <?php if ($father !== null && $father->getSex() === 'M'): ?> - <?= I18N::translate('Husband') ?> - <?php elseif ($father !== null && $father->getSex() === 'F'): ?> - <?= I18N::translate('Wife') ?> - <?php else: ?> - <?= I18N::translate('Spouse') ?> - <?php endif ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $father, ['id' => 'HUSB', 'name' => 'HUSB']) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="HUSB"> + <?php if ($father !== null && $father->getSex() === 'M') : ?> + <?= I18N::translate('Husband') ?> + <?php elseif ($father !== null && $father->getSex() === 'F') : ?> + <?= I18N::translate('Wife') ?> + <?php else : ?> + <?= I18N::translate('Spouse') ?> + <?php endif ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $father, ['id' => 'HUSB', 'name' => 'HUSB']) ?> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="WIFE"> - <?php if ($mother !== null && $mother->getSex() === 'M'): ?> - <?= I18N::translate('Husband') ?> - <?php elseif ($mother !== null && $mother->getSex() === 'F'): ?> - <?= I18N::translate('Wife') ?> - <?php else: ?> - <?= I18N::translate('Spouse') ?> - <?php endif ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $mother, ['id' => 'WIFE', 'name' => 'WIFE']) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="WIFE"> + <?php if ($mother !== null && $mother->getSex() === 'M') : ?> + <?= I18N::translate('Husband') ?> + <?php elseif ($mother !== null && $mother->getSex() === 'F') : ?> + <?= I18N::translate('Wife') ?> + <?php else : ?> + <?= I18N::translate('Spouse') ?> + <?php endif ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $mother, ['id' => 'WIFE', 'name' => 'WIFE']) ?> + </div> + </div> - <?php foreach ($children as $n => $child): ?> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="CHIL<?= e($n) ?>"> - <?php if ($child !== null && $child->getSex() === 'M'): ?> - <?= I18N::translate('Son') ?> - <?php elseif ($child !== null && $child->getSex() === 'F'): ?> - <?= I18N::translate('Daughter') ?> - <?php else: ?> - <?= I18N::translate('Child') ?> - <?php endif ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $child, ['id' => 'CHIL' . $n, 'name' => 'CHIL' . $n]) ?> - </div> - </div> - <?php endforeach ?> + <?php foreach ($children as $n => $child) : ?> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="CHIL<?= e($n) ?>"> + <?php if ($child !== null && $child->getSex() === 'M') : ?> + <?= I18N::translate('Son') ?> + <?php elseif ($child !== null && $child->getSex() === 'F') : ?> + <?= I18N::translate('Daughter') ?> + <?php else : ?> + <?= I18N::translate('Child') ?> + <?php endif ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $child, ['id' => 'CHIL' . $n, 'name' => 'CHIL' . $n]) ?> + </div> + </div> + <?php endforeach ?> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="CHIL<?= e(count($children) + 1) ?>"> - <?= I18N::translate('Child') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'CHIL' . (count($children) + 1), 'name' => 'CHIL' . (count($children) + 1)]) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="CHIL<?= e(count($children) + 1) ?>"> + <?= I18N::translate('Child') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'CHIL' . (count($children) + 1), 'name' => 'CHIL' . (count($children) + 1)]) ?> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($family->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($family->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/edit/edit-fact.php b/resources/views/edit/edit-fact.php index 6c4f363231..0ca408d291 100644 --- a/resources/views/edit/edit-fact.php +++ b/resources/views/edit/edit-fact.php @@ -9,114 +9,115 @@ <h2 class="wt-page-title"><?= $title ?></h2> -<form class="wt-page-content" action="<?= e(route('update-fact', ['ged' => $tree->getName(), 'xref' => $record->getXref(), 'fact_id' => $edit_fact->getFactId()])) ?>" method="post"> <?= csrf_field() ?> +<form class="wt-page-content" action="<?= e(route('update-fact', ['ged' => $tree->getName(), 'xref' => $record->getXref(), 'fact_id' => $edit_fact->getFactId()])) ?>" method="post"> <?= csrf_field() ?> - <?php FunctionsEdit::createEditForm($edit_fact) ?> + <?php FunctionsEdit::createEditForm($edit_fact) ?> - <?php - $level1type = $edit_fact->getTag(); - switch ($record::RECORD_TYPE) { - case 'REPO': - // REPO:NAME facts may take a NOTE (but the REPO record may not). - if ($level1type === 'NAME') { - echo view('cards/add-note', [ - 'level' => 2, - 'tree' => $tree, - ]); - echo view('addSimpleTag($tree, ', [ - 'level' => 2, - 'tree' => $tree, - ]); - } - break; - case 'FAM': - case 'INDI': - // FAM and INDI records have real facts. They can take NOTE/SOUR/OBJE/etc. - if ($level1type !== 'SEX' && $level1type !== 'NOTE' && $level1type !== 'ALIA') { - if ($level1type !== 'SOUR') { - echo view('cards/add-source-citation', [ - 'level' => 2, - 'full_citations' => $tree->getPreference('FULL_SOURCES'), - 'tree' => $tree, - ]); } - if ($level1type !== 'OBJE') { - if ($tree->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($tree)) { - echo view('cards/add-media-object', [ - 'level' => 2, - 'tree' => $tree, - ]); - } - } - echo view('cards/add-note', [ - 'level' => 2, - 'tree' => $tree, - ]); - echo view('cards/add-shared-note', [ - 'level' => 2, - 'tree' => $tree, - ]); - if ($level1type !== 'ASSO' && $level1type !== 'NOTE' && $level1type !== 'SOUR') { - echo view('cards/add-associate', [ - 'id' => Uuid::uuid4()->toString(), - 'level' => 2, - 'tree' => $tree, - ]); - } - // allow to add godfather and godmother for CHR fact or best man and bridesmaid for MARR fact in one window - if (in_array($level1type, Config::twoAssociates())) { - echo view('cards/add-associate', [ - 'id' => Uuid::uuid4()->toString(), - 'level' => 2, - 'tree' => $tree, - ]); - } - if ($level1type !== 'SOUR') { - echo view('cards/add-restriction', [ - 'level' => 2, - 'tree' => $tree, - ]); - } - } - break; - default: - // Other types of record do not have these lower-level records - break; - } + <?php + $level1type = $edit_fact->getTag(); + switch ($record::RECORD_TYPE) { + case 'REPO': + // REPO:NAME facts may take a NOTE (but the REPO record may not). + if ($level1type === 'NAME') { + echo view('cards/add-note', [ + 'level' => 2, + 'tree' => $tree, + ]); + echo view('addSimpleTag($tree, ', [ + 'level' => 2, + 'tree' => $tree, + ]); + } + break; + case 'FAM': + case 'INDI': + // FAM and INDI records have real facts. They can take NOTE/SOUR/OBJE/etc. + if ($level1type !== 'SEX' && $level1type !== 'NOTE' && $level1type !== 'ALIA') { + if ($level1type !== 'SOUR') { + echo view('cards/add-source-citation', [ + 'level' => 2, + 'full_citations' => $tree->getPreference('FULL_SOURCES'), + 'tree' => $tree, + ]); + } + if ($level1type !== 'OBJE') { + if ($tree->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($tree)) { + echo view('cards/add-media-object', [ + 'level' => 2, + 'tree' => $tree, + ]); + } + } + echo view('cards/add-note', [ + 'level' => 2, + 'tree' => $tree, + ]); + echo view('cards/add-shared-note', [ + 'level' => 2, + 'tree' => $tree, + ]); + if ($level1type !== 'ASSO' && $level1type !== 'NOTE' && $level1type !== 'SOUR') { + echo view('cards/add-associate', [ + 'id' => Uuid::uuid4()->toString(), + 'level' => 2, + 'tree' => $tree, + ]); + } + // allow to add godfather and godmother for CHR fact or best man and bridesmaid for MARR fact in one window + if (in_array($level1type, Config::twoAssociates())) { + echo view('cards/add-associate', [ + 'id' => Uuid::uuid4()->toString(), + 'level' => 2, + 'tree' => $tree, + ]); + } + if ($level1type !== 'SOUR') { + echo view('cards/add-restriction', [ + 'level' => 2, + 'tree' => $tree, + ]); + } + } + break; + default: + // Other types of record do not have these lower-level records + break; + } - ?> + ?> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="keep_chan"> - <?= I18N::translate('Last change') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::checkbox(I18N::translate('Keep the existing “last change” information'), true, ['name' => 'keep_chan', 'checked' => (bool) $tree->getPreference('NO_UPDATE_CHAN')]) ?> - <?= GedcomTag::getLabelValue('DATE', $record->lastChangeTimestamp()) ?> - <?= GedcomTag::getLabelValue('_WT_USER', e($record->lastChangeUser())) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="keep_chan"> + <?= I18N::translate('Last change') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::checkbox(I18N::translate('Keep the existing “last change” information'), true, ['name' => 'keep_chan', 'checked' => (bool) $tree->getPreference('NO_UPDATE_CHAN')]) ?> + <?= GedcomTag::getLabelValue('DATE', $record->lastChangeTimestamp()) ?> + <?= GedcomTag::getLabelValue('_WT_USER', e($record->lastChangeUser())) ?> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> - <?php if ($can_edit_raw): ?> - <a class="btn btn-link" href="<?= e(route('edit-raw-fact', ['xref' => $record->getXref(), 'fact_id' => $edit_fact->getFactId(), 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif; ?> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> + <?php if ($can_edit_raw) : ?> + <a class="btn btn-link" href="<?= e(route('edit-raw-fact', ['xref' => $record->getXref(), 'fact_id' => $edit_fact->getFactId(), 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif; ?> + </div> + </div> </form> <?= view('modals/on-screen-keyboard') ?> diff --git a/resources/views/edit/initialize-calendar-popup.php b/resources/views/edit/initialize-calendar-popup.php index 023501aa22..047eb4ce93 100644 --- a/resources/views/edit/initialize-calendar-popup.php +++ b/resources/views/edit/initialize-calendar-popup.php @@ -4,28 +4,28 @@ <?php View::push('javascript') ?> <script> cal_setMonthNames( - <?= json_encode(I18N::translateContext('NOMINATIVE', 'January')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'February')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'March')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'April')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'May')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'June')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'July')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'August')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'September')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'October')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'November')) ?>, - <?= json_encode(I18N::translateContext('NOMINATIVE', 'December')) ?> + <?= json_encode(I18N::translateContext('NOMINATIVE', 'January')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'February')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'March')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'April')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'May')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'June')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'July')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'August')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'September')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'October')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'November')) ?>, + <?= json_encode(I18N::translateContext('NOMINATIVE', 'December')) ?> ); cal_setDayHeaders( - <?= json_encode(I18N::translate('Sun')) ?>, - <?= json_encode(I18N::translate('Mon')) ?>, - <?= json_encode(I18N::translate('Tue')) ?>, - <?= json_encode(I18N::translate('Wed')) ?>, - <?= json_encode(I18N::translate('Thu')) ?>, - <?= json_encode(I18N::translate('Fri')) ?>, - <?= json_encode(I18N::translate('Sat')) ?> + <?= json_encode(I18N::translate('Sun')) ?>, + <?= json_encode(I18N::translate('Mon')) ?>, + <?= json_encode(I18N::translate('Tue')) ?>, + <?= json_encode(I18N::translate('Wed')) ?>, + <?= json_encode(I18N::translate('Thu')) ?>, + <?= json_encode(I18N::translate('Fri')) ?>, + <?= json_encode(I18N::translate('Sat')) ?> ); cal_setWeekStart(" . I18N::firstDay() . "); diff --git a/resources/views/edit/input-addon-calendar.php b/resources/views/edit/input-addon-calendar.php index 8943f6c1df..6891da9938 100644 --- a/resources/views/edit/input-addon-calendar.php +++ b/resources/views/edit/input-addon-calendar.php @@ -2,7 +2,7 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="input-group-append"> - <span class="input-group-text"> - <?= FontAwesome::linkIcon('calendar', I18N::translate('Select a date'), ['href' => '#', 'onclick' => 'return calendarWidget("caldiv' . $id . '", "' . $id . '");']) ?> - </span> + <span class="input-group-text"> + <?= FontAwesome::linkIcon('calendar', I18N::translate('Select a date'), ['href' => '#', 'onclick' => 'return calendarWidget("caldiv' . $id . '", "' . $id . '");']) ?> + </span> </div> diff --git a/resources/views/edit/input-addon-coordinates.php b/resources/views/edit/input-addon-coordinates.php index 800aabf2be..c3fc51830a 100644 --- a/resources/views/edit/input-addon-coordinates.php +++ b/resources/views/edit/input-addon-coordinates.php @@ -2,7 +2,7 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="input-group-append"> - <span class="input-group-text"> - <?= FontAwesome::linkIcon('coordinates', I18N::translate('Latitude') . ' / ' . I18N::translate('Longitude'), ['data-toggle' => 'collapse', 'data-target' => '.child_of_' . $id]) ?> - </span> + <span class="input-group-text"> + <?= FontAwesome::linkIcon('coordinates', I18N::translate('Latitude') . ' / ' . I18N::translate('Longitude'), ['data-toggle' => 'collapse', 'data-target' => '.child_of_' . $id]) ?> + </span> </div> diff --git a/resources/views/edit/input-addon-help.php b/resources/views/edit/input-addon-help.php index ad73537293..681d0dc634 100644 --- a/resources/views/edit/input-addon-help.php +++ b/resources/views/edit/input-addon-help.php @@ -1,7 +1,7 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsPrint; ?> <div class="input-group-append"> - <span class="input-group-text"> - <?= FunctionsPrint::helpLink($fact) ?> - </span> + <span class="input-group-text"> + <?= FunctionsPrint::helpLink($fact) ?> + </span> </div> diff --git a/resources/views/edit/input-addon-keyboard.php b/resources/views/edit/input-addon-keyboard.php index 1f698a6bda..99a40e781c 100644 --- a/resources/views/edit/input-addon-keyboard.php +++ b/resources/views/edit/input-addon-keyboard.php @@ -2,7 +2,7 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="input-group-append"> - <span class="input-group-text"> - <?= FontAwesome::linkIcon('keyboard', I18N::translate('Find a special character'), ['class' => 'wt-osk-trigger', 'href' => '#', 'data-id' => $id]) ?> - </span> + <span class="input-group-text"> + <?= FontAwesome::linkIcon('keyboard', I18N::translate('Find a special character'), ['class' => 'wt-osk-trigger', 'href' => '#', 'data-id' => $id]) ?> + </span> </div> diff --git a/resources/views/edit/link-child-to-family.php b/resources/views/edit/link-child-to-family.php index 36bc5a9a0e..452a0961ad 100644 --- a/resources/views/edit/link-child-to-family.php +++ b/resources/views/edit/link-child-to-family.php @@ -7,41 +7,41 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="famid"> - <?= I18N::translate('Family') ?> - </label> - <div class="col-sm-9"> - <?= FunctionsEdit::formControlFamily($tree, null, ['id' => 'famid', 'name' => 'famid']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="famid"> + <?= I18N::translate('Family') ?> + </label> + <div class="col-sm-9"> + <?= FunctionsEdit::formControlFamily($tree, null, ['id' => 'famid', 'name' => 'famid']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="PEDI"> - <?= I18N::translate('Pedigree') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select(GedcomCodePedi::getValues($individual), '', ['id' => 'PEDI', 'name' => 'PEDI']) ?> - <p class="small text-muted"> - <?= I18N::translate('A child may have more than one set of parents. The relationship between the child and the parents can be biological, legal, or based on local culture and tradition. If no pedigree is specified, then a biological relationship will be assumed.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="PEDI"> + <?= I18N::translate('Pedigree') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select(GedcomCodePedi::getValues($individual), '', ['id' => 'PEDI', 'name' => 'PEDI']) ?> + <p class="small text-muted"> + <?= I18N::translate('A child may have more than one set of parents. The relationship between the child and the parents can be biological, legal, or based on local culture and tradition. If no pedigree is specified, then a biological relationship will be assumed.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-9 offset-sm-3"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-9 offset-sm-3"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/edit/link-spouse-to-individual.php b/resources/views/edit/link-spouse-to-individual.php index 85603c91a7..a8c9ee2596 100644 --- a/resources/views/edit/link-spouse-to-individual.php +++ b/resources/views/edit/link-spouse-to-individual.php @@ -5,33 +5,33 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="spouse"> - <?= $label ?> - </label> - <div class="col-sm-9"> - <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'spouse', 'name' => 'spid']) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="spouse"> + <?= $label ?> + </label> + <div class="col-sm-9"> + <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'spouse', 'name' => 'spid']) ?> + </div> + </div> - <?= FunctionsEdit::addSimpleTag($tree, '0 MARR Y') ?> - <?= FunctionsEdit::addSimpleTag($tree, '0 DATE', 'MARR') ?> - <?= FunctionsEdit::addSimpleTag($tree, '0 PLAC', 'MARR') ?> + <?= FunctionsEdit::addSimpleTag($tree, '0 MARR Y') ?> + <?= FunctionsEdit::addSimpleTag($tree, '0 DATE', 'MARR') ?> + <?= FunctionsEdit::addSimpleTag($tree, '0 PLAC', 'MARR') ?> - <div class="row form-group"> - <div class="col-sm-9 offset-sm-3"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-9 offset-sm-3"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/edit/new-individual.php b/resources/views/edit/new-individual.php index 0edda57ceb..7d256577d1 100644 --- a/resources/views/edit/new-individual.php +++ b/resources/views/edit/new-individual.php @@ -10,116 +10,116 @@ <?php if ($individual !== null) { - $xref = $individual->getXref(); - $cancel_url = $individual->url(); + $xref = $individual->getXref(); + $cancel_url = $individual->url(); } elseif ($family !== null) { - $xref = $family->getXref(); - $cancel_url = $family->url(); + $xref = $family->getXref(); + $cancel_url = $family->url(); } else { - $cancel_url = route('admin-trees'); - $xref = 'new'; + $cancel_url = route('admin-trees'); + $xref = 'new'; } // Different cultures do surnames differently $surname_tradition = SurnameTradition::create($tree->getPreference('SURNAME_TRADITION')); if ($name_fact !== null) { - // Editing an existing name - $name_fact_id = $name_fact->getFactId(); - $namerec = $name_fact->getGedcom(); - $name_fields = [ - 'NAME' => $name_fact->getValue(), - 'TYPE' => $name_fact->getAttribute('TYPE'), - 'NPFX' => $name_fact->getAttribute('NPFX'), - 'GIVN' => $name_fact->getAttribute('GIVN'), - 'NICK' => $name_fact->getAttribute('NICK'), - 'SPFX' => $name_fact->getAttribute('SPFX'), - 'SURN' => $name_fact->getAttribute('SURN'), - 'NSFX' => $name_fact->getAttribute('NSFX'), - ]; + // Editing an existing name + $name_fact_id = $name_fact->getFactId(); + $namerec = $name_fact->getGedcom(); + $name_fields = [ + 'NAME' => $name_fact->getValue(), + 'TYPE' => $name_fact->getAttribute('TYPE'), + 'NPFX' => $name_fact->getAttribute('NPFX'), + 'GIVN' => $name_fact->getAttribute('GIVN'), + 'NICK' => $name_fact->getAttribute('NICK'), + 'SPFX' => $name_fact->getAttribute('SPFX'), + 'SURN' => $name_fact->getAttribute('SURN'), + 'NSFX' => $name_fact->getAttribute('NSFX'), + ]; - // Populate any missing subfields from the NAME field - $npfx_accept = implode('|', Config::namePrefixes()); - if (preg_match('/(((' . $npfx_accept . ')\.? +)*)([^\n\/"]*)("(.*)")? *\/(([a-z]{2,3} +)*)(.*)\/ *(.*)/i', $name_fields['NAME'], $name_bits)) { - $name_fields['NPFX'] = $name_fields['NPFX'] ?: $name_bits[1]; - $name_fields['GIVN'] = $name_fields['GIVN'] ?: $name_bits[4]; - $name_fields['NICK'] = $name_fields['NICK'] ?: $name_bits[6]; - $name_fields['SPFX'] = $name_fields['SPFX'] ?: trim($name_bits[7]); - $name_fields['SURN'] = $name_fields['SURN'] ?: preg_replace('~/[^/]*/~', ',', $name_bits[9]); - $name_fields['NSFX'] = $name_fields['NSFX'] ?: $name_bits[10]; - } + // Populate any missing subfields from the NAME field + $npfx_accept = implode('|', Config::namePrefixes()); + if (preg_match('/(((' . $npfx_accept . ')\.? +)*)([^\n\/"]*)("(.*)")? *\/(([a-z]{2,3} +)*)(.*)\/ *(.*)/i', $name_fields['NAME'], $name_bits)) { + $name_fields['NPFX'] = $name_fields['NPFX'] ?: $name_bits[1]; + $name_fields['GIVN'] = $name_fields['GIVN'] ?: $name_bits[4]; + $name_fields['NICK'] = $name_fields['NICK'] ?: $name_bits[6]; + $name_fields['SPFX'] = $name_fields['SPFX'] ?: trim($name_bits[7]); + $name_fields['SURN'] = $name_fields['SURN'] ?: preg_replace('~/[^/]*/~', ',', $name_bits[9]); + $name_fields['NSFX'] = $name_fields['NSFX'] ?: $name_bits[10]; + } } else { - // Creating a new name - $name_fact_id = ''; - $namerec = ''; - $name_fields = [ - 'NAME' => '', - 'TYPE' => '', - 'NPFX' => '', - 'GIVN' => '', - 'NICK' => '', - 'SPFX' => '', - 'SURN' => '', - 'NSFX' => '', - ]; + // Creating a new name + $name_fact_id = ''; + $namerec = ''; + $name_fields = [ + 'NAME' => '', + 'TYPE' => '', + 'NPFX' => '', + 'GIVN' => '', + 'NICK' => '', + 'SPFX' => '', + 'SURN' => '', + 'NSFX' => '', + ]; - // Inherit surname from parents, spouse or child - if ($family) { - $father = $family->getHusband(); - if ($father && $father->getFirstFact('NAME')) { - $father_name = $father->getFirstFact('NAME')->getValue(); - } else { - $father_name = ''; - } - $mother = $family->getWife(); - if ($mother && $mother->getFirstFact('NAME')) { - $mother_name = $mother->getFirstFact('NAME')->getValue(); - } else { - $mother_name = ''; - } - } else { - $father = null; - $mother = null; - $father_name = ''; - $mother_name = ''; - } - if ($individual && $individual->getFirstFact('NAME')) { - $indi_name = $individual->getFirstFact('NAME')->getValue(); - } else { - $indi_name = ''; - } + // Inherit surname from parents, spouse or child + if ($family) { + $father = $family->getHusband(); + if ($father && $father->getFirstFact('NAME')) { + $father_name = $father->getFirstFact('NAME')->getValue(); + } else { + $father_name = ''; + } + $mother = $family->getWife(); + if ($mother && $mother->getFirstFact('NAME')) { + $mother_name = $mother->getFirstFact('NAME')->getValue(); + } else { + $mother_name = ''; + } + } else { + $father = null; + $mother = null; + $father_name = ''; + $mother_name = ''; + } + if ($individual && $individual->getFirstFact('NAME')) { + $indi_name = $individual->getFirstFact('NAME')->getValue(); + } else { + $indi_name = ''; + } - switch ($nextaction) { - case 'add_child_to_family_action': - $name_fields = array_merge($name_fields, $surname_tradition->newChildNames($father_name, $mother_name, $gender)); - break; - case 'add_child_to_individual_action': - if ($individual->getSex() === 'F') { - $name_fields = array_merge($name_fields, $surname_tradition->newChildNames('', $indi_name, $gender)); - } else { - $name_fields = array_merge($name_fields, $surname_tradition->newChildNames($indi_name, '', $gender)); - } - break; - case 'add_parent_to_individual_action': - $name_fields = array_merge($name_fields, $surname_tradition->newParentNames($indi_name, $gender)); - break; - case 'add_spouse_to_family_action': - if ($father) { - $name_fields = array_merge($name_fields, $surname_tradition->newSpouseNames($father_name, $gender)); - } else { - $name_fields = array_merge($name_fields, $surname_tradition->newSpouseNames($mother_name, $gender)); - } - break; - case 'add_spouse_to_individual_action': - $name_fields = array_merge($name_fields, $surname_tradition->newSpouseNames($indi_name, $gender)); - break; - case 'add_unlinked_indi_action': - case 'update': - if ($surname_tradition->hasSurnames()) { - $name_fields['NAME'] = '//'; - } - break; - } + switch ($nextaction) { + case 'add_child_to_family_action': + $name_fields = array_merge($name_fields, $surname_tradition->newChildNames($father_name, $mother_name, $gender)); + break; + case 'add_child_to_individual_action': + if ($individual->getSex() === 'F') { + $name_fields = array_merge($name_fields, $surname_tradition->newChildNames('', $indi_name, $gender)); + } else { + $name_fields = array_merge($name_fields, $surname_tradition->newChildNames($indi_name, '', $gender)); + } + break; + case 'add_parent_to_individual_action': + $name_fields = array_merge($name_fields, $surname_tradition->newParentNames($indi_name, $gender)); + break; + case 'add_spouse_to_family_action': + if ($father) { + $name_fields = array_merge($name_fields, $surname_tradition->newSpouseNames($father_name, $gender)); + } else { + $name_fields = array_merge($name_fields, $surname_tradition->newSpouseNames($mother_name, $gender)); + } + break; + case 'add_spouse_to_individual_action': + $name_fields = array_merge($name_fields, $surname_tradition->newSpouseNames($indi_name, $gender)); + break; + case 'add_unlinked_indi_action': + case 'update': + if ($surname_tradition->hasSurnames()) { + $name_fields['NAME'] = '//'; + } + break; + } } $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR @@ -128,218 +128,217 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR <h2 class="wt-page-title"><?= $title ?></h2> <form method="post" onsubmit="return checkform();"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="action" value="<?= e($nextaction) ?>"> - <input type="hidden" name="fact_id" value="<?= e($name_fact_id) ?>"> - <input type="hidden" name="xref" value="<?= e($xref) ?>"> - <input type="hidden" name="famtag" value="<?= e($famtag) ?>"> - <input type="hidden" name="gender" value="<?= $gender ?>"> - <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="action" value="<?= e($nextaction) ?>"> + <input type="hidden" name="fact_id" value="<?= e($name_fact_id) ?>"> + <input type="hidden" name="xref" value="<?= e($xref) ?>"> + <input type="hidden" name="famtag" value="<?= e($famtag) ?>"> + <input type="hidden" name="gender" value="<?= $gender ?>"> + <?= csrf_field() ?> - <?php if ($nextaction === 'add_child_to_family_action' || $nextaction === 'add_child_to_individual_action'): ?> - <?= FunctionsEdit::addSimpleTag($tree, '0 PEDI') ?> - <?php endif ?> + <?php if ($nextaction === 'add_child_to_family_action' || $nextaction === 'add_child_to_individual_action') : ?> + <?= FunctionsEdit::addSimpleTag($tree, '0 PEDI') ?> + <?php endif ?> - <?php - // First - standard name fields - foreach ($name_fields as $tag => $value) { - if (substr_compare($tag, '_', 0, 1) !== 0) { - echo FunctionsEdit::addSimpleTag($tree, '0 ' . $tag . ' ' . $value, '', '', null, $individual); - } - } - - // Second - advanced name fields - if ($surname_tradition->hasMarriedNames() || preg_match('/\n2 _MARNM /', $namerec)) { - $adv_name_fields = ['_MARNM' => '']; - } else { - $adv_name_fields = []; - } - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('ADVANCED_NAME_FACTS'), $match)) { - foreach ($match[1] as $tag) { - // Ignore advanced facts that duplicate standard facts - if (!in_array($tag, ['TYPE', 'NPFX', 'GIVN', 'NICK', 'SPFX', 'SURN', 'NSFX'])) { - $adv_name_fields[$tag] = ''; - } - } - } + <?php + // First - standard name fields + foreach ($name_fields as $tag => $value) { + if (substr_compare($tag, '_', 0, 1) !== 0) { + echo FunctionsEdit::addSimpleTag($tree, '0 ' . $tag . ' ' . $value, '', '', null, $individual); + } + } - foreach (array_keys($adv_name_fields) as $tag) { - // Edit existing tags, grouped together - if (preg_match_all('/2 ' . $tag . ' (.+)/', $namerec, $match)) { - foreach ($match[1] as $value) { - echo FunctionsEdit::addSimpleTag($tree, '2 ' . $tag . ' ' . $value, '', GedcomTag::getLabel('NAME:' . $tag, $individual)); - if ($tag === '_MARNM') { - preg_match_all('/\/([^\/]*)\//', $value, $matches); - echo FunctionsEdit::addSimpleTag($tree, '2 _MARNM_SURN ' . implode(',', $matches[1])); - } - } - } - // Allow a new tag to be entered - if (!array_key_exists($tag, $name_fields)) { - echo FunctionsEdit::addSimpleTag($tree, '0 ' . $tag, '', GedcomTag::getLabel('NAME:' . $tag, $individual)); - if ($tag === '_MARNM') { - echo FunctionsEdit::addSimpleTag($tree, '0 _MARNM_SURN'); - } - } - } + // Second - advanced name fields + if ($surname_tradition->hasMarriedNames() || preg_match('/\n2 _MARNM /', $namerec)) { + $adv_name_fields = ['_MARNM' => '']; + } else { + $adv_name_fields = []; + } + if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('ADVANCED_NAME_FACTS'), $match)) { + foreach ($match[1] as $tag) { + // Ignore advanced facts that duplicate standard facts + if (!in_array($tag, ['TYPE', 'NPFX', 'GIVN', 'NICK', 'SPFX', 'SURN', 'NSFX'])) { + $adv_name_fields[$tag] = ''; + } + } + } - // Third - new/existing custom name fields - foreach ($name_fields as $tag => $value) { - if (substr_compare($tag, '_', 0, 1) === 0) { - echo FunctionsEdit::addSimpleTag($tree, '0 ' . $tag . ' ' . $value); - if ($tag === '_MARNM') { - preg_match_all('/\/([^\/]*)\//', $value, $matches); - echo FunctionsEdit::addSimpleTag($tree, '2 _MARNM_SURN ' . implode(',', $matches[1])); - } - } - } + foreach (array_keys($adv_name_fields) as $tag) { + // Edit existing tags, grouped together + if (preg_match_all('/2 ' . $tag . ' (.+)/', $namerec, $match)) { + foreach ($match[1] as $value) { + echo FunctionsEdit::addSimpleTag($tree, '2 ' . $tag . ' ' . $value, '', GedcomTag::getLabel('NAME:' . $tag, $individual)); + if ($tag === '_MARNM') { + preg_match_all('/\/([^\/]*)\//', $value, $matches); + echo FunctionsEdit::addSimpleTag($tree, '2 _MARNM_SURN ' . implode(',', $matches[1])); + } + } + } + // Allow a new tag to be entered + if (!array_key_exists($tag, $name_fields)) { + echo FunctionsEdit::addSimpleTag($tree, '0 ' . $tag, '', GedcomTag::getLabel('NAME:' . $tag, $individual)); + if ($tag === '_MARNM') { + echo FunctionsEdit::addSimpleTag($tree, '0 _MARNM_SURN'); + } + } + } - // Fourth - SOUR, NOTE, _CUSTOM, etc. - if ($namerec !== '') { - $gedlines = explode("\n", $namerec); // -- find the number of lines in the record - $fields = explode(' ', $gedlines[0]); - $glevel = $fields[0]; - $level = $glevel; - $type = $fields[1]; - $tags = []; - $i = 0; - do { - if ($type !== 'TYPE' && !array_key_exists($type, $name_fields) && !array_key_exists($type, $adv_name_fields)) { - $text = ''; - for ($j = 2; $j < count($fields); $j++) { - if ($j > 2) { - $text .= ' '; - } - $text .= $fields[$j]; - } - while (($i + 1 < count($gedlines)) && (preg_match('/' . ($level + 1) . ' CONT ?(.*)/', $gedlines[$i + 1], $cmatch) > 0)) { - $text .= "\n" . $cmatch[1]; - $i++; - } - echo FunctionsEdit::addSimpleTag($tree, $level . ' ' . $type . ' ' . $text); - } - $tags[] = $type; - $i++; - if (isset($gedlines[$i])) { - $fields = explode(' ', $gedlines[$i]); - $level = $fields[0]; - if (isset($fields[1])) { - $type = $fields[1]; - } - } - } while (($level > $glevel) && ($i < count($gedlines))); - } + // Third - new/existing custom name fields + foreach ($name_fields as $tag => $value) { + if (substr_compare($tag, '_', 0, 1) === 0) { + echo FunctionsEdit::addSimpleTag($tree, '0 ' . $tag . ' ' . $value); + if ($tag === '_MARNM') { + preg_match_all('/\/([^\/]*)\//', $value, $matches); + echo FunctionsEdit::addSimpleTag($tree, '2 _MARNM_SURN ' . implode(',', $matches[1])); + } + } + } - // If we are adding a new individual, add the basic details - if ($nextaction !== 'update') { - echo '</table><br><table class="table wt-facts-table">'; - // 1 SEX - if ($famtag === 'HUSB' || $gender === 'M') { - echo FunctionsEdit::addSimpleTag($tree, '0 SEX M'); - } elseif ($famtag === 'WIFE' || $gender === 'F') { - echo FunctionsEdit::addSimpleTag($tree, '0 SEX F'); - } else { - echo FunctionsEdit::addSimpleTag($tree, '0 SEX U'); - } - $bdm = 'BD'; - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { - foreach ($matches[1] as $match) { - if (!in_array($match, explode('|', WT_EVENTS_DEAT))) { - FunctionsEdit::addSimpleTags($tree, $match); - } - } - } - //-- if adding a spouse add the option to add a marriage fact to the new family - if ($nextaction === 'add_spouse_to_individual_action' || $nextaction === 'add_spouse_to_family_action') { - $bdm .= 'M'; - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) { - foreach ($matches[1] as $match) { - FunctionsEdit::addSimpleTags($tree, $match); - } - } - } - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { - foreach ($matches[1] as $match) { - if (in_array($match, explode('|', WT_EVENTS_DEAT))) { - FunctionsEdit::addSimpleTags($tree, $match); - } - } - } - } + // Fourth - SOUR, NOTE, _CUSTOM, etc. + if ($namerec !== '') { + $gedlines = explode("\n", $namerec); // -- find the number of lines in the record + $fields = explode(' ', $gedlines[0]); + $glevel = $fields[0]; + $level = $glevel; + $type = $fields[1]; + $tags = []; + $i = 0; + do { + if ($type !== 'TYPE' && !array_key_exists($type, $name_fields) && !array_key_exists($type, $adv_name_fields)) { + $text = ''; + for ($j = 2; $j < count($fields); $j++) { + if ($j > 2) { + $text .= ' '; + } + $text .= $fields[$j]; + } + while (($i + 1 < count($gedlines)) && (preg_match('/' . ($level + 1) . ' CONT ?(.*)/', $gedlines[$i + 1], $cmatch) > 0)) { + $text .= "\n" . $cmatch[1]; + $i++; + } + echo FunctionsEdit::addSimpleTag($tree, $level . ' ' . $type . ' ' . $text); + } + $tags[] = $type; + $i++; + if (isset($gedlines[$i])) { + $fields = explode(' ', $gedlines[$i]); + $level = $fields[0]; + if (isset($fields[1])) { + $type = $fields[1]; + } + } + } while (($level > $glevel) && ($i < count($gedlines))); + } - echo '</table>'; - if ($nextaction === 'update') { - // GEDCOM 5.5.1 spec says NAME doesn’t get a OBJE - echo view('cards/add-source-citation', [ - 'level' => 2, - 'full_citations' => $tree->getPreference('FULL_SOURCES'), - 'tree' => $tree, - ]); - echo view('cards/add-note', [ - 'level' => 2, - 'tree' => $tree, - ]); - echo view('cards/add-shared-note', [ - 'level' => 2, - 'tree' => $tree, - ]); - echo view('cards/add-restriction', [ - 'level' => 2, - 'tree' => $tree, - ]); - } else { - echo view('cards/add-source-citation', [ - 'bdm' => $bdm, - 'level' => 1, - 'full_citations' => $tree->getPreference('FULL_SOURCES'), - 'prefer_level2_sources' => $tree->getPreference('PREFER_LEVEL2_SOURCES'), - 'quick_required_facts' => $tree->getPreference('QUICK_REQUIRED_FACTS'), - 'quick_required_famfacts' => $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), - 'tree' => $tree, - ]); - echo view('cards/add-note', [ - 'level' => 1, - 'tree' => $tree, - ]); - echo view('cards/add-shared-note', [ - 'level' => 1, - 'tree' => $tree, - ]); - echo view('cards/add-restriction', [ - 'level' => 1, - 'tree' => $tree, - ]); - } + // If we are adding a new individual, add the basic details + if ($nextaction !== 'update') { + echo '</table><br><table class="table wt-facts-table">'; + // 1 SEX + if ($famtag === 'HUSB' || $gender === 'M') { + echo FunctionsEdit::addSimpleTag($tree, '0 SEX M'); + } elseif ($famtag === 'WIFE' || $gender === 'F') { + echo FunctionsEdit::addSimpleTag($tree, '0 SEX F'); + } else { + echo FunctionsEdit::addSimpleTag($tree, '0 SEX U'); + } + $bdm = 'BD'; + if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { + foreach ($matches[1] as $match) { + if (!in_array($match, explode('|', WT_EVENTS_DEAT))) { + FunctionsEdit::addSimpleTags($tree, $match); + } + } + } + //-- if adding a spouse add the option to add a marriage fact to the new family + if ($nextaction === 'add_spouse_to_individual_action' || $nextaction === 'add_spouse_to_family_action') { + $bdm .= 'M'; + if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) { + foreach ($matches[1] as $match) { + FunctionsEdit::addSimpleTags($tree, $match); + } + } + } + if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { + foreach ($matches[1] as $match) { + if (in_array($match, explode('|', WT_EVENTS_DEAT))) { + FunctionsEdit::addSimpleTags($tree, $match); + } + } + } + } - ?> - <div class="row form-group"> - <div class="col-sm-9 offset-sm-3"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <?php if (preg_match('/^add_(child|spouse|parent|unlinked_indi)/', $nextaction)): ?> + echo '</table>'; + if ($nextaction === 'update') { + // GEDCOM 5.5.1 spec says NAME doesn’t get a OBJE + echo view('cards/add-source-citation', [ + 'level' => 2, + 'full_citations' => $tree->getPreference('FULL_SOURCES'), + 'tree' => $tree, + ]); + echo view('cards/add-note', [ + 'level' => 2, + 'tree' => $tree, + ]); + echo view('cards/add-shared-note', [ + 'level' => 2, + 'tree' => $tree, + ]); + echo view('cards/add-restriction', [ + 'level' => 2, + 'tree' => $tree, + ]); + } else { + echo view('cards/add-source-citation', [ + 'bdm' => $bdm, + 'level' => 1, + 'full_citations' => $tree->getPreference('FULL_SOURCES'), + 'prefer_level2_sources' => $tree->getPreference('PREFER_LEVEL2_SOURCES'), + 'quick_required_facts' => $tree->getPreference('QUICK_REQUIRED_FACTS'), + 'quick_required_famfacts' => $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), + 'tree' => $tree, + ]); + echo view('cards/add-note', [ + 'level' => 1, + 'tree' => $tree, + ]); + echo view('cards/add-shared-note', [ + 'level' => 1, + 'tree' => $tree, + ]); + echo view('cards/add-restriction', [ + 'level' => 1, + 'tree' => $tree, + ]); + } - <button class="btn btn-primary" type="submit" name="goto" value="<?= $xref ?>"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('go to new individual') ?> - </button> - <?php endif ?> - <a class="btn btn-secondary" href="<?= e($cancel_url) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> + ?> + <div class="row form-group"> + <div class="col-sm-9 offset-sm-3"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <?php if (preg_match('/^add_(child|spouse|parent|unlinked_indi)/', $nextaction)) : ?> + <button class="btn btn-primary" type="submit" name="goto" value="<?= $xref ?>"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('go to new individual') ?> + </button> + <?php endif ?> + <a class="btn btn-secondary" href="<?= e($cancel_url) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> - <?php if ($name_fact instanceof Fact && (Auth::isAdmin() || $tree->getPreference('SHOW_GEDCOM_RECORD'))): ?> - <a class="btn btn-link" href="<?= e(route('edit-raw-fact', ['xref' => $xref, 'fact_id' => $name_fact->getFactId(), 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> - </div> + <?php if ($name_fact instanceof Fact && (Auth::isAdmin() || $tree->getPreference('SHOW_GEDCOM_RECORD'))) : ?> + <a class="btn btn-link" href="<?= e(route('edit-raw-fact', ['xref' => $xref, 'fact_id' => $name_fact->getFactId(), 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> + </div> </form> <?= view('modals/on-screen-keyboard') ?> diff --git a/resources/views/edit/raw-gedcom-fact.php b/resources/views/edit/raw-gedcom-fact.php index 530fba2fdf..e040dbbfd9 100644 --- a/resources/views/edit/raw-gedcom-fact.php +++ b/resources/views/edit/raw-gedcom-fact.php @@ -4,37 +4,37 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($fact->getParent()->getTree()->getName()) ?>"> - <input type="hidden" name="xref" value="<?= e($fact->getParent()->getXref()) ?>"> - <input type="hidden" name="fact_id" value="<?= e($fact->getFactId()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($fact->getParent()->getTree()->getName()) ?>"> + <input type="hidden" name="xref" value="<?= e($fact->getParent()->getXref()) ?>"> + <input type="hidden" name="fact_id" value="<?= e($fact->getFactId()) ?>"> - <p class="text-muted small"> - <?= I18N::translate('This page allows you to bypass the usual forms, and edit the underlying data directly. It is an advanced option, and you should not use it unless you understand the GEDCOM format. If you make a mistake here, it can be difficult to fix.') ?> - </p> - <p class="text-muted small"> - <?= /* I18N: %s is a URL */ I18N::translate('You can download a copy of the GEDCOM specification from %s.', '<a href="https://wiki.webtrees.net/w/images-en/Ged551-5.pdf">https://wiki.webtrees.net/w/images-en/Ged551-5.pdf</a>') ?> - </p> + <p class="text-muted small"> + <?= I18N::translate('This page allows you to bypass the usual forms, and edit the underlying data directly. It is an advanced option, and you should not use it unless you understand the GEDCOM format. If you make a mistake here, it can be difficult to fix.') ?> + </p> + <p class="text-muted small"> + <?= /* I18N: %s is a URL */ I18N::translate('You can download a copy of the GEDCOM specification from %s.', '<a href="https://wiki.webtrees.net/w/images-en/Ged551-5.pdf">https://wiki.webtrees.net/w/images-en/Ged551-5.pdf</a>') ?> + </p> - <div class="card my-2"> - <label class="card-header py-1 px-2 d-flex" for="gedcom"> - <?= $fact->summary() ?> - </label> - <textarea class="card-body form-control py-1 px-2" dir="ltr" id="gedcom" name="gedcom" pattern="<?= e($pattern) ?>" rows="<?= 5 + preg_match_all('/\n/', $fact->getGedcom()) ?>"><?= e($fact->getGedcom()) ?></textarea> - </div> + <div class="card my-2"> + <label class="card-header py-1 px-2 d-flex" for="gedcom"> + <?= $fact->summary() ?> + </label> + <textarea class="card-body form-control py-1 px-2" dir="ltr" id="gedcom" name="gedcom" pattern="<?= e($pattern) ?>" rows="<?= 5 + preg_match_all('/\n/', $fact->getGedcom()) ?>"><?= e($fact->getGedcom()) ?></textarea> + </div> - <div class="row form-group"> - <div class="col-sm-9 offset-sm-3"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($fact->getParent()->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-9 offset-sm-3"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($fact->getParent()->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/edit/raw-gedcom-record.php b/resources/views/edit/raw-gedcom-record.php index b3528a999f..d107f85917 100644 --- a/resources/views/edit/raw-gedcom-record.php +++ b/resources/views/edit/raw-gedcom-record.php @@ -5,61 +5,61 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="xref" value="<?= e($record->getXref()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="xref" value="<?= e($record->getXref()) ?>"> - <p class="text-muted small"> - <?= I18N::translate('This page allows you to bypass the usual forms, and edit the underlying data directly. It is an advanced option, and you should not use it unless you understand the GEDCOM format. If you make a mistake here, it can be difficult to fix.') ?> - </p> - <p class="text-muted small"> - <?= /* I18N: %s is a URL */ I18N::translate('You can download a copy of the GEDCOM specification from %s.', '<a href="https://wiki.webtrees.net/w/images-en/Ged551-5.pdf">https://wiki.webtrees.net/w/images-en/Ged551-5.pdf</a>') ?> - </p> + <p class="text-muted small"> + <?= I18N::translate('This page allows you to bypass the usual forms, and edit the underlying data directly. It is an advanced option, and you should not use it unless you understand the GEDCOM format. If you make a mistake here, it can be difficult to fix.') ?> + </p> + <p class="text-muted small"> + <?= /* I18N: %s is a URL */ I18N::translate('You can download a copy of the GEDCOM specification from %s.', '<a href="https://wiki.webtrees.net/w/images-en/Ged551-5.pdf">https://wiki.webtrees.net/w/images-en/Ged551-5.pdf</a>') ?> + </p> - <div class="card"> - <label class="card-header py-1 px-2" for="fact0"> - <?= $record->getFullName() ?> - </label> - <div class="card-body form-control py-1 px-2"> - <textarea class="card-body form-control py-1 px-2" dir="ltr" id="fact0" rows="1">0 @<?= e($record->getXref()) ?>@ <?= e($record::RECORD_TYPE) ?></textarea> - </div> - </div> + <div class="card"> + <label class="card-header py-1 px-2" for="fact0"> + <?= $record->getFullName() ?> + </label> + <div class="card-body form-control py-1 px-2"> + <textarea class="card-body form-control py-1 px-2" dir="ltr" id="fact0" rows="1">0 @<?= e($record->getXref()) ?>@ <?= e($record::RECORD_TYPE) ?></textarea> + </div> + </div> - <div id="raw-gedcom-list"> - <?php foreach ($record->getFacts() as $fact): ?> - <?php if (!$fact->isPendingDeletion()): ?> - <div class="card my-2"> - <label class="card-header py-1 px-2 d-flex" for="fact-<?= e($fact->getFactId()) ?>"> + <div id="raw-gedcom-list"> + <?php foreach ($record->getFacts() as $fact) : ?> + <?php if (!$fact->isPendingDeletion()) : ?> + <div class="card my-2"> + <label class="card-header py-1 px-2 d-flex" for="fact-<?= e($fact->getFactId()) ?>"> <?= view('icons/drag-handle') ?> - <?= $fact->summary() ?> - </label> - <input type="hidden" name="fact_id[]" value="<?= e($fact->getFactId()) ?>"> - <textarea class="card-body form-control py-1 px-2" dir="ltr" id="fact-<?= e($fact->getFactId()) ?>" name="fact[]" pattern="<?= e($pattern) ?>" rows="<?= 1 + preg_match_all('/\n/', $fact->getGedcom()) ?>"><?= e($fact->getGedcom()) ?></textarea> - </div> - <?php endif ?> - <?php endforeach ?> + <?= $fact->summary() ?> + </label> + <input type="hidden" name="fact_id[]" value="<?= e($fact->getFactId()) ?>"> + <textarea class="card-body form-control py-1 px-2" dir="ltr" id="fact-<?= e($fact->getFactId()) ?>" name="fact[]" pattern="<?= e($pattern) ?>" rows="<?= 1 + preg_match_all('/\n/', $fact->getGedcom()) ?>"><?= e($fact->getGedcom()) ?></textarea> + </div> + <?php endif ?> + <?php endforeach ?> - <div class="card my-2"> - <label class="card-header py-1 px-2" for="fact-add"> - <?= I18N::translate('Add a fact') ?> - </label> - <input type="hidden" name="fact_id[]" value="<?= e($fact->getFactId()) ?>"> - <textarea class="card-body form-control py-1 px-2" dir="ltr" id="fact-add" name="fact[]" pattern="<?= e($pattern) ?>" rows="2"></textarea> - </div> - </div> + <div class="card my-2"> + <label class="card-header py-1 px-2" for="fact-add"> + <?= I18N::translate('Add a fact') ?> + </label> + <input type="hidden" name="fact_id[]" value="<?= e($fact->getFactId()) ?>"> + <textarea class="card-body form-control py-1 px-2" dir="ltr" id="fact-add" name="fact[]" pattern="<?= e($pattern) ?>" rows="2"></textarea> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-9 offset-sm-3"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-9 offset-sm-3"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </div> + </div> </form> <?php View::push('javascript') ?> diff --git a/resources/views/edit/reorder-children.php b/resources/views/edit/reorder-children.php index c6b6c9db40..0dfd24e59f 100644 --- a/resources/views/edit/reorder-children.php +++ b/resources/views/edit/reorder-children.php @@ -5,39 +5,39 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> - <div class="wt-sortable-list"> - <?php foreach ($family->getFacts('CHIL') as $fact): ?> - <div class="card mb-2 wt-sortable-item" data-sortbydate="<?= $fact->getTarget()->getBirthDate()->julianDay() ?>"> - <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> - <h3 class="card-header"> - <?= FontAwesome::semanticIcon('drag-handle', '') ?> - <?= $fact->getTarget()->getFullName() ?> - </h3> - <div class="card-body"> - <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_BIRT, 2) ?> - <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_DEAT, 2) ?> - </div> - </div> - <?php endforeach ?> - </div> + <?= csrf_field() ?> + <div class="wt-sortable-list"> + <?php foreach ($family->getFacts('CHIL') as $fact) : ?> + <div class="card mb-2 wt-sortable-item" data-sortbydate="<?= $fact->getTarget()->getBirthDate()->julianDay() ?>"> + <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> + <h3 class="card-header"> + <?= FontAwesome::semanticIcon('drag-handle', '') ?> + <?= $fact->getTarget()->getFullName() ?> + </h3> + <div class="card-body"> + <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_BIRT, 2) ?> + <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_DEAT, 2) ?> + </div> + </div> + <?php endforeach ?> + </div> - <p> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('save') ?> - </button> + <p> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('save') ?> + </button> - <button class="btn btn-secondary" id="btn-default-order" type="button"> - <?= FontAwesome::decorativeIcon('sort') ?> - <?= /* I18N: A button label. */ I18N::translate('sort by date of birth') ?> - </button> + <button class="btn btn-secondary" id="btn-default-order" type="button"> + <?= FontAwesome::decorativeIcon('sort') ?> + <?= /* I18N: A button label. */ I18N::translate('sort by date of birth') ?> + </button> - <a class="btn btn-secondary" href="<?= e($family->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </p> + <a class="btn btn-secondary" href="<?= e($family->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </p> </form> <?php View::push('javascript') ?> diff --git a/resources/views/edit/reorder-media.php b/resources/views/edit/reorder-media.php index 98615c8e5f..3680efffa2 100644 --- a/resources/views/edit/reorder-media.php +++ b/resources/views/edit/reorder-media.php @@ -5,33 +5,33 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> - <div class="wt-sortable-list"> - <?php foreach ($individual->getFacts('OBJE') as $fact): ?> - <div class="card mb-2 wt-sortable-item"> - <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> - <h3 class="card-header"> - <?= FontAwesome::semanticIcon('drag-handle', '') ?> - <?= $fact->getTarget()->getFullName() ?> - </h3> - <div class="card-body"> - <?= $fact->getTarget()->displayImage(100, 100, "contain") ?> - </div> - </div> - <?php endforeach ?> - </div> + <?= csrf_field() ?> + <div class="wt-sortable-list"> + <?php foreach ($individual->getFacts('OBJE') as $fact) : ?> + <div class="card mb-2 wt-sortable-item"> + <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> + <h3 class="card-header"> + <?= FontAwesome::semanticIcon('drag-handle', '') ?> + <?= $fact->getTarget()->getFullName() ?> + </h3> + <div class="card-body"> + <?= $fact->getTarget()->displayImage(100, 100, "contain") ?> + </div> + </div> + <?php endforeach ?> + </div> - <p> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('save') ?> - </button> + <p> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('save') ?> + </button> - <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </p> + <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </p> </form> <?php View::push('javascript') ?> diff --git a/resources/views/edit/reorder-names.php b/resources/views/edit/reorder-names.php index 1aa7f725a9..ff41627c18 100644 --- a/resources/views/edit/reorder-names.php +++ b/resources/views/edit/reorder-names.php @@ -7,33 +7,33 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> - <div class="wt-sortable-list"> - <?php foreach ($individual->getFacts('NAME') as $fact): ?> - <div class="card mb-2 wt-sortable-item"> - <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> - <h3 class="card-header"> - <?= FontAwesome::semanticIcon('drag-handle', '') ?> - <?= $fact->getValue() ?> - </h3> - <div class="card-body"> - <?= GedcomTag::getLabelValue('TYPE', GedcomCodeName::getValue($fact->getAttribute('TYPE'), $fact->getParent())) ?> - </div> - </div> - <?php endforeach ?> - </div> + <?= csrf_field() ?> + <div class="wt-sortable-list"> + <?php foreach ($individual->getFacts('NAME') as $fact) : ?> + <div class="card mb-2 wt-sortable-item"> + <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> + <h3 class="card-header"> + <?= FontAwesome::semanticIcon('drag-handle', '') ?> + <?= $fact->getValue() ?> + </h3> + <div class="card-body"> + <?= GedcomTag::getLabelValue('TYPE', GedcomCodeName::getValue($fact->getAttribute('TYPE'), $fact->getParent())) ?> + </div> + </div> + <?php endforeach ?> + </div> - <p> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('save') ?> - </button> + <p> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('save') ?> + </button> - <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </p> + <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </p> </form> <?php View::push('javascript') ?> diff --git a/resources/views/edit/reorder-spouses.php b/resources/views/edit/reorder-spouses.php index 2669ac2958..aac6056619 100644 --- a/resources/views/edit/reorder-spouses.php +++ b/resources/views/edit/reorder-spouses.php @@ -5,39 +5,39 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-content" method="post"> - <?= csrf_field() ?> - <div class="wt-sortable-list"> - <?php foreach ($individual->getFacts('FAMS') as $fact): ?> - <div class="card mb-2 wt-sortable-item" data-sortbydate="<?= $fact->getTarget()->getMarriageDate()->julianDay() ?>"> - <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> - <h3 class="card-header"> - <?= FontAwesome::semanticIcon('drag-handle', '') ?> - <?= $fact->getTarget()->getFullName() ?> - </h3> - <div class="card-body"> - <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_MARR, 2) ?> - <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_DIV, 2) ?> - </div> - </div> - <?php endforeach ?> - </div> + <?= csrf_field() ?> + <div class="wt-sortable-list"> + <?php foreach ($individual->getFacts('FAMS') as $fact) : ?> + <div class="card mb-2 wt-sortable-item" data-sortbydate="<?= $fact->getTarget()->getMarriageDate()->julianDay() ?>"> + <input type="hidden" name="order[]" value="<?= $fact->getFactId() ?>"> + <h3 class="card-header"> + <?= FontAwesome::semanticIcon('drag-handle', '') ?> + <?= $fact->getTarget()->getFullName() ?> + </h3> + <div class="card-body"> + <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_MARR, 2) ?> + <?= $fact->getTarget()->formatFirstMajorFact(WT_EVENTS_DIV, 2) ?> + </div> + </div> + <?php endforeach ?> + </div> - <p> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('save') ?> - </button> + <p> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('save') ?> + </button> - <button class="btn btn-secondary" id="btn-default-order" type="button"> - <?= FontAwesome::decorativeIcon('sort') ?> - <?= /* I18N: A button label. */ I18N::translate('sort by date of marriage') ?> - </button> + <button class="btn btn-secondary" id="btn-default-order" type="button"> + <?= FontAwesome::decorativeIcon('sort') ?> + <?= /* I18N: A button label. */ I18N::translate('sort by date of marriage') ?> + </button> - <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </p> + <a class="btn btn-secondary" href="<?= e($individual->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </p> </form> <?php View::push('javascript') ?> diff --git a/resources/views/edit/shared-note.php b/resources/views/edit/shared-note.php index b19a9f7569..06883f82df 100644 --- a/resources/views/edit/shared-note.php +++ b/resources/views/edit/shared-note.php @@ -4,31 +4,31 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-options" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="NOTE"> - <?= I18N::translate('Shared note') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <textarea class="form-control" name="NOTE" id="NOTE" rows="15"><?= e($note->getNote()) ?></textarea> - <?= FontAwesome::linkIcon('keyboard', I18N::translate('Find a special character'), ['class' => 'wt-osk-trigger', 'href' => '#', 'data-id' => 'NOTE']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="NOTE"> + <?= I18N::translate('Shared note') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <textarea class="form-control" name="NOTE" id="NOTE" rows="15"><?= e($note->getNote()) ?></textarea> + <?= FontAwesome::linkIcon('keyboard', I18N::translate('Find a special character'), ['class' => 'wt-osk-trigger', 'href' => '#', 'data-id' => 'NOTE']) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-9 offset-sm-3"> - <button class="btn btn-primary" type="submit"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ - I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($note->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ - I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-9 offset-sm-3"> + <button class="btn btn-primary" type="submit"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ + I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($note->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ + I18N::translate('cancel') ?> + </a> + </div> + </div> </form> <?= view('modals/on-screen-keyboard'); ?> diff --git a/resources/views/emails/approve-user-html.php b/resources/views/emails/approve-user-html.php index 5716aafefc..1831e12d04 100644 --- a/resources/views/emails/approve-user-html.php +++ b/resources/views/emails/approve-user-html.php @@ -1,8 +1,8 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= I18N::translate('Hello %s…', e($user->getRealName())) ?> + <?= I18N::translate('Hello %s…', e($user->getRealName())) ?> </p> <p> - <?= I18N::translate('The administrator at the webtrees site %s has approved your application for an account. You may now sign in by accessing the following link: %s', e(WT_BASE_URL), e(WT_BASE_URL)) ?> + <?= I18N::translate('The administrator at the webtrees site %s has approved your application for an account. You may now sign in by accessing the following link: %s', e(WT_BASE_URL), e(WT_BASE_URL)) ?> </p> diff --git a/resources/views/emails/message-copy-html.php b/resources/views/emails/message-copy-html.php index c56e61ac01..e944b0f64b 100644 --- a/resources/views/emails/message-copy-html.php +++ b/resources/views/emails/message-copy-html.php @@ -1,21 +1,21 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= I18N::translate('Hello %s…', e($sender->getRealName())) ?> + <?= I18N::translate('Hello %s…', e($sender->getRealName())) ?> </p> <p> - <?= I18N::translate('You sent the following message to a webtrees user:') ?><?= e($recipient->getRealName()) ?> + <?= I18N::translate('You sent the following message to a webtrees user:') ?><?= e($recipient->getRealName()) ?> </p> <hr> <p> - <?= nl2br(e($message), false) ?> + <?= nl2br(e($message), false) ?> </p> <hr> <p> - <?= I18N::translate('This message was sent while viewing the following URL: ') ?> - <?= e($url) ?> + <?= I18N::translate('This message was sent while viewing the following URL: ') ?> + <?= e($url) ?> </p> diff --git a/resources/views/emails/message-user-html.php b/resources/views/emails/message-user-html.php index d0f1b006bb..5bcee17509 100644 --- a/resources/views/emails/message-user-html.php +++ b/resources/views/emails/message-user-html.php @@ -1,21 +1,21 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= I18N::translate('Hello %s…', e($recipient->getRealName())) ?> + <?= I18N::translate('Hello %s…', e($recipient->getRealName())) ?> </p> <p> - <?= /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', e($sender->getRealName())) ?> + <?= /* I18N: %s is a person's name */ I18N::translate('%s sent you the following message.', e($sender->getRealName())) ?> </p> <hr> <p> - <?= nl2br(e($message), false) ?> + <?= nl2br(e($message), false) ?> </p> <hr> <p> - <?= I18N::translate('This message was sent while viewing the following URL: ') ?> - <?= e($url) ?> + <?= I18N::translate('This message was sent while viewing the following URL: ') ?> + <?= e($url) ?> </p> diff --git a/resources/views/emails/password-reset-html.php b/resources/views/emails/password-reset-html.php index 3f09803138..caad934667 100644 --- a/resources/views/emails/password-reset-html.php +++ b/resources/views/emails/password-reset-html.php @@ -1,25 +1,25 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= e(I18N::translate('Hello %s…', $user->getRealName())) ?> + <?= e(I18N::translate('Hello %s…', $user->getRealName())) ?> </p> <p> - <?= I18N::translate('A new password has been requested for your username.') ?> + <?= I18N::translate('A new password has been requested for your username.') ?> </p> <dl> - <dt><?= I18N::translate('Username') ?></dt> - <dd><?= e($user->getUserName())?></dd> - <dt><?= I18N::translate('Password') ?></dt> - <dd><?= e($new_password) ?></dd> + <dt><?= I18N::translate('Username') ?></dt> + <dd><?= e($user->getUserName())?></dd> + <dt><?= I18N::translate('Password') ?></dt> + <dd><?= e($new_password) ?></dd> </dl> <p> - <a href="<?= e(route('login', ['username' => $user->getUserName(), 'url' => route('my-account', [])], true)) ?>"> - <?= I18N::translate('Sign in') ?> - </a> + <a href="<?= e(route('login', ['username' => $user->getUserName(), 'url' => route('my-account', [])], true)) ?>"> + <?= I18N::translate('Sign in') ?> + </a> </p> <p> - <?= I18N::translate('After you have signed in, select the “My account” link under the “My pages” menu and fill in the password fields to change your password.') ?> + <?= I18N::translate('After you have signed in, select the “My account” link under the “My pages” menu and fill in the password fields to change your password.') ?> </p> diff --git a/resources/views/emails/pending-changes-html.php b/resources/views/emails/pending-changes-html.php index af60b02c8d..e7f4d8e03f 100644 --- a/resources/views/emails/pending-changes-html.php +++ b/resources/views/emails/pending-changes-html.php @@ -1,16 +1,16 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= e(I18N::translate('Hello %s…', $user->getRealName())) ?> + <?= e(I18N::translate('Hello %s…', $user->getRealName())) ?> </p> <p> - <?= I18N::translate('There are pending changes for you to moderate.') ?> + <?= I18N::translate('There are pending changes for you to moderate.') ?> </p> <ul> - <li> - <a href="<?= e(route('show-pending', ['ged' => $tree->getName()], true)) ?>"> - <?= e($tree->getTitle()) ?> - </a> - </li> + <li> + <a href="<?= e(route('show-pending', ['ged' => $tree->getName()], true)) ?>"> + <?= e($tree->getTitle()) ?> + </a> + </li> </ul> diff --git a/resources/views/emails/register-notify-html.php b/resources/views/emails/register-notify-html.php index 8df29dd05f..dfe05745e9 100644 --- a/resources/views/emails/register-notify-html.php +++ b/resources/views/emails/register-notify-html.php @@ -1,27 +1,27 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= I18N::translate('Hello administrator…') ?> + <?= I18N::translate('Hello administrator…') ?> </p> <p> - <?= /* I18N: %s is a server name/URL */I18N::translate('A prospective user has registered with webtrees at %s.', WT_BASE_URL . ' ' . e($tree->getTitle())) ?> + <?= /* I18N: %s is a server name/URL */I18N::translate('A prospective user has registered with webtrees at %s.', WT_BASE_URL . ' ' . e($tree->getTitle())) ?> </p> <dl> - <dt><?= I18N::translate('Username') ?></dt> - <dd><?= e($user->getUserName()) ?></dd> - <dt><?= I18N::translate('Real name') ?></dt> - <dd><?= e($user->getRealName()) ?></dd> - <dt><?= I18N::translate('Email address') ?></dt> - <dd><?= e($user->getEmail()) ?></dd> - <dt><?= I18N::translate('Comments') ?></dt> - <dd><?= e($comments) ?></dd> + <dt><?= I18N::translate('Username') ?></dt> + <dd><?= e($user->getUserName()) ?></dd> + <dt><?= I18N::translate('Real name') ?></dt> + <dd><?= e($user->getRealName()) ?></dd> + <dt><?= I18N::translate('Email address') ?></dt> + <dd><?= e($user->getEmail()) ?></dd> + <dt><?= I18N::translate('Comments') ?></dt> + <dd><?= e($comments) ?></dd> </dl> <p> - <?= I18N::translate('The user has been sent an email with the information necessary to confirm the access request.') ?> + <?= I18N::translate('The user has been sent an email with the information necessary to confirm the access request.') ?> </p> <p> - <?= I18N::translate('You will be informed by email when this prospective user has confirmed the request. You can then complete the process by activating the username. The new user will not be able to sign in until you activate the account.') ?> + <?= I18N::translate('You will be informed by email when this prospective user has confirmed the request. You can then complete the process by activating the username. The new user will not be able to sign in until you activate the account.') ?> </p> diff --git a/resources/views/emails/register-user-html.php b/resources/views/emails/register-user-html.php index dcc42bef39..2a43ae83ba 100644 --- a/resources/views/emails/register-user-html.php +++ b/resources/views/emails/register-user-html.php @@ -1,22 +1,22 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= I18N::translate('Hello %s…', e($user->getRealName())) ?> + <?= I18N::translate('Hello %s…', e($user->getRealName())) ?> </p> <p> - <?= /* I18N: %1$s is the site URL and %2$s is an email address */I18N::translate('You (or someone claiming to be you) has requested an account at %1$s using the email address %2$s.', e(WT_BASE_URL), e($user->getEmail())) ?> + <?= /* I18N: %1$s is the site URL and %2$s is an email address */I18N::translate('You (or someone claiming to be you) has requested an account at %1$s using the email address %2$s.', e(WT_BASE_URL), e($user->getEmail())) ?> </p> <p> - <?= I18N::translate('Follow this link to verify your email address.') ?> + <?= I18N::translate('Follow this link to verify your email address.') ?> </p> <p> - <a href="<?= e(route('verify', ['username' => $user->getUserName(), 'token' => $user->getPreference('reg_hashcode'), 'ged' => $tree->getName()], true)) ?>"> - <?= e(route('verify', ['username' => $user->getUserName(), 'token' => $user->getPreference('reg_hashcode'), 'ged' => $tree->getName()], true)) ?> - </a> + <a href="<?= e(route('verify', ['username' => $user->getUserName(), 'token' => $user->getPreference('reg_hashcode'), 'ged' => $tree->getName()], true)) ?>"> + <?= e(route('verify', ['username' => $user->getUserName(), 'token' => $user->getPreference('reg_hashcode'), 'ged' => $tree->getName()], true)) ?> + </a> </p> <p> - <?= I18N::translate('If you didn’t request an account, you can just delete this message.') ?> + <?= I18N::translate('If you didn’t request an account, you can just delete this message.') ?> </p> diff --git a/resources/views/emails/register-user-text.php b/resources/views/emails/register-user-text.php index 254d67d184..f80df7002d 100644 --- a/resources/views/emails/register-user-text.php +++ b/resources/views/emails/register-user-text.php @@ -7,4 +7,4 @@ <?= route('verify', ['username' => $user->getUserName(), 'token' => $user->getPreference('reg_hashcode'), 'ged' => $tree->getName()], true) ?> -<?= I18N::translate('If you didn’t request an account, you can just delete this message.') ?> +<?= I18N::translate('If you didn’t request an account, you can just delete this message.'); diff --git a/resources/views/emails/verify-notify-html.php b/resources/views/emails/verify-notify-html.php index 148d6fcf71..d28bbc38d3 100644 --- a/resources/views/emails/verify-notify-html.php +++ b/resources/views/emails/verify-notify-html.php @@ -1,23 +1,27 @@ <?php namespace Fisharebest\Webtrees; ?> <p> - <?= I18N::translate('Hello administrator…') ?> + <?= I18N::translate('Hello administrator…') ?> </p> <p> - <?= /* I18N: %1$s is a real-name, %2$s is a username, %3$s is an email address */ I18N::translate( -'A new user (%1$s) has requested an account (%2$s) and verified an email address (%3$s).', e($user->getRealName()), e($user->getUserName()), e($user->getEmail())) ?> + <?= /* I18N: %1$s is a real-name, %2$s is a username, %3$s is an email address */ I18N::translate( + 'A new user (%1$s) has requested an account (%2$s) and verified an email address (%3$s).', + e($user->getRealName()), + e($user->getUserName()), + e($user->getEmail()) + ) ?> </p> <p> - <?= I18N::translate('You need to review the account details.') ?> + <?= I18N::translate('You need to review the account details.') ?> </p> <a href="<?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?>"> - <?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?> + <?= e(route('admin-users-edit', ['user_id' => $user->getUserId()])) ?> </a> <ul> - <li><?= /* I18N: You need to: */ I18N::translate('Set the status to “approved”.') ?></li> - <li><?= /* I18N: You need to: */ I18N::translate('Set the access level for each tree.') ?></li> - <li><?= /* I18N: You need to: */ I18N::translate('Link the user account to an individual.') ?></li> + <li><?= /* I18N: You need to: */ I18N::translate('Set the status to “approved”.') ?></li> + <li><?= /* I18N: You need to: */ I18N::translate('Set the access level for each tree.') ?></li> + <li><?= /* I18N: You need to: */ I18N::translate('Link the user account to an individual.') ?></li> </ul> diff --git a/resources/views/emails/verify-notify-text.php b/resources/views/emails/verify-notify-text.php index 749937b6e4..bd7e3ddc24 100644 --- a/resources/views/emails/verify-notify-text.php +++ b/resources/views/emails/verify-notify-text.php @@ -2,7 +2,11 @@ <?= I18N::translate('Hello administrator…') ?> <?= /* I18N: %1$s is a real-name, %2$s is a username, %3$s is an email address */ I18N::translate( -'A new user (%1$s) has requested an account (%2$s) and verified an email address (%3$s).', e($user->getRealName()), e($user->getUserName()), e($user->getEmail())) ?> + 'A new user (%1$s) has requested an account (%2$s) and verified an email address (%3$s).', + e($user->getRealName()), + e($user->getUserName()), + e($user->getEmail()) +) ?> <?= I18N::translate('You need to review the account details.') ?> @@ -10,4 +14,4 @@ <?= /* I18N: You need to: */ I18N::translate('Set the status to “approved”.') ?> <?= /* I18N: You need to: */ I18N::translate('Set the access level for each tree.') ?> -<?= /* I18N: You need to: */ I18N::translate('Link the user account to an individual.') ?> +<?= /* I18N: You need to: */ I18N::translate('Link the user account to an individual.'); diff --git a/resources/views/errors/database-connection.php b/resources/views/errors/database-connection.php index a9fc6a56ca..ee10b0bcef 100644 --- a/resources/views/errors/database-connection.php +++ b/resources/views/errors/database-connection.php @@ -1,29 +1,29 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="content"> - <p> - <?= I18N::translate('Oops! The webserver is unable to connect to the database server. It could be busy, undergoing maintenance, or simply broken. You should <a href="index.php">try again</a> in a few minutes or contact the website administrator.') ?> - </p> + <p> + <?= I18N::translate('Oops! The webserver is unable to connect to the database server. It could be busy, undergoing maintenance, or simply broken. You should <a href="index.php">try again</a> in a few minutes or contact the website administrator.') ?> + </p> - <blockquote> - <?= e($error) ?> - </blockquote> + <blockquote> + <?= e($error) ?> + </blockquote> - <?= I18N::translate('If you are the website administrator, you should check that:') ?> + <?= I18N::translate('If you are the website administrator, you should check that:') ?> - <ol> - <li> - <?= /* I18N: [you should check that:] ... */ I18N::translate('the database connection settings in the file “/data/config.ini.php” are still correct') ?> - </li> - <li> - <?= /* I18N: [you should check that:] ... */ I18N::translate('the folder “/data” and the file “/data/config.ini.php” have access permissions that allow the webserver to read them') ?> - </li> - <li> - <?= /* I18N: [you should check that:] ... */ I18N::translate('you can connect to the database using other applications, such as phpmyadmin') ?> - </li> - </ol> + <ol> + <li> + <?= /* I18N: [you should check that:] ... */ I18N::translate('the database connection settings in the file “/data/config.ini.php” are still correct') ?> + </li> + <li> + <?= /* I18N: [you should check that:] ... */ I18N::translate('the folder “/data” and the file “/data/config.ini.php” have access permissions that allow the webserver to read them') ?> + </li> + <li> + <?= /* I18N: [you should check that:] ... */ I18N::translate('you can connect to the database using other applications, such as phpmyadmin') ?> + </li> + </ol> - <p class="good"> - <?= I18N::translate('If you cannot resolve the problem yourself, you can ask for help on the forums at <a href="https://webtrees.net">webtrees.net</a>.') ?> - </p> + <p class="good"> + <?= I18N::translate('If you cannot resolve the problem yourself, you can ask for help on the forums at <a href="https://webtrees.net">webtrees.net</a>.') ?> + </p> </div> diff --git a/resources/views/errors/database-error.php b/resources/views/errors/database-error.php index 21b9cc2671..93030d68b8 100644 --- a/resources/views/errors/database-error.php +++ b/resources/views/errors/database-error.php @@ -1,13 +1,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('An unexpected database error occurred.') ?> + <?= I18N::translate('An unexpected database error occurred.') ?> </p> <pre> - <?= e($error) ?> + <?= e($error) ?> </pre> <p> - <?= I18N::translate('The webtrees developers would be very interested to learn about this error. If you contact them, they will help you resolve the problem.') ?> + <?= I18N::translate('The webtrees developers would be very interested to learn about this error. If you contact them, they will help you resolve the problem.') ?> </p> diff --git a/resources/views/errors/no-tree-access.php b/resources/views/errors/no-tree-access.php index 35f5d1f391..6d95eaf588 100644 --- a/resources/views/errors/no-tree-access.php +++ b/resources/views/errors/no-tree-access.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="alert alert-danger"> - <?= I18N::translate('This user account does not have access to any tree.') ?> + <?= I18N::translate('This user account does not have access to any tree.') ?> </div> diff --git a/resources/views/expand-chart-box.php b/resources/views/expand-chart-box.php index ee38d04b68..982d0a824d 100644 --- a/resources/views/expand-chart-box.php +++ b/resources/views/expand-chart-box.php @@ -1,3 +1,3 @@ -<?php foreach ($facts as $fact): ?> - <?= $fact->summary() ?> -<?php endforeach ?> +<?php foreach ($facts as $fact) : ?> + <?= $fact->summary() ?> +<?php endforeach; diff --git a/resources/views/family-book-page.php b/resources/views/family-book-page.php index e92ccc20b9..bbfbb68ee5 100644 --- a/resources/views/family-book-page.php +++ b/resources/views/family-book-page.php @@ -3,57 +3,57 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-family-book-chart d-print-none"> - <input type="hidden" name="route" value="family-book"> - <input type="hidden" name="ged" value="<?= e($individual->getTree()->getName()) ?>"> + <input type="hidden" name="route" value="family-book"> + <input type="hidden" name="ged" value="<?= e($individual->getTree()->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="book_size"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select(FunctionsEdit::numericOptions(range(2, 5)), $book_size, ['id' => 'book_size', 'name' => 'book_size']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="book_size"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select(FunctionsEdit::numericOptions(range(2, 5)), $book_size, ['id' => 'book_size', 'name' => 'book_size']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Descendant generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select(FunctionsEdit::numericOptions(range($minimum_generations, $maximum_generations)), $generations, ['id' => 'generations', 'name' => 'generations']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Descendant generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select(FunctionsEdit::numericOptions(range($minimum_generations, $maximum_generations)), $generations, ['id' => 'generations', 'name' => 'generations']) ?> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - <?= I18N::translate('Spouses') ?> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::checkbox(I18N::translate('Show spouses'), false, ['name' => 'show_spouse', 'checked' => $show_spouse]) ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + <?= I18N::translate('Spouses') ?> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::checkbox(I18N::translate('Show spouses'), false, ['name' => 'show_spouse', 'checked' => $show_spouse]) ?> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-family-book-chart" data-ajax-url="<?= e(route('family-book-chart', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName(), 'book_size' => $book_size, 'generations' => $generations, 'show_spouse' => (int) $show_spouse])) ?>"></div> diff --git a/resources/views/family-page-menu.php b/resources/views/family-page-menu.php index bc8f3e4741..d09cffcec2 100644 --- a/resources/views/family-page-menu.php +++ b/resources/views/family-page-menu.php @@ -3,37 +3,37 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <a class="dropdown-item menu-fam-change" href="<?= e(route('change-family-members', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Change family members') ?> - </a> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <a class="dropdown-item menu-fam-change" href="<?= e(route('change-family-members', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Change family members') ?> + </a> - <a class="dropdown-item menu-fam-addchil" href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Add a child to this family') ?> - </a> + <a class="dropdown-item menu-fam-addchil" href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Add a child to this family') ?> + </a> - <?php if ($record->getNumberOfChildren() > 1): ?> - <a class="dropdown-item menu-fam-orderchil" href="<?= e(route('reorder-children', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Re-order children') ?> - </a> - <?php endif ?> + <?php if ($record->getNumberOfChildren() > 1) : ?> + <a class="dropdown-item menu-fam-orderchil" href="<?= e(route('reorder-children', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Re-order children') ?> + </a> + <?php endif ?> - <div class="dropdown-divider"></div> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-fam-del" href="#" data-confirm="<?= I18N::translate('Deleting the family will unlink all of the individuals from each other but will leave the individuals in place. Are you sure you want to delete this family?') ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <a class="dropdown-item menu-fam-del" href="#" data-confirm="<?= I18N::translate('Deleting the family will unlink all of the individuals from each other but will leave the individuals in place. Are you sure you want to delete this family?') ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-fam-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-fam-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> diff --git a/resources/views/family-page.php b/resources/views/family-page.php index 8393e755c6..d7a5d91298 100644 --- a/resources/views/family-page.php +++ b/resources/views/family-page.php @@ -5,127 +5,127 @@ <?php use Fisharebest\Webtrees\I18N; ?> <?php use Fisharebest\Webtrees\Theme; ?> -<?php if ($record->isPendingDeletion()): ?> - <?php if (Auth::isModerator($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> -<?php elseif ($record->isPendingAddition()): ?> - <?php if (Auth::isModerator($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> +<?php if ($record->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> +<?php elseif ($record->isPendingAddition()) : ?> + <?php if (Auth::isModerator($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> <?php endif ?> <div class="d-flex mb-4"> - <h2 class="wt-page-title mx-auto"> - <?= $record->getFullName() ?> - </h2> - <?php if ($record->canEdit() && !$record->isPendingDeletion()): ?> - <?= view('family-page-menu', ['record' => $record]) ?> - <?php endif ?> + <h2 class="wt-page-title mx-auto"> + <?= $record->getFullName() ?> + </h2> + <?php if ($record->canEdit() && !$record->isPendingDeletion()) : ?> + <?= view('family-page-menu', ['record' => $record]) ?> + <?php endif ?> </div> <div class="wt-page-content"> - <table id="family-table" class="w-100" role="presentation"> - <tr style="vertical-align:top;"> - <td style="width: <?= Theme::theme()->parameter('chart-box-x') + 30 ?>px;"> - <?php FunctionsCharts::printFamilyChildren($record) ?> - </td> - <td> - <table class="w-100" role="presentation"> - <tr> - <td class="subheaders"><?= I18N::translate('Parents') ?></td> - <td class="subheaders"><?= I18N::translate('Grandparents') ?></td> - </tr> - <tr> - <td colspan="2"> - <?php FunctionsCharts::printFamilyParents($record) ?> - <?php if (Auth::isEditor($record->getTree())): ?> - <?php if ($record->getHusband() === null): ?> - <a href="<?= e(route('add-spouse-to-family', ['ged=' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'famtag' => 'HUSB'])) ?>"> - <?= I18N::translate('Add a father') ?> - </a> - <br> - <?php endif ?> - <?php if ($record->getWife() === null): ?> - <a href="<?= e(route('add-spouse-to-family', ['ged=' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'famtag' => 'WIFE'])) ?>"> - <?= I18N::translate('Add a mother') ?> - </a> - <br> - <?php endif ?> - <?php endif ?> - </td> - </tr> - </table> - </td> - </tr> - </table> - <span class="subheaders"><?= I18N::translate('Family group information') ?></span> - <table class="table wt-facts-table"> - <?php if (empty($facts)): ?> - <tr> - <td class="messagebox" colspan="2"> - <?= I18N::translate('No facts exist for this family.') ?> - </td> - </tr> - <?php else: ?> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printFact($fact, $record) ?> - <?php endforeach ?> - <?php endif ?> + <table id="family-table" class="w-100" role="presentation"> + <tr style="vertical-align:top;"> + <td style="width: <?= Theme::theme()->parameter('chart-box-x') + 30 ?>px;"> + <?php FunctionsCharts::printFamilyChildren($record) ?> + </td> + <td> + <table class="w-100" role="presentation"> + <tr> + <td class="subheaders"><?= I18N::translate('Parents') ?></td> + <td class="subheaders"><?= I18N::translate('Grandparents') ?></td> + </tr> + <tr> + <td colspan="2"> + <?php FunctionsCharts::printFamilyParents($record) ?> + <?php if (Auth::isEditor($record->getTree())) : ?> + <?php if ($record->getHusband() === null) : ?> + <a href="<?= e(route('add-spouse-to-family', ['ged=' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'famtag' => 'HUSB'])) ?>"> + <?= I18N::translate('Add a father') ?> + </a> + <br> + <?php endif ?> + <?php if ($record->getWife() === null) : ?> + <a href="<?= e(route('add-spouse-to-family', ['ged=' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'famtag' => 'WIFE'])) ?>"> + <?= I18N::translate('Add a mother') ?> + </a> + <br> + <?php endif ?> + <?php endif ?> + </td> + </tr> + </table> + </td> + </tr> + </table> + <span class="subheaders"><?= I18N::translate('Family group information') ?></span> + <table class="table wt-facts-table"> + <?php if (empty($facts)) : ?> + <tr> + <td class="messagebox" colspan="2"> + <?= I18N::translate('No facts exist for this family.') ?> + </td> + </tr> + <?php else : ?> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printFact($fact, $record) ?> + <?php endforeach ?> + <?php endif ?> - <?php if (Auth::isEditor($record->getTree())): ?> - <?php FunctionsPrint::printAddNewFact($record, $facts, 'FAM') ?> - <tr> - <th scope="row"> - <?= I18N::translate('Note') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'NOTE'])) ?>"> - <?= I18N::translate('Add a note') ?> - </a> - </td> - </tr> + <?php if (Auth::isEditor($record->getTree())) : ?> + <?php FunctionsPrint::printAddNewFact($record, $facts, 'FAM') ?> + <tr> + <th scope="row"> + <?= I18N::translate('Note') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'NOTE'])) ?>"> + <?= I18N::translate('Add a note') ?> + </a> + </td> + </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Shared note') ?> - </th> - <td class="optionbox"> - <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'SHARED_NOTE'])) ?>"> - <?= I18N::translate('Add a shared note') ?> - </a> - </td> - </tr> + <tr> + <th scope="row"> + <?= I18N::translate('Shared note') ?> + </th> + <td class="optionbox"> + <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'SHARED_NOTE'])) ?>"> + <?= I18N::translate('Add a shared note') ?> + </a> + </td> + </tr> - <?php if ($record->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($record->getTree())): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Media object') ?> - </th> - <td class="optionbox"> - <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'OBJE'])) ?>"> - <?= I18N::translate('Add a media object') ?> - </a> - </td> - </tr> - <?php endif ?> + <?php if ($record->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($record->getTree())) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Media object') ?> + </th> + <td class="optionbox"> + <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'OBJE'])) ?>"> + <?= I18N::translate('Add a media object') ?> + </a> + </td> + </tr> + <?php endif ?> - <tr> - <th scope="row"> - <?= I18N::translate('Source') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'SOUR'])) ?>"> - <?= I18N::translate('Add a source citation') ?> - </a> - </td> - </tr> - <?php endif ?> - </table> + <tr> + <th scope="row"> + <?= I18N::translate('Source') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref(), 'fact' => 'SOUR'])) ?>"> + <?= I18N::translate('Add a source citation') ?> + </a> + </td> + </tr> + <?php endif ?> + </table> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/fan-page.php b/resources/views/fan-page.php index 5e8ebc2445..92cc09650a 100644 --- a/resources/views/fan-page.php +++ b/resources/views/fan-page.php @@ -3,62 +3,62 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-fan-chart d-print-none"> - <input type="hidden" name="route" value="fan"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="fan"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Layout') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($chart_styles, $chart_style, ['id' => 'chart_style', 'name' => 'chart_style']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Layout') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($chart_styles, $chart_style, ['id' => 'chart_style', 'name' => 'chart_style']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select(FunctionsEdit::numericOptions(range($minimum_generations, $maximum_generations)), $generations, ['id' => 'generations', 'name' => 'generations']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select(FunctionsEdit::numericOptions(range($minimum_generations, $maximum_generations)), $generations, ['id' => 'generations', 'name' => 'generations']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="fan_width"> - <?= I18N::translate('Zoom') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <div class="input-group"> - <input class="form-control" id="fan_width" max="<?= $maximum_width ?>" min="<?= $minimum_width ?>" name="fan_width" required type="number" value="<?= $fan_width ?>"> - <div class="input-group-append"> - <span class="input-group-text"> - % - </span> - </div> - </div> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="fan_width"> + <?= I18N::translate('Zoom') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <div class="input-group"> + <input class="form-control" id="fan_width" max="<?= $maximum_width ?>" min="<?= $minimum_width ?>" name="fan_width" required type="number" value="<?= $fan_width ?>"> + <div class="input-group-append"> + <span class="input-group-text"> + % + </span> + </div> + </div> + </div> + </div> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-fan-chart" data-ajax-url="<?= e(route('fan-chart', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName(), 'generations' => $generations, 'chart_style' => $chart_style, 'fan_width' => $fan_width])) ?>"></div> diff --git a/resources/views/forgot-password-page.php b/resources/views/forgot-password-page.php index e95ffee07e..52bc200191 100644 --- a/resources/views/forgot-password-page.php +++ b/resources/views/forgot-password-page.php @@ -1,29 +1,29 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-forgot-password" method="post"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="identifier"> - <?= I18N::translate('Username or email address') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="text" id="identifier" name="identifier"> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="identifier"> + <?= I18N::translate('Username or email address') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="text" id="identifier" name="identifier"> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button class="btn btn-primary" type="submit"> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button class="btn btn-primary" type="submit"> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/gedcom-record-page-menu.php b/resources/views/gedcom-record-page-menu.php index 2bd234301a..a5e3d6715d 100644 --- a/resources/views/gedcom-record-page-menu.php +++ b/resources/views/gedcom-record-page-menu.php @@ -3,25 +3,25 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <a class="dropdown-item menu-indi-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <a class="dropdown-item menu-indi-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-indi-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-indi-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> -<?php if ($record->canEdit()): ?> +<?php if ($record->canEdit()) : ?> <?php endif ?> diff --git a/resources/views/gedcom-record-page.php b/resources/views/gedcom-record-page.php index 76ffefe0d6..205c379d74 100644 --- a/resources/views/gedcom-record-page.php +++ b/resources/views/gedcom-record-page.php @@ -4,97 +4,97 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($record->isPendingDeletion()): ?> - <?php if (Auth::isModerator($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This record has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This record has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> -<?php elseif ($record->isPendingAddition()): ?> - <?php if (Auth::isModerator($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This record has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($record->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This record has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> +<?php if ($record->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This record has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This record has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> +<?php elseif ($record->isPendingAddition()) : ?> + <?php if (Auth::isModerator($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This record has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($record->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This record has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> <?php endif ?> <div class="d-flex mb-4"> - <h2 class="wt-page-title mx-auto"> - <?= $record->getFullName() ?> - </h2> - <?php if ($record->canEdit() && !$record->isPendingDeletion()): ?> - <?= view('gedcom-record-page-menu', ['record' => $record]) ?> - <?php endif ?> + <h2 class="wt-page-title mx-auto"> + <?= $record->getFullName() ?> + </h2> + <?php if ($record->canEdit() && !$record->isPendingDeletion()) : ?> + <?= view('gedcom-record-page-menu', ['record' => $record]) ?> + <?php endif ?> </div> <div class="wt-page-content"> - <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> - <?= I18N::translate('Details') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> - <?= I18N::translate('Individuals') ?> - <?= Bootstrap4::badgeCount($individuals) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> - <?= I18N::translate('Families') ?> - <?= Bootstrap4::badgeCount($families) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($media_objects) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#media"> - <?= I18N::translate('Media objects') ?> - <?= Bootstrap4::badgeCount($media_objects) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> - <?= I18N::translate('Sources') ?> - <?= Bootstrap4::badgeCount($sources) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> - <?= I18N::translate('Notes') ?> - <?= Bootstrap4::badgeCount($notes) ?> - </a> - </li> - </ul> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> + <?= I18N::translate('Details') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> + <?= I18N::translate('Individuals') ?> + <?= Bootstrap4::badgeCount($individuals) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> + <?= I18N::translate('Families') ?> + <?= Bootstrap4::badgeCount($families) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($media_objects) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#media"> + <?= I18N::translate('Media objects') ?> + <?= Bootstrap4::badgeCount($media_objects) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> + <?= I18N::translate('Sources') ?> + <?= Bootstrap4::badgeCount($sources) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> + <?= I18N::translate('Notes') ?> + <?= Bootstrap4::badgeCount($notes) ?> + </a> + </li> + </ul> - <div class="tab-content"> - <div class="tab-pane active fade show" role="tabpanel" id="details"> - <table class="table wt-facts-table"> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printFact($fact, $record) ?> - <?php endforeach ?> - </table> - </div> + <div class="tab-content"> + <div class="tab-pane active fade show" role="tabpanel" id="details"> + <table class="table wt-facts-table"> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printFact($fact, $record) ?> + <?php endforeach ?> + </table> + </div> - <div class="tab-pane fade" role="tabpanel" id="individuals"> - <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="individuals"> + <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="families"> - <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="families"> + <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="media"> - <?= view('lists/media-table', ['media_objects' => $media_objects, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="media"> + <?= view('lists/media-table', ['media_objects' => $media_objects, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="sources"> - <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="sources"> + <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="notes"> - <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> - </div> - </div> + <div class="tab-pane fade" role="tabpanel" id="notes"> + <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> + </div> + </div> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/help/calendar-year.php b/resources/views/help/calendar-year.php index b69a35f429..f235940d87 100644 --- a/resources/views/help/calendar-year.php +++ b/resources/views/help/calendar-year.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('This input box lets you change that year of the calendar. Type a year into the box and press <b>Enter</b> to change the calendar to that year.<br><br><b>Advanced features</b> for <b>View the year</b><dl><dt><b>More than one year</b></dt><dd>You can search for dates in a range of years.<br><br>Year ranges are <u>inclusive</u>. This means that the date range extends from 1 January of the first year of the range to 31 December of the last year mentioned. Here are a few examples of year ranges:<br><br><b>1992-5</b> for all events from 1992 to 1995.<br><b>1972-89</b> for all events from 1972 to 1989.<br><b>1610-759</b> for all events from 1610 to 1759.<br><b>1880-1905</b> for all events from 1880 to 1905.<br><b>880-1105</b> for all events from 880 to 1105.<br><br>To see all the events in a given decade or century, you can use <b>?</b> in place of the final digits. For example, <b>197?</b> for all events from 1970 to 1979 or <b>16??</b> for all events from 1600 to 1699.<br><br>Selecting a range of years will change the calendar to the year view.</dd></dl>') ?> + <?= I18N::translate('This input box lets you change that year of the calendar. Type a year into the box and press <b>Enter</b> to change the calendar to that year.<br><br><b>Advanced features</b> for <b>View the year</b><dl><dt><b>More than one year</b></dt><dd>You can search for dates in a range of years.<br><br>Year ranges are <u>inclusive</u>. This means that the date range extends from 1 January of the first year of the range to 31 December of the last year mentioned. Here are a few examples of year ranges:<br><br><b>1992-5</b> for all events from 1992 to 1995.<br><b>1972-89</b> for all events from 1972 to 1989.<br><b>1610-759</b> for all events from 1610 to 1759.<br><b>1880-1905</b> for all events from 1880 to 1905.<br><b>880-1105</b> for all events from 880 to 1105.<br><br>To see all the events in a given decade or century, you can use <b>?</b> in place of the final digits. For example, <b>197?</b> for all events from 1970 to 1979 or <b>16??</b> for all events from 1600 to 1699.<br><br>Selecting a range of years will change the calendar to the year view.</dd></dl>') ?> </p> diff --git a/resources/views/help/date.php b/resources/views/help/date.php index 6dca23579f..1a7cef52b8 100644 --- a/resources/views/help/date.php +++ b/resources/views/help/date.php @@ -1,197 +1,197 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('Dates are stored using English abbreviations and keywords. Shortcuts are available as alternatives to these abbreviations and keywords.') ?> + <?= I18N::translate('Dates are stored using English abbreviations and keywords. Shortcuts are available as alternatives to these abbreviations and keywords.') ?> </p> <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Date') ?> - </th> - <th> - <?= I18N::translate('Format') ?> - </th> - <th> - <?= I18N::translate('Shortcut') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($date_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - <td> - <?php foreach ($date_shortcuts[$code] as $shortcut): ?> - <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd> - <br> - <?php endforeach ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th> + <?= I18N::translate('Date') ?> + </th> + <th> + <?= I18N::translate('Format') ?> + </th> + <th> + <?= I18N::translate('Shortcut') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($date_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + <td> + <?php foreach ($date_shortcuts[$code] as $shortcut) : ?> + <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd> + <br> + <?php endforeach ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <p> - <?= I18N::translate('Date ranges are used to indicate that an event, such as a birth, happened on an unknown date within a possible range.') ?> + <?= I18N::translate('Date ranges are used to indicate that an event, such as a birth, happened on an unknown date within a possible range.') ?> </p> <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Date range') ?> - </th> - <th> - <?= I18N::translate('Format') ?> - </th> - <th> - <?= I18N::translate('Shortcut') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($date_range_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - <td> - <?php foreach ($date_range_shortcuts[$code] as $shortcut): ?> - <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd> - <br> - <?php endforeach ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th> + <?= I18N::translate('Date range') ?> + </th> + <th> + <?= I18N::translate('Format') ?> + </th> + <th> + <?= I18N::translate('Shortcut') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($date_range_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + <td> + <?php foreach ($date_range_shortcuts[$code] as $shortcut) : ?> + <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd> + <br> + <?php endforeach ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <p> - <?=I18N::translate('Date periods are used to indicate that a fact, such as an occupation, continued for a period of time.') ?> + <?=I18N::translate('Date periods are used to indicate that a fact, such as an occupation, continued for a period of time.') ?> </p> <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Date period') ?> - </th> - <th> - <?= I18N::translate('Format') ?> - </th> - <th> - <?= I18N::translate('Shortcut') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($date_period_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - <td> - <?php foreach ($date_period_shortcuts[$code] as $shortcut): ?> - <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd> - <br> - <?php endforeach ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th> + <?= I18N::translate('Date period') ?> + </th> + <th> + <?= I18N::translate('Format') ?> + </th> + <th> + <?= I18N::translate('Shortcut') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($date_period_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + <td> + <?php foreach ($date_period_shortcuts[$code] as $shortcut) : ?> + <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd> + <br> + <?php endforeach ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <p> - <?= I18N::translate('Simple dates are assumed to be in the gregorian calendar. To specify a date in another calendar, add a keyword before the date. This keyword is optional if the month or year format make the date unambiguous.') ?> + <?= I18N::translate('Simple dates are assumed to be in the gregorian calendar. To specify a date in another calendar, add a keyword before the date. This keyword is optional if the month or year format make the date unambiguous.') ?> </p> <table class="table table-bordered table-sm"> - <thead> - <tr> - <th> - <?= I18N::translate('Date') ?> - </th> - <th> - <?= I18N::translate('Format') ?> - </th> - </tr> - </thead> - <tbody> - <tr> - <th colspan="2"> - <?= I18N::translate('Julian') ?> - </th> - </tr> - <?php foreach ($julian_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - </tr> - <?php endforeach ?> + <thead> + <tr> + <th> + <?= I18N::translate('Date') ?> + </th> + <th> + <?= I18N::translate('Format') ?> + </th> + </tr> + </thead> + <tbody> + <tr> + <th colspan="2"> + <?= I18N::translate('Julian') ?> + </th> + </tr> + <?php foreach ($julian_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + </tr> + <?php endforeach ?> - <tr> - <th colspan="2"> - <?= I18N::translate('Jewish') ?> - </th> - </tr> - <?php foreach ($jewish_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - </tr> - <?php endforeach ?> + <tr> + <th colspan="2"> + <?= I18N::translate('Jewish') ?> + </th> + </tr> + <?php foreach ($jewish_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + </tr> + <?php endforeach ?> - <tr> - <th colspan="2"> - <?= I18N::translate('Hijri') ?> - </th> - </tr> - <?php foreach ($hijri_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - </tr> - <?php endforeach ?> + <tr> + <th colspan="2"> + <?= I18N::translate('Hijri') ?> + </th> + </tr> + <?php foreach ($hijri_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + </tr> + <?php endforeach ?> - <tr> - <th colspan="2"> - <?= I18N::translate('French') ?> - </th> - </tr> - <?php foreach ($french_dates as $code => $date): ?> - <tr> - <td> - <?= $date ?> - </td> - <td> - <kbd dir="ltr" lang="en"><?= $code ?></kbd> - </td> - </tr> - <?php endforeach ?> - </tbody> + <tr> + <th colspan="2"> + <?= I18N::translate('French') ?> + </th> + </tr> + <?php foreach ($french_dates as $code => $date) : ?> + <tr> + <td> + <?= $date ?> + </td> + <td> + <kbd dir="ltr" lang="en"><?= $code ?></kbd> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/help/hebrew.php b/resources/views/help/hebrew.php index 3b9048980b..9723d6e408 100644 --- a/resources/views/help/hebrew.php +++ b/resources/views/help/hebrew.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use the Latin alphabet to enter the name in the standard name fields, then you can use this field to enter the same name in the non-Latin alphabet such as Greek, Hebrew, Russian, Arabic, or Chinese. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Hebrew”, it is not restricted to containing only Hebrew characters.') ?> + <?= I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use the Latin alphabet to enter the name in the standard name fields, then you can use this field to enter the same name in the non-Latin alphabet such as Greek, Hebrew, Russian, Arabic, or Chinese. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Hebrew”, it is not restricted to containing only Hebrew characters.') ?> </p> diff --git a/resources/views/help/media-object.php b/resources/views/help/media-object.php index b813710a72..5c83b45edf 100644 --- a/resources/views/help/media-object.php +++ b/resources/views/help/media-object.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('A media object is a record in the family tree which contains information about a media file. This information may include a title, a copyright notice, a transcript, privacy restrictions, etc. The media file, such as the photo or video, can be stored locally (on this webserver) or remotely (on a different webserver).') ?> + <?= I18N::translate('A media object is a record in the family tree which contains information about a media file. This information may include a title, a copyright notice, a transcript, privacy restrictions, etc. The media file, such as the photo or video, can be stored locally (on this webserver) or remotely (on a different webserver).') ?> </p> diff --git a/resources/views/help/name.php b/resources/views/help/name.php index 929c78cf58..d5e32ba5e7 100644 --- a/resources/views/help/name.php +++ b/resources/views/help/name.php @@ -1,26 +1,26 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('The <b>name</b> field contains the individual’s full name, as they would have spelled it or as it was recorded. This is how it will be displayed on screen. It uses standard genealogy annotations to identify different parts of the name.') ?> + <?= I18N::translate('The <b>name</b> field contains the individual’s full name, as they would have spelled it or as it was recorded. This is how it will be displayed on screen. It uses standard genealogy annotations to identify different parts of the name.') ?> </p> <ul> - <li> - <?= I18N::translate('The surname is enclosed by slashes: <%s>John Paul /Smith/<%s>', 'b', '/b') ?> - </li> - <li> - <?= I18N::translate('If the surname is unknown, use empty slashes: <%s>Mary //<%s>', 'b', '/b') ?> - </li> - <li> - <?= I18N::translate('If an individual has two separate surnames, both should be enclosed by slashes: <%s>José Antonio /Gómez/ /Iglesias/<%s>', 'b', '/b') ?> - </li> - <li> - <?= I18N::translate('If an individual does not have a surname, no slashes are needed: <%s>Jón Einarsson<%s>', 'b', '/b') ?> - </li> - <li> - <?= I18N::translate('If an individual was not known by their first given name, the preferred name should be indicated with an asterisk: <%s>John Paul* /Smith/<%s>', 'b', '/b') ?> - </li> - <li> - <?= I18N::translate('If an individual was known by a nickname which is not part of their formal name, it should be enclosed by quotation marks. For example, <%s>John "Nobby" /Clark/<%s>.', 'b', '/b') ?> - </li> + <li> + <?= I18N::translate('The surname is enclosed by slashes: <%s>John Paul /Smith/<%s>', 'b', '/b') ?> + </li> + <li> + <?= I18N::translate('If the surname is unknown, use empty slashes: <%s>Mary //<%s>', 'b', '/b') ?> + </li> + <li> + <?= I18N::translate('If an individual has two separate surnames, both should be enclosed by slashes: <%s>José Antonio /Gómez/ /Iglesias/<%s>', 'b', '/b') ?> + </li> + <li> + <?= I18N::translate('If an individual does not have a surname, no slashes are needed: <%s>Jón Einarsson<%s>', 'b', '/b') ?> + </li> + <li> + <?= I18N::translate('If an individual was not known by their first given name, the preferred name should be indicated with an asterisk: <%s>John Paul* /Smith/<%s>', 'b', '/b') ?> + </li> + <li> + <?= I18N::translate('If an individual was known by a nickname which is not part of their formal name, it should be enclosed by quotation marks. For example, <%s>John "Nobby" /Clark/<%s>.', 'b', '/b') ?> + </li> </ul> diff --git a/resources/views/help/pending-changes.php b/resources/views/help/pending-changes.php index 6476238254..1eb5415194 100644 --- a/resources/views/help/pending-changes.php +++ b/resources/views/help/pending-changes.php @@ -1,19 +1,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('When you add, edit, or delete information, the changes are not saved immediately. Instead, they are kept in a “pending” area. These pending changes need to be reviewed by a moderator before they are accepted.') ?> + <?= I18N::translate('When you add, edit, or delete information, the changes are not saved immediately. Instead, they are kept in a “pending” area. These pending changes need to be reviewed by a moderator before they are accepted.') ?> </p> <p> - <?= I18N::translate('This process allows the site’s owner to ensure that the new information follows the site’s standards and conventions, has proper source attributions, etc.') ?> + <?= I18N::translate('This process allows the site’s owner to ensure that the new information follows the site’s standards and conventions, has proper source attributions, etc.') ?> </p> <p> - <?= I18N::translate('Pending changes are only shown when your account has permission to edit. When you sign out, you will no longer be able to see them. Also, pending changes are only shown on certain pages. For example, they are not shown in lists, reports, or search results.') ?> + <?= I18N::translate('Pending changes are only shown when your account has permission to edit. When you sign out, you will no longer be able to see them. Also, pending changes are only shown on certain pages. For example, they are not shown in lists, reports, or search results.') ?> </p> -<?php if ($is_admin): ?> - <p> - <?= I18N::translate('Each user account has an option to “automatically accept changes”. When this is enabled, any changes made by that user are saved immediately. Many administrators enable this for their own user account.') ?> - </p> +<?php if ($is_admin) : ?> + <p> + <?= I18N::translate('Each user account has an option to “automatically accept changes”. When this is enabled, any changes made by that user are saved immediately. Many administrators enable this for their own user account.') ?> + </p> <?php endif ?> diff --git a/resources/views/help/place.php b/resources/views/help/place.php index 9ddc40d462..e79bbab337 100644 --- a/resources/views/help/place.php +++ b/resources/views/help/place.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('Places should be entered according to the standards for genealogy. In genealogy, places are recorded with the most specific information about the place first and then working up to the least specific place last, using commas to separate the different place levels. The level at which you record the place information should represent the levels of government or church where vital records for that place are kept.<br><br>For example, a place like Salt Lake City would be entered as “Salt Lake City, Salt Lake, Utah, USA”.<br><br>Let’s examine each part of this place. The first part, “Salt Lake City,” is the city or township where the event occurred. In some countries, there may be municipalities or districts inside a city which are important to note. In that case, they should come before the city. The next part, “Salt Lake,” is the county. “Utah” is the state, and “USA” is the country. It is important to note each place because genealogy records are kept by the governments of each level.<br><br>If a level of the place is unknown, you should leave a space between the commas. Suppose, in the example above, you didn’t know the county for Salt Lake City. You should then record it like this: “Salt Lake City, , Utah, USA”. Suppose you only know that an individual was born in Utah. You would enter the information like this: “, , Utah, USA”. <br><br>You can use the <b>Find Place</b> link to help you find places that already exist in the database.') ?> + <?= I18N::translate('Places should be entered according to the standards for genealogy. In genealogy, places are recorded with the most specific information about the place first and then working up to the least specific place last, using commas to separate the different place levels. The level at which you record the place information should represent the levels of government or church where vital records for that place are kept.<br><br>For example, a place like Salt Lake City would be entered as “Salt Lake City, Salt Lake, Utah, USA”.<br><br>Let’s examine each part of this place. The first part, “Salt Lake City,” is the city or township where the event occurred. In some countries, there may be municipalities or districts inside a city which are important to note. In that case, they should come before the city. The next part, “Salt Lake,” is the county. “Utah” is the state, and “USA” is the country. It is important to note each place because genealogy records are kept by the governments of each level.<br><br>If a level of the place is unknown, you should leave a space between the commas. Suppose, in the example above, you didn’t know the county for Salt Lake City. You should then record it like this: “Salt Lake City, , Utah, USA”. Suppose you only know that an individual was born in Utah. You would enter the information like this: “, , Utah, USA”. <br><br>You can use the <b>Find Place</b> link to help you find places that already exist in the database.') ?> </p> diff --git a/resources/views/help/restriction.php b/resources/views/help/restriction.php index 8cc461d7d2..4ecee09346 100644 --- a/resources/views/help/restriction.php +++ b/resources/views/help/restriction.php @@ -1,8 +1,8 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('Restrictions can be added to records and/or facts. They restrict who can view the data and who can edit it.') ?> + <?= I18N::translate('Restrictions can be added to records and/or facts. They restrict who can view the data and who can edit it.') ?> </p> <p> - <?= I18N::translate('Note that if a user account is linked to a record, then that user will always be able to view that record.') ?> + <?= I18N::translate('Note that if a user account is linked to a record, then that user will always be able to view that record.') ?> </p> diff --git a/resources/views/help/romanized.php b/resources/views/help/romanized.php index dbc26c7d74..f57fec6dc9 100644 --- a/resources/views/help/romanized.php +++ b/resources/views/help/romanized.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use a non-Latin alphabet such as Hebrew, Greek, Russian, Chinese, or Arabic to enter the name in the standard name fields, then you can use this field to enter the same name using the Latin alphabet. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Romanized”, it is not restricted to containing only characters based on the Latin alphabet. This might be of use with Japanese names, where three different alphabets may occur.') ?> + <?= I18N::translate('In many cultures it is customary to have a traditional name spelled in the traditional characters and also a romanized version of the name as it would be spelled or pronounced in languages based on the Latin alphabet, such as English.<br><br>If you prefer to use a non-Latin alphabet such as Hebrew, Greek, Russian, Chinese, or Arabic to enter the name in the standard name fields, then you can use this field to enter the same name using the Latin alphabet. Both versions of the name will appear in lists and charts.<br><br>Although this field is labeled “Romanized”, it is not restricted to containing only characters based on the Latin alphabet. This might be of use with Japanese names, where three different alphabets may occur.') ?> </p> diff --git a/resources/views/help/source-events.php b/resources/views/help/source-events.php index 698fb811fd..bb6a601ee0 100644 --- a/resources/views/help/source-events.php +++ b/resources/views/help/source-events.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('Each source records specific events, generally for a given date range and for a place jurisdiction. For example a Census records census events and church records record birth, marriage, and death events.<br><br>Select the events that are recorded by this source from the list of events provided. The date should be specified in a range format such as <i>FROM 1900 TO 1910</i>. The place jurisdiction is the name of the lowest jurisdiction that encompasses all lower-level places named in this source. For example, “Oneida, Idaho, USA” would be used as a source jurisdiction place for events occurring in the various towns within Oneida County. “Idaho, USA” would be the source jurisdiction place if the events recorded took place not only in Oneida County but also in other counties in Idaho.') ?> + <?= I18N::translate('Each source records specific events, generally for a given date range and for a place jurisdiction. For example a Census records census events and church records record birth, marriage, and death events.<br><br>Select the events that are recorded by this source from the list of events provided. The date should be specified in a range format such as <i>FROM 1900 TO 1910</i>. The place jurisdiction is the name of the lowest jurisdiction that encompasses all lower-level places named in this source. For example, “Oneida, Idaho, USA” would be used as a source jurisdiction place for events occurring in the various towns within Oneida County. “Idaho, USA” would be the source jurisdiction place if the events recorded took place not only in Oneida County but also in other counties in Idaho.') ?> </p> diff --git a/resources/views/help/surname.php b/resources/views/help/surname.php index bd57d603fb..587881c077 100644 --- a/resources/views/help/surname.php +++ b/resources/views/help/surname.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('The <b>surname</b> field contains a name that is used for sorting and grouping. It can be different to the individual’s actual surname which is always taken from the <b>name</b> field. This field can be used to sort surnames with or without a prefix (Gogh / van Gogh) and to group spelling variations or inflections (Kowalski / Kowalska). If an individual needs to be listed under more than one surname, each name should be separated by a comma.') ?> + <?= I18N::translate('The <b>surname</b> field contains a name that is used for sorting and grouping. It can be different to the individual’s actual surname which is always taken from the <b>name</b> field. This field can be used to sort surnames with or without a prefix (Gogh / van Gogh) and to group spelling variations or inflections (Kowalski / Kowalska). If an individual needs to be listed under more than one surname, each name should be separated by a comma.') ?> </p> diff --git a/resources/views/hourglass-page.php b/resources/views/hourglass-page.php index 8fdbaf26e2..c4bb15fea4 100644 --- a/resources/views/hourglass-page.php +++ b/resources/views/hourglass-page.php @@ -3,48 +3,48 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-hourglass-chart d-print-none"> - <input type="hidden" name="route" value="hourglass"> - <input type="hidden" name="ged" value="<?= e($individual->getTree()->getName()) ?>"> + <input type="hidden" name="route" value="hourglass"> + <input type="hidden" name="ged" value="<?= e($individual->getTree()->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select(FunctionsEdit::numericOptions(range($minimum_generations, $maximum_generations)), $generations, ['id' => 'generations', 'name' => 'generations']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select(FunctionsEdit::numericOptions(range($minimum_generations, $maximum_generations)), $generations, ['id' => 'generations', 'name' => 'generations']) ?> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - <?= I18N::translate('Layout') ?> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::checkbox(I18N::translate('Show spouses'), false, ['name' => 'show_spouse', 'checked' => $show_spouse]) ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + <?= I18N::translate('Layout') ?> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::checkbox(I18N::translate('Show spouses'), false, ['name' => 'show_spouse', 'checked' => $show_spouse]) ?> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-hourglass-chart" data-ajax-url="<?= e(route('hourglass-chart', ['xref' => $individual->getXref(), 'generations' => $generations, 'show_spouse' => $show_spouse, 'ged' => $individual->getTree()->getName()])) ?>"></div> diff --git a/resources/views/individual-page-menu.php b/resources/views/individual-page-menu.php index 3ce8ec401c..500e39cbd0 100644 --- a/resources/views/individual-page-menu.php +++ b/resources/views/individual-page-menu.php @@ -3,45 +3,45 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <?php if ($count_sex === 0): ?> - <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Edit the gender') ?> - </a> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <?php if ($count_sex === 0) : ?> + <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Edit the gender') ?> + </a> - <?php endif ?> + <?php endif ?> - <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-name', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Add a name') ?> - </a> + <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-name', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Add a name') ?> + </a> - <?php if ($count_names > 1): ?> - <a class="dropdown-item menu-indi-editraw" href="<?= e(route('reorder-names', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Re-order names') ?> - </a> - <?php endif ?> + <?php if ($count_names > 1) : ?> + <a class="dropdown-item menu-indi-editraw" href="<?= e(route('reorder-names', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Re-order names') ?> + </a> + <?php endif ?> - <?php if (empty($individual->getFacts('SEX'))): ?> - <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Edit the gender') ?> - </a> - <?php endif ?> + <?php if (empty($individual->getFacts('SEX'))) : ?> + <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Edit the gender') ?> + </a> + <?php endif ?> - <a class="dropdown-item menu-indi-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($individual->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($individual->getXref()) ?>', '<?= e($individual->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <a class="dropdown-item menu-indi-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($individual->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($individual->getXref()) ?>', '<?= e($individual->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $individual->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $individual->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-indi-editraw" href="<?= e(route('edit-raw-record', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-indi-editraw" href="<?= e(route('edit-raw-record', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> diff --git a/resources/views/individual-page.php b/resources/views/individual-page.php index a2fa4d7714..5cc7f264ba 100644 --- a/resources/views/individual-page.php +++ b/resources/views/individual-page.php @@ -3,22 +3,22 @@ <?php use Fisharebest\Webtrees\I18N; ?> <?php use Fisharebest\Webtrees\View; ?> -<?php if ($individual->isPendingDeletion()): ?> - <?php if (Auth::isModerator($individual->getTree())): ?> +<?php if ($individual->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($individual->getTree())) : ?> <?= view('components/alert-warning-dismissible', [ 'alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This individual has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($individual->getXref()) . '\', \'' . e($individual->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($individual->getXref()) . '\', \'' . e($individual->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes'), ]) ?> - <?php elseif (Auth::isEditor($individual->getTree())): ?> + <?php elseif (Auth::isEditor($individual->getTree())) : ?> <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This individual has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> <?php endif ?> -<?php elseif ($individual->isPendingAddition()): ?> - <?php if (Auth::isModerator($individual->getTree())): ?> +<?php elseif ($individual->isPendingAddition()) : ?> + <?php if (Auth::isModerator($individual->getTree())) : ?> <?= view('components/alert-warning-dismissible', [ 'alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This individual has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($individual->getXref()) . '\', \'' . e($individual->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($individual->getXref()) . '\', \'' . e($individual->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes'), ]) ?> - <?php elseif (Auth::isEditor($individual->getTree())): ?> + <?php elseif (Auth::isEditor($individual->getTree())) : ?> <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This individual has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> <?php endif ?> <?php endif ?> @@ -27,7 +27,7 @@ <h2 class="wt-page-title mx-auto"> <?= $individual->getFullName() ?><?= $user_link ?>, <?= $individual->getLifeSpan() ?> <?= $age ?> </h2> - <?php if ($individual->canEdit() && !$individual->isPendingDeletion()): ?> + <?php if ($individual->canEdit() && !$individual->isPendingDeletion()) : ?> <?= view('individual-page-menu', ['individual' => $individual, 'count_names' => $count_names, 'count_sex' => $count_sex]) ?> <?php endif ?> </div> @@ -37,14 +37,14 @@ <div class="row mb-4"> <!-- Individual images --> <div class="col-sm-3"> - <?php if (empty($individual_media)): ?> + <?php if (empty($individual_media)) : ?> <i class="wt-silhouette wt-silhouette-<?= $individual->getSex() ?>"></i> - <?php elseif (count($individual_media) === 1): ?> + <?php elseif (count($individual_media) === 1) : ?> <?= $individual_media[0]->displayImage(200, 260, 'crop', ['class' => 'img-thumbnail img-fluid w-100']) ?> - <?php else: ?> + <?php else : ?> <div id="individual-images" class="carousel slide" data-ride="carousel" data-interval="false"> <div class="carousel-inner"> - <?php foreach ($individual_media as $n => $media_file): ?> + <?php foreach ($individual_media as $n => $media_file) : ?> <div class="carousel-item <?= $n === 0 ? 'active' : '' ?>"> <?= $media_file->displayImage(200, 260, 'crop', ['class' => 'img-thumbnail img-fluid w-100']) ?> </div> @@ -62,8 +62,8 @@ <?php endif ?> - <?php if (Auth::isEditor($individual->getTree())): ?> - <?php if (count($individual->getFacts('OBJE')) > 1): ?> + <?php if (Auth::isEditor($individual->getTree())) : ?> + <?php if (count($individual->getFacts('OBJE')) > 1) : ?> <div> <a href="<?= e(route('reorder-media', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> <?= I18N::translate('Re-order media') ?> @@ -71,7 +71,7 @@ </div> <?php endif ?> - <?php if ($individual->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($individual->getTree())): ?> + <?php if ($individual->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($individual->getTree())) : ?> <div> <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'OBJE'])) ?>"> <?= I18N::translate('Add a media object') ?> @@ -83,11 +83,11 @@ <!-- Name accordion --> <div class="col-sm-9" id="individual-names" role="tablist"> - <?php foreach ($name_records as $name_record): ?> + <?php foreach ($name_records as $name_record) : ?> <?= $name_record ?> <?php endforeach ?> - <?php foreach ($sex_records as $sex_record): ?> + <?php foreach ($sex_records as $sex_record) : ?> <?= $sex_record ?> <?php endforeach ?> </div> @@ -95,7 +95,7 @@ <div id="individual-tabs"> <ul class="nav nav-tabs flex-wrap"> - <?php foreach ($tabs as $tab): ?> + <?php foreach ($tabs as $tab) : ?> <li class="nav-item"> <a class="nav-link<?= $tab->isGrayedOut($individual) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" data-href="<?= e(route('individual-tab', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName(), 'module' => $tab->getName()])) ?>" href="#<?= $tab->getName() ?>"> <?= $tab->getTitle() ?> @@ -104,14 +104,16 @@ <?php endforeach ?> </ul> <div class="tab-content"> - <?php foreach ($tabs as $tab): ?> - <div id="<?= $tab->getName() ?>" class="tab-pane fade wt-ajax-load" role="tabpanel"><?php if (!$tab->canLoadAjax()): ?><?= $tab->getTabContent($individual) ?><?php endif ?></div> + <?php foreach ($tabs as $tab) : ?> + <div id="<?= $tab->getName() ?>" class="tab-pane fade wt-ajax-load" role="tabpanel"><?php if (!$tab->canLoadAjax()) : + ?><?= $tab->getTabContent($individual) ?><?php + endif ?></div> <?php endforeach ?> </div> </div> </div> <div class="col-sm-4" id="sidebar" role="tablist"> - <?php foreach ($sidebars as $sidebar): ?> + <?php foreach ($sidebars as $sidebar) : ?> <div class="card"> <div class="card-header" role="tab" id="sidebar-header-<?= $sidebar->getName() ?>"> <div class="card-title mb-0"> diff --git a/resources/views/interactive-tree-chart.php b/resources/views/interactive-tree-chart.php index 23e8642d65..3e40423352 100644 --- a/resources/views/interactive-tree-chart.php +++ b/resources/views/interactive-tree-chart.php @@ -1,17 +1,17 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div id="<?= $name ?>_out" class="tv_out"> - <div id="tv_tools"> - <ul> - <li id="tvbCompact" class="tv_button"> - <img src="<?= WT_MODULES_DIR ?>tree/images/compact.png" alt="<?= I18N::translate('Use compact layout') ?>" title="<?= I18N::translate('Use compact layout') ?>"> - </li> - <li class="tv_button" id="<?= $name ?>_loading"> - <i class="icon-loading-small"></i> - </li> - </ul> - </div> - <div id="<?= $name ?>_in" class="tv_in" dir="ltr"> - <?= $individual ?> - </div> + <div id="tv_tools"> + <ul> + <li id="tvbCompact" class="tv_button"> + <img src="<?= WT_MODULES_DIR ?>tree/images/compact.png" alt="<?= I18N::translate('Use compact layout') ?>" title="<?= I18N::translate('Use compact layout') ?>"> + </li> + <li class="tv_button" id="<?= $name ?>_loading"> + <i class="icon-loading-small"></i> + </li> + </ul> + </div> + <div id="<?= $name ?>_in" class="tv_in" dir="ltr"> + <?= $individual ?> + </div> </div> diff --git a/resources/views/interactive-tree-page.php b/resources/views/interactive-tree-page.php index 15416f8f40..496caa9f71 100644 --- a/resources/views/interactive-tree-page.php +++ b/resources/views/interactive-tree-page.php @@ -3,41 +3,41 @@ <?php use Fisharebest\Webtrees\View; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-compact-chart d-print-none"> - <input type="hidden" name="route" value="module"> - <input type="hidden" name="module" value="tree"> - <input type="hidden" name="action" value="Treeview"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="module"> + <input type="hidden" name="module" value="tree"> + <input type="hidden" name="action" value="Treeview"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ - I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ + I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-page-content wt-chart wt-interactive-tree"> - <?= $html ?> + <?= $html ?> </div> <?php View::push('javascript') ?> <script src="<?= e(WT_MODULES_DIR) ?>tree/js/treeview.js"></script> <script> - <?= $js ?> + <?= $js ?> </script> <?php View::endpush() ?> diff --git a/resources/views/layouts/administration.php b/resources/views/layouts/administration.php index a99cb77710..16eac9c28a 100644 --- a/resources/views/layouts/administration.php +++ b/resources/views/layouts/administration.php @@ -4,72 +4,72 @@ <?php use Fisharebest\Webtrees\View; ?> <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="csrf" content="<?= e(csrf_token()) ?>"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="csrf" content="<?= e(csrf_token()) ?>"> - <title><?= $title ?></title> + <title><?= $title ?></title> - <link rel="icon" href="favicon.ico" type="image/x-icon"> + <link rel="icon" href="favicon.ico" type="image/x-icon"> - <?php if (I18N::direction() === 'rtl'): ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>"> - <?php else: ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>"> - <?php endif ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/administration.css') ?>"> + <?php if (I18N::direction() === 'rtl') : ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>"> + <?php else : ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>"> + <?php endif ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/administration.css') ?>"> - <?= View::stack('styles') ?> + <?= View::stack('styles') ?> - <?= DebugBar::renderHead() ?> - </head> - <body class="container wt-global"> - <header> - <div class="wt-accessibility-links"> - <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> - <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?> - </a> - </div> + <?= DebugBar::renderHead() ?> + </head> + <body class="container wt-global"> + <header> + <div class="wt-accessibility-links"> + <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> + <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?> + </a> + </div> - <ul class="nav small d-flex justify-content-end"> - <li class="nav-item menu-mypage"> - <a class="nav-link active" href="<?= e(route('user-page')) ?>"><?= I18N::translate('My page') ?></a> - </li> - <li class="nav-item dropdown menu-language"> - <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> - <?= I18N::translate('Language') ?> - </a> - <div class="dropdown-menu"> - <?php foreach (I18N::activeLocales() as $locale): ?> - <a class="dropdown-item menu-language-<?= $locale->languageTag() ?> <?= WT_LOCALE === $locale->languageTag() ? ' active' : ''?>" data-language="<?= $locale->languageTag() ?>" href="#"><?= $locale->endonym() ?></a> - <?php endforeach ?> - </div> - </li> - <li class="nav-item menu-logout"> - <a class="nav-link" href="<?= e(route('logout')) ?>"><?= I18N::translate('Sign out') ?></a> - </li> - </ul> - </header> + <ul class="nav small d-flex justify-content-end"> + <li class="nav-item menu-mypage"> + <a class="nav-link active" href="<?= e(route('user-page')) ?>"><?= I18N::translate('My page') ?></a> + </li> + <li class="nav-item dropdown menu-language"> + <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> + <?= I18N::translate('Language') ?> + </a> + <div class="dropdown-menu"> + <?php foreach (I18N::activeLocales() as $locale) : ?> + <a class="dropdown-item menu-language-<?= $locale->languageTag() ?> <?= WT_LOCALE === $locale->languageTag() ? ' active' : ''?>" data-language="<?= $locale->languageTag() ?>" href="#"><?= $locale->endonym() ?></a> + <?php endforeach ?> + </div> + </li> + <li class="nav-item menu-logout"> + <a class="nav-link" href="<?= e(route('logout')) ?>"><?= I18N::translate('Sign out') ?></a> + </li> + </ul> + </header> - <div id="content"></div> + <div id="content"></div> - <?php foreach (FlashMessages::getMessages() as $message): ?> - <div class="alert alert-<?= $message->status ?> alert-dismissible" role="alert"> - <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> - <?= $message->text ?> - </div> - <?php endforeach ?> + <?php foreach (FlashMessages::getMessages() as $message) : ?> + <div class="alert alert-<?= $message->status ?> alert-dismissible" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> + <?= $message->text ?> + </div> + <?php endforeach ?> - <?= $content ?> + <?= $content ?> - <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script> - <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script> + <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script> + <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script> - <?= View::stack('javascript') ?> + <?= View::stack('javascript') ?> - <?= DebugBar::render() ?> - </body> + <?= DebugBar::render() ?> + </body> </html> diff --git a/resources/views/layouts/ajax.php b/resources/views/layouts/ajax.php index 34ec603fd3..9c6ac48bd4 100644 --- a/resources/views/layouts/ajax.php +++ b/resources/views/layouts/ajax.php @@ -2,4 +2,4 @@ <?= $content ?> -<?= View::stack('javascript') ?> +<?= View::stack('javascript'); diff --git a/resources/views/layouts/default.php b/resources/views/layouts/default.php index 2a21c5f816..ce125d36e9 100644 --- a/resources/views/layouts/default.php +++ b/resources/views/layouts/default.php @@ -7,133 +7,137 @@ <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="csrf" content="<?= e(csrf_token()) ?>"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="robots" content="<?= e($meta_robots ?? 'noindex,nofollow') ?>"> - <meta name="generator" content="<?= e(WT_WEBTREES) ?>"> - <?php if ($tree !== null): ?> - <meta name="description" content="<?= e($tree->getPreference('META_DESCRIPTION')) ?>"> - <?php endif ?> + <head> + <meta charset="UTF-8"> + <meta name="csrf" content="<?= e(csrf_token()) ?>"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="robots" content="<?= e($meta_robots ?? 'noindex,nofollow') ?>"> + <meta name="generator" content="<?= e(WT_WEBTREES) ?>"> + <?php if ($tree !== null) : ?> + <meta name="description" content="<?= e($tree->getPreference('META_DESCRIPTION')) ?>"> + <?php endif ?> - <title> - <?= strip_tags($title) ?> - <?php if ($tree !== null && $tree->getPreference('META_TITLE') !== ''): ?> - – <?= e($tree->getPreference('META_TITLE')) ?> - <?php endif ?> - </title> + <title> + <?= strip_tags($title) ?> + <?php if ($tree !== null && $tree->getPreference('META_TITLE') !== '') : ?> + – <?= e($tree->getPreference('META_TITLE')) ?> + <?php endif ?> + </title> - <link rel="icon" href="<?= Theme::theme()::ASSET_DIR ?>favicon.png" type="image/png"> - <link rel="icon" type="image/png" href="<?= Theme::theme()::ASSET_DIR ?>favicon192.png" sizes="192x192"> - <link rel="apple-touch-icon" sizes="180x180" href="<?= Theme::theme()::ASSET_DIR ?>favicon180.png"> + <link rel="icon" href="<?= Theme::theme()::ASSET_DIR ?>favicon.png" type="image/png"> + <link rel="icon" type="image/png" href="<?= Theme::theme()::ASSET_DIR ?>favicon192.png" sizes="192x192"> + <link rel="apple-touch-icon" sizes="180x180" href="<?= Theme::theme()::ASSET_DIR ?>favicon180.png"> - <?php if (I18N::direction() === 'rtl'): ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>"> - <?php else: ?> - <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>"> - <?php endif ?> + <?php if (I18N::direction() === 'rtl') : ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>"> + <?php else : ?> + <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>"> + <?php endif ?> - <?php foreach (Theme::theme()->stylesheets() as $stylesheet): ?> - <link rel="stylesheet" type="text/css" href="<?= $stylesheet ?>"> - <?php endforeach ?> + <?php foreach (Theme::theme()->stylesheets() as $stylesheet) : ?> + <link rel="stylesheet" type="text/css" href="<?= $stylesheet ?>"> + <?php endforeach ?> - <?= View::stack('styles') ?> + <?= View::stack('styles') ?> - <?= Theme::theme()->analytics() ?> + <?= Theme::theme()->analytics() ?> - <?= DebugBar::renderHead() ?> - </head> + <?= DebugBar::renderHead() ?> + </head> - <body class="wt-global"> - <header class="wt-header-wrapper d-print-none"> - <div class="container wt-header-container"> - <div class="row wt-header-content"> - <div class="wt-accessibility-links"> - <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> - <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?> - </a> - </div> - <div class="col wt-site-logo"></div> + <body class="wt-global"> + <header class="wt-header-wrapper d-print-none"> + <div class="container wt-header-container"> + <div class="row wt-header-content"> + <div class="wt-accessibility-links"> + <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content"> + <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?> + </a> + </div> + <div class="col wt-site-logo"></div> - <?php if ($tree !== null): ?> - <h1 class="col wt-site-title"><?= e($tree->getTitle()) ?></h1> + <?php if ($tree !== null) : ?> + <h1 class="col wt-site-title"><?= e($tree->getTitle()) ?></h1> - <div class="col wt-header-search"> - <form class="wt-header-search-form" role="search"> - <input type="hidden" name="route" value="search-quick"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="input-group"> - <label class="sr-only" for="quick-search"><?= I18N::translate('Search') ?></label> - <input type="search" class="form-control wt-header-search-field" id="quick-search" name="query" size="15" placeholder="<?= I18N::translate('Search') ?>"> - <span class="input-group-btn"> - <button type="submit" class="btn btn-primary wt-header-search-button"> + <div class="col wt-header-search"> + <form class="wt-header-search-form" role="search"> + <input type="hidden" name="route" value="search-quick"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="input-group"> + <label class="sr-only" for="quick-search"><?= I18N::translate('Search') ?></label> + <input type="search" class="form-control wt-header-search-field" id="quick-search" name="query" size="15" placeholder="<?= I18N::translate('Search') ?>"> + <span class="input-group-btn"> + <button type="submit" class="btn btn-primary wt-header-search-button"> <?= view('icons/search') ?> - </button> - </span> - </div> - </form> - </div> - <?php endif ?> + </button> + </span> + </div> + </form> + </div> + <?php endif ?> - <div class="col wt-secondary-navigation"> - <ul class="nav wt-secondary-menu"> - <?php foreach (Theme::theme()->secondaryMenu() as $menu): ?> - <?= $menu->bootstrap4() ?> - <?php endforeach ?> - </ul> - </div> + <div class="col wt-secondary-navigation"> + <ul class="nav wt-secondary-menu"> + <?php foreach (Theme::theme()->secondaryMenu() as $menu) : ?> + <?= $menu->bootstrap4() ?> + <?php endforeach ?> + </ul> + </div> - <?php if ($tree !== null): ?> - <nav class="col wt-primary-navigation"> - <ul class="nav wt-primary-menu"> - <?php foreach (Theme::theme()->primaryMenu($individual ?? $tree->significantIndividual(Auth::user())) as $menu): ?> - <?= $menu->bootstrap4() ?> - <?php endforeach ?> - </ul> - </nav> - <?php endif ?> - </div> - </div> - </header> + <?php if ($tree !== null) : ?> + <nav class="col wt-primary-navigation"> + <ul class="nav wt-primary-menu"> + <?php foreach (Theme::theme()->primaryMenu($individual ?? $tree->significantIndividual(Auth::user())) as $menu) : ?> + <?= $menu->bootstrap4() ?> + <?php endforeach ?> + </ul> + </nav> + <?php endif ?> + </div> + </div> + </header> - <main id="content" class="wt-main-wrapper"> - <div class="container wt-main-container"> - <div class="flash-messages"> - <?php foreach (FlashMessages::getMessages() as $message): ?> - <div class="alert alert-<?= e($message->status) ?> alert-dismissible" role="alert"> - <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> - <?= $message->text ?> - </div> - <?php endforeach ?> - </div> + <main id="content" class="wt-main-wrapper"> + <div class="container wt-main-container"> + <div class="flash-messages"> + <?php foreach (FlashMessages::getMessages() as $message) : ?> + <div class="alert alert-<?= e($message->status) ?> alert-dismissible" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> + <?= $message->text ?> + </div> + <?php endforeach ?> + </div> - <?= $content ?> - </div> - </main> + <?= $content ?> + </div> + </main> - <footer class="wt-footer-container"> - <div class="wt-footer-content container d-print-none"> - <?= Theme::theme()->formatContactLinks() ?> - <?= Theme::theme()->logoPoweredBy() ?> + <footer class="wt-footer-container"> + <div class="wt-footer-content container d-print-none"> + <?= Theme::theme()->formatContactLinks() ?> + <?= Theme::theme()->logoPoweredBy() ?> - <?php if ($page_hits ?? 0 > 0): ?> - <div class="wt-page-views"> - <?= I18N::plural('This page has been viewed %s time.', 'This page has been viewed %s times.', $page_hits, - '<span class="odometer">' . I18N::digits($page_hits) . '</span>') ?> - </div> - <?php endif ?> + <?php if ($page_hits ?? 0 > 0) : ?> + <div class="wt-page-views"> + <?= I18N::plural( + 'This page has been viewed %s time.', + 'This page has been viewed %s times.', + $page_hits, + '<span class="odometer">' . I18N::digits($page_hits) . '</span>' + ) ?> + </div> + <?php endif ?> - <?= Theme::theme()->cookieWarning()?> - </div> - </footer> + <?= Theme::theme()->cookieWarning()?> + </div> + </footer> - <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script> - <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script> + <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script> + <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script> - <script> + <script> activate_colorbox(); jQuery.extend(jQuery.colorbox.settings, { width: "85%", @@ -145,8 +149,8 @@ }); </script> - <?= View::stack('javascript') ?> + <?= View::stack('javascript') ?> - <?= DebugBar::render() ?> - </body> + <?= DebugBar::render() ?> + </body> </html> diff --git a/resources/views/layouts/error.php b/resources/views/layouts/error.php index c2fb86a60a..cf27c5bc2c 100644 --- a/resources/views/layouts/error.php +++ b/resources/views/layouts/error.php @@ -1,30 +1,30 @@ <?php use Fisharebest\Webtrees\I18N; ?> <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="robots" content="noindex"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="robots" content="noindex"> - <title><?= I18N::translate('This website is temporarily unavailable') ?></title> + <title><?= I18N::translate('This website is temporarily unavailable') ?></title> - <link rel="icon" href="favicon.ico" type="image/x-icon"> + <link rel="icon" href="favicon.ico" type="image/x-icon"> - <style type="text/css"> - body {color: gray; background-color: white; font: 14px tahoma, arial, helvetica, sans-serif; padding:10px; } - a {color: #81A9CB; font-weight: bold; text-decoration: none;} - a:hover {text-decoration: underline;} - h1 {color: #81A9CB; font-weight:normal; text-align:center;} - li {line-height:2;} - blockquote {color:red;} - .content { border:1px solid gray; padding:15px; margin: 15px; border-radius:15px;} - .good {color: green;} - </style> - </head> + <style type="text/css"> + body {color: gray; background-color: white; font: 14px tahoma, arial, helvetica, sans-serif; padding:10px; } + a {color: #81A9CB; font-weight: bold; text-decoration: none;} + a:hover {text-decoration: underline;} + h1 {color: #81A9CB; font-weight:normal; text-align:center;} + li {line-height:2;} + blockquote {color:red;} + .content { border:1px solid gray; padding:15px; margin: 15px; border-radius:15px;} + .good {color: green;} + </style> + </head> - <body> - <h1><?= I18N::translate('This website is temporarily unavailable') ?></h1> + <body> + <h1><?= I18N::translate('This website is temporarily unavailable') ?></h1> - <?= $content ?> - </body> + <?= $content ?> + </body> </html> diff --git a/resources/views/layouts/offline.php b/resources/views/layouts/offline.php index 2e03d4da53..fa54aa3a96 100644 --- a/resources/views/layouts/offline.php +++ b/resources/views/layouts/offline.php @@ -1,66 +1,66 @@ <?php use Fisharebest\Webtrees\I18N; ?> <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> - <title><?= WT_WEBTREES ?></title> + <title><?= WT_WEBTREES ?></title> - <link rel="icon" href="favicon.ico" type="image/x-icon"> - <style type="text/css"> - body { - color: gray; - background-color: white; - font: 14px tahoma, arial, helvetica, sans-serif; - padding: 10px; - } + <link rel="icon" href="favicon.ico" type="image/x-icon"> + <style type="text/css"> + body { + color: gray; + background-color: white; + font: 14px tahoma, arial, helvetica, sans-serif; + padding: 10px; + } - a { - color: #81A9CB; - font-weight: bold; - text-decoration: none; - } + a { + color: #81A9CB; + font-weight: bold; + text-decoration: none; + } - a:hover { - text-decoration: underline; - } + a:hover { + text-decoration: underline; + } - h1 { - color: #81A9CB; - font-weight: normal; - text-align: center; - } + h1 { + color: #81A9CB; + font-weight: normal; + text-align: center; + } - li { - line-height: 2; - } + li { + line-height: 2; + } - blockquote { - color: red; - } + blockquote { + color: red; + } - .content { /*margin:auto; width:800px;*/ - border: 1px solid gray; - padding: 15px; - border-radius: 15px; - } + .content { /*margin:auto; width:800px;*/ + border: 1px solid gray; + padding: 15px; + border-radius: 15px; + } - .good { - color: green; - } - </style> - </head> + .good { + color: green; + } + </style> + </head> - <body class="container"> - <h1><?= I18N::translate('This website is temporarily unavailable') ?></h1> - <div class="content"> - <p> - <?= str_replace('index.php', e($url), I18N::translate('This website is down for maintenance. You should <a href="index.php">try again</a> in a few minutes.')) ?> - </p> - <p> - <?= $message ?> - </p> - </div> - </body> + <body class="container"> + <h1><?= I18N::translate('This website is temporarily unavailable') ?></h1> + <div class="content"> + <p> + <?= str_replace('index.php', e($url), I18N::translate('This website is down for maintenance. You should <a href="index.php">try again</a> in a few minutes.')) ?> + </p> + <p> + <?= $message ?> + </p> + </div> + </body> </html> diff --git a/resources/views/layouts/report.php b/resources/views/layouts/report.php index c9f4eab0df..95f5b6238a 100644 --- a/resources/views/layouts/report.php +++ b/resources/views/layouts/report.php @@ -2,19 +2,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> - <title><?= $title ?></title> + <title><?= $title ?></title> - <link rel="icon" href="favicon.ico" type="image/x-icon"> + <link rel="icon" href="favicon.ico" type="image/x-icon"> - <?= DebugBar::renderHead() ?> - </head> - <body class="container wt-global wt-report-page"> - <?= $content ?> + <?= DebugBar::renderHead() ?> + </head> + <body class="container wt-global wt-report-page"> + <?= $content ?> - <?= DebugBar::render() ?> - </body> + <?= DebugBar::render() ?> + </body> </html> diff --git a/resources/views/layouts/setup.php b/resources/views/layouts/setup.php index 4b237305e7..695285412e 100644 --- a/resources/views/layouts/setup.php +++ b/resources/views/layouts/setup.php @@ -1,21 +1,21 @@ <?php use Fisharebest\Webtrees\I18N; ?> <!DOCTYPE html> <html <?= I18N::htmlAttributes() ?>> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> - <title><?= I18N::translate('Setup wizard for webtrees') ?></title> + <title><?= I18N::translate('Setup wizard for webtrees') ?></title> - <link rel="icon" href="favicon.ico" type="image/x-icon"> - <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous"> - </head> + <link rel="icon" href="favicon.ico" type="image/x-icon"> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous"> + </head> - <body class="container"> - <h1 class="text-info"> - <?= I18N::translate('Setup wizard for webtrees') ?> - </h1> + <body class="container"> + <h1 class="text-info"> + <?= I18N::translate('Setup wizard for webtrees') ?> + </h1> - <?= $content ?> - </body> + <?= $content ?> + </body> </html> diff --git a/resources/views/lifespans-chart.php b/resources/views/lifespans-chart.php index 5106cfcf97..10b4a18165 100644 --- a/resources/views/lifespans-chart.php +++ b/resources/views/lifespans-chart.php @@ -1,29 +1,31 @@ <p class="wt-lifespans-subtitle"> - <?= $subtitle ?> + <?= $subtitle ?> </p> <div class="wt-lifespans-scale"> - <?php for ($year = $start_year; $year < $end_year; $year += 10): ?><div class="wt-lifespans-decade"><?= $year ?></div><?php endfor ?> + <?php for ($year = $start_year; $year < $end_year; $year += 10) : + ?><div class="wt-lifespans-decade"><?= $year ?></div><?php + endfor ?> </div> <div class="wt-lifespans-individuals position-relative" style="height: <?= (5 + $max_rows) * 1.5 ?>rem; width: <?= ($end_year - $start_year) * 7 ?>px;"> - <?php foreach ($lifespans as $lifespan): ?> - <a href="<?= e($lifespan->id) ?>" data-toggle="collapse" data-target="#<?= e($lifespan->id) ?>" aria-expanded="false" aria-controls="<?= e($lifespan->id) ?>"> - <div class="wt-lifespans-individual position-absolute text-nowrap text-truncate" dir="auto" style="background: <?= $lifespan->background ?>; <?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= ($lifespan->birth_year - $start_year) * 7 ?>px; top:<?= $lifespan->row * 1.5 ?>rem; width:<?= ($lifespan->death_year - $lifespan->birth_year) * 7 + 5 ?>px;"> - <?= $lifespan->individual->getFullName() ?> - <?= strip_tags($lifespan->individual->getLifespan()) ?> - </div> - </a> + <?php foreach ($lifespans as $lifespan) : ?> + <a href="<?= e($lifespan->id) ?>" data-toggle="collapse" data-target="#<?= e($lifespan->id) ?>" aria-expanded="false" aria-controls="<?= e($lifespan->id) ?>"> + <div class="wt-lifespans-individual position-absolute text-nowrap text-truncate" dir="auto" style="background: <?= $lifespan->background ?>; <?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= ($lifespan->birth_year - $start_year) * 7 ?>px; top:<?= $lifespan->row * 1.5 ?>rem; width:<?= ($lifespan->death_year - $lifespan->birth_year) * 7 + 5 ?>px;"> + <?= $lifespan->individual->getFullName() ?> + <?= strip_tags($lifespan->individual->getLifespan()) ?> + </div> + </a> - <div class="wt-lifespans-summary collapse position-absolute" id="<?= e($lifespan->id) ?>" style="<?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= (min($lifespan->birth_year, $end_year - 50) - $start_year) * 7 ?>px; top:<?= ($lifespan->row + 1) * 1.5 ?>rem; width:350px;"> - <a class="wt-lifespans-summary-link" href="<?= e($lifespan->individual->url()) ?>"> - <?= $lifespan->individual->getFullName() ?> - </a> + <div class="wt-lifespans-summary collapse position-absolute" id="<?= e($lifespan->id) ?>" style="<?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= (min($lifespan->birth_year, $end_year - 50) - $start_year) * 7 ?>px; top:<?= ($lifespan->row + 1) * 1.5 ?>rem; width:350px;"> + <a class="wt-lifespans-summary-link" href="<?= e($lifespan->individual->url()) ?>"> + <?= $lifespan->individual->getFullName() ?> + </a> - <?php foreach ($lifespan->individual->getFacts(WT_EVENTS_BIRT . '|' . WT_EVENTS_DEAT, true) as $fact): ?> - <?= $fact->summary() ?> - <?php endforeach ?> - </div> - <?php endforeach ?> + <?php foreach ($lifespan->individual->getFacts(WT_EVENTS_BIRT . '|' . WT_EVENTS_DEAT, true) as $fact) : ?> + <?= $fact->summary() ?> + <?php endforeach ?> + </div> + <?php endforeach ?> </div> diff --git a/resources/views/lifespans-page.php b/resources/views/lifespans-page.php index d9213e90ef..079a3221e5 100644 --- a/resources/views/lifespans-page.php +++ b/resources/views/lifespans-page.php @@ -3,75 +3,75 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-lifespans-chart d-print-none"> - <input type="hidden" name="route" value="lifespans"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="lifespans"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?php foreach ($xrefs as $xref): ?> - <input name="xrefs[]" type="hidden" value="<?= e($xref) ?>"> - <?php endforeach ?> + <?php foreach ($xrefs as $xref) : ?> + <input name="xrefs[]" type="hidden" value="<?= e($xref) ?>"> + <?php endforeach ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="addxref"> - <?= I18N::translate('Add individuals') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, null, [ - 'id' => 'addxref', - 'name' => 'addxref', - ]) ?> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="addxref"> + <?= I18N::translate('Add individuals') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, null, [ + 'id' => 'addxref', + 'name' => 'addxref', + ]) ?> - <?= Bootstrap4::checkbox(/* I18N: Label for a configuration option */ I18N::translate('Include the individual’s immediate family'), false, ['name' => 'addfam']) ?> - </div> - </div> + <?= Bootstrap4::checkbox(/* I18N: Label for a configuration option */ I18N::translate('Include the individual’s immediate family'), false, ['name' => 'addfam']) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-12 col-form-label wt-page-options-label"> - <?= I18N::translate('Select individuals by place or date') ?> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-12 col-form-label wt-page-options-label"> + <?= I18N::translate('Select individuals by place or date') ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="placename"> - <?= I18N::translate('Place') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" id="placename" name="placename" type="text"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="placename"> + <?= I18N::translate('Place') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" id="placename" name="placename" type="text"> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="start"> - <?= I18N::translate('Start year') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" id="start" name="start" type="text"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="start"> + <?= I18N::translate('Start year') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" id="start" name="start" type="text"> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="end"> - <?= I18N::translate('End year') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" id="end" name="end" type="text"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="end"> + <?= I18N::translate('End year') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" id="end" name="end" type="text"> + </div> + </div> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <button type="submit" class="btn btn-primary" type="submit"> - <?= /* I18N: A button label. */ I18N::translate('add') ?> - </button> - <a class="btn btn-secondary" href="<?= e(route('lifespans', ['ged' => $tree->getName()])) ?>"> - <?= /* I18N: A button label. */ I18N::translate('reset') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <button type="submit" class="btn btn-primary" type="submit"> + <?= /* I18N: A button label. */ I18N::translate('add') ?> + </button> + <a class="btn btn-secondary" href="<?= e(route('lifespans', ['ged' => $tree->getName()])) ?>"> + <?= /* I18N: A button label. */ I18N::translate('reset') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/lists/chart-by-age.php b/resources/views/lists/chart-by-age.php index 4cdd0d80a4..e59587dd63 100644 --- a/resources/views/lists/chart-by-age.php +++ b/resources/views/lists/chart-by-age.php @@ -6,14 +6,14 @@ $agemax = 0; $vmax = 0; $avg = 0; foreach ($data as $age => $v) { - $n = strlen($v); - $vmax = max($vmax, $n); - $agemax = max($agemax, $age); - $count += $n; - $avg += $age * $n; + $n = strlen($v); + $vmax = max($vmax, $n); + $agemax = max($agemax, $age); + $count += $n; + $avg += $age * $n; } if ($count < 1) { - return ''; + return ''; } $avg = round($avg / $count); $chart_url = 'https://chart.googleapis.com/chart?cht=bvs'; // chart type @@ -27,36 +27,36 @@ $chart_url .= '&chxt=x,y,r'; // axis labels specification $chart_url .= '&chm=V,FF0000,0,' . ($avg - 0.3) . ',1'; // average age line marker $chart_url .= '&chxl=0:|'; // label for ($age = 0; $age <= $agemax; $age += 5) { - $chart_url .= $age . '|||||'; // x axis + $chart_url .= $age . '|||||'; // x axis } $chart_url .= '|1:||' . rawurlencode(I18N::percentage($vmax / $count)); // y axis $chart_url .= '|2:||'; $step = $vmax; for ($d = $vmax; $d > 0; $d--) { - if ($vmax < ($d * 10 + 1) && ($vmax % $d) == 0) { - $step = $d; - } + if ($vmax < ($d * 10 + 1) && ($vmax % $d) == 0) { + $step = $d; + } } if ($step == $vmax) { - for ($d = $vmax - 1; $d > 0; $d--) { - if (($vmax - 1) < ($d * 10 + 1) && (($vmax - 1) % $d) == 0) { - $step = $d; - } - } + for ($d = $vmax - 1; $d > 0; $d--) { + if (($vmax - 1) < ($d * 10 + 1) && (($vmax - 1) % $d) == 0) { + $step = $d; + } + } } for ($n = $step; $n < $vmax; $n += $step) { - $chart_url .= $n . '|'; + $chart_url .= $n . '|'; } $chart_url .= rawurlencode($vmax . ' / ' . $count); // r axis $chart_url .= '&chg=100,' . round(100 * $step / $vmax, 1) . ',1,5'; // grid $chart_url .= '&chd=s:'; // data : simple encoding from A=0 to 9=61 $CHART_ENCODING61 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; for ($age = 0; $age <= $agemax; $age++) { - $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$age], 'M') * 61 / $vmax)]; + $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$age], 'M') * 61 / $vmax)]; } $chart_url .= ','; for ($age = 0; $age <= $agemax; $age++) { - $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$age], 'F') * 61 / $vmax)]; + $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$age], 'F') * 61 / $vmax)]; } $html = '<img src="' . $chart_url . '" alt="' . $title . '" title="' . $title . '" class="gchart">'; diff --git a/resources/views/lists/chart-by-decade.php b/resources/views/lists/chart-by-decade.php index 681656a90d..220a566004 100644 --- a/resources/views/lists/chart-by-decade.php +++ b/resources/views/lists/chart-by-decade.php @@ -4,12 +4,12 @@ $count = 0; $vmax = 0; foreach ($data as $v) { - $n = strlen($v); - $vmax = max($vmax, $n); - $count += $n; + $n = strlen($v); + $vmax = max($vmax, $n); + $count += $n; } if ($count < 1) { - return ''; + return ''; } $chart_url = 'https://chart.googleapis.com/chart?cht=bvs'; // chart type $chart_url .= '&chs=360x150'; // size @@ -20,36 +20,36 @@ $chart_url .= '&chtt=' . rawurlencode($title); // title $chart_url .= '&chxt=x,y,r'; // axis labels specification $chart_url .= '&chxl=0:|<|||'; // <1570 for ($y = 1600; $y < 2030; $y += 50) { - $chart_url .= $y . '|||||'; // x axis + $chart_url .= $y . '|||||'; // x axis } $chart_url .= '|1:||' . rawurlencode(I18N::percentage($vmax / $count)); // y axis $chart_url .= '|2:||'; $step = $vmax; for ($d = $vmax; $d > 0; $d--) { - if ($vmax < ($d * 10 + 1) && ($vmax % $d) == 0) { - $step = $d; - } + if ($vmax < ($d * 10 + 1) && ($vmax % $d) == 0) { + $step = $d; + } } if ($step == $vmax) { - for ($d = $vmax - 1; $d > 0; $d--) { - if (($vmax - 1) < ($d * 10 + 1) && (($vmax - 1) % $d) == 0) { - $step = $d; - } - } + for ($d = $vmax - 1; $d > 0; $d--) { + if (($vmax - 1) < ($d * 10 + 1) && (($vmax - 1) % $d) == 0) { + $step = $d; + } + } } for ($n = $step; $n < $vmax; $n += $step) { - $chart_url .= $n . '|'; + $chart_url .= $n . '|'; } $chart_url .= rawurlencode($vmax . ' / ' . $count); // r axis $chart_url .= '&chg=100,' . round(100 * $step / $vmax, 1) . ',1,5'; // grid $chart_url .= '&chd=s:'; // data : simple encoding from A=0 to 9=61 $CHART_ENCODING61 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; for ($y = 1570; $y < 2030; $y += 10) { - $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$y], 'M') * 61 / $vmax)]; + $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$y], 'M') * 61 / $vmax)]; } $chart_url .= ','; for ($y = 1570; $y < 2030; $y += 10) { - $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$y], 'F') * 61 / $vmax)]; + $chart_url .= $CHART_ENCODING61[(int) (substr_count($data[$y], 'F') * 61 / $vmax)]; } $html = '<img src="' . $chart_url . '" alt="' . $title . '" title="' . $title . '" class="gchart">'; diff --git a/resources/views/lists/families-table.php b/resources/views/lists/families-table.php index c6b881d03d..6aa5ba8ac7 100644 --- a/resources/views/lists/families-table.php +++ b/resources/views/lists/families-table.php @@ -12,7 +12,7 @@ $hundred_years_ago = new Date(date('Y') - 100); <?php View::push('javascript') ?> <script> - $("#<?= e($table_id) ?>").dataTable( { + $("#<?= e($table_id) ?>").dataTable( { dom: '<"H"<"filtersH_<?= e($table_id) ?>"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_<?= e($table_id) ?>">>', <?= I18N::datatablesI18N() ?>, autoWidth: false, @@ -70,344 +70,344 @@ $max_age = (int) $tree->getPreference('MAX_ALIVE_AGE'); // init chart data $marr_by_age = []; for ($age = 0; $age <= $max_age; $age++) { - $marr_by_age[$age] = ''; + $marr_by_age[$age] = ''; } $birt_by_decade = []; $marr_by_decade = []; for ($year = 1550; $year < 2030; $year += 10) { - $birt_by_decade[$year] = ''; - $marr_by_decade[$year] = ''; + $birt_by_decade[$year] = ''; + $marr_by_decade[$year] = ''; } ?> <div class="fam-list"> - <table id="<?= e($table_id) ?>"> - <thead> - <tr> - <th colspan="14"> - <div class="btn-toolbar d-flex justify-content-between mb-2"> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="N" - title="' . I18N::translate('Show individuals who are alive or couples where both partners are alive.') ?>" - > - <?= I18N::translate('Both alive') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="W" - title="<?= I18N::translate('Show couples where only the female partner is dead.') ?>" - > - <?= I18N::translate('Widower') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="H" - title="<?= I18N::translate('Show couples where only the male partner is dead.') ?>" - > - <?= I18N::translate('Widow') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="Y" - title="<?= I18N::translate('Show individuals who are dead or couples where both partners are dead.') ?>" - > - <?= I18N::translate('Both dead') ?> - </button> - </div> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="13" - data-filter-value="R" - title="<?= I18N::translate('Show “roots” couples or individuals. These individuals may also be called “patriarchs”. They are individuals who have no parents recorded in the database.') ?>" - > - <?= I18N::translate('Roots') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="13" - data-filter-value="L" - title="<?= I18N::translate('Show “leaves” couples or individuals. These are individuals who are alive but have no children recorded in the database.') ?>" - > - <?= I18N::translate('Leaves') ?> - </button> - </div> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="11" - data-filter-value="U" - title="<?= I18N::translate('Show couples with an unknown marriage date.') ?>" - > - <?= I18N::translate('Marriage') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="11" - data-filter-value="YES" - title="<?= I18N::translate('Show couples who married more than 100 years ago.') ?>" - > - <?= I18N::translate('Marriage') ?>>100 - </button> - <button - class="btn btn-secondary" - data-filter-column="11" - data-filter-value="Y100" - title="<?= I18N::translate('Show couples who married within the last 100 years.') ?>" - > - <?= I18N::translate('Marriage') ?><=100 - </button> - <button - class="btn btn-secondary" - data-filter-column="11" - data-filter-value="D" - title="<?= I18N::translate('Show divorced couples.') ?>" - > - <?= I18N::translate('Divorce') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="11" - data-filter-value="M" - title="<?= I18N::translate('Show couples where either partner married more than once.') ?>" - > - <?= I18N::translate('Multiple marriages') ?> - </button> - </div> - </div> - </th> - </tr> - <tr> - <th><?= I18N::translate('Given names') ?></th> - <th><?= I18N::translate('Surname') ?></th> - <th><?= I18N::translate('Age') ?></th> - <th><?= I18N::translate('Given names') ?></th> - <th><?= I18N::translate('Surname') ?></th> - <th><?= I18N::translate('Age') ?></th> - <th><?= I18N::translate('Marriage') ?></th> - <th><i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i></th> - <th><?= I18N::translate('Place') ?></th> - <th><i class="icon-children" title="<?= I18N::translate('Children') ?>"></i></th> - <th><?= I18N::translate('Last change') ?></th> - <th hidden></th> - <th hidden></th> - <th hidden></th> - </tr> - </thead> + <table id="<?= e($table_id) ?>"> + <thead> + <tr> + <th colspan="14"> + <div class="btn-toolbar d-flex justify-content-between mb-2"> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="N" + title="' . I18N::translate('Show individuals who are alive or couples where both partners are alive.') ?>" + > + <?= I18N::translate('Both alive') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="W" + title="<?= I18N::translate('Show couples where only the female partner is dead.') ?>" + > + <?= I18N::translate('Widower') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="H" + title="<?= I18N::translate('Show couples where only the male partner is dead.') ?>" + > + <?= I18N::translate('Widow') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="Y" + title="<?= I18N::translate('Show individuals who are dead or couples where both partners are dead.') ?>" + > + <?= I18N::translate('Both dead') ?> + </button> + </div> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="13" + data-filter-value="R" + title="<?= I18N::translate('Show “roots” couples or individuals. These individuals may also be called “patriarchs”. They are individuals who have no parents recorded in the database.') ?>" + > + <?= I18N::translate('Roots') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="13" + data-filter-value="L" + title="<?= I18N::translate('Show “leaves” couples or individuals. These are individuals who are alive but have no children recorded in the database.') ?>" + > + <?= I18N::translate('Leaves') ?> + </button> + </div> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="11" + data-filter-value="U" + title="<?= I18N::translate('Show couples with an unknown marriage date.') ?>" + > + <?= I18N::translate('Marriage') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="11" + data-filter-value="YES" + title="<?= I18N::translate('Show couples who married more than 100 years ago.') ?>" + > + <?= I18N::translate('Marriage') ?>>100 + </button> + <button + class="btn btn-secondary" + data-filter-column="11" + data-filter-value="Y100" + title="<?= I18N::translate('Show couples who married within the last 100 years.') ?>" + > + <?= I18N::translate('Marriage') ?><=100 + </button> + <button + class="btn btn-secondary" + data-filter-column="11" + data-filter-value="D" + title="<?= I18N::translate('Show divorced couples.') ?>" + > + <?= I18N::translate('Divorce') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="11" + data-filter-value="M" + title="<?= I18N::translate('Show couples where either partner married more than once.') ?>" + > + <?= I18N::translate('Multiple marriages') ?> + </button> + </div> + </div> + </th> + </tr> + <tr> + <th><?= I18N::translate('Given names') ?></th> + <th><?= I18N::translate('Surname') ?></th> + <th><?= I18N::translate('Age') ?></th> + <th><?= I18N::translate('Given names') ?></th> + <th><?= I18N::translate('Surname') ?></th> + <th><?= I18N::translate('Age') ?></th> + <th><?= I18N::translate('Marriage') ?></th> + <th><i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i></th> + <th><?= I18N::translate('Place') ?></th> + <th><i class="icon-children" title="<?= I18N::translate('Children') ?>"></i></th> + <th><?= I18N::translate('Last change') ?></th> + <th hidden></th> + <th hidden></th> + <th hidden></th> + </tr> + </thead> - <tfoot> - <tr> - <th colspan="14"> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="ui-state-default btn-toggle-parents"> - <?= I18N::translate('Show parents') ?> - </button> - <button class="ui-state-default btn-toggle-statistics"> - <?= I18N::translate('Show statistics charts') ?> - </button> - </div> - </div> - </th> - </tr> - </tfoot> - <tbody> + <tfoot> + <tr> + <th colspan="14"> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="ui-state-default btn-toggle-parents"> + <?= I18N::translate('Show parents') ?> + </button> + <button class="ui-state-default btn-toggle-statistics"> + <?= I18N::translate('Show statistics charts') ?> + </button> + </div> + </div> + </th> + </tr> + </tfoot> + <tbody> - <?php foreach ($families as $family): ?> - <?php $husb = $family->getHusband() ?? new Individual('H', '0 @H@ INDI', null, $family->getTree()) ?> - <?php $wife = $family->getWife() ?? new Individual('W', '0 @W@ INDI', null, $family->getTree()) ?> + <?php foreach ($families as $family) : ?> + <?php $husb = $family->getHusband() ?? new Individual('H', '0 @H@ INDI', null, $family->getTree()) ?> + <?php $wife = $family->getWife() ?? new Individual('W', '0 @W@ INDI', null, $family->getTree()) ?> - <tr class="<?= $family->isPendingDeletion() ? 'old' : ($family->isPendingAddition() ? 'new' : '') ?>"> - <!-- Husband name --> - <td colspan="2" data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', implode(',', array_reverse(explode(',', $husb->getSortName()))))) ?>"> - <?php foreach ($husb->getAllNames() as $num => $name): ?> - <?php if ($name['type'] != '_MARNM' || $num == $husb->getPrimaryName()): ?> - <a title="<?= $name['type'] === 'NAME' ? '' : GedcomTag::getLabel($name['type'], $husb) ?>" href="<?= e($family->url()) ?>" class="<?= $num === $husb->getPrimaryName() ? 'name2' : '' ?>"> - <?= $name['full'] ?> - </a> - <?php if ($num === $husb->getPrimaryName()): ?> - <?= $husb->getSexImage() ?> - <?php endif ?> - <br> - <?php endif ?> - <?php endforeach ?> - <?= $husb->getPrimaryParentsNames('parents details1', 'none') ?> - </td> + <tr class="<?= $family->isPendingDeletion() ? 'old' : ($family->isPendingAddition() ? 'new' : '') ?>"> + <!-- Husband name --> + <td colspan="2" data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', implode(',', array_reverse(explode(',', $husb->getSortName()))))) ?>"> + <?php foreach ($husb->getAllNames() as $num => $name) : ?> + <?php if ($name['type'] != '_MARNM' || $num == $husb->getPrimaryName()) : ?> + <a title="<?= $name['type'] === 'NAME' ? '' : GedcomTag::getLabel($name['type'], $husb) ?>" href="<?= e($family->url()) ?>" class="<?= $num === $husb->getPrimaryName() ? 'name2' : '' ?>"> + <?= $name['full'] ?> + </a> + <?php if ($num === $husb->getPrimaryName()) : ?> + <?= $husb->getSexImage() ?> + <?php endif ?> + <br> + <?php endif ?> + <?php endforeach ?> + <?= $husb->getPrimaryParentsNames('parents details1', 'none') ?> + </td> - <td hidden data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', $husb->getSortName())) ?>"></td> + <td hidden data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', $husb->getSortName())) ?>"></td> - <!-- Husband age --> - <?php - $mdate = $family->getMarriageDate(); - $hdate = $husb->getBirthDate(); - if ($hdate->isOK() && $mdate->isOK()) { - if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { - $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); - } - $hage = Date::getAgeYears($hdate, $mdate); - if ($hage >= 0 && $hage <= $max_age) { - $marr_by_age[$hage] .= $husb->getSex(); - } - } - ?> - <td class="center" data-sort="<?= Date::getAgeDays($hdate, $mdate) ?>"> - <?= Date::getAge($hdate, $mdate) ?> - </td> + <!-- Husband age --> + <?php + $mdate = $family->getMarriageDate(); + $hdate = $husb->getBirthDate(); + if ($hdate->isOK() && $mdate->isOK()) { + if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { + $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); + } + $hage = Date::getAgeYears($hdate, $mdate); + if ($hage >= 0 && $hage <= $max_age) { + $marr_by_age[$hage] .= $husb->getSex(); + } + } + ?> + <td class="center" data-sort="<?= Date::getAgeDays($hdate, $mdate) ?>"> + <?= Date::getAge($hdate, $mdate) ?> + </td> - <!-- Wife name --> - <td colspan="2" data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', implode(',', array_reverse(explode(',', $wife->getSortName()))))) ?>"> - <?php foreach ($wife->getAllNames() as $num => $name): ?> - <?php if ($name['type'] != '_MARNM' || $num == $wife->getPrimaryName()): ?> - <a title="<?= $name['type'] === 'NAME' ? '' : GedcomTag::getLabel($name['type'], $wife) ?>" href="<?= e($family->url()) ?>" class="<?= $num === $wife->getPrimaryName() ? 'name2' : '' ?>"> - <?= $name['full'] ?> - </a> - <?php if ($num === $wife->getPrimaryName()): ?> - <?= $wife->getSexImage() ?> - <?php endif ?> - <br> - <?php endif ?> - <?php endforeach ?> - <?= $wife->getPrimaryParentsNames('parents details1', 'none') ?> - </td> + <!-- Wife name --> + <td colspan="2" data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', implode(',', array_reverse(explode(',', $wife->getSortName()))))) ?>"> + <?php foreach ($wife->getAllNames() as $num => $name) : ?> + <?php if ($name['type'] != '_MARNM' || $num == $wife->getPrimaryName()) : ?> + <a title="<?= $name['type'] === 'NAME' ? '' : GedcomTag::getLabel($name['type'], $wife) ?>" href="<?= e($family->url()) ?>" class="<?= $num === $wife->getPrimaryName() ? 'name2' : '' ?>"> + <?= $name['full'] ?> + </a> + <?php if ($num === $wife->getPrimaryName()) : ?> + <?= $wife->getSexImage() ?> + <?php endif ?> + <br> + <?php endif ?> + <?php endforeach ?> + <?= $wife->getPrimaryParentsNames('parents details1', 'none') ?> + </td> - <td hidden data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', $wife->getSortName())) ?>"></td> + <td hidden data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', $wife->getSortName())) ?>"></td> - <!-- Wife age --> - <?php - $wdate = $wife->getBirthDate(); - if ($wdate->isOK() && $mdate->isOK()) { - if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { - $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); - } - $wage = Date::getAgeYears($wdate, $mdate); - if ($wage >= 0 && $wage <= $max_age) { - $marr_by_age[$wage] .= $wife->getSex(); - } - } - ?> + <!-- Wife age --> + <?php + $wdate = $wife->getBirthDate(); + if ($wdate->isOK() && $mdate->isOK()) { + if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { + $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); + } + $wage = Date::getAgeYears($wdate, $mdate); + if ($wage >= 0 && $wage <= $max_age) { + $marr_by_age[$wage] .= $wife->getSex(); + } + } + ?> - <td class="center" data-sort="<?= Date::getAgeDays($wdate, $mdate) ?>"> - <?= Date::getAge($wdate, $mdate) ?> - </td> + <td class="center" data-sort="<?= Date::getAgeDays($wdate, $mdate) ?>"> + <?= Date::getAge($wdate, $mdate) ?> + </td> - <!-- Marriage date --> - <td data-sort="<?= $family->getMarriageDate()->julianDay() ?>"> - <?php if ($marriage_dates = $family->getAllMarriageDates()): ?> - <?php foreach ($marriage_dates as $n => $marriage_date): ?> - <div><?= $marriage_date->display(true) ?></div> - <?php endforeach ?> - <?php if ($marriage_dates[0]->gregorianYear() >= 1550 && $marriage_dates[0]->gregorianYear() < 2030): ?> - <?php $marr_by_decade[(int) ($marriage_dates[0]->gregorianYear() / 10) * 10] .= $husb->getSex() . $wife->getSex() ?> - <?php endif ?> - <?php elseif ($family->getFacts('_NMR')): ?> - <?= I18N::translate('no') ?> - <?php elseif ($family->getFacts('MARR')): ?> - <?= I18N::translate('yes') ?> - <?php endif ?> - </td> + <!-- Marriage date --> + <td data-sort="<?= $family->getMarriageDate()->julianDay() ?>"> + <?php if ($marriage_dates = $family->getAllMarriageDates()) : ?> + <?php foreach ($marriage_dates as $n => $marriage_date) : ?> + <div><?= $marriage_date->display(true) ?></div> + <?php endforeach ?> + <?php if ($marriage_dates[0]->gregorianYear() >= 1550 && $marriage_dates[0]->gregorianYear() < 2030) : ?> + <?php $marr_by_decade[(int) ($marriage_dates[0]->gregorianYear() / 10) * 10] .= $husb->getSex() . $wife->getSex() ?> + <?php endif ?> + <?php elseif ($family->getFacts('_NMR')) : ?> + <?= I18N::translate('no') ?> + <?php elseif ($family->getFacts('MARR')) : ?> + <?= I18N::translate('yes') ?> + <?php endif ?> + </td> - <!-- Marriage anniversary --> - <td class="center" data-sort="<?= -$family->getMarriageDate()->julianDay() ?>"> - <?= Date::getAge($family->getMarriageDate(), null) ?> - </td> + <!-- Marriage anniversary --> + <td class="center" data-sort="<?= - $family->getMarriageDate()->julianDay() ?>"> + <?= Date::getAge($family->getMarriageDate(), null) ?> + </td> - <!-- Marriage place --> - <td> - <?php foreach ($family->getAllMarriagePlaces() as $n => $marriage_place): ?> - <a href="<?= $marriage_place->getURL() ?>" title="<?= strip_tags($marriage_place->getFullName()) ?>"> - <?= $marriage_place->getShortName() ?> - </a> - <br> - <?php endforeach ?> - </td> + <!-- Marriage place --> + <td> + <?php foreach ($family->getAllMarriagePlaces() as $n => $marriage_place) : ?> + <a href="<?= $marriage_place->getURL() ?>" title="<?= strip_tags($marriage_place->getFullName()) ?>"> + <?= $marriage_place->getShortName() ?> + </a> + <br> + <?php endforeach ?> + </td> - <!-- Number of children --> - <td class="center" data-sort="<?= $family->getNumberOfChildren() ?>"> - <?= I18N::number($family->getNumberOfChildren()) ?> - </td> + <!-- Number of children --> + <td class="center" data-sort="<?= $family->getNumberOfChildren() ?>"> + <?= I18N::number($family->getNumberOfChildren()) ?> + </td> - <!-- Last change --> - <td data-sort="<?= $family->lastChangeTimestamp(true) ?>"> - <?= $family->lastChangeTimestamp() ?> - </td> + <!-- Last change --> + <td data-sort="<?= $family->lastChangeTimestamp(true) ?>"> + <?= $family->lastChangeTimestamp() ?> + </td> - <!-- Filter by marriage date --> - <td hidden> - <?php if (!$family->canShow() || !$mdate->isOK()): ?> - U - <?php elseif (Date::compare($mdate, $hundred_years_ago) > 0): ?> - Y100 - <?php else: ?> - YES - <?php endif ?> - <?php if ($family->getFacts(WT_EVENTS_DIV)): ?> - D - <?php endif ?> - <?php if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1): ?> - M - <?php endif ?> - </td> + <!-- Filter by marriage date --> + <td hidden> + <?php if (!$family->canShow() || !$mdate->isOK()) : ?> + U + <?php elseif (Date::compare($mdate, $hundred_years_ago) > 0) : ?> + Y100 + <?php else : ?> + YES + <?php endif ?> + <?php if ($family->getFacts(WT_EVENTS_DIV)) : ?> + D + <?php endif ?> + <?php if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) : ?> + M + <?php endif ?> + </td> - <!-- Filter by alive/dead --> - <td hidden> - <?php if ($husb->isDead() && $wife->isDead()): ?> - Y - <?php endif ?> - <?php if ($husb->isDead() && !$wife->isDead()): ?> - <?php if ($wife->getSex() == 'F'): ?> - H - <?php endif ?> - <?php if ($wife->getSex() == 'M'): ?> - W - <?php endif ?> - <?php endif ?> - <?php if (!$husb->isDead() && $wife->isDead()): ?> - <?php if ($husb->getSex() == 'M'): ?> - W - <?php endif ?> - <?php if ($husb->getSex() == 'F'): ?> - H - <?php endif ?> - <?php endif ?> - <?php if (!$husb->isDead() && !$wife->isDead()): ?> - N - <?php endif ?> - </td> + <!-- Filter by alive/dead --> + <td hidden> + <?php if ($husb->isDead() && $wife->isDead()) : ?> + Y + <?php endif ?> + <?php if ($husb->isDead() && !$wife->isDead()) : ?> + <?php if ($wife->getSex() == 'F') : ?> + H + <?php endif ?> + <?php if ($wife->getSex() == 'M') : ?> + W + <?php endif ?> + <?php endif ?> + <?php if (!$husb->isDead() && $wife->isDead()) : ?> + <?php if ($husb->getSex() == 'M') : ?> + W + <?php endif ?> + <?php if ($husb->getSex() == 'F') : ?> + H + <?php endif ?> + <?php endif ?> + <?php if (!$husb->isDead() && !$wife->isDead()) : ?> + N + <?php endif ?> + </td> - <!-- Filter by roots/leaves --> - <td hidden> - <?php if (!$husb->getChildFamilies() && !$wife->getChildFamilies()): ?> - R - <?php elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() === 0): ?> - L - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> + <!-- Filter by roots/leaves --> + <td hidden> + <?php if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) : ?> + R + <?php elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() === 0) : ?> + L + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> - <div id="family-charts-<?= e($table_id) ?>" style="display:none"> - <table class="list-charts"> - <tr> - <td> - <?= view('lists/chart-by-decade', ['data' => $birt_by_decade, 'title' => I18N::translate('Decade of birth')]) ?> + <div id="family-charts-<?= e($table_id) ?>" style="display:none"> + <table class="list-charts"> + <tr> + <td> + <?= view('lists/chart-by-decade', ['data' => $birt_by_decade, 'title' => I18N::translate('Decade of birth')]) ?> </td> <td> - <?= view('lists/chart-by-decade', ['data' => $marr_by_decade, 'title' => I18N::translate('Decade of marriage')]) ?> - </td> - </tr> - <tr> - <td colspan="2"> - <?= view('lists/chart-by-age', ['data' => $marr_by_age, 'title' => I18N::translate('Age in year of marriage')]) ?> - </td> - </tr> - </table> - </div> + <?= view('lists/chart-by-decade', ['data' => $marr_by_decade, 'title' => I18N::translate('Decade of marriage')]) ?> + </td> + </tr> + <tr> + <td colspan="2"> + <?= view('lists/chart-by-age', ['data' => $marr_by_age, 'title' => I18N::translate('Age in year of marriage')]) ?> + </td> + </tr> + </table> + </div> </div> diff --git a/resources/views/lists/individuals-table.php b/resources/views/lists/individuals-table.php index f69ccec5e8..1e096f0ea9 100644 --- a/resources/views/lists/individuals-table.php +++ b/resources/views/lists/individuals-table.php @@ -17,386 +17,386 @@ $unique_indis = []; // Don't double-count indis with multiple names. <?php View::push('javascript') ?> <script> $("#<?= e($table_id) ?>").dataTable( { - dom: '<"H"<"filtersH_<?= e($table_id) ?>">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_<?= e($table_id) ?>">>', - <?= I18N::datatablesI18N() ?>, - autoWidth: false, - processing: true, - retrieve: true, - columns: [ - /* Given names */ { type: "text" }, - /* Surnames */ { type: "text" }, - /* SOSA numnber */ { type: "num", visible: <?= json_encode($sosa) ?> }, - /* Birth date */ { type: "num" }, - /* Anniversary */ { type: "num" }, - /* Birthplace */ { type: "text" }, - /* Children */ { type: "num" }, - /* Deate date */ { type: "num" }, - /* Anniversary */ { type: "num" }, - /* Age */ { type: "num" }, - /* Death place */ { type: "text" }, - /* Last change */ { visible: <?= json_encode($tree->getPreference('SHOW_LAST_CHANGE')) ?> }, - /* Filter sex */ { sortable: false }, - /* Filter birth */ { sortable: false }, - /* Filter death */ { sortable: false }, - /* Filter tree */ { sortable: false } - ], - sorting: <?= json_encode($sosa ? [[4, "asc"]] : [[1, "asc"]]) ?>, - displayLength: 20, - pagingType: "full_numbers" + dom: '<"H"<"filtersH_<?= e($table_id) ?>">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_<?= e($table_id) ?>">>', + <?= I18N::datatablesI18N() ?>, + autoWidth: false, + processing: true, + retrieve: true, + columns: [ + /* Given names */ { type: "text" }, + /* Surnames */ { type: "text" }, + /* SOSA numnber */ { type: "num", visible: <?= json_encode($sosa) ?> }, + /* Birth date */ { type: "num" }, + /* Anniversary */ { type: "num" }, + /* Birthplace */ { type: "text" }, + /* Children */ { type: "num" }, + /* Deate date */ { type: "num" }, + /* Anniversary */ { type: "num" }, + /* Age */ { type: "num" }, + /* Death place */ { type: "text" }, + /* Last change */ { visible: <?= json_encode($tree->getPreference('SHOW_LAST_CHANGE')) ?> }, + /* Filter sex */ { sortable: false }, + /* Filter birth */ { sortable: false }, + /* Filter death */ { sortable: false }, + /* Filter tree */ { sortable: false } + ], + sorting: <?= json_encode($sosa ? [[4, "asc"]] : [[1, "asc"]]) ?>, + displayLength: 20, + pagingType: "full_numbers" }); $("#<?= e($table_id) ?>") /* Hide/show parents */ .on("click", ".btn-toggle-parents", function() { - $(this).toggleClass("ui-state-active"); - $(".parents", $(this).closest("table").DataTable().rows().nodes()).slideToggle(); + $(this).toggleClass("ui-state-active"); + $(".parents", $(this).closest("table").DataTable().rows().nodes()).slideToggle(); }) /* Hide/show statistics */ .on("click", ".btn-toggle-statistics", function() { - $(this).toggleClass("ui-state-active"); - $("#individual-charts-<?= e($table_id) ?>").slideToggle(); + $(this).toggleClass("ui-state-active"); + $("#individual-charts-<?= e($table_id) ?>").slideToggle(); }) /* Filter buttons in table header */ .on("click", "button[data-filter-column]", function() { - var btn = $(this); - // De-activate the other buttons in this button group - btn.siblings().removeClass("active"); - // Apply (or clear) this filter - var col = $("#<?= e($table_id) ?>").DataTable().column(btn.data("filter-column")); - if (btn.hasClass("active")) { - col.search("").draw(); - } else { - col.search(btn.data("filter-value")).draw(); - } + var btn = $(this); + // De-activate the other buttons in this button group + btn.siblings().removeClass("active"); + // Apply (or clear) this filter + var col = $("#<?= e($table_id) ?>").DataTable().column(btn.data("filter-column")); + if (btn.hasClass("active")) { + col.search("").draw(); + } else { + col.search(btn.data("filter-value")).draw(); + } }); </script> <?php View::endpush() ?> - + <?php $max_age = (int) $tree->getPreference('MAX_ALIVE_AGE'); // Inititialise chart data $deat_by_age = []; for ($age = 0; $age <= $max_age; $age++) { - $deat_by_age[$age] = ''; + $deat_by_age[$age] = ''; } $birt_by_decade = []; $deat_by_decade = []; for ($year = 1550; $year < 2030; $year += 10) { - $birt_by_decade[$year] = ''; - $deat_by_decade[$year] = ''; + $birt_by_decade[$year] = ''; + $deat_by_decade[$year] = ''; } ?> <div class="indi-list"> - <table id="<?= e($table_id) ?>"> - <thead> - <tr> - <th colspan="16"> - <div class="btn-toolbar d-flex justify-content-between mb-2" role="toolbar"> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="M" - title="<?= I18N::translate('Show only males.') ?>" - > - <?= Individual::sexImage('M', 'large') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="F" - title="<?= I18N::translate('Show only females.') ?>" - > - <?= Individual::sexImage('F', 'large') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="12" - data-filter-value="U" - title="<?= I18N::translate('Show only individuals for whom the gender is not known.') ?>" - > - <?= Individual::sexImage('U', 'large') ?> - </button> - </div> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="14" - data-filter-value="N" - title="<?= I18N::translate('Show individuals who are alive or couples where both partners are alive.') ?>" - > - <?= I18N::translate('Alive') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="14" - data-filter-value="Y" - title="<?= I18N::translate('Show individuals who are dead or couples where both partners are dead.') ?>" - > - <?= I18N::translate('Dead') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="14" - data-filter-value="YES" - title="<?= I18N::translate('Show individuals who died more than 100 years ago.') ?>" - > - <?= I18N::translate('Death') ?>>100 - </button> - <button - class="btn btn-secondary" - data-filter-column="14" - data-filter-value="Y100" - title="<?= I18N::translate('Show individuals who died within the last 100 years.') ?>" - > - <?= I18N::translate('Death') ?><<=100 - </button> - </div> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="13" - data-filter-value="YES" - title="<?= I18N::translate('Show individuals born more than 100 years ago.') ?>" - > - <?= I18N::translate('Birth') ?>>100 - </button> - <button - class="btn btn-secondary" - data-filter-column="13" - data-filter-value="Y100" - title="<?= I18N::translate('Show individuals born within the last 100 years.') ?>" - > - <?= I18N::translate('Birth') ?><=100 - </button> - </div> - <div class="btn-group" data-toggle="buttons"> - <button - class="btn btn-secondary" - data-filter-column="15" - data-filter-value="R" - title="<?= I18N::translate('Show “roots” couples or individuals. These individuals may also be called “patriarchs”. They are individuals who have no parents recorded in the database.') ?>" - > - <?= I18N::translate('Roots') ?> - </button> - <button - class="btn btn-secondary" - data-filter-column="15" - data-filter-value="L" - title="<?= I18N::translate('Show “leaves” couples or individuals. These are individuals who are alive but have no children recorded in the database.') ?>" - > - <?= I18N::translate('Leaves') ?> - </button> - </div> - </div> - </th> - </tr> - <tr> - <th><?= I18N::translate('Given names') ?></th> - <th><?= I18N::translate('Surname') ?></th> - <th><?= /* I18N: Abbreviation for “Sosa-Stradonitz number”. This is an individual’s surname, so may need transliterating into non-latin alphabets. */ - I18N::translate('Sosa') ?></th> - <th><?= I18N::translate('Birth') ?></th> - <th> - <i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i> - </th> - <th><?= I18N::translate('Place') ?></th> - <th> - <i class="icon-children" title="<?= I18N::translate('Children') ?>"></i> - </th> - <th><?= I18N::translate('Death') ?></th> - <th> - <i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i> - </th> - <th><?= I18N::translate('Age') ?></th> - <th><?= I18N::translate('Place') ?></th> - <th><?= I18N::translate('Last change') ?></th> - <th hidden></th> - <th hidden></th> - <th hidden></th> - <th hidden></th> - </tr> - </thead> - <tfoot> - <tr> - <th colspan="16"> - <div class="btn-toolbar"> - <div class="btn-group"> - <button class="ui-state-default btn-toggle-parents"> - <?= I18N::translate('Show parents') ?> - </button> - <button class="ui-state-default btn-toggle-statistics"> - <?= I18N::translate('Show statistics charts') ?> - </button> - </div> - </div> - </th> - </tr> - </tfoot> + <table id="<?= e($table_id) ?>"> + <thead> + <tr> + <th colspan="16"> + <div class="btn-toolbar d-flex justify-content-between mb-2" role="toolbar"> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="M" + title="<?= I18N::translate('Show only males.') ?>" + > + <?= Individual::sexImage('M', 'large') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="F" + title="<?= I18N::translate('Show only females.') ?>" + > + <?= Individual::sexImage('F', 'large') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="12" + data-filter-value="U" + title="<?= I18N::translate('Show only individuals for whom the gender is not known.') ?>" + > + <?= Individual::sexImage('U', 'large') ?> + </button> + </div> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="14" + data-filter-value="N" + title="<?= I18N::translate('Show individuals who are alive or couples where both partners are alive.') ?>" + > + <?= I18N::translate('Alive') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="14" + data-filter-value="Y" + title="<?= I18N::translate('Show individuals who are dead or couples where both partners are dead.') ?>" + > + <?= I18N::translate('Dead') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="14" + data-filter-value="YES" + title="<?= I18N::translate('Show individuals who died more than 100 years ago.') ?>" + > + <?= I18N::translate('Death') ?>>100 + </button> + <button + class="btn btn-secondary" + data-filter-column="14" + data-filter-value="Y100" + title="<?= I18N::translate('Show individuals who died within the last 100 years.') ?>" + > + <?= I18N::translate('Death') ?><<=100 + </button> + </div> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="13" + data-filter-value="YES" + title="<?= I18N::translate('Show individuals born more than 100 years ago.') ?>" + > + <?= I18N::translate('Birth') ?>>100 + </button> + <button + class="btn btn-secondary" + data-filter-column="13" + data-filter-value="Y100" + title="<?= I18N::translate('Show individuals born within the last 100 years.') ?>" + > + <?= I18N::translate('Birth') ?><=100 + </button> + </div> + <div class="btn-group" data-toggle="buttons"> + <button + class="btn btn-secondary" + data-filter-column="15" + data-filter-value="R" + title="<?= I18N::translate('Show “roots” couples or individuals. These individuals may also be called “patriarchs”. They are individuals who have no parents recorded in the database.') ?>" + > + <?= I18N::translate('Roots') ?> + </button> + <button + class="btn btn-secondary" + data-filter-column="15" + data-filter-value="L" + title="<?= I18N::translate('Show “leaves” couples or individuals. These are individuals who are alive but have no children recorded in the database.') ?>" + > + <?= I18N::translate('Leaves') ?> + </button> + </div> + </div> + </th> + </tr> + <tr> + <th><?= I18N::translate('Given names') ?></th> + <th><?= I18N::translate('Surname') ?></th> + <th><?= /* I18N: Abbreviation for “Sosa-Stradonitz number”. This is an individual’s surname, so may need transliterating into non-latin alphabets. */ + I18N::translate('Sosa') ?></th> + <th><?= I18N::translate('Birth') ?></th> + <th> + <i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i> + </th> + <th><?= I18N::translate('Place') ?></th> + <th> + <i class="icon-children" title="<?= I18N::translate('Children') ?>"></i> + </th> + <th><?= I18N::translate('Death') ?></th> + <th> + <i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i> + </th> + <th><?= I18N::translate('Age') ?></th> + <th><?= I18N::translate('Place') ?></th> + <th><?= I18N::translate('Last change') ?></th> + <th hidden></th> + <th hidden></th> + <th hidden></th> + <th hidden></th> + </tr> + </thead> + <tfoot> + <tr> + <th colspan="16"> + <div class="btn-toolbar"> + <div class="btn-group"> + <button class="ui-state-default btn-toggle-parents"> + <?= I18N::translate('Show parents') ?> + </button> + <button class="ui-state-default btn-toggle-statistics"> + <?= I18N::translate('Show statistics charts') ?> + </button> + </div> + </div> + </th> + </tr> + </tfoot> - <tbody> - <?php foreach ($individuals as $key => $individual): ?> - <tr class="<?= $individual->isPendingDeletion() ? 'old' : ($individual->isPendingAddition() ? 'new' : '') ?>"> - <td colspan="2" data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', implode(',', array_reverse(explode(',', $individual->getSortName()))))) ?>"> - <?php foreach ($individual->getAllNames() as $num => $name): ?> - <a title="<?= $name['type'] === 'NAME' ? '' : GedcomTag::getLabel($name['type'], $individual) ?>" href="<?= e($individual->url()) ?>" class="<?= $num === $individual->getPrimaryName() ? 'name2' : '' ?>"> - <?= $name['full'] ?> - </a> - <?php if ($num === $individual->getPrimaryName()): ?> - <?= $individual->getSexImage() ?> - <?php endif ?> - <br> - <?php endforeach ?> - <?= $individual->getPrimaryParentsNames('parents details1', 'none') ?> - </td> + <tbody> + <?php foreach ($individuals as $key => $individual) : ?> + <tr class="<?= $individual->isPendingDeletion() ? 'old' : ($individual->isPendingAddition() ? 'new' : '') ?>"> + <td colspan="2" data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', implode(',', array_reverse(explode(',', $individual->getSortName()))))) ?>"> + <?php foreach ($individual->getAllNames() as $num => $name) : ?> + <a title="<?= $name['type'] === 'NAME' ? '' : GedcomTag::getLabel($name['type'], $individual) ?>" href="<?= e($individual->url()) ?>" class="<?= $num === $individual->getPrimaryName() ? 'name2' : '' ?>"> + <?= $name['full'] ?> + </a> + <?php if ($num === $individual->getPrimaryName()) : ?> + <?= $individual->getSexImage() ?> + <?php endif ?> + <br> + <?php endforeach ?> + <?= $individual->getPrimaryParentsNames('parents details1', 'none') ?> + </td> - <td hidden data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', $individual->getSortName())) ?>"></td> + <td hidden data-sort="<?= e(str_replace([',', '@P.N.', '@N.N.'], 'AAAA', $individual->getSortName())) ?>"></td> - <td class="center" data-sort="<?= $key ?>"> - <?php if ($sosa): ?> - <a href="<?= e(route('relationships', ['xref1' => $individuals[1]->getXref(), 'xref2' => $individual->getXref(), 'ged' => $individual->getTree()->getName()])) ?>" title="<?= I18N::translate('Relationships') ?>" rel="nofollow"> - <?= I18N::number($key) ?> - </a> - <?php endif ?> - </td> + <td class="center" data-sort="<?= $key ?>"> + <?php if ($sosa) : ?> + <a href="<?= e(route('relationships', ['xref1' => $individuals[1]->getXref(), 'xref2' => $individual->getXref(), 'ged' => $individual->getTree()->getName()])) ?>" title="<?= I18N::translate('Relationships') ?>" rel="nofollow"> + <?= I18N::number($key) ?> + </a> + <?php endif ?> + </td> - <!-- Birth date --> - <td data-sort="<?= $individual->getEstimatedBirthDate()->julianDay() ?>"> - <?php $birth_dates = $individual->getAllBirthDates(); ?> + <!-- Birth date --> + <td data-sort="<?= $individual->getEstimatedBirthDate()->julianDay() ?>"> + <?php $birth_dates = $individual->getAllBirthDates(); ?> - <?php foreach ($birth_dates as $n => $birth_date): ?> - <?= $birth_date->display(true) ?> - <br> - <?php endforeach ?> - </td> + <?php foreach ($birth_dates as $n => $birth_date) : ?> + <?= $birth_date->display(true) ?> + <br> + <?php endforeach ?> + </td> - <!-- Birth anniversary --> - <td class="center" data-sort="<?= -$individual->getEstimatedBirthDate()->julianDay() ?>"> - <?php if (isset($birth_dates[0]) && $birth_dates[0]->gregorianYear() >= 1550 && $birth_dates[0]->gregorianYear() < 2030 && !isset($unique_indis[$individual->getXref()])): ?> - <?php $birt_by_decade[(int) ($birth_dates[0]->gregorianYear() / 10) * 10] .= $individual->getSex() ?> - <?= Date::getAge($birth_dates[0], null) ?> - <?php endif ?> - </td> + <!-- Birth anniversary --> + <td class="center" data-sort="<?= - $individual->getEstimatedBirthDate()->julianDay() ?>"> + <?php if (isset($birth_dates[0]) && $birth_dates[0]->gregorianYear() >= 1550 && $birth_dates[0]->gregorianYear() < 2030 && !isset($unique_indis[$individual->getXref()])) : ?> + <?php $birt_by_decade[(int) ($birth_dates[0]->gregorianYear() / 10) * 10] .= $individual->getSex() ?> + <?= Date::getAge($birth_dates[0], null) ?> + <?php endif ?> + </td> - <!-- Birth place --> - <td> - <?php foreach ($individual->getAllBirthPlaces() as $n => $birth_place): ?> - <a href="<?= $birth_place->getURL() ?>" title="<?= strip_tags($birth_place->getFullName()) ?>"> - <?= $birth_place->getShortName() ?> - </a> - <br> - <?php endforeach ?> - </td> + <!-- Birth place --> + <td> + <?php foreach ($individual->getAllBirthPlaces() as $n => $birth_place) : ?> + <a href="<?= $birth_place->getURL() ?>" title="<?= strip_tags($birth_place->getFullName()) ?>"> + <?= $birth_place->getShortName() ?> + </a> + <br> + <?php endforeach ?> + </td> - <!-- Number of children --> - <td class="center" data-sort="<?= $individual->getNumberOfChildren() ?>"> - <?= I18N::number($individual->getNumberOfChildren()) ?> - </td> + <!-- Number of children --> + <td class="center" data-sort="<?= $individual->getNumberOfChildren() ?>"> + <?= I18N::number($individual->getNumberOfChildren()) ?> + </td> - <!-- Death date --> - <?php $death_dates = $individual->getAllDeathDates() ?> - <td data-sort="<?= $individual->getEstimatedDeathDate()->julianDay() ?>"> - <?php foreach ($death_dates as $num => $death_date): ?> - <?= $death_date->display(true) ?> - <br> - <?php endforeach ?> - </td> + <!-- Death date --> + <?php $death_dates = $individual->getAllDeathDates() ?> + <td data-sort="<?= $individual->getEstimatedDeathDate()->julianDay() ?>"> + <?php foreach ($death_dates as $num => $death_date) : ?> + <?= $death_date->display(true) ?> + <br> + <?php endforeach ?> + </td> - <!-- Death anniversary --> - <td class="center" data-sort="<?= -$individual->getEstimatedDeathDate()->julianDay() ?>"> - <?php if (isset($death_dates[0]) && $death_dates[0]->gregorianYear() >= 1550 && $death_dates[0]->gregorianYear() < 2030 && !isset($unique_indis[$individual->getXref()])): ?> - <?php $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $individual->getSex() ?> - <?= Date::getAge($death_dates[0], null) ?> - <?php endif ?> - </td> + <!-- Death anniversary --> + <td class="center" data-sort="<?= - $individual->getEstimatedDeathDate()->julianDay() ?>"> + <?php if (isset($death_dates[0]) && $death_dates[0]->gregorianYear() >= 1550 && $death_dates[0]->gregorianYear() < 2030 && !isset($unique_indis[$individual->getXref()])) : ?> + <?php $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $individual->getSex() ?> + <?= Date::getAge($death_dates[0], null) ?> + <?php endif ?> + </td> - <!-- Age at death --> - <?php if (isset($birth_dates[0]) && isset($death_dates[0])): ?> - <?php $age_at_death = I18N::number((int) Date::getAgeYears($birth_dates[0], $death_dates[0])); ?> - <?php $age_at_death_sort = Date::getAge($birth_dates[0], $death_dates[0]); ?> - <?php if (!isset($unique_indis[$individual->getXref()]) && $age_at_death >= 0 && $age_at_death <= $max_age): ?> - <?php $deat_by_age[$age_at_death] .= $individual->getSex(); ?> - <?php endif ?> - <?php else: ?> - <?php $age_at_death = ''; ?> - <?php $age_at_death_sort = PHP_INT_MAX; ?> - <?php endif ?> - <td class="center" data-sort="<?= e($age_at_death_sort) ?>"> - <?= e($age_at_death) ?> - </td> + <!-- Age at death --> + <?php if (isset($birth_dates[0]) && isset($death_dates[0])) : ?> + <?php $age_at_death = I18N::number((int) Date::getAgeYears($birth_dates[0], $death_dates[0])); ?> + <?php $age_at_death_sort = Date::getAge($birth_dates[0], $death_dates[0]); ?> + <?php if (!isset($unique_indis[$individual->getXref()]) && $age_at_death >= 0 && $age_at_death <= $max_age) : ?> + <?php $deat_by_age[$age_at_death] .= $individual->getSex(); ?> + <?php endif ?> + <?php else : ?> + <?php $age_at_death = ''; ?> + <?php $age_at_death_sort = PHP_INT_MAX; ?> + <?php endif ?> + <td class="center" data-sort="<?= e($age_at_death_sort) ?>"> + <?= e($age_at_death) ?> + </td> - <!-- Death place --> - <td> - <?php foreach ($individual->getAllDeathPlaces() as $n => $death_place): ?> - <a href="<?= $death_place->getURL() ?>" title="<?= e(strip_tags($death_place->getFullName())) ?>"> - <?= $death_place->getShortName() ?> - </a> - <br> - <?php endforeach ?> - </td> + <!-- Death place --> + <td> + <?php foreach ($individual->getAllDeathPlaces() as $n => $death_place) : ?> + <a href="<?= $death_place->getURL() ?>" title="<?= e(strip_tags($death_place->getFullName())) ?>"> + <?= $death_place->getShortName() ?> + </a> + <br> + <?php endforeach ?> + </td> - <!-- Last change --> - <td data-sort="<?= $individual->lastChangeTimestamp(true) ?>"> - <?= $individual->lastChangeTimestamp() ?> - </td> + <!-- Last change --> + <td data-sort="<?= $individual->lastChangeTimestamp(true) ?>"> + <?= $individual->lastChangeTimestamp() ?> + </td> - <!-- Filter by sex --> - <td hidden> - <?= $individual->getSex() ?> - </td> + <!-- Filter by sex --> + <td hidden> + <?= $individual->getSex() ?> + </td> - <!-- Filter by birth date --> - <td hidden> - <?php if (!$individual->canShow() || Date::compare($individual->getEstimatedBirthDate(), $hundred_years_ago) > 0): ?> - Y100 - <?php else: ?> - YES - <?php endif ?> - </td> + <!-- Filter by birth date --> + <td hidden> + <?php if (!$individual->canShow() || Date::compare($individual->getEstimatedBirthDate(), $hundred_years_ago) > 0) : ?> + Y100 + <?php else : ?> + YES + <?php endif ?> + </td> - <!-- Filter by death date --> - <td hidden> - <?php if (isset($death_dates[0]) && Date::compare($death_dates[0], $hundred_years_ago) > 0): ?> - Y100 - <?php elseif ($individual->isDead()): ?> - YES - <?php else: ?> - N - <?php endif ?> - </td> + <!-- Filter by death date --> + <td hidden> + <?php if (isset($death_dates[0]) && Date::compare($death_dates[0], $hundred_years_ago) > 0) : ?> + Y100 + <?php elseif ($individual->isDead()) : ?> + YES + <?php else : ?> + N + <?php endif ?> + </td> - <!-- Filter by roots/leaves --> - <td hidden> - <?php if (!$individual->getChildFamilies()): ?> - R - <?php elseif (!$individual->isDead() && $individual->getNumberOfChildren() < 1): ?> - L - <?php endif ?> - </td> - </tr> + <!-- Filter by roots/leaves --> + <td hidden> + <?php if (!$individual->getChildFamilies()) : ?> + R + <?php elseif (!$individual->isDead() && $individual->getNumberOfChildren() < 1) : ?> + L + <?php endif ?> + </td> + </tr> - <?php $unique_indis[$individual->getXref()] = true ?> - <?php endforeach ?> - </tbody> - </table> + <?php $unique_indis[$individual->getXref()] = true ?> + <?php endforeach ?> + </tbody> + </table> - <div id="individual-charts-<?= e($table_id) ?>" style="display:none"> - <table class="list-charts"> - <tr> - <td> - <?= view('lists/chart-by-decade', ['data' => $birt_by_decade, 'title' => I18N::translate('Decade of birth')]) ?> - </td> - <td> - <?= view('lists/chart-by-decade', ['data' => $deat_by_decade, 'title' => I18N::translate('Decade of death')]) ?> - </td> - </tr> - <tr> - <td colspan="2"> - <?= view('lists/chart-by-age', ['data' => $deat_by_age, 'title' => I18N::translate('Age related to death year')]) ?> - </td> - </tr> - </table> - </div> + <div id="individual-charts-<?= e($table_id) ?>" style="display:none"> + <table class="list-charts"> + <tr> + <td> + <?= view('lists/chart-by-decade', ['data' => $birt_by_decade, 'title' => I18N::translate('Decade of birth')]) ?> + </td> + <td> + <?= view('lists/chart-by-decade', ['data' => $deat_by_decade, 'title' => I18N::translate('Decade of death')]) ?> + </td> + </tr> + <tr> + <td colspan="2"> + <?= view('lists/chart-by-age', ['data' => $deat_by_age, 'title' => I18N::translate('Age related to death year')]) ?> + </td> + </tr> + </table> + </div> </div> diff --git a/resources/views/lists/media-table.php b/resources/views/lists/media-table.php index 8dcfc51e6b..f49d76adc1 100644 --- a/resources/views/lists/media-table.php +++ b/resources/views/lists/media-table.php @@ -6,80 +6,80 @@ // It is not good to bypass privacy, but many servers do not have the resources // to process privacy for every record in the tree $count_individuals = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##individuals` JOIN `##link` ON l_from = i_id AND l_file = i_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##individuals` JOIN `##link` ON l_from = i_id AND l_file = i_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_families = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_sources = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); ?> <table - class="table table-bordered table-sm wt-table-media datatables" - data-columns="<?= e(json_encode([ - null, - null, - ['visible' => array_sum($count_individuals) > 0], - ['visible' => array_sum($count_families) > 0], - ['visible' => array_sum($count_sources) > 0], - ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], - ])) ?>" - data-state-save="true" + class="table table-bordered table-sm wt-table-media datatables" + data-columns="<?= e(json_encode([ + null, + null, + ['visible' => array_sum($count_individuals) > 0], + ['visible' => array_sum($count_families) > 0], + ['visible' => array_sum($count_sources) > 0], + ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], + ])) ?>" + data-state-save="true" > - <caption class="sr-only"> - <?= $caption ?? I18N::translate('Media objects') ?> - </caption> + <caption class="sr-only"> + <?= $caption ?? I18N::translate('Media objects') ?> + </caption> - <thead> - <tr> - <th><?= I18N::translate('Media') ?></th> - <th><?= I18N::translate('Title') ?></th> - <th><?= I18N::translate('Individuals') ?></th> - <th><?= I18N::translate('Families') ?></th> - <th><?= I18N::translate('Sources') ?></th> - <th><?= I18N::translate('Last change') ?></th> - </tr> - </thead> + <thead> + <tr> + <th><?= I18N::translate('Media') ?></th> + <th><?= I18N::translate('Title') ?></th> + <th><?= I18N::translate('Individuals') ?></th> + <th><?= I18N::translate('Families') ?></th> + <th><?= I18N::translate('Sources') ?></th> + <th><?= I18N::translate('Last change') ?></th> + </tr> + </thead> - <tbody> - <?php foreach ($media_objects as $media_object): ?> - <tr class="<?= $media_object->isPendingDeletion() ? 'old' : ($media_object->isPendingAddition() ? 'new' : '') ?>"> - <!-- Thumbnails--> - <td data-sort="<?= e($media_object->getSortName()) ?>"> - <?php foreach ($media_object->mediaFiles() as $media_file): ?> - <?= $media_file->displayImage(100, 100, 'contain', []) ?> - <?php endforeach ?> - </td> + <tbody> + <?php foreach ($media_objects as $media_object) : ?> + <tr class="<?= $media_object->isPendingDeletion() ? 'old' : ($media_object->isPendingAddition() ? 'new' : '') ?>"> + <!-- Thumbnails--> + <td data-sort="<?= e($media_object->getSortName()) ?>"> + <?php foreach ($media_object->mediaFiles() as $media_file) : ?> + <?= $media_file->displayImage(100, 100, 'contain', []) ?> + <?php endforeach ?> + </td> - <!-- Title --> - <td data-sort="<?= e($media_object->getSortName()) ?>"> - <a href="<?= e($media_object->url()) ?>"> - <?= $media_object->getFullName() ?> - </a> - </td> + <!-- Title --> + <td data-sort="<?= e($media_object->getSortName()) ?>"> + <a href="<?= e($media_object->url()) ?>"> + <?= $media_object->getFullName() ?> + </a> + </td> - <!-- Count of linked individuals --> - <td class="center" data-sort="<?= $count_individuals[$media_object->getXref()] ?? 0 ?>"> - <?= I18N::number($count_individuals[$media_object->getXref()] ?? 0) ?> - </td> + <!-- Count of linked individuals --> + <td class="center" data-sort="<?= $count_individuals[$media_object->getXref()] ?? 0 ?>"> + <?= I18N::number($count_individuals[$media_object->getXref()] ?? 0) ?> + </td> - <!-- Count of linked families --> - <td class="center" data-sort="<?= $count_families[$media_object->getXref()] ?? 0 ?>"> - <?= I18N::number($count_families[$media_object->getXref()] ?? 0) ?> - </td> + <!-- Count of linked families --> + <td class="center" data-sort="<?= $count_families[$media_object->getXref()] ?? 0 ?>"> + <?= I18N::number($count_families[$media_object->getXref()] ?? 0) ?> + </td> - <!-- Count of sources --> - <td class="center" data-sort="<?= $count_sources[$media_object->getXref()] ?? 0 ?>"> - <?= I18N::number($count_sources[$media_object->getXref()] ?? 0) ?> - </td> + <!-- Count of sources --> + <td class="center" data-sort="<?= $count_sources[$media_object->getXref()] ?? 0 ?>"> + <?= I18N::number($count_sources[$media_object->getXref()] ?? 0) ?> + </td> - <!-- Last change --> - <td data-sort="<?= $media_object->lastChangeTimestamp(true) ?>"> - <?= $media_object->lastChangeTimestamp() ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <!-- Last change --> + <td data-sort="<?= $media_object->lastChangeTimestamp(true) ?>"> + <?= $media_object->lastChangeTimestamp() ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/lists/notes-table.php b/resources/views/lists/notes-table.php index a4cd653e6e..80573071fb 100644 --- a/resources/views/lists/notes-table.php +++ b/resources/views/lists/notes-table.php @@ -6,81 +6,81 @@ // It is not good to bypass privacy, but many servers do not have the resources // to process privacy for every record in the tree $count_individuals = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##individuals` JOIN `##link` ON l_from = i_id AND l_file = i_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##individuals` JOIN `##link` ON l_from = i_id AND l_file = i_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_families = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_media = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##media` JOIN `##link` ON l_from = m_id AND l_file = m_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##media` JOIN `##link` ON l_from = m_id AND l_file = m_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_sources = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); ?> <table - class="table table-bordered table-sm wt-table-note datatables" - data-columns="<?= e(json_encode([ - null, - ['visible' => array_sum($count_individuals) > 0], - ['visible' => array_sum($count_families) > 0], - ['visible' => array_sum($count_media) > 0], - ['visible' => array_sum($count_sources) > 0], - ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], - ])) ?>" - data-state-save="true" + class="table table-bordered table-sm wt-table-note datatables" + data-columns="<?= e(json_encode([ + null, + ['visible' => array_sum($count_individuals) > 0], + ['visible' => array_sum($count_families) > 0], + ['visible' => array_sum($count_media) > 0], + ['visible' => array_sum($count_sources) > 0], + ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], + ])) ?>" + data-state-save="true" > - <caption class="sr-only"> - <?= $caption ?? I18N::translate('Sources') ?> - </caption> + <caption class="sr-only"> + <?= $caption ?? I18N::translate('Sources') ?> + </caption> - <thead> - <tr> - <th><?= I18N::translate('Title') ?></th> - <th><?= I18N::translate('Individuals') ?></th> - <th><?= I18N::translate('Families') ?></th> - <th><?= I18N::translate('Media objects') ?></th> - <th><?= I18N::translate('Sources') ?></th> - <th><?= I18N::translate('Last change') ?></th> - </tr> - </thead> + <thead> + <tr> + <th><?= I18N::translate('Title') ?></th> + <th><?= I18N::translate('Individuals') ?></th> + <th><?= I18N::translate('Families') ?></th> + <th><?= I18N::translate('Media objects') ?></th> + <th><?= I18N::translate('Sources') ?></th> + <th><?= I18N::translate('Last change') ?></th> + </tr> + </thead> - <tbody> - <?php foreach ($notes as $note): ?> - <tr class="<?= $note->isPendingDeletion() ? 'old' : ($note->isPendingAddition() ? 'new' : '') ?>"> - <!-- Title --> - <td data-sort="<?= e($note->getSortName()) ?>"> - <a href="<?= e($note->url()) ?>"> - <?= $note->getFullName() ?> - </a> - </td> + <tbody> + <?php foreach ($notes as $note) : ?> + <tr class="<?= $note->isPendingDeletion() ? 'old' : ($note->isPendingAddition() ? 'new' : '') ?>"> + <!-- Title --> + <td data-sort="<?= e($note->getSortName()) ?>"> + <a href="<?= e($note->url()) ?>"> + <?= $note->getFullName() ?> + </a> + </td> - <!-- Count of linked individuals --> - <td class="center" data-sort="<?= $count_individuals[$note->getXref()] ?? 0 ?>"> - <?= I18N::number($count_individuals[$note->getXref()] ?? 0) ?> - </td> + <!-- Count of linked individuals --> + <td class="center" data-sort="<?= $count_individuals[$note->getXref()] ?? 0 ?>"> + <?= I18N::number($count_individuals[$note->getXref()] ?? 0) ?> + </td> - <!-- Count of linked families --> - <td class="center" data-sort="<?= $count_families[$note->getXref()] ?? 0 ?>"> - <?= I18N::number($count_families[$note->getXref()] ?? 0) ?> - </td> + <!-- Count of linked families --> + <td class="center" data-sort="<?= $count_families[$note->getXref()] ?? 0 ?>"> + <?= I18N::number($count_families[$note->getXref()] ?? 0) ?> + </td> - <!-- Count of linked media objects --> - <td class="center" data-sort="<?= $count_media[$note->getXref()] ?? 0 ?>"> - <?= I18N::number($count_media[$note->getXref()] ?? 0) ?> - </td> + <!-- Count of linked media objects --> + <td class="center" data-sort="<?= $count_media[$note->getXref()] ?? 0 ?>"> + <?= I18N::number($count_media[$note->getXref()] ?? 0) ?> + </td> - <!-- Count of sources --> - <td class="center" data-sort="<?= $count_sources[$note->getXref()] ?? 0 ?>"> - <?= I18N::number($count_sources[$note->getXref()] ?? 0) ?> - </td> + <!-- Count of sources --> + <td class="center" data-sort="<?= $count_sources[$note->getXref()] ?? 0 ?>"> + <?= I18N::number($count_sources[$note->getXref()] ?? 0) ?> + </td> - <!-- Last change --> - <td data-sort="<?= $note->lastChangeTimestamp(true) ?>"> - <?= $note->lastChangeTimestamp() ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <!-- Last change --> + <td data-sort="<?= $note->lastChangeTimestamp(true) ?>"> + <?= $note->lastChangeTimestamp() ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/lists/repositories-table.php b/resources/views/lists/repositories-table.php index 949f48c9bc..4021c24d5c 100644 --- a/resources/views/lists/repositories-table.php +++ b/resources/views/lists/repositories-table.php @@ -6,51 +6,51 @@ // It is not good to bypass privacy, but many servers do not have the resources // to process privacy for every record in the tree $count_sources = Database::prepare( -"SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'REPO' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'REPO' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); ?> <table - class="table table-bordered table-sm wt-table-source datatables d-none" - data-columns="<?= e(json_encode([ - null, - ['visible' => array_sum($count_sources) > 0], - ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], - ])) ?>" - data-state-save="true" + class="table table-bordered table-sm wt-table-source datatables d-none" + data-columns="<?= e(json_encode([ + null, + ['visible' => array_sum($count_sources) > 0], + ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], + ])) ?>" + data-state-save="true" > - <caption class="sr-only"> - <?= $caption ?? I18N::translate('Repositories') ?> - </caption> + <caption class="sr-only"> + <?= $caption ?? I18N::translate('Repositories') ?> + </caption> - <thead> - <tr> - <th><?= I18N::translate('Repository name') ?></th> - <th><?= I18N::translate('Sources') ?></th> - <th><?= I18N::translate('Last change') ?></th> - </tr> - </thead> + <thead> + <tr> + <th><?= I18N::translate('Repository name') ?></th> + <th><?= I18N::translate('Sources') ?></th> + <th><?= I18N::translate('Last change') ?></th> + </tr> + </thead> - <tbody> - <?php foreach ($repositories as $repository): ?> - <tr class="<?= $repository->isPendingDeletion() ? 'old' : ($repository->isPendingAddition() ? 'new' : '') ?>"> - <!-- Repository name --> - <td data-sort="<?= e($repository->getSortName()) ?>"> - <a href="<?= e($repository->url()) ?>"> - <?= $repository->getFullName() ?> - </a> - </td> + <tbody> + <?php foreach ($repositories as $repository) : ?> + <tr class="<?= $repository->isPendingDeletion() ? 'old' : ($repository->isPendingAddition() ? 'new' : '') ?>"> + <!-- Repository name --> + <td data-sort="<?= e($repository->getSortName()) ?>"> + <a href="<?= e($repository->url()) ?>"> + <?= $repository->getFullName() ?> + </a> + </td> - <!-- Count of linked sources --> - <td class="center" data-sort="<?= $count_sources[$repository->getXref()] ?? 0 ?>"> - <?= I18N::number($count_sources[$repository->getXref()] ?? 0) ?> - </td> + <!-- Count of linked sources --> + <td class="center" data-sort="<?= $count_sources[$repository->getXref()] ?? 0 ?>"> + <?= I18N::number($count_sources[$repository->getXref()] ?? 0) ?> + </td> - <!-- Last change --> - <td data-sort="<?= $repository->lastChangeTimestamp(true) ?>"> - <?= $repository->lastChangeTimestamp() ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <!-- Last change --> + <td data-sort="<?= $repository->lastChangeTimestamp(true) ?>"> + <?= $repository->lastChangeTimestamp() ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/lists/sources-table.php b/resources/views/lists/sources-table.php index 1c349d3e88..874593eef7 100644 --- a/resources/views/lists/sources-table.php +++ b/resources/views/lists/sources-table.php @@ -6,88 +6,88 @@ // It is not good to bypass privacy, but many servers do not have the resources // to process privacy for every record in the tree $count_individuals = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##individuals` JOIN `##link` ON l_from = i_id AND l_file = i_file AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##individuals` JOIN `##link` ON l_from = i_id AND l_file = i_file AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_families = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_media = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##media` JOIN `##link` ON l_from = m_id AND l_file = m_file AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##media` JOIN `##link` ON l_from = m_id AND l_file = m_file AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); $count_notes = Database::prepare( - "SELECT l_to, COUNT(*) FROM `##other` JOIN `##link` ON l_from = o_id AND l_file = o_file AND o_type = 'NOTE' AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" + "SELECT l_to, COUNT(*) FROM `##other` JOIN `##link` ON l_from = o_id AND l_file = o_file AND o_type = 'NOTE' AND l_type = 'SOUR' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); ?> <table - class="table table-bordered table-sm wt-table-source datatables d-none" - data-columns="<?= e(json_encode([ - null, - null, - ['visible' => array_sum($count_individuals) > 0], - ['visible' => array_sum($count_families) > 0], - ['visible' => array_sum($count_media) > 0], - ['visible' => array_sum($count_notes) > 0], - ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], - ])) ?>" - data-state-save="true" + class="table table-bordered table-sm wt-table-source datatables d-none" + data-columns="<?= e(json_encode([ + null, + null, + ['visible' => array_sum($count_individuals) > 0], + ['visible' => array_sum($count_families) > 0], + ['visible' => array_sum($count_media) > 0], + ['visible' => array_sum($count_notes) > 0], + ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], + ])) ?>" + data-state-save="true" > - <caption class="sr-only"> - <?= $caption ?? I18N::translate('Sources') ?> - </caption> + <caption class="sr-only"> + <?= $caption ?? I18N::translate('Sources') ?> + </caption> - <thead> - <tr> - <th><?= I18N::translate('Title') ?></th> - <th><?= I18N::translate('Author') ?></th> - <th><?= I18N::translate('Individuals') ?></th> - <th><?= I18N::translate('Families') ?></th> - <th><?= I18N::translate('Media objects') ?></th> - <th><?= I18N::translate('Shared notes') ?></th> - <th><?= I18N::translate('Last change') ?></th> - </tr> - </thead> + <thead> + <tr> + <th><?= I18N::translate('Title') ?></th> + <th><?= I18N::translate('Author') ?></th> + <th><?= I18N::translate('Individuals') ?></th> + <th><?= I18N::translate('Families') ?></th> + <th><?= I18N::translate('Media objects') ?></th> + <th><?= I18N::translate('Shared notes') ?></th> + <th><?= I18N::translate('Last change') ?></th> + </tr> + </thead> - <tbody> - <?php foreach ($sources as $source): ?> - <tr class="<?= $source->isPendingDeletion() ? 'old' : ($source->isPendingAddition() ? 'new' : '') ?>"> - <!-- Title --> - <td data-sort="<?= e($source->getSortName()) ?>"> - <a href="<?= e($source->url()) ?>"> - <?= $source->getFullName() ?> - </a> - </td> + <tbody> + <?php foreach ($sources as $source) : ?> + <tr class="<?= $source->isPendingDeletion() ? 'old' : ($source->isPendingAddition() ? 'new' : '') ?>"> + <!-- Title --> + <td data-sort="<?= e($source->getSortName()) ?>"> + <a href="<?= e($source->url()) ?>"> + <?= $source->getFullName() ?> + </a> + </td> - <!-- Author --> - <td> - <?= e($source->getFirstFact('AUTH') ? $source->getFirstFact('AUTH')->getValue() : '') ?> - </td> + <!-- Author --> + <td> + <?= e($source->getFirstFact('AUTH') ? $source->getFirstFact('AUTH')->getValue() : '') ?> + </td> - <!-- Count of linked individuals --> - <td class="center" data-sort="<?= $count_individuals[$source->getXref()] ?? 0 ?>"> - <?= I18N::number($count_individuals[$source->getXref()] ?? 0) ?> - </td> + <!-- Count of linked individuals --> + <td class="center" data-sort="<?= $count_individuals[$source->getXref()] ?? 0 ?>"> + <?= I18N::number($count_individuals[$source->getXref()] ?? 0) ?> + </td> - <!-- Count of linked families --> - <td class="center" data-sort="<?= $count_families[$source->getXref()] ?? 0 ?>"> - <?= I18N::number($count_families[$source->getXref()] ?? 0) ?> - </td> + <!-- Count of linked families --> + <td class="center" data-sort="<?= $count_families[$source->getXref()] ?? 0 ?>"> + <?= I18N::number($count_families[$source->getXref()] ?? 0) ?> + </td> - <!-- Count of linked media objects --> - <td class="center" data-sort="<?= $count_media[$source->getXref()] ?? 0 ?>"> - <?= I18N::number($count_media[$source->getXref()] ?? 0) ?> - </td> + <!-- Count of linked media objects --> + <td class="center" data-sort="<?= $count_media[$source->getXref()] ?? 0 ?>"> + <?= I18N::number($count_media[$source->getXref()] ?? 0) ?> + </td> - <!-- Count of linked notes --> - <td class="center" data-sort="<?= $count_notes[$source->getXref()] ?? 0 ?>"> - <?= I18N::number($count_notes[$source->getXref()] ?? 0) ?> - </td> + <!-- Count of linked notes --> + <td class="center" data-sort="<?= $count_notes[$source->getXref()] ?? 0 ?>"> + <?= I18N::number($count_notes[$source->getXref()] ?? 0) ?> + </td> - <!-- Last change --> - <td data-sort="<?= $source->lastChangeTimestamp(true) ?>"> - <?= $source->lastChangeTimestamp() ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <!-- Last change --> + <td data-sort="<?= $source->lastChangeTimestamp(true) ?>"> + <?= $source->lastChangeTimestamp() ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/lists/surnames-table.php b/resources/views/lists/surnames-table.php index d9123deec0..7506b8aa93 100644 --- a/resources/views/lists/surnames-table.php +++ b/resources/views/lists/surnames-table.php @@ -1,59 +1,59 @@ <?php use Fisharebest\Webtrees\I18N; ?> <table class="table table-bordered table-sm datatables wt-table-surname" data-info="false" data-paging="false" data-searching="false" data-state-save="true" data-order="<?= e(json_encode($order ?? [[1, 'desc']])) ?>"> - <caption class="sr-only"> - <?= I18N::translate('Surnames') ?> - </caption> - <thead> - <tr> - <th> - <?= I18N::translate('Surname') ?> - </th> - <th> - <?php if ($route == 'family-list'):?> - <?= I18N::translate('Spouses') ?> - <?php else: ?> - <?= I18N::translate('Individuals') ?> - <?php endif ?> - </th> - </tr> - </thead> + <caption class="sr-only"> + <?= I18N::translate('Surnames') ?> + </caption> + <thead> + <tr> + <th> + <?= I18N::translate('Surname') ?> + </th> + <th> + <?php if ($route == 'family-list') :?> + <?= I18N::translate('Spouses') ?> + <?php else : ?> + <?= I18N::translate('Individuals') ?> + <?php endif ?> + </th> + </tr> + </thead> - <tbody> - <?php foreach ($surnames as $surn => $surns): ?> - <tr> - <td data-sort="<?= e($surn) ?>"> - <!-- Multiple surname variants, e.g. von Groot, van Groot, van der Groot, etc. --> - <?php foreach ($surns as $spfxsurn => $indis): ?> - <?php if ($spfxsurn): ?> - <?php if ($surn !== ''): ?> - <a href="<?= route($route, ['surname' => $surn, 'ged' => $tree->getName()]) ?>" dir="auto"> - <?= e($spfxsurn) ?> - </a> - <?php else: ?> - <a href="<?= route($route, ['alpha' => ',', 'ged' => $tree->getName()]) ?>" dir="auto"> - <?= e($spfxsurn) ?> - </a> - <?php endif ?> - <?php else: ?> - <!-- No surname, but a value from "2 SURN"? A common workaround for toponyms, etc. --> - <a href="<?= route($route, ['surname' => $surn, 'ged' => $tree->getName()]) ?>" dir="auto"><?= e($surn) ?></a> - <?php endif ?> - <br> - <?php endforeach ?> - </td> + <tbody> + <?php foreach ($surnames as $surn => $surns) : ?> + <tr> + <td data-sort="<?= e($surn) ?>"> + <!-- Multiple surname variants, e.g. von Groot, van Groot, van der Groot, etc. --> + <?php foreach ($surns as $spfxsurn => $indis) : ?> + <?php if ($spfxsurn) : ?> + <?php if ($surn !== '') : ?> + <a href="<?= route($route, ['surname' => $surn, 'ged' => $tree->getName()]) ?>" dir="auto"> + <?= e($spfxsurn) ?> + </a> + <?php else : ?> + <a href="<?= route($route, ['alpha' => ',', 'ged' => $tree->getName()]) ?>" dir="auto"> + <?= e($spfxsurn) ?> + </a> + <?php endif ?> + <?php else : ?> + <!-- No surname, but a value from "2 SURN"? A common workaround for toponyms, etc. --> + <a href="<?= route($route, ['surname' => $surn, 'ged' => $tree->getName()]) ?>" dir="auto"><?= e($surn) ?></a> + <?php endif ?> + <br> + <?php endforeach ?> + </td> - <td class="text-center" data-sort="<?= array_sum($surns) ?>"> - <?php foreach ($surns as $indis): ?> - <?= I18N::number($indis) ?> - <br> - <?php endforeach ?> + <td class="text-center" data-sort="<?= array_sum($surns) ?>"> + <?php foreach ($surns as $indis) : ?> + <?= I18N::number($indis) ?> + <br> + <?php endforeach ?> - <?php if (count($surns) > 1): ?> - <?= I18N::number(array_sum($surns)) ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <?php if (count($surns) > 1) : ?> + <?= I18N::number(array_sum($surns)) ?> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/login-page.php b/resources/views/login-page.php index 9e88be5b6c..9f4269232f 100644 --- a/resources/views/login-page.php +++ b/resources/views/login-page.php @@ -1,63 +1,63 @@ <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($error): ?> - <div class="alert alert-danger"> - <?= $error ?> - </div> +<?php if ($error) : ?> + <div class="alert alert-danger"> + <?= $error ?> + </div> <?php endif ?> <h2 class="wt-page-title"> - <?= I18N::translate('Welcome to this genealogy website') ?> + <?= I18N::translate('Welcome to this genealogy website') ?> </h2> <p> - <?= nl2br($welcome, false) ?> + <?= nl2br($welcome, false) ?> </p> <form action="<?= e(route('login')) ?>" class="wt-page-options wt-page-options-login" method="post"> - <?= csrf_field() ?> - <input type="hidden" name="url" value="<?= e($url) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="url" value="<?= e($url) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> - <?= I18N::translate('Username') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="text" id="username" name="username" required value="<?= e($username) ?>"> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> + <?= I18N::translate('Username') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="text" id="username" name="username" required value="<?= e($username) ?>"> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> - <?= I18N::translate('Password') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input autocomplete="current-password" class="form-control" id="password" name="password" required type="password"> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> + <?= I18N::translate('Password') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input autocomplete="current-password" class="form-control" id="password" name="password" required type="password"> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button class="btn btn-primary" type="submit"> - <?= /* I18N: A button label. */ I18N::translate('sign in') ?> - </button> - <!-- - Emails are sent from a TREE, not from a SITE. Therefore if there is no - tree available (initial setup or all trees private), then we can't send email. - --> - <?php if ($tree): ?> - <a class="btn btn-link" href="<?= e(route('forgot-password')) ?>"> - <?= I18N::translate('Forgot password?') ?> - </a> + <div class="form-group row"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button class="btn btn-primary" type="submit"> + <?= /* I18N: A button label. */ I18N::translate('sign in') ?> + </button> + <!-- + Emails are sent from a TREE, not from a SITE. Therefore if there is no + tree available (initial setup or all trees private), then we can't send email. + --> + <?php if ($tree) : ?> + <a class="btn btn-link" href="<?= e(route('forgot-password')) ?>"> + <?= I18N::translate('Forgot password?') ?> + </a> - <?php if ($can_register): ?> - <a class="btn btn-link" href="<?= e(route('register')) ?>"> - <?= I18N::translate('Request a new user account') ?> - </a> - <?php endif ?> - <?php endif ?> - </div> - </div> + <?php if ($can_register) : ?> + <a class="btn btn-link" href="<?= e(route('register')) ?>"> + <?= I18N::translate('Request a new user account') ?> + </a> + <?php endif ?> + <?php endif ?> + </div> + </div> </form> diff --git a/resources/views/media-list-page.php b/resources/views/media-list-page.php index 0fac106b07..679172b50c 100644 --- a/resources/views/media-list-page.php +++ b/resources/views/media-list-page.php @@ -8,202 +8,202 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-media-list d-print-none"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="route" value="media-list"> - <input type="hidden" name="action" value="1"> - <input type="hidden" name="search" value="yes"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="media-list"> + <input type="hidden" name="action" value="1"> + <input type="hidden" name="search" value="yes"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="folder"> - <?= I18N::translate('Folder') ?> - </label> - <div class="col-sm-3 wt-page-options-value"> - <?= Bootstrap4::select($folders, $folder, ['id' => 'folder', 'name' => 'folder']) ?> - <?= Bootstrap4::checkbox(/* I18N: Label for check-box */ I18N::translate('Include subfolders'), true, ['name' => 'subdirs', 'checked' => ($subdirs === '1')]) ?> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="folder"> + <?= I18N::translate('Folder') ?> + </label> + <div class="col-sm-3 wt-page-options-value"> + <?= Bootstrap4::select($folders, $folder, ['id' => 'folder', 'name' => 'folder']) ?> + <?= Bootstrap4::checkbox(/* I18N: Label for check-box */ I18N::translate('Include subfolders'), true, ['name' => 'subdirs', 'checked' => ($subdirs === '1')]) ?> + </div> - <label class="col-sm-3 col-form-label wt-page-options-label" for="max"> - <?= I18N::translate('Media objects per page') ?> - </label> - <div class="col-sm-3 wt-page-options-value"> - <?= Bootstrap4::select(FunctionsEdit::numericOptions([10, 20, 30, 40, 50, 75, 100, 150, 200]), $max, ['id' => 'max', 'name' => 'max']) ?> - </div> - </div> + <label class="col-sm-3 col-form-label wt-page-options-label" for="max"> + <?= I18N::translate('Media objects per page') ?> + </label> + <div class="col-sm-3 wt-page-options-value"> + <?= Bootstrap4::select(FunctionsEdit::numericOptions([10, 20, 30, 40, 50, 75, 100, 150, 200]), $max, ['id' => 'max', 'name' => 'max']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="form-type"> - <?= I18N::translate('Type') ?> - </label> - <div class="col-sm-3 wt-page-options-value"> - <?= Bootstrap4::select(['' => ''] + $formats, $form_type, ['id' => 'form-type', 'name' => 'form_type']) ?> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="form-type"> + <?= I18N::translate('Type') ?> + </label> + <div class="col-sm-3 wt-page-options-value"> + <?= Bootstrap4::select(['' => ''] + $formats, $form_type, ['id' => 'form-type', 'name' => 'form_type']) ?> + </div> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> - <div class="col-sm-3 wt-page-options-value"> - </div> - </div> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> + <div class="col-sm-3 wt-page-options-value"> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="filter"> - <?= I18N::translate('Search filters') ?> - </label> - <div class="col-sm-3 wt-page-options-value"> - <input type="text" class="form-control" name="filter" id="filter" value="<?= e($filter) ?>"> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="filter"> + <?= I18N::translate('Search filters') ?> + </label> + <div class="col-sm-3 wt-page-options-value"> + <input type="text" class="form-control" name="filter" id="filter" value="<?= e($filter) ?>"> + </div> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> - <div class="col-sm-3 wt-page-options-value"> - <button type="submit" name="action" value="1" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('search') ?> - </button> - <a class="btn btn-secondary" href="<?= e(route('media-list', ['ged' => $tree->getName()])) ?>"> - <?= /* I18N: A button label. */ I18N::translate('reset') ?> - </a> - </div> - </div> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> + <div class="col-sm-3 wt-page-options-value"> + <button type="submit" name="action" value="1" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('search') ?> + </button> + <a class="btn btn-secondary" href="<?= e(route('media-list', ['ged' => $tree->getName()])) ?>"> + <?= /* I18N: A button label. */ I18N::translate('reset') ?> + </a> + </div> + </div> </form> <div class="wt-page-content"> - <?php if (!empty($media_objects)): ?> - <p class="text-center mt-4"><?= I18N::translate('Media objects found') ?> <?= I18N::number($count) ?></p> + <?php if (!empty($media_objects)) : ?> + <p class="text-center mt-4"><?= I18N::translate('Media objects found') ?> <?= I18N::number($count) ?></p> - <div class="row text-center"> - <div class="col"> - <?php if ($page > 1): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => 1])) ?>"> - <?= I18N::translate('first') ?> - </a> - <?php endif ?> - </div> - <div class="col"> - <?php if ($page > 1): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page - 1])) ?>"> - <?= I18N::translate('previous') ?> - </a> - <?php endif ?> - </div> - <div class="col"> - <?= I18N::translate('Page %s of %s', $page, $pages) ?> - </div> - <div class="col"> - <?php if ($page < $pages): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page + 1])) ?>"> - <?= I18N::translate('next') ?> - </a> - <?php endif ?> - </div> - <div class="col"> - <?php if ($page < $pages): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $pages])) ?>"> - <?= I18N::translate('last') ?> - </a> - <?php endif ?> - </div> - </div> + <div class="row text-center"> + <div class="col"> + <?php if ($page > 1) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => 1])) ?>"> + <?= I18N::translate('first') ?> + </a> + <?php endif ?> + </div> + <div class="col"> + <?php if ($page > 1) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page - 1])) ?>"> + <?= I18N::translate('previous') ?> + </a> + <?php endif ?> + </div> + <div class="col"> + <?= I18N::translate('Page %s of %s', $page, $pages) ?> + </div> + <div class="col"> + <?php if ($page < $pages) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page + 1])) ?>"> + <?= I18N::translate('next') ?> + </a> + <?php endif ?> + </div> + <div class="col"> + <?php if ($page < $pages) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $pages])) ?>"> + <?= I18N::translate('last') ?> + </a> + <?php endif ?> + </div> + </div> - <div class="card-deck row mb-4 mt-4"> - <?php foreach ($media_objects as $n => $media_object): ?> - <div class="col-xs-12 col-sm-6 col-lg-4 d-flex"> - <div class="card mb-4"> - <div class="card-header"> - <h4 class="card-title"> - <a href="<?= e($media_object->url()) ?>"><?= $media_object->getFullName() ?></a> - </h4> - </div> - <div class="card-body"> - <?php foreach ($media_object->mediaFiles() as $media_file): ?> - <?= $media_file->displayImage(300, 200, 'contain', ['class' => 'img-fluid']) ?> - <?php endforeach ?> + <div class="card-deck row mb-4 mt-4"> + <?php foreach ($media_objects as $n => $media_object) : ?> + <div class="col-xs-12 col-sm-6 col-lg-4 d-flex"> + <div class="card mb-4"> + <div class="card-header"> + <h4 class="card-title"> + <a href="<?= e($media_object->url()) ?>"><?= $media_object->getFullName() ?></a> + </h4> + </div> + <div class="card-body"> + <?php foreach ($media_object->mediaFiles() as $media_file) : ?> + <?= $media_file->displayImage(300, 200, 'contain', ['class' => 'img-fluid']) ?> + <?php endforeach ?> - <p class="card-text"> - <?php - // Show file details - $mediatype = $media_file->type(); - if ($mediatype) { - echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype)); - } - echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1); - echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1); - if ($media_file->isExternal()) { - echo GedcomTag::getLabelValue('URL', $media_file->filename()); - } elseif ($media_file->fileExists()) { - ?> - <button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#details-<?= e($n) ?>" aria-expanded="false" aria-controls="details-<?= e($n) ?>"> - <?= I18N::translate('Media file') ?> - </button> - <div class="collapse" id="details-<?= e($n) ?>"> - <?php - if (Auth::isEditor($tree)) { - echo GedcomTag::getLabelValue('FILE', $media_file->filename()); - } - echo GedcomTag::getLabelValue('FORM', $media_file->mimeType()); - foreach ($media_file->attributes() as $tag => $value) { - echo GedcomTag::getLabelValue($tag, $value); - } - ?> - </div> - <?php - } else { - echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>'; - } - ?> - </p> - </div> - <div class="card-footer"> - <?php - foreach ($media_object->linkedIndividuals('OBJE') as $individual) { - echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>'; - } - foreach ($media_object->linkedFamilies('OBJE') as $family) { - echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>'; - } - foreach ($media_object->linkedSources('OBJE') as $source) { - echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>'; - } ?> - </div> - </div> - </div> - <?php endforeach ?> - </div> + <p class="card-text"> + <?php + // Show file details + $mediatype = $media_file->type(); + if ($mediatype) { + echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype)); + } + echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1); + echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1); + if ($media_file->isExternal()) { + echo GedcomTag::getLabelValue('URL', $media_file->filename()); + } elseif ($media_file->fileExists()) { + ?> + <button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#details-<?= e($n) ?>" aria-expanded="false" aria-controls="details-<?= e($n) ?>"> + <?= I18N::translate('Media file') ?> + </button> + <div class="collapse" id="details-<?= e($n) ?>"> + <?php + if (Auth::isEditor($tree)) { + echo GedcomTag::getLabelValue('FILE', $media_file->filename()); + } + echo GedcomTag::getLabelValue('FORM', $media_file->mimeType()); + foreach ($media_file->attributes() as $tag => $value) { + echo GedcomTag::getLabelValue($tag, $value); + } + ?> + </div> + <?php + } else { + echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>'; + } + ?> + </p> + </div> + <div class="card-footer"> + <?php + foreach ($media_object->linkedIndividuals('OBJE') as $individual) { + echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>'; + } + foreach ($media_object->linkedFamilies('OBJE') as $family) { + echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>'; + } + foreach ($media_object->linkedSources('OBJE') as $source) { + echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>'; + } ?> + </div> + </div> + </div> + <?php endforeach ?> + </div> - <div class="row text-center"> - <div class="col"> - <?php if ($page > 1): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => 1])) ?>"> - <?= I18N::translate('first') ?> - </a> - <?php endif ?> - </div> - <div class="col"> - <?php if ($page > 1): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page - 1])) ?>"> - <?= I18N::translate('previous') ?> - </a> - <?php endif ?> - </div> - <div class="col"> - <?= I18N::translate('Page %s of %s', $page, $pages) ?> - </div> - <div class="col"> - <?php if ($page < $pages): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page + 1])) ?>"> - <?= I18N::translate('next') ?> - </a> - <?php endif ?> - </div> - <div class="col"> - <?php if ($page < $pages): ?> - <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $pages])) ?>"> - <?= I18N::translate('last') ?> - </a> - <?php endif ?> - </div> - </div> - <?php endif ?> + <div class="row text-center"> + <div class="col"> + <?php if ($page > 1) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => 1])) ?>"> + <?= I18N::translate('first') ?> + </a> + <?php endif ?> + </div> + <div class="col"> + <?php if ($page > 1) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page - 1])) ?>"> + <?= I18N::translate('previous') ?> + </a> + <?php endif ?> + </div> + <div class="col"> + <?= I18N::translate('Page %s of %s', $page, $pages) ?> + </div> + <div class="col"> + <?php if ($page < $pages) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $page + 1])) ?>"> + <?= I18N::translate('next') ?> + </a> + <?php endif ?> + </div> + <div class="col"> + <?php if ($page < $pages) : ?> + <a href="<?= e(route('media-list', ['ged' => $tree->getName(), 'action' => '1', 'folder' => $folder, 'subdirs' => $subdirs, 'filter' => $filter, 'form_type' => $form_type, 'max' => $max, 'page' => $pages])) ?>"> + <?= I18N::translate('last') ?> + </a> + <?php endif ?> + </div> + </div> + <?php endif ?> </div> diff --git a/resources/views/media-page-menu.php b/resources/views/media-page-menu.php index 361bfb34cb..0094231fec 100644 --- a/resources/views/media-page-menu.php +++ b/resources/views/media-page-menu.php @@ -4,40 +4,40 @@ <?php use Fisharebest\Webtrees\Module; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <?php if (false && Module::getModuleByName('GEDFact_assistant')): ?> - <a class="dropdown-item menu-obje-link" href="#" onclick="return ilinkitem('<?= e($record->getXref()) ?>','manage','<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Manage the links') ?> - </a> - <?php else: ?> - <a class="dropdown-item menu-obje-link" href="#" data-href="<?= e(route('link-media-to-individual', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Link this media object to an individual') ?> - </a> + <?php if (false && Module::getModuleByName('GEDFact_assistant')) : ?> + <a class="dropdown-item menu-obje-link" href="#" onclick="return ilinkitem('<?= e($record->getXref()) ?>','manage','<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Manage the links') ?> + </a> + <?php else : ?> + <a class="dropdown-item menu-obje-link" href="#" data-href="<?= e(route('link-media-to-individual', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Link this media object to an individual') ?> + </a> - <a class="dropdown-item menu-obje-link" href="#" data-href="<?= e(route('link-media-to-family', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Link this media object to a family') ?> - </a> + <a class="dropdown-item menu-obje-link" href="#" data-href="<?= e(route('link-media-to-family', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Link this media object to a family') ?> + </a> - <a class="dropdown-item menu-obje-link" href="#" data-href="<?= e(route('link-media-to-source', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Link this media object to a source') ?> - </a> - <?php endif ?> + <a class="dropdown-item menu-obje-link" href="#" data-href="<?= e(route('link-media-to-source', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Link this media object to a source') ?> + </a> + <?php endif ?> - <a class="dropdown-item menu-obje-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <a class="dropdown-item menu-obje-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-obje-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-obje-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> diff --git a/resources/views/media-page.php b/resources/views/media-page.php index 6aa0f1a48b..f9458eeea9 100644 --- a/resources/views/media-page.php +++ b/resources/views/media-page.php @@ -6,175 +6,175 @@ <?php use Fisharebest\Webtrees\GedcomTag; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($media->isPendingDeletion()): ?> - <?php if (Auth::isModerator($media->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($media->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This media object has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> -<?php elseif ($media->isPendingAddition()): ?> - <?php if (Auth::isModerator($media->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($media->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This media object has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> +<?php if ($media->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($media->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($media->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This media object has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> +<?php elseif ($media->isPendingAddition()) : ?> + <?php if (Auth::isModerator($media->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($media->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This media object has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> <?php endif ?> <div class="d-flex mb-4"> - <h2 class="wt-page-title mx-auto"> - <?= $media->getFullName() ?> - </h2> - <?php if ($media->canEdit() && !$media->isPendingDeletion()): ?> - <?= view('media-page-menu', ['record' => $media]) ?> - <?php endif ?> + <h2 class="wt-page-title mx-auto"> + <?= $media->getFullName() ?> + </h2> + <?php if ($media->canEdit() && !$media->isPendingDeletion()) : ?> + <?= view('media-page-menu', ['record' => $media]) ?> + <?php endif ?> </div> <div class="wt-page-content"> - <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> - <?= I18N::translate('Details') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> - <?= I18N::translate('Individuals') ?> - <?= Bootstrap4::badgeCount($individuals) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> - <?= I18N::translate('Families') ?> - <?= Bootstrap4::badgeCount($families) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> - <?= I18N::translate('Sources') ?> - <?= Bootstrap4::badgeCount($sources) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> - <?= I18N::translate('Notes') ?> - <?= Bootstrap4::badgeCount($notes) ?> - </a> - </li> - </ul> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> + <?= I18N::translate('Details') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> + <?= I18N::translate('Individuals') ?> + <?= Bootstrap4::badgeCount($individuals) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> + <?= I18N::translate('Families') ?> + <?= Bootstrap4::badgeCount($families) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> + <?= I18N::translate('Sources') ?> + <?= Bootstrap4::badgeCount($sources) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> + <?= I18N::translate('Notes') ?> + <?= Bootstrap4::badgeCount($notes) ?> + </a> + </li> + </ul> - <div class="tab-content mt-4"> - <div class="tab-pane active fade show" role="tabpanel" id="details"> - <table class="table wt-facts-table"> - <?php foreach ($media->mediaFiles() as $media_file): ?> - <tr class="<?= $media_file->isPendingAddition() ? 'new' : '' ?><?= $media_file->isPendingDeletion() ? 'old' : '' ?>"> - <th scope="row"> - <?= I18N::translate('Media file') ?> - <?php if ($media->canEdit()): ?> - <div class="editfacts"> - <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => '#', 'data-toggle' => 'modal', 'data-target' => '#wt-ajax-modal', 'data-href' => route('edit-media-file', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact_id' => $media_file->factId()])]) ?> - <?php if (count($media->mediaFiles()) > 1): ?> - <?= FontAwesome::linkIcon('delete', I18N::translate('Delete'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return delete_fact("' . I18N::translate('Are you sure you want to delete this fact?') . '", "' . e($media->getTree()->getName()) . '", , "' . e($media->getXref()) . '", "' . $media_file->factId() . '");']) ?> - <?php endif ?> - </div> - <?php endif ?> - </th> - <td class="d-flex justify-content-between"> - <div> - <?php if ($media_file->isExternal()): ?> - <?= GedcomTag::getLabelValue('URL', $media_file->filename()) ?> - <?php elseif (Auth::isEditor($media->getTree())): ?> - <?= GedcomTag::getLabelValue('FILE', $media_file->filename()) ?> - <?php if ($media_file->fileExists()): ?> - <?php if ($media->getTree()->getPreference('SHOW_MEDIA_DOWNLOAD') >= Auth::accessLevel($media->getTree())): ?> - — <a href="<?= $media_file->imageUrl(0, 0, '') ?>"> - <?= I18N::translate('Download file') ?> - </a> - <?php endif ?> - <?php elseif (!$media_file->isExternal()): ?> - <p class="alert alert-danger"> - <?= I18N::translate('The file “%s” does not exist.', $media_file->filename()) ?> - </p> - <?php endif ?> - <?php endif ?> - <?= GedcomTag::getLabelValue('TITL', $media_file->title()) ?> - <?= GedcomTag::getLabelValue('TYPE', $media_file->type()) ?> - <?= GedcomTag::getLabelValue('FORM', $media_file->format()) ?> - </div> - <div> - <?php if (!$media_file->isExternal()): ?> - <?= $media_file->displayImage(200, 150, 'contain', []) ?> - <?php endif ?> - </div> - </td> - </tr> - <?php endforeach ?> - <?php foreach ($facts as $fact): ?> - <?php if ($fact->getTag() !== 'FILE'): ?> - <?php FunctionsPrintFacts::printFact($fact, $media) ?> - <?php endif ?> - <?php endforeach ?> - <?php if ($media->canEdit()): ?> - <?php FunctionsPrint::printAddNewFact($media, $facts, 'OBJE') ?> - <tr> - <th> - <?= I18N::translate('Source') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact' => 'SOUR'])) ?>"> - <?= I18N::translate('Add a source citation') ?> - </a> - </td> - </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Shared note') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact' => 'SHARED_NOTE'])) ?>"> - <?= I18N::translate('Add a shared note') ?> - </a> - </td> - </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Restriction') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact' => 'RESN'])) ?>"> - <?= I18N::translate('Add a restriction') ?> - </a> - </td> - </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Media file') ?> - </th> - <td> - <a href="#" data-href="<?= e(route('add-media-file', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> - <?= I18N::translate('Add a media file') ?> - </a> - </td> - </tr> - <?php endif ?> - </table> - </div> + <div class="tab-content mt-4"> + <div class="tab-pane active fade show" role="tabpanel" id="details"> + <table class="table wt-facts-table"> + <?php foreach ($media->mediaFiles() as $media_file) : ?> + <tr class="<?= $media_file->isPendingAddition() ? 'new' : '' ?><?= $media_file->isPendingDeletion() ? 'old' : '' ?>"> + <th scope="row"> + <?= I18N::translate('Media file') ?> + <?php if ($media->canEdit()) : ?> + <div class="editfacts"> + <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => '#', 'data-toggle' => 'modal', 'data-target' => '#wt-ajax-modal', 'data-href' => route('edit-media-file', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact_id' => $media_file->factId()])]) ?> + <?php if (count($media->mediaFiles()) > 1) : ?> + <?= FontAwesome::linkIcon('delete', I18N::translate('Delete'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return delete_fact("' . I18N::translate('Are you sure you want to delete this fact?') . '", "' . e($media->getTree()->getName()) . '", , "' . e($media->getXref()) . '", "' . $media_file->factId() . '");']) ?> + <?php endif ?> + </div> + <?php endif ?> + </th> + <td class="d-flex justify-content-between"> + <div> + <?php if ($media_file->isExternal()) : ?> + <?= GedcomTag::getLabelValue('URL', $media_file->filename()) ?> + <?php elseif (Auth::isEditor($media->getTree())) : ?> + <?= GedcomTag::getLabelValue('FILE', $media_file->filename()) ?> + <?php if ($media_file->fileExists()) : ?> + <?php if ($media->getTree()->getPreference('SHOW_MEDIA_DOWNLOAD') >= Auth::accessLevel($media->getTree())) : ?> + — <a href="<?= $media_file->imageUrl(0, 0, '') ?>"> + <?= I18N::translate('Download file') ?> + </a> + <?php endif ?> + <?php elseif (!$media_file->isExternal()) : ?> + <p class="alert alert-danger"> + <?= I18N::translate('The file “%s” does not exist.', $media_file->filename()) ?> + </p> + <?php endif ?> + <?php endif ?> + <?= GedcomTag::getLabelValue('TITL', $media_file->title()) ?> + <?= GedcomTag::getLabelValue('TYPE', $media_file->type()) ?> + <?= GedcomTag::getLabelValue('FORM', $media_file->format()) ?> + </div> + <div> + <?php if (!$media_file->isExternal()) : ?> + <?= $media_file->displayImage(200, 150, 'contain', []) ?> + <?php endif ?> + </div> + </td> + </tr> + <?php endforeach ?> + <?php foreach ($facts as $fact) : ?> + <?php if ($fact->getTag() !== 'FILE') : ?> + <?php FunctionsPrintFacts::printFact($fact, $media) ?> + <?php endif ?> + <?php endforeach ?> + <?php if ($media->canEdit()) : ?> + <?php FunctionsPrint::printAddNewFact($media, $facts, 'OBJE') ?> + <tr> + <th> + <?= I18N::translate('Source') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact' => 'SOUR'])) ?>"> + <?= I18N::translate('Add a source citation') ?> + </a> + </td> + </tr> + <tr> + <th scope="row"> + <?= I18N::translate('Shared note') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact' => 'SHARED_NOTE'])) ?>"> + <?= I18N::translate('Add a shared note') ?> + </a> + </td> + </tr> + <tr> + <th scope="row"> + <?= I18N::translate('Restriction') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref(), 'fact' => 'RESN'])) ?>"> + <?= I18N::translate('Add a restriction') ?> + </a> + </td> + </tr> + <tr> + <th scope="row"> + <?= I18N::translate('Media file') ?> + </th> + <td> + <a href="#" data-href="<?= e(route('add-media-file', ['ged' => $media->getTree()->getName(), 'xref' => $media->getXref()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal"> + <?= I18N::translate('Add a media file') ?> + </a> + </td> + </tr> + <?php endif ?> + </table> + </div> - <div class="tab-pane fade" role="tabpanel" id="individuals"> - <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="individuals"> + <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="families"> - <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="families"> + <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="sources"> - <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="sources"> + <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="notes"> - <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> - </div> - </div> + <div class="tab-pane fade" role="tabpanel" id="notes"> + <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> + </div> + </div> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/message-page.php b/resources/views/message-page.php index 9019ebfeb5..f0c3613c9a 100644 --- a/resources/views/message-page.php +++ b/resources/views/message-page.php @@ -3,56 +3,56 @@ <h2><?= $title ?></h2> <form method="post" action="<?= e(route('message')) ?>"> - <?= csrf_field() ?> - <input type="hidden" name="url" value="<?= e($url) ?>"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="url" value="<?= e($url) ?>"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="from"> - <?= I18N::translate('From') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="from" type="text" value="<?= e($from->getRealName()) ?>" disabled> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="from"> + <?= I18N::translate('From') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="from" type="text" value="<?= e($from->getRealName()) ?>" disabled> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="to"> - <?= I18N::translate('To') ?> - </label> - <div class="col-sm-9"> - <input type="hidden" name="to" value="<?= e($to->getUserName()) ?>"> - <input class="form-control" id="to" type="text" value="<?= e($to->getRealName()) ?>" disabled> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="to"> + <?= I18N::translate('To') ?> + </label> + <div class="col-sm-9"> + <input type="hidden" name="to" value="<?= e($to->getUserName()) ?>"> + <input class="form-control" id="to" type="text" value="<?= e($to->getRealName()) ?>" disabled> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="subject"> - <?= I18N::translate('Subject') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="subject"> + <?= I18N::translate('Subject') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="body"> - <?= I18N::translate('Message') ?> - </label> - <div class="col-sm-9"> - <textarea class="form-control" id="body" rows="5" type="text" name="body" required><?= e($body) ?></textarea> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label" for="body"> + <?= I18N::translate('Message') ?> + </label> + <div class="col-sm-9"> + <textarea class="form-control" id="body" rows="5" type="text" name="body" required><?= e($body) ?></textarea> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 col-form-label"></div> - <div class="col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('Send') ?> - </button> - <a class="btn btn-link" href="<?= e($url) ?>"> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 col-form-label"></div> + <div class="col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('Send') ?> + </button> + <a class="btn btn-link" href="<?= e($url) ?>"> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/modals/add-media-file.php b/resources/views/modals/add-media-file.php index 532320d180..f2ddfe97ec 100644 --- a/resources/views/modals/add-media-file.php +++ b/resources/views/modals/add-media-file.php @@ -1,13 +1,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('add-media-file', ['xref' => $media->getXref(), 'ged' => $media->getTree()->getName()])) ?>" enctype="multipart/form-data" method="POST"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <?= view('modals/header', ['title' => I18N::translate('Add a media file')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Add a media file')]) ?> - <div class="modal-body"> - <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => $unused_files, 'media_file' => null]) ?> - </div> + <div class="modal-body"> + <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => $unused_files, 'media_file' => null]) ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> diff --git a/resources/views/modals/create-family.php b/resources/views/modals/create-family.php index d6412e2ce6..a5bf3ab994 100644 --- a/resources/views/modals/create-family.php +++ b/resources/views/modals/create-family.php @@ -3,42 +3,42 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?> <div class="modal wt-modal-create-record" id="modal-create-family"> - <form action="<?= e(route('create-family')) ?>" id="form-create-family"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="modal-dialog modal-lg" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <h3 class="modal-title"><?= I18N::translate('Create a family from existing individuals') ?></h3> - <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="modal-body"> - <div class="form-group"> - <label class="col-form-label" for="husband"> - <?= I18N::translate('Husband') ?> - </label> - <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'husband', 'name' => 'husband']) ?> - </div> - <div class="form-group"> - <label class="col-form-label" for="wife"> - <?= I18N::translate('Wife') ?> - </label> - <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'wife', 'name' => 'wife']) ?> - </div> - </div> - <div class="modal-footer"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= I18N::translate('save') ?> - </button> - <button type="button" class="btn btn-text" data-dismiss="modal"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('cancel') ?> - </button> - </div> - </div> - </div> - </form> + <form action="<?= e(route('create-family')) ?>" id="form-create-family"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="modal-dialog modal-lg" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h3 class="modal-title"><?= I18N::translate('Create a family from existing individuals') ?></h3> + <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> + </div> + <div class="modal-body"> + <div class="form-group"> + <label class="col-form-label" for="husband"> + <?= I18N::translate('Husband') ?> + </label> + <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'husband', 'name' => 'husband']) ?> + </div> + <div class="form-group"> + <label class="col-form-label" for="wife"> + <?= I18N::translate('Wife') ?> + </label> + <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'wife', 'name' => 'wife']) ?> + </div> + </div> + <div class="modal-footer"> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= I18N::translate('save') ?> + </button> + <button type="button" class="btn btn-text" data-dismiss="modal"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('cancel') ?> + </button> + </div> + </div> + </div> + </form> </div> diff --git a/resources/views/modals/create-media-from-file.php b/resources/views/modals/create-media-from-file.php index 6fb6cf2d2e..6feffebc6a 100644 --- a/resources/views/modals/create-media-from-file.php +++ b/resources/views/modals/create-media-from-file.php @@ -4,63 +4,63 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="modal" id="modal-create-media-from-file"> - <form action="<?= e(route('create-media-from-file')) ?>" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="action" value="create-media-object-from-file"> - <input type="hidden" name="ged" id="ged" value=""> - <div class="modal-dialog modal-lg" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <h3 class="modal-title"><?= I18N::translate('Create a media object') ?></h3> - <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="modal-body"> - <div class="form-group row"> - <label class="col-form-label col-sm-2" for="file"> - <?= I18N::translate('Media file') ?> - </label> - <div class="col-sm-10"> - <input type="text" class="form-control" id="file" name="file" value="" readonly> - </div> - </div> - <div class="form-group row"> - <label class="col-form-label col-sm-2" for="title"> - <?= I18N::translate('Title') ?> - </label> - <div class="col-sm-10"> - <input type="text" class="form-control" name="title" id="title"> - </div> - </div> - <div class="form-group row"> - <label class="col-form-label col-sm-2" for="type"> - <?= I18N::translate('Media type') ?> - </label> - <div class="col-sm-10"> - <?= Bootstrap4::select(['' => ''] + GedcomTag::getFileFormTypes(), '') ?> - </div> - </div> - <div class="form-group row"> - <label class="col-form-label col-sm-2" for="note"> - <?= I18N::translate('Note') ?> - </label> - <div class="col-sm-10"> - <textarea class="form-control" id="note" name="note"></textarea> - </div> - </div> - </div> - <div class="modal-footer"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= I18N::translate('save') ?> - </button> - <button type="button" class="btn btn-text" data-dismiss="modal"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('cancel') ?> - </button> - </div> - </div> - </div> - </form> + <form action="<?= e(route('create-media-from-file')) ?>" method="POST"> + <?= csrf_field() ?> + <input type="hidden" name="action" value="create-media-object-from-file"> + <input type="hidden" name="ged" id="ged" value=""> + <div class="modal-dialog modal-lg" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h3 class="modal-title"><?= I18N::translate('Create a media object') ?></h3> + <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> + </div> + <div class="modal-body"> + <div class="form-group row"> + <label class="col-form-label col-sm-2" for="file"> + <?= I18N::translate('Media file') ?> + </label> + <div class="col-sm-10"> + <input type="text" class="form-control" id="file" name="file" value="" readonly> + </div> + </div> + <div class="form-group row"> + <label class="col-form-label col-sm-2" for="title"> + <?= I18N::translate('Title') ?> + </label> + <div class="col-sm-10"> + <input type="text" class="form-control" name="title" id="title"> + </div> + </div> + <div class="form-group row"> + <label class="col-form-label col-sm-2" for="type"> + <?= I18N::translate('Media type') ?> + </label> + <div class="col-sm-10"> + <?= Bootstrap4::select(['' => ''] + GedcomTag::getFileFormTypes(), '') ?> + </div> + </div> + <div class="form-group row"> + <label class="col-form-label col-sm-2" for="note"> + <?= I18N::translate('Note') ?> + </label> + <div class="col-sm-10"> + <textarea class="form-control" id="note" name="note"></textarea> + </div> + </div> + </div> + <div class="modal-footer"> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= I18N::translate('save') ?> + </button> + <button type="button" class="btn btn-text" data-dismiss="modal"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('cancel') ?> + </button> + </div> + </div> + </div> + </form> </div> diff --git a/resources/views/modals/create-media-object.php b/resources/views/modals/create-media-object.php index 35f7c91324..06dade7474 100644 --- a/resources/views/modals/create-media-object.php +++ b/resources/views/modals/create-media-object.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('create-media-object')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Create a media object')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Create a media object')]) ?> - <div class="modal-body"> - <?= view('modals/media-object-fields', ['max_upload_size' => $max_upload_size, 'media_types' => $media_types, 'unused_files' => $unused_files]) ?> - </div> + <div class="modal-body"> + <?= view('modals/media-object-fields', ['max_upload_size' => $max_upload_size, 'media_types' => $media_types, 'unused_files' => $unused_files]) ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> <script> diff --git a/resources/views/modals/create-note-object.php b/resources/views/modals/create-note-object.php index 7e35e51085..968bcb93b7 100644 --- a/resources/views/modals/create-note-object.php +++ b/resources/views/modals/create-note-object.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('create-note-object')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Create a shared note')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Create a shared note')]) ?> - <div class="modal-body"> - <?= view('modals/note-object-fields') ?> - </div> + <div class="modal-body"> + <?= view('modals/note-object-fields') ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> <script> diff --git a/resources/views/modals/create-repository.php b/resources/views/modals/create-repository.php index 8283a6a9f2..5f6f21abf2 100644 --- a/resources/views/modals/create-repository.php +++ b/resources/views/modals/create-repository.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('create-repository')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Create a repository')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Create a repository')]) ?> - <div class="modal-body"> - <?= view('modals/repository-fields') ?> - </div> + <div class="modal-body"> + <?= view('modals/repository-fields') ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> <script> diff --git a/resources/views/modals/create-source.php b/resources/views/modals/create-source.php index 1d780365ee..387f1567b9 100644 --- a/resources/views/modals/create-source.php +++ b/resources/views/modals/create-source.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('create-source')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Create a source')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Create a source')]) ?> - <div class="modal-body"> - <?= view('modals/source-fields', ['tree' => $tree]) ?> - </div> + <div class="modal-body"> + <?= view('modals/source-fields', ['tree' => $tree]) ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> <script> diff --git a/resources/views/modals/create-submitter.php b/resources/views/modals/create-submitter.php index b221336774..8a7c8d9512 100644 --- a/resources/views/modals/create-submitter.php +++ b/resources/views/modals/create-submitter.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('create-submitter')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Create a submitter')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Create a submitter')]) ?> - <div class="modal-body"> - <?= view('modals/submitter-fields') ?> - </div> + <div class="modal-body"> + <?= view('modals/submitter-fields') ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> <script> diff --git a/resources/views/modals/edit-media-file.php b/resources/views/modals/edit-media-file.php index e466823036..7db7b7ade5 100644 --- a/resources/views/modals/edit-media-file.php +++ b/resources/views/modals/edit-media-file.php @@ -1,13 +1,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('edit-media-file', ['xref' => $media->getXref(), 'ged' => $media->getTree()->getName(), 'fact_id' => $media_file->factId()])) ?>" enctype="multipart/form-data" method="POST"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <?= view('modals/header', ['title' => I18N::translate('Edit a media file')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Edit a media file')]) ?> - <div class="modal-body"> - <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => [], 'media_file' => $media_file]) ?> - </div> + <div class="modal-body"> + <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => [], 'media_file' => $media_file]) ?> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> diff --git a/resources/views/modals/footer-close.php b/resources/views/modals/footer-close.php index 674cf3fa53..622dafb269 100644 --- a/resources/views/modals/footer-close.php +++ b/resources/views/modals/footer-close.php @@ -2,8 +2,8 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="modal-footer"> - <button type="button" class="btn btn-primary" data-dismiss="modal"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('close') ?> - </button> + <button type="button" class="btn btn-primary" data-dismiss="modal"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('close') ?> + </button> </div> diff --git a/resources/views/modals/footer-save-cancel.php b/resources/views/modals/footer-save-cancel.php index a7c1bd6332..b012f9593f 100644 --- a/resources/views/modals/footer-save-cancel.php +++ b/resources/views/modals/footer-save-cancel.php @@ -2,12 +2,12 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="modal-footer"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= I18N::translate('save') ?> - </button> - <button type="button" class="btn btn-secondary" data-dismiss="modal"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('cancel') ?> - </button> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= I18N::translate('save') ?> + </button> + <button type="button" class="btn btn-secondary" data-dismiss="modal"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('cancel') ?> + </button> </div> diff --git a/resources/views/modals/header.php b/resources/views/modals/header.php index 26b5ab2551..f14943ea00 100644 --- a/resources/views/modals/header.php +++ b/resources/views/modals/header.php @@ -1,10 +1,10 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="modal-header"> - <h3 class="modal-title" id="wt-ajax-modal-title"> - <?= $title ?> - </h3> - <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> - <span aria-hidden="true">×</span> - </button> + <h3 class="modal-title" id="wt-ajax-modal-title"> + <?= $title ?> + </h3> + <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> + <span aria-hidden="true">×</span> + </button> </div> diff --git a/resources/views/modals/link-media-to-family.php b/resources/views/modals/link-media-to-family.php index 094ef3e0c7..dea7f4463c 100644 --- a/resources/views/modals/link-media-to-family.php +++ b/resources/views/modals/link-media-to-family.php @@ -2,21 +2,21 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('link-media-to-record')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="xref" value="<?= e($media->getXref()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="xref" value="<?= e($media->getXref()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Link this media object to a family')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Link this media object to a family')]) ?> - <div class="modal-body"> - <div class="form-group"> - <label class="col-form-label" for="link"> - <?= I18N::translate('Family') ?> - </label> - <?= FunctionsEdit::formControlFamily($tree, null, ['id' => 'link', 'name' => 'link']) ?> - </div> - </div> + <div class="modal-body"> + <div class="form-group"> + <label class="col-form-label" for="link"> + <?= I18N::translate('Family') ?> + </label> + <?= FunctionsEdit::formControlFamily($tree, null, ['id' => 'link', 'name' => 'link']) ?> + </div> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> diff --git a/resources/views/modals/link-media-to-individual.php b/resources/views/modals/link-media-to-individual.php index 3c3482fc3b..9a99c61840 100644 --- a/resources/views/modals/link-media-to-individual.php +++ b/resources/views/modals/link-media-to-individual.php @@ -2,20 +2,20 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('link-media-to-record')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="xref" value="<?= e($media->getXref()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="xref" value="<?= e($media->getXref()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Link this media object to an individual')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Link this media object to an individual')]) ?> - <div class="modal-body"> - <div class="form-group"> - <label class="col-form-label" for="link"> - <?= I18N::translate('Individual') ?> - </label> - <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'link', 'name' => 'link']) ?> - </div> - </div> + <div class="modal-body"> + <div class="form-group"> + <label class="col-form-label" for="link"> + <?= I18N::translate('Individual') ?> + </label> + <?= FunctionsEdit::formControlIndividual($tree, null, ['id' => 'link', 'name' => 'link']) ?> + </div> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> diff --git a/resources/views/modals/link-media-to-source.php b/resources/views/modals/link-media-to-source.php index 9e3b3861c1..d0de9aa62b 100644 --- a/resources/views/modals/link-media-to-source.php +++ b/resources/views/modals/link-media-to-source.php @@ -2,21 +2,21 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form action="<?= e(route('link-media-to-record')) ?>" id="wt-modal-form" method="POST"> - <?= csrf_field() ?> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="xref" value="<?= e($media->getXref()) ?>"> + <?= csrf_field() ?> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="xref" value="<?= e($media->getXref()) ?>"> - <?= view('modals/header', ['title' => I18N::translate('Link this media object to a source')]) ?> + <?= view('modals/header', ['title' => I18N::translate('Link this media object to a source')]) ?> - <div class="modal-body"> - <div class="form-group"> - <label class="col-form-label" for="link"> - <?= I18N::translate('Source') ?> - </label> - <?= FunctionsEdit::formControlSource($tree, null, ['id' => 'link', 'name' => 'link']) ?> - </div> - </div> + <div class="modal-body"> + <div class="form-group"> + <label class="col-form-label" for="link"> + <?= I18N::translate('Source') ?> + </label> + <?= FunctionsEdit::formControlSource($tree, null, ['id' => 'link', 'name' => 'link']) ?> + </div> + </div> - <?= view('modals/footer-save-cancel') ?> + <?= view('modals/footer-save-cancel') ?> </form> diff --git a/resources/views/modals/media-file-fields.php b/resources/views/modals/media-file-fields.php index 33b182c400..82ba0c4f52 100644 --- a/resources/views/modals/media-file-fields.php +++ b/resources/views/modals/media-file-fields.php @@ -3,121 +3,121 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row <?= $media_file ? 'd-none' : '' ?>"> - <label class="col-form-label col-sm-2" for="file-location"> - <?= I18N::translate('Media file') ?> - </label> - <div class="col-sm-10"> - <select class="form-control" id="file-location" name="file_location"> - <option value="upload"> - <?= I18N::translate('A file on your computer') ?> - </option> - <?php if (!empty($unused_files)): ?> - <option value="unused"> - <?= I18N::translate('A file on the server') ?> - </option> - <?php endif ?> - <option value="url"> - <?= /* I18N: URL = web address */ I18N::translate('A URL') ?> - </option> - </select> - </div> + <label class="col-form-label col-sm-2" for="file-location"> + <?= I18N::translate('Media file') ?> + </label> + <div class="col-sm-10"> + <select class="form-control" id="file-location" name="file_location"> + <option value="upload"> + <?= I18N::translate('A file on your computer') ?> + </option> + <?php if (!empty($unused_files)) : ?> + <option value="unused"> + <?= I18N::translate('A file on the server') ?> + </option> + <?php endif ?> + <option value="url"> + <?= /* I18N: URL = web address */ I18N::translate('A URL') ?> + </option> + </select> + </div> </div> <div class="form-group row file-location file-location-upload <?= $media_file ? 'd-none' : '' ?>"> - <label class="col-form-label col-sm-2" for="file"> - <?= I18N::translate('A file on your computer') ?> - </label> - <div class="col-sm-10"> - <input class="form-control" id="file" name="file" type="file"> - <small class="text-muted"> - <?= I18N::translate('Maximum upload size: ') ?> - <?= $max_upload_size ?> - </small> - </div> + <label class="col-form-label col-sm-2" for="file"> + <?= I18N::translate('A file on your computer') ?> + </label> + <div class="col-sm-10"> + <input class="form-control" id="file" name="file" type="file"> + <small class="text-muted"> + <?= I18N::translate('Maximum upload size: ') ?> + <?= $max_upload_size ?> + </small> + </div> </div> <div class="form-group row file-location file-location-upload <?= $media_file && $media_file->isExternal() ? 'd-none' : '' ?>"> - <label class="col-form-label col-sm-2" for="folder"> - <?= I18N::translate('Filename on server') ?> - </label> - <div class="col-sm-10"> - <div class="row"> - <div class="col-sm-6"> - <div class="form-check"> - <label class="form-check-label"> - <input class="form-check-input" type="radio" name="auto" value="0" checked> - <!-- @TODO typeaheadjs.css doesn't work with input-group --> - <input class="form-control" id="folder" name="folder" placeholder="<?= I18N::translate('Folder') ?>" type="text" value="<?= e($media_file ? $media_file->dirname() : '') ?>" data-autocomplete-url="<?= e(route('autocomplete-folder', ['query' => 'QUERY'])) ?>"> - <div class="input-group"> - <div class="input-group-append"> - <span class="input-group-text">/</span> - </div> - </div> - </label> - </div> - </div> - <div class="col-sm-6"> - <input class="form-control" name="new_file" type="text" placeholder="<?= I18N::translate('Same as uploaded file') ?>" value="<?= e($media_file ? $media_file->basename() : '') ?>"> - </div> - </div> - <p class="small text-muted"> - <?= I18N::translate('If you have a large number of media files, you can organize them into folders and subfolders.') ?> - </p> - <div class="form-check"> - <label class="form-check-label"> - <input class="form-check-input" type="radio" name="auto" value="1"> - <?= I18N::translate('Create a unique filename') ?> - </label> - </div> - </div> + <label class="col-form-label col-sm-2" for="folder"> + <?= I18N::translate('Filename on server') ?> + </label> + <div class="col-sm-10"> + <div class="row"> + <div class="col-sm-6"> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" type="radio" name="auto" value="0" checked> + <!-- @TODO typeaheadjs.css doesn't work with input-group --> + <input class="form-control" id="folder" name="folder" placeholder="<?= I18N::translate('Folder') ?>" type="text" value="<?= e($media_file ? $media_file->dirname() : '') ?>" data-autocomplete-url="<?= e(route('autocomplete-folder', ['query' => 'QUERY'])) ?>"> + <div class="input-group"> + <div class="input-group-append"> + <span class="input-group-text">/</span> + </div> + </div> + </label> + </div> + </div> + <div class="col-sm-6"> + <input class="form-control" name="new_file" type="text" placeholder="<?= I18N::translate('Same as uploaded file') ?>" value="<?= e($media_file ? $media_file->basename() : '') ?>"> + </div> + </div> + <p class="small text-muted"> + <?= I18N::translate('If you have a large number of media files, you can organize them into folders and subfolders.') ?> + </p> + <div class="form-check"> + <label class="form-check-label"> + <input class="form-check-input" type="radio" name="auto" value="1"> + <?= I18N::translate('Create a unique filename') ?> + </label> + </div> + </div> </div> <div class="form-group row file-location file-location-unused d-none"> - <label class="col-form-label col-sm-2" for="unused"> - <?= I18N::translate('A file on the server') ?> - </label> - <div class="col-sm-10"> - <?= Bootstrap4::select($unused_files, '', ['id' => 'unused', 'name' => 'unused']) ?> - <small class="text-muted"> - </small> - </div> + <label class="col-form-label col-sm-2" for="unused"> + <?= I18N::translate('A file on the server') ?> + </label> + <div class="col-sm-10"> + <?= Bootstrap4::select($unused_files, '', ['id' => 'unused', 'name' => 'unused']) ?> + <small class="text-muted"> + </small> + </div> </div> <div class="form-group row file-location file-location-url <?= $media_file && $media_file->isExternal() ? '' : 'd-none' ?>"> - <label class="col-form-label col-sm-2" for="remote"> - <?= I18N::translate('URL') ?> - </label> - <div class="col-sm-10"> - <input class="form-control" type="url" id="remote" name="remote" placeholder="https://www.example.com/photo.jpeg" value="<?= e($media_file && $media_file->isExternal() ? $media_file->filename() : '') ?>"> - <small class="text-muted"> - <?= \Fisharebest\Webtrees\FontAwesome::semanticIcon('warning', I18N::translate('Caution!')) ?> - <?= I18N::translate('The GEDCOM standard does not allow URLs in media objects.') ?> - <?= I18N::translate('Other genealogy applications might not recognize this data.') ?> - </small> - </div> + <label class="col-form-label col-sm-2" for="remote"> + <?= I18N::translate('URL') ?> + </label> + <div class="col-sm-10"> + <input class="form-control" type="url" id="remote" name="remote" placeholder="https://www.example.com/photo.jpeg" value="<?= e($media_file && $media_file->isExternal() ? $media_file->filename() : '') ?>"> + <small class="text-muted"> + <?= \Fisharebest\Webtrees\FontAwesome::semanticIcon('warning', I18N::translate('Caution!')) ?> + <?= I18N::translate('The GEDCOM standard does not allow URLs in media objects.') ?> + <?= I18N::translate('Other genealogy applications might not recognize this data.') ?> + </small> + </div> </div> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="title"> - <?= I18N::translate('Title') ?> - </label> - <div class="col-sm-10"> - <input class="form-control" id="title" name="title" type="text" value="<?= e($media_file ? $media_file->title() : '') ?>"> - </div> + <label class="col-form-label col-sm-2" for="title"> + <?= I18N::translate('Title') ?> + </label> + <div class="col-sm-10"> + <input class="form-control" id="title" name="title" type="text" value="<?= e($media_file ? $media_file->title() : '') ?>"> + </div> </div> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="type"> - <?= I18N::translate('Media type') ?> - </label> - <div class="col-sm-10"> - <?= Bootstrap4::select(['' => ''] + GedcomTag::getFileFormTypes(), $media_file ? $media_file->type() : '', ['id' => 'type', 'name' => 'type']) ?> - </div> + <label class="col-form-label col-sm-2" for="type"> + <?= I18N::translate('Media type') ?> + </label> + <div class="col-sm-10"> + <?= Bootstrap4::select(['' => ''] + GedcomTag::getFileFormTypes(), $media_file ? $media_file->type() : '', ['id' => 'type', 'name' => 'type']) ?> + </div> </div> <script> - autocomplete('#folder'); - document.getElementById('file-location').addEventListener('change', function () { + autocomplete('#folder'); + document.getElementById('file-location').addEventListener('change', function () { $('.file-location').addClass('d-none'); $('.file-location-' + $(this).val()).removeClass('d-none'); }); diff --git a/resources/views/modals/media-object-fields.php b/resources/views/modals/media-object-fields.php index 7867ecbefe..1f7ed9d134 100644 --- a/resources/views/modals/media-object-fields.php +++ b/resources/views/modals/media-object-fields.php @@ -3,12 +3,12 @@ <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => $unused_files, 'media_file' => null]) ?> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="media-note"> - <?= I18N::translate('Note') ?> - </label> - <div class="col-sm-10"> - <textarea class="form-control" id="media-note" name="media-note"></textarea> - </div> + <label class="col-form-label col-sm-2" for="media-note"> + <?= I18N::translate('Note') ?> + </label> + <div class="col-sm-10"> + <textarea class="form-control" id="media-note" name="media-note"></textarea> + </div> </div> <?= view('modals/restriction-fields') ?> diff --git a/resources/views/modals/note-object-fields.php b/resources/views/modals/note-object-fields.php index 1b4a492b57..82b11e9f90 100644 --- a/resources/views/modals/note-object-fields.php +++ b/resources/views/modals/note-object-fields.php @@ -1,10 +1,10 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group"> - <label class="col-form-label" for="note"> - <?= I18N::translate('Note') ?> - </label> - <textarea class="form-control" id="note" name="note" required rows="5"></textarea> + <label class="col-form-label" for="note"> + <?= I18N::translate('Note') ?> + </label> + <textarea class="form-control" id="note" name="note" required rows="5"></textarea> </div> <?= view('modals/restriction-fields') ?> diff --git a/resources/views/modals/on-screen-keyboard.php b/resources/views/modals/on-screen-keyboard.php index 2e40f2d9b1..4e858cafa7 100644 --- a/resources/views/modals/on-screen-keyboard.php +++ b/resources/views/modals/on-screen-keyboard.php @@ -1,303 +1,303 @@ <?php use Fisharebest\Webtrees\FontAwesome; ?> <?php use Fisharebest\Webtrees\I18N; ?> <div class="card wt-osk"> - <div class="card-header"> - <div class="card-title"> - <button type="button" class="btn btn-primary wt-osk-close">×</button> + <div class="card-header"> + <div class="card-title"> + <button type="button" class="btn btn-primary wt-osk-close">×</button> - <button type="button" class="btn btn-secondary wt-osk-pin-button" data-toggle="button" aria-pressed="false"><?= FontAwesome::semanticIcon('pin', I18N::translate('Keep open')) ?></button> + <button type="button" class="btn btn-secondary wt-osk-pin-button" data-toggle="button" aria-pressed="false"><?= FontAwesome::semanticIcon('pin', I18N::translate('Keep open')) ?></button> - <button type="button" class="btn btn-secondary wt-osk-shift-button" data-toggle="button" aria-pressed="false">a ↔ A</button> + <button type="button" class="btn btn-secondary wt-osk-shift-button" data-toggle="button" aria-pressed="false">a ↔ A</button> - <div class="btn-group" role="group" data-toggle="buttons"> - <button class="btn btn-secondary active" dir="ltr"> - <input type="radio" class="wt-osk-script-button" checked autocomplete="off" data-script="latn" name="osk-script"> Abcd - </button> - <button class="btn btn-secondary" dir="ltr"> - <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="cyrl" name="osk-script"> Абгд - </button> - <button class="btn btn-secondary" dir="ltr"> - <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="grek" name="osk-script"> Αβγδ - </button> - <button class="btn btn-secondary" dir="rtl"> - <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="arab" name="osk-script"> ابةت - </button> - <button class="btn btn-secondary" dir="rtl"> - <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="hebr" name="osk-script"> אבגד - </button> - </div> - </div> - </div> - <div class="card-body wt-osk-keys"> - <!-- Quotation marks --> - <div class="wt-osk-group"> - <span class="wt-osk-key">‘<sup class="wt-osk-key-shift">“</sup></span> - <span class="wt-osk-key">’<sup class="wt-osk-key-shift">”</sup></span> - <span class="wt-osk-key">‹<sup class="wt-osk-key-shift">“</sup></span> - <span class="wt-osk-key">›<sup class="wt-osk-key-shift">»</sup></span> - <span class="wt-osk-key">‚<sup class="wt-osk-key-shift">„</sup></span> - <span class="wt-osk-key">′<sup class="wt-osk-key-shift">″</sup></span> - </div> - <!-- Symbols and punctuation --> - <div class="wt-osk-group"> - <span class="wt-osk-key">©</span> - <span class="wt-osk-key">°</span> - <span class="wt-osk-key">…</span> - <span class="wt-osk-key">·<sup class="wt-osk-key-shift">•</sup></span> - <span class="wt-osk-key">–<sup class="wt-osk-key-shift">—</sup></span> - <span class="wt-osk-key">†<sup class="wt-osk-key-shift">‡</sup></span> - <span class="wt-osk-key">§<sup class="wt-osk-key-shift">¶</sup></span> - <span class="wt-osk-key">¿<sup class="wt-osk-key-shift">¡</sup></span> - </div> - <!-- Letter A with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">à<sup class="wt-osk-key-shift">À</sup></span> - <span class="wt-osk-key">á<sup class="wt-osk-key-shift">Á</sup></span> - <span class="wt-osk-key">â<sup class="wt-osk-key-shift">Â</sup></span> - <span class="wt-osk-key">ã<sup class="wt-osk-key-shift">Ã</sup></span> - <span class="wt-osk-key">å<sup class="wt-osk-key-shift">Å</sup></span> - <span class="wt-osk-key">ą<sup class="wt-osk-key-shift">Ą</sup></span> - <span class="wt-osk-key">æ<sup class="wt-osk-key-shift">Æ</sup></span> - <span class="wt-osk-key">ª</span> - </div> - <!-- Letter C with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ç<sup class="wt-osk-key-shift">Ç</sup></span> - <span class="wt-osk-key">č<sup class="wt-osk-key-shift">Č</sup></span> - </div> - <!-- Letter D with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">Ď<sup class="wt-osk-key-shift">Ď</sup></span> - </div> - <!-- Letter E with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">è<sup class="wt-osk-key-shift">È</sup></span> - <span class="wt-osk-key">é<sup class="wt-osk-key-shift">É</sup></span> - <span class="wt-osk-key">ê<sup class="wt-osk-key-shift">Ê</sup></span> - <span class="wt-osk-key">ë<sup class="wt-osk-key-shift">Ë</sup></span> - <span class="wt-osk-key">ę<sup class="wt-osk-key-shift">Ę</sup></span> - </div> - <!-- Letter G with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ğ<sup class="wt-osk-key-shift">Ğ</sup></span> - </div> - <!-- Letter I with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ì<sup class="wt-osk-key-shift">Ì</sup></span> - <span class="wt-osk-key">í<sup class="wt-osk-key-shift">Í</sup></span> - <span class="wt-osk-key">î<sup class="wt-osk-key-shift">Î</sup></span> - <span class="wt-osk-key">ï<sup class="wt-osk-key-shift">Ï</sup></span> - <span class="wt-osk-key">į<sup class="wt-osk-key-shift">Į</sup></span> - <span class="wt-osk-key">ı<sup class="wt-osk-key-shift">İ</sup></span> - <span class="wt-osk-key">ij<sup class="wt-osk-key-shift">IJ</sup></span> - </div> - <!-- Letter L with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ľ<sup class="wt-osk-key-shift">Ľ</sup></span> - <span class="wt-osk-key">ĺ<sup class="wt-osk-key-shift">Ĺ</sup></span> - <span class="wt-osk-key">ł<sup class="wt-osk-key-shift">Ł</sup></span> - </div> - <!-- Letter N with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ʼn</span> - <span class="wt-osk-key">ñ<sup class="wt-osk-key-shift">Ñ</sup></span> - <span class="wt-osk-key">ň<sup class="wt-osk-key-shift">Ň</sup></span> - </div> - <!-- Letter O with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ò<sup class="wt-osk-key-shift">Ò</sup></span> - <span class="wt-osk-key">ó<sup class="wt-osk-key-shift">Ó</sup></span> - <span class="wt-osk-key">ô<sup class="wt-osk-key-shift">Ô</sup></span> - <span class="wt-osk-key">õ<sup class="wt-osk-key-shift">Õ</sup></span> - <span class="wt-osk-key">ö<sup class="wt-osk-key-shift">Ö</sup></span> - <span class="wt-osk-key">ø<sup class="wt-osk-key-shift">Ø</sup></span> - <span class="wt-osk-key">œ<sup class="wt-osk-key-shift">Œ</sup></span> - <span class="wt-osk-key">º</span> - </div> - <!-- Letter T with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ť<sup class="wt-osk-key-shift">Ť</sup></span> - </div> - <!-- Letter R with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ŕ<sup class="wt-osk-key-shift">Ŕ</sup></span> - <span class="wt-osk-key">ř<sup class="wt-osk-key-shift">Ř</sup></span> - </div> - <!-- Letter S with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">š<sup class="wt-osk-key-shift">Š</sup></span> - <span class="wt-osk-key">ş<sup class="wt-osk-key-shift">Ş</sup></span> - <span class="wt-osk-key">ſ</sup></span> - </div> - <!-- Letter U with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ù<sup class="wt-osk-key-shift">Ù</sup></span> - <span class="wt-osk-key">ú<sup class="wt-osk-key-shift">Ú</sup></span> - <span class="wt-osk-key">û<sup class="wt-osk-key-shift">Û</sup></span> - <span class="wt-osk-key">ũ<sup class="wt-osk-key-shift">Ũ</sup></span> - <span class="wt-osk-key">ū<sup class="wt-osk-key-shift">Ū</sup></span> - <span class="wt-osk-key">ų<sup class="wt-osk-key-shift">Ų</sup></span> - </div> - <!-- Letter Y with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ý<sup class="wt-osk-key-shift">Ý</sup></span> - </div> - <!-- Letter Z with diacritic --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ż<sup class="wt-osk-key-shift">Ż</sup></span> - <span class="wt-osk-key">ž<sup class="wt-osk-key-shift">Ž</sup></span> - </div> - <!-- Esszet, Eth and Thorn --> - <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> - <span class="wt-osk-key">ß<sup class="wt-osk-key-shift">ẞ</sup></span> - <span class="wt-osk-key">ð<sup class="wt-osk-key-shift">Ð</sup></span> - <span class="wt-osk-key">þ<sup class="wt-osk-key-shift">Þ</sup></span> - </div> - <!-- Extra Cyrillic characters --> - <div class="wt-osk-group wt-osk-script wt-osk-script-cyrl" dir="ltr" hidden> - <span class="wt-osk-key">ё<sup class="wt-osk-key-shift">Ё</sup></span> - <span class="wt-osk-key">ђ<sup class="wt-osk-key-shift">Ђ</sup></span> - <span class="wt-osk-key">ѓ<sup class="wt-osk-key-shift">Ѓ</sup></span> - <span class="wt-osk-key">є<sup class="wt-osk-key-shift">Є</sup></span> - <span class="wt-osk-key">ѕ<sup class="wt-osk-key-shift">Ѕ</sup></span> - <span class="wt-osk-key">і<sup class="wt-osk-key-shift">І</sup></span> - <span class="wt-osk-key">ї<sup class="wt-osk-key-shift">Ї</sup></span> - <span class="wt-osk-key">ј<sup class="wt-osk-key-shift">Ј</sup></span> - <span class="wt-osk-key">љ<sup class="wt-osk-key-shift">Љ</sup></span> - <span class="wt-osk-key">њ<sup class="wt-osk-key-shift">Њ</sup></span> - <span class="wt-osk-key">ћ<sup class="wt-osk-key-shift">Ћ</sup></span> - <span class="wt-osk-key">ќ<sup class="wt-osk-key-shift">Ќ</sup></span> - <span class="wt-osk-key">ў<sup class="wt-osk-key-shift">Ў</sup></span> - <span class="wt-osk-key">џ<sup class="wt-osk-key-shift">Џ</sup></span> - </div> - <!-- Cyrillic alphabet --> - <div class="wt-osk-group wt-osk-script wt-osk-script-cyrl" dir="ltr" hidden> - <span class="wt-osk-key">а<sup class="wt-osk-key-shift">А</sup></span> - <span class="wt-osk-key">б<sup class="wt-osk-key-shift">Б</sup></span> - <span class="wt-osk-key">г<sup class="wt-osk-key-shift">Г</sup></span> - <span class="wt-osk-key">д<sup class="wt-osk-key-shift">Д</sup></span> - <span class="wt-osk-key">е<sup class="wt-osk-key-shift">Е</sup></span> - <span class="wt-osk-key">ж<sup class="wt-osk-key-shift">Ж</sup></span> - <span class="wt-osk-key">з<sup class="wt-osk-key-shift">З</sup></span> - <span class="wt-osk-key">и<sup class="wt-osk-key-shift">И</sup></span> - <span class="wt-osk-key">й<sup class="wt-osk-key-shift">Й</sup></span> - <span class="wt-osk-key">к<sup class="wt-osk-key-shift">К</sup></span> - <span class="wt-osk-key">л<sup class="wt-osk-key-shift">Л</sup></span> - <span class="wt-osk-key">м<sup class="wt-osk-key-shift">М</sup></span> - <span class="wt-osk-key">н<sup class="wt-osk-key-shift">Н</sup></span> - <span class="wt-osk-key">о<sup class="wt-osk-key-shift">О</sup></span> - <span class="wt-osk-key">п<sup class="wt-osk-key-shift">П</sup></span> - <span class="wt-osk-key">с<sup class="wt-osk-key-shift">С</sup></span> - <span class="wt-osk-key">т<sup class="wt-osk-key-shift">Т</sup></span> - <span class="wt-osk-key">у<sup class="wt-osk-key-shift">У</sup></span> - <span class="wt-osk-key">у<sup class="wt-osk-key-shift">У</sup></span> - <span class="wt-osk-key">ф<sup class="wt-osk-key-shift">Ф</sup></span> - <span class="wt-osk-key">х<sup class="wt-osk-key-shift">Х</sup></span> - <span class="wt-osk-key">ц<sup class="wt-osk-key-shift">Ц</sup></span> - <span class="wt-osk-key">ч<sup class="wt-osk-key-shift">Ч</sup></span> - <span class="wt-osk-key">ш<sup class="wt-osk-key-shift">Ш</sup></span> - <span class="wt-osk-key">щ<sup class="wt-osk-key-shift">Щ</sup></span> - <span class="wt-osk-key">ъ<sup class="wt-osk-key-shift">Ъ</sup></span> - <span class="wt-osk-key">ы<sup class="wt-osk-key-shift">Ы</sup></span> - <span class="wt-osk-key">ь<sup class="wt-osk-key-shift">Ь</sup></span> - <span class="wt-osk-key">э<sup class="wt-osk-key-shift">Э</sup></span> - <span class="wt-osk-key">ю<sup class="wt-osk-key-shift">Ю</sup></span> - <span class="wt-osk-key">я<sup class="wt-osk-key-shift">Я</sup></span> - </div> - <!-- Greek alphabet --> - <div class="wt-osk-group wt-osk-script wt-osk-script-grek" dir="ltr" hidden> - <span class="wt-osk-key">α<sup class="wt-osk-key-shift">Α</sup></span> - <span class="wt-osk-key">β<sup class="wt-osk-key-shift">Β</sup></span> - <span class="wt-osk-key">γ<sup class="wt-osk-key-shift">Γ</sup></span> - <span class="wt-osk-key">δ<sup class="wt-osk-key-shift">Δ</sup></span> - <span class="wt-osk-key">ε<sup class="wt-osk-key-shift">Ε</sup></span> - <span class="wt-osk-key">ζ<sup class="wt-osk-key-shift">Ζ</sup></span> - <span class="wt-osk-key">η<sup class="wt-osk-key-shift">η</sup></span> - <span class="wt-osk-key">θ<sup class="wt-osk-key-shift">Θ</sup></span> - <span class="wt-osk-key">ι<sup class="wt-osk-key-shift">Ι</sup></span> - <span class="wt-osk-key">κ<sup class="wt-osk-key-shift">Κ</sup></span> - <span class="wt-osk-key">λ<sup class="wt-osk-key-shift">Λ</sup></span> - <span class="wt-osk-key">μ<sup class="wt-osk-key-shift">Μ</sup></span> - <span class="wt-osk-key">ν<sup class="wt-osk-key-shift">Ν</sup></span> - <span class="wt-osk-key">ξ<sup class="wt-osk-key-shift">Ξ</sup></span> - <span class="wt-osk-key">ο<sup class="wt-osk-key-shift">Ο</sup></span> - <span class="wt-osk-key">π<sup class="wt-osk-key-shift">Π</sup></span> - <span class="wt-osk-key">ρ<sup class="wt-osk-key-shift">Ρ</sup></span> - <span class="wt-osk-key">σ<sup class="wt-osk-key-shift">Σ</sup></span> - <span class="wt-osk-key">τ<sup class="wt-osk-key-shift">Τ</sup></span> - <span class="wt-osk-key">υ<sup class="wt-osk-key-shift">Υ</sup></span> - <span class="wt-osk-key">φ<sup class="wt-osk-key-shift">Φ</sup></span> - <span class="wt-osk-key">χ<sup class="wt-osk-key-shift">χ</sup></span> - <span class="wt-osk-key">ψ<sup class="wt-osk-key-shift">Ψ</sup></span> - <span class="wt-osk-key">ω<sup class="wt-osk-key-shift">Ω</sup></span> - </div> - <!-- Arabic alphabet --> - <div class="wt-osk-group wt-osk-script wt-osk-script-arab" dir="rtl" hidden> - <span class="wt-osk-key">ا</span> - <span class="wt-osk-key">ب</span> - <span class="wt-osk-key">ت</span> - <span class="wt-osk-key">ثج</span> - <span class="wt-osk-key">ح</span> - <span class="wt-osk-key">خ</span> - <span class="wt-osk-key">د</span> - <span class="wt-osk-key">ذ</span> - <span class="wt-osk-key">ر</span> - <span class="wt-osk-key">ز</span> - <span class="wt-osk-key">س</span> - <span class="wt-osk-key">ش</span> - <span class="wt-osk-key">ص</span> - <span class="wt-osk-key">ض</span> - <span class="wt-osk-key">ط</span> - <span class="wt-osk-key">ظ</span> - <span class="wt-osk-key">ع</span> - <span class="wt-osk-key">غ</span> - <span class="wt-osk-key">ف</span> - <span class="wt-osk-key">ق</span> - <span class="wt-osk-key">ك</span> - <span class="wt-osk-key">ل</span> - <span class="wt-osk-key">من</span> - <span class="wt-osk-key">ه</span> - <span class="wt-osk-key">و</span> - <span class="wt-osk-key">ي</span> - <span class="wt-osk-key">آ</span> - <span class="wt-osk-key">ة</span> - <span class="wt-osk-key">ى</span> - <span class="wt-osk-key">ی</span> - </div> - <!-- Hebrew alphabet --> - <div class="wt-osk-group wt-osk-script wt-osk-script-hebr" dir="rtl" hidden> - <span class="wt-osk-key">א</span> - <span class="wt-osk-key">ב</span> - <span class="wt-osk-key">ג</span> - <span class="wt-osk-key">ד</span> - <span class="wt-osk-key">ה</span> - <span class="wt-osk-key">ו</span> - <span class="wt-osk-key">ז</span> - <span class="wt-osk-key">ח</span> - <span class="wt-osk-key">ט</span> - <span class="wt-osk-key">י</span> - <span class="wt-osk-key">ך</span> - <span class="wt-osk-key">כ</span> - <span class="wt-osk-key">ל</span> - <span class="wt-osk-key">ם</span> - <span class="wt-osk-key">מ</span> - <span class="wt-osk-key">ן</span> - <span class="wt-osk-key">נ</span> - <span class="wt-osk-key">ס</span> - <span class="wt-osk-key">ע</span> - <span class="wt-osk-key">ף</span> - <span class="wt-osk-key">פ</span> - <span class="wt-osk-key">ץ</span> - <span class="wt-osk-key">צ</span> - <span class="wt-osk-key">ק</span> - <span class="wt-osk-key">ר</span> - <span class="wt-osk-key">ש</span> - <span class="wt-osk-key">ת</span> - <span class="wt-osk-key">װ</span> - <span class="wt-osk-key">ױ</span> - <span class="wt-osk-key">ײ</span> - <span class="wt-osk-key">׳</span> - <span class="wt-osk-key">״</span> - </div> - </div> + <div class="btn-group" role="group" data-toggle="buttons"> + <button class="btn btn-secondary active" dir="ltr"> + <input type="radio" class="wt-osk-script-button" checked autocomplete="off" data-script="latn" name="osk-script"> Abcd + </button> + <button class="btn btn-secondary" dir="ltr"> + <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="cyrl" name="osk-script"> Абгд + </button> + <button class="btn btn-secondary" dir="ltr"> + <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="grek" name="osk-script"> Αβγδ + </button> + <button class="btn btn-secondary" dir="rtl"> + <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="arab" name="osk-script"> ابةت + </button> + <button class="btn btn-secondary" dir="rtl"> + <input type="radio" class="wt-osk-script-button" autocomplete="off" data-script="hebr" name="osk-script"> אבגד + </button> + </div> + </div> + </div> + <div class="card-body wt-osk-keys"> + <!-- Quotation marks --> + <div class="wt-osk-group"> + <span class="wt-osk-key">‘<sup class="wt-osk-key-shift">“</sup></span> + <span class="wt-osk-key">’<sup class="wt-osk-key-shift">”</sup></span> + <span class="wt-osk-key">‹<sup class="wt-osk-key-shift">“</sup></span> + <span class="wt-osk-key">›<sup class="wt-osk-key-shift">»</sup></span> + <span class="wt-osk-key">‚<sup class="wt-osk-key-shift">„</sup></span> + <span class="wt-osk-key">′<sup class="wt-osk-key-shift">″</sup></span> + </div> + <!-- Symbols and punctuation --> + <div class="wt-osk-group"> + <span class="wt-osk-key">©</span> + <span class="wt-osk-key">°</span> + <span class="wt-osk-key">…</span> + <span class="wt-osk-key">·<sup class="wt-osk-key-shift">•</sup></span> + <span class="wt-osk-key">–<sup class="wt-osk-key-shift">—</sup></span> + <span class="wt-osk-key">†<sup class="wt-osk-key-shift">‡</sup></span> + <span class="wt-osk-key">§<sup class="wt-osk-key-shift">¶</sup></span> + <span class="wt-osk-key">¿<sup class="wt-osk-key-shift">¡</sup></span> + </div> + <!-- Letter A with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">à<sup class="wt-osk-key-shift">À</sup></span> + <span class="wt-osk-key">á<sup class="wt-osk-key-shift">Á</sup></span> + <span class="wt-osk-key">â<sup class="wt-osk-key-shift">Â</sup></span> + <span class="wt-osk-key">ã<sup class="wt-osk-key-shift">Ã</sup></span> + <span class="wt-osk-key">å<sup class="wt-osk-key-shift">Å</sup></span> + <span class="wt-osk-key">ą<sup class="wt-osk-key-shift">Ą</sup></span> + <span class="wt-osk-key">æ<sup class="wt-osk-key-shift">Æ</sup></span> + <span class="wt-osk-key">ª</span> + </div> + <!-- Letter C with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ç<sup class="wt-osk-key-shift">Ç</sup></span> + <span class="wt-osk-key">č<sup class="wt-osk-key-shift">Č</sup></span> + </div> + <!-- Letter D with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">Ď<sup class="wt-osk-key-shift">Ď</sup></span> + </div> + <!-- Letter E with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">è<sup class="wt-osk-key-shift">È</sup></span> + <span class="wt-osk-key">é<sup class="wt-osk-key-shift">É</sup></span> + <span class="wt-osk-key">ê<sup class="wt-osk-key-shift">Ê</sup></span> + <span class="wt-osk-key">ë<sup class="wt-osk-key-shift">Ë</sup></span> + <span class="wt-osk-key">ę<sup class="wt-osk-key-shift">Ę</sup></span> + </div> + <!-- Letter G with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ğ<sup class="wt-osk-key-shift">Ğ</sup></span> + </div> + <!-- Letter I with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ì<sup class="wt-osk-key-shift">Ì</sup></span> + <span class="wt-osk-key">í<sup class="wt-osk-key-shift">Í</sup></span> + <span class="wt-osk-key">î<sup class="wt-osk-key-shift">Î</sup></span> + <span class="wt-osk-key">ï<sup class="wt-osk-key-shift">Ï</sup></span> + <span class="wt-osk-key">į<sup class="wt-osk-key-shift">Į</sup></span> + <span class="wt-osk-key">ı<sup class="wt-osk-key-shift">İ</sup></span> + <span class="wt-osk-key">ij<sup class="wt-osk-key-shift">IJ</sup></span> + </div> + <!-- Letter L with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ľ<sup class="wt-osk-key-shift">Ľ</sup></span> + <span class="wt-osk-key">ĺ<sup class="wt-osk-key-shift">Ĺ</sup></span> + <span class="wt-osk-key">ł<sup class="wt-osk-key-shift">Ł</sup></span> + </div> + <!-- Letter N with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ʼn</span> + <span class="wt-osk-key">ñ<sup class="wt-osk-key-shift">Ñ</sup></span> + <span class="wt-osk-key">ň<sup class="wt-osk-key-shift">Ň</sup></span> + </div> + <!-- Letter O with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ò<sup class="wt-osk-key-shift">Ò</sup></span> + <span class="wt-osk-key">ó<sup class="wt-osk-key-shift">Ó</sup></span> + <span class="wt-osk-key">ô<sup class="wt-osk-key-shift">Ô</sup></span> + <span class="wt-osk-key">õ<sup class="wt-osk-key-shift">Õ</sup></span> + <span class="wt-osk-key">ö<sup class="wt-osk-key-shift">Ö</sup></span> + <span class="wt-osk-key">ø<sup class="wt-osk-key-shift">Ø</sup></span> + <span class="wt-osk-key">œ<sup class="wt-osk-key-shift">Œ</sup></span> + <span class="wt-osk-key">º</span> + </div> + <!-- Letter T with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ť<sup class="wt-osk-key-shift">Ť</sup></span> + </div> + <!-- Letter R with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ŕ<sup class="wt-osk-key-shift">Ŕ</sup></span> + <span class="wt-osk-key">ř<sup class="wt-osk-key-shift">Ř</sup></span> + </div> + <!-- Letter S with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">š<sup class="wt-osk-key-shift">Š</sup></span> + <span class="wt-osk-key">ş<sup class="wt-osk-key-shift">Ş</sup></span> + <span class="wt-osk-key">ſ</sup></span> + </div> + <!-- Letter U with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ù<sup class="wt-osk-key-shift">Ù</sup></span> + <span class="wt-osk-key">ú<sup class="wt-osk-key-shift">Ú</sup></span> + <span class="wt-osk-key">û<sup class="wt-osk-key-shift">Û</sup></span> + <span class="wt-osk-key">ũ<sup class="wt-osk-key-shift">Ũ</sup></span> + <span class="wt-osk-key">ū<sup class="wt-osk-key-shift">Ū</sup></span> + <span class="wt-osk-key">ų<sup class="wt-osk-key-shift">Ų</sup></span> + </div> + <!-- Letter Y with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ý<sup class="wt-osk-key-shift">Ý</sup></span> + </div> + <!-- Letter Z with diacritic --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ż<sup class="wt-osk-key-shift">Ż</sup></span> + <span class="wt-osk-key">ž<sup class="wt-osk-key-shift">Ž</sup></span> + </div> + <!-- Esszet, Eth and Thorn --> + <div class="wt-osk-group wt-osk-script wt-osk-script-latn" dir="ltr"> + <span class="wt-osk-key">ß<sup class="wt-osk-key-shift">ẞ</sup></span> + <span class="wt-osk-key">ð<sup class="wt-osk-key-shift">Ð</sup></span> + <span class="wt-osk-key">þ<sup class="wt-osk-key-shift">Þ</sup></span> + </div> + <!-- Extra Cyrillic characters --> + <div class="wt-osk-group wt-osk-script wt-osk-script-cyrl" dir="ltr" hidden> + <span class="wt-osk-key">ё<sup class="wt-osk-key-shift">Ё</sup></span> + <span class="wt-osk-key">ђ<sup class="wt-osk-key-shift">Ђ</sup></span> + <span class="wt-osk-key">ѓ<sup class="wt-osk-key-shift">Ѓ</sup></span> + <span class="wt-osk-key">є<sup class="wt-osk-key-shift">Є</sup></span> + <span class="wt-osk-key">ѕ<sup class="wt-osk-key-shift">Ѕ</sup></span> + <span class="wt-osk-key">і<sup class="wt-osk-key-shift">І</sup></span> + <span class="wt-osk-key">ї<sup class="wt-osk-key-shift">Ї</sup></span> + <span class="wt-osk-key">ј<sup class="wt-osk-key-shift">Ј</sup></span> + <span class="wt-osk-key">љ<sup class="wt-osk-key-shift">Љ</sup></span> + <span class="wt-osk-key">њ<sup class="wt-osk-key-shift">Њ</sup></span> + <span class="wt-osk-key">ћ<sup class="wt-osk-key-shift">Ћ</sup></span> + <span class="wt-osk-key">ќ<sup class="wt-osk-key-shift">Ќ</sup></span> + <span class="wt-osk-key">ў<sup class="wt-osk-key-shift">Ў</sup></span> + <span class="wt-osk-key">џ<sup class="wt-osk-key-shift">Џ</sup></span> + </div> + <!-- Cyrillic alphabet --> + <div class="wt-osk-group wt-osk-script wt-osk-script-cyrl" dir="ltr" hidden> + <span class="wt-osk-key">а<sup class="wt-osk-key-shift">А</sup></span> + <span class="wt-osk-key">б<sup class="wt-osk-key-shift">Б</sup></span> + <span class="wt-osk-key">г<sup class="wt-osk-key-shift">Г</sup></span> + <span class="wt-osk-key">д<sup class="wt-osk-key-shift">Д</sup></span> + <span class="wt-osk-key">е<sup class="wt-osk-key-shift">Е</sup></span> + <span class="wt-osk-key">ж<sup class="wt-osk-key-shift">Ж</sup></span> + <span class="wt-osk-key">з<sup class="wt-osk-key-shift">З</sup></span> + <span class="wt-osk-key">и<sup class="wt-osk-key-shift">И</sup></span> + <span class="wt-osk-key">й<sup class="wt-osk-key-shift">Й</sup></span> + <span class="wt-osk-key">к<sup class="wt-osk-key-shift">К</sup></span> + <span class="wt-osk-key">л<sup class="wt-osk-key-shift">Л</sup></span> + <span class="wt-osk-key">м<sup class="wt-osk-key-shift">М</sup></span> + <span class="wt-osk-key">н<sup class="wt-osk-key-shift">Н</sup></span> + <span class="wt-osk-key">о<sup class="wt-osk-key-shift">О</sup></span> + <span class="wt-osk-key">п<sup class="wt-osk-key-shift">П</sup></span> + <span class="wt-osk-key">с<sup class="wt-osk-key-shift">С</sup></span> + <span class="wt-osk-key">т<sup class="wt-osk-key-shift">Т</sup></span> + <span class="wt-osk-key">у<sup class="wt-osk-key-shift">У</sup></span> + <span class="wt-osk-key">у<sup class="wt-osk-key-shift">У</sup></span> + <span class="wt-osk-key">ф<sup class="wt-osk-key-shift">Ф</sup></span> + <span class="wt-osk-key">х<sup class="wt-osk-key-shift">Х</sup></span> + <span class="wt-osk-key">ц<sup class="wt-osk-key-shift">Ц</sup></span> + <span class="wt-osk-key">ч<sup class="wt-osk-key-shift">Ч</sup></span> + <span class="wt-osk-key">ш<sup class="wt-osk-key-shift">Ш</sup></span> + <span class="wt-osk-key">щ<sup class="wt-osk-key-shift">Щ</sup></span> + <span class="wt-osk-key">ъ<sup class="wt-osk-key-shift">Ъ</sup></span> + <span class="wt-osk-key">ы<sup class="wt-osk-key-shift">Ы</sup></span> + <span class="wt-osk-key">ь<sup class="wt-osk-key-shift">Ь</sup></span> + <span class="wt-osk-key">э<sup class="wt-osk-key-shift">Э</sup></span> + <span class="wt-osk-key">ю<sup class="wt-osk-key-shift">Ю</sup></span> + <span class="wt-osk-key">я<sup class="wt-osk-key-shift">Я</sup></span> + </div> + <!-- Greek alphabet --> + <div class="wt-osk-group wt-osk-script wt-osk-script-grek" dir="ltr" hidden> + <span class="wt-osk-key">α<sup class="wt-osk-key-shift">Α</sup></span> + <span class="wt-osk-key">β<sup class="wt-osk-key-shift">Β</sup></span> + <span class="wt-osk-key">γ<sup class="wt-osk-key-shift">Γ</sup></span> + <span class="wt-osk-key">δ<sup class="wt-osk-key-shift">Δ</sup></span> + <span class="wt-osk-key">ε<sup class="wt-osk-key-shift">Ε</sup></span> + <span class="wt-osk-key">ζ<sup class="wt-osk-key-shift">Ζ</sup></span> + <span class="wt-osk-key">η<sup class="wt-osk-key-shift">η</sup></span> + <span class="wt-osk-key">θ<sup class="wt-osk-key-shift">Θ</sup></span> + <span class="wt-osk-key">ι<sup class="wt-osk-key-shift">Ι</sup></span> + <span class="wt-osk-key">κ<sup class="wt-osk-key-shift">Κ</sup></span> + <span class="wt-osk-key">λ<sup class="wt-osk-key-shift">Λ</sup></span> + <span class="wt-osk-key">μ<sup class="wt-osk-key-shift">Μ</sup></span> + <span class="wt-osk-key">ν<sup class="wt-osk-key-shift">Ν</sup></span> + <span class="wt-osk-key">ξ<sup class="wt-osk-key-shift">Ξ</sup></span> + <span class="wt-osk-key">ο<sup class="wt-osk-key-shift">Ο</sup></span> + <span class="wt-osk-key">π<sup class="wt-osk-key-shift">Π</sup></span> + <span class="wt-osk-key">ρ<sup class="wt-osk-key-shift">Ρ</sup></span> + <span class="wt-osk-key">σ<sup class="wt-osk-key-shift">Σ</sup></span> + <span class="wt-osk-key">τ<sup class="wt-osk-key-shift">Τ</sup></span> + <span class="wt-osk-key">υ<sup class="wt-osk-key-shift">Υ</sup></span> + <span class="wt-osk-key">φ<sup class="wt-osk-key-shift">Φ</sup></span> + <span class="wt-osk-key">χ<sup class="wt-osk-key-shift">χ</sup></span> + <span class="wt-osk-key">ψ<sup class="wt-osk-key-shift">Ψ</sup></span> + <span class="wt-osk-key">ω<sup class="wt-osk-key-shift">Ω</sup></span> + </div> + <!-- Arabic alphabet --> + <div class="wt-osk-group wt-osk-script wt-osk-script-arab" dir="rtl" hidden> + <span class="wt-osk-key">ا</span> + <span class="wt-osk-key">ب</span> + <span class="wt-osk-key">ت</span> + <span class="wt-osk-key">ثج</span> + <span class="wt-osk-key">ح</span> + <span class="wt-osk-key">خ</span> + <span class="wt-osk-key">د</span> + <span class="wt-osk-key">ذ</span> + <span class="wt-osk-key">ر</span> + <span class="wt-osk-key">ز</span> + <span class="wt-osk-key">س</span> + <span class="wt-osk-key">ش</span> + <span class="wt-osk-key">ص</span> + <span class="wt-osk-key">ض</span> + <span class="wt-osk-key">ط</span> + <span class="wt-osk-key">ظ</span> + <span class="wt-osk-key">ع</span> + <span class="wt-osk-key">غ</span> + <span class="wt-osk-key">ف</span> + <span class="wt-osk-key">ق</span> + <span class="wt-osk-key">ك</span> + <span class="wt-osk-key">ل</span> + <span class="wt-osk-key">من</span> + <span class="wt-osk-key">ه</span> + <span class="wt-osk-key">و</span> + <span class="wt-osk-key">ي</span> + <span class="wt-osk-key">آ</span> + <span class="wt-osk-key">ة</span> + <span class="wt-osk-key">ى</span> + <span class="wt-osk-key">ی</span> + </div> + <!-- Hebrew alphabet --> + <div class="wt-osk-group wt-osk-script wt-osk-script-hebr" dir="rtl" hidden> + <span class="wt-osk-key">א</span> + <span class="wt-osk-key">ב</span> + <span class="wt-osk-key">ג</span> + <span class="wt-osk-key">ד</span> + <span class="wt-osk-key">ה</span> + <span class="wt-osk-key">ו</span> + <span class="wt-osk-key">ז</span> + <span class="wt-osk-key">ח</span> + <span class="wt-osk-key">ט</span> + <span class="wt-osk-key">י</span> + <span class="wt-osk-key">ך</span> + <span class="wt-osk-key">כ</span> + <span class="wt-osk-key">ל</span> + <span class="wt-osk-key">ם</span> + <span class="wt-osk-key">מ</span> + <span class="wt-osk-key">ן</span> + <span class="wt-osk-key">נ</span> + <span class="wt-osk-key">ס</span> + <span class="wt-osk-key">ע</span> + <span class="wt-osk-key">ף</span> + <span class="wt-osk-key">פ</span> + <span class="wt-osk-key">ץ</span> + <span class="wt-osk-key">צ</span> + <span class="wt-osk-key">ק</span> + <span class="wt-osk-key">ר</span> + <span class="wt-osk-key">ש</span> + <span class="wt-osk-key">ת</span> + <span class="wt-osk-key">װ</span> + <span class="wt-osk-key">ױ</span> + <span class="wt-osk-key">ײ</span> + <span class="wt-osk-key">׳</span> + <span class="wt-osk-key">״</span> + </div> + </div> </div> diff --git a/resources/views/modals/repository-fields.php b/resources/views/modals/repository-fields.php index 50483bafe0..25a1c604ed 100644 --- a/resources/views/modals/repository-fields.php +++ b/resources/views/modals/repository-fields.php @@ -1,10 +1,10 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group"> - <label class="col-form-label" for="repository-name"> - <?= I18N::translateContext('Repository', 'Name') ?> - </label> - <input class="form-control" type="text" id="repository-name" name="repository-name" required> + <label class="col-form-label" for="repository-name"> + <?= I18N::translateContext('Repository', 'Name') ?> + </label> + <input class="form-control" type="text" id="repository-name" name="repository-name" required> </div> <?= view('modals/restriction-fields') ?> diff --git a/resources/views/modals/restriction-fields.php b/resources/views/modals/restriction-fields.php index 205cc21c1a..f1cfc0b1bf 100644 --- a/resources/views/modals/restriction-fields.php +++ b/resources/views/modals/restriction-fields.php @@ -1,32 +1,32 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="privacy-restriction"> - <?= /* I18N: a restrction on viewing data */ I18N::translate('Privacy restriction') ?> - </label> - <div class="col-sm-4"> - <select class="form-control" id="privacy-restriction" name="privacy-restriction"> - <option value=""></option> - <option value="none"> - <?= I18N::translate('Show to visitors') ?> - </option> - <option value="privacy"> - <?= I18N::translate('Show to members') ?> - </option> - <option value="confidential"> - <?= I18N::translate('Show to managers') ?> - </option> - </select> - </div> - <label class="col-form-label col-sm-2" for="edit-restriction"> - <?= /* I18N: A restriction on editing data */ I18N::translate('Editing restriction') ?> - </label> - <div class="col-sm-4"> - <select class="form-control" id="edit-restriction" name="edit-restriction"> - <option value=""></option> - <option value="locked"> - <?= I18N::translate('Only managers can edit'); ?> - </option> - </select> - </div> + <label class="col-form-label col-sm-2" for="privacy-restriction"> + <?= /* I18N: a restrction on viewing data */ I18N::translate('Privacy restriction') ?> + </label> + <div class="col-sm-4"> + <select class="form-control" id="privacy-restriction" name="privacy-restriction"> + <option value=""></option> + <option value="none"> + <?= I18N::translate('Show to visitors') ?> + </option> + <option value="privacy"> + <?= I18N::translate('Show to members') ?> + </option> + <option value="confidential"> + <?= I18N::translate('Show to managers') ?> + </option> + </select> + </div> + <label class="col-form-label col-sm-2" for="edit-restriction"> + <?= /* I18N: A restriction on editing data */ I18N::translate('Editing restriction') ?> + </label> + <div class="col-sm-4"> + <select class="form-control" id="edit-restriction" name="edit-restriction"> + <option value=""></option> + <option value="locked"> + <?= I18N::translate('Only managers can edit'); ?> + </option> + </select> + </div> </div> diff --git a/resources/views/modals/source-fields.php b/resources/views/modals/source-fields.php index 9dac7659b8..8ee70f7d82 100644 --- a/resources/views/modals/source-fields.php +++ b/resources/views/modals/source-fields.php @@ -2,56 +2,56 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="source-title"> - <?= I18N::translate('Title') ?> - </label> - <div class="col-sm-10"> - <input class="form-control" type="text" id="source-title" name="source-title" required> - </div> + <label class="col-form-label col-sm-2" for="source-title"> + <?= I18N::translate('Title') ?> + </label> + <div class="col-sm-10"> + <input class="form-control" type="text" id="source-title" name="source-title" required> + </div> </div> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="source-abbreviation"> - <?= I18N::translate('Abbreviation') ?> - </label> - <div class="col-sm-10"> - <input class="form-control" type="text" id="source-abbreviation" name="source-abbreviation"> - </div> + <label class="col-form-label col-sm-2" for="source-abbreviation"> + <?= I18N::translate('Abbreviation') ?> + </label> + <div class="col-sm-10"> + <input class="form-control" type="text" id="source-abbreviation" name="source-abbreviation"> + </div> </div> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="source-author"> - <?= I18N::translate('Author') ?> - </label> - <div class="col-sm-4"> - <input class="form-control" type="text" id="source-author" name="source-author"> - </div> - <label class="col-form-label col-sm-2" for="source-publication"> - <?= I18N::translate('Publication') ?> - </label> - <div class="col-sm-4"> - <input class="form-control" type="text" id="source-publication" name="source-publication"> - </div> + <label class="col-form-label col-sm-2" for="source-author"> + <?= I18N::translate('Author') ?> + </label> + <div class="col-sm-4"> + <input class="form-control" type="text" id="source-author" name="source-author"> + </div> + <label class="col-form-label col-sm-2" for="source-publication"> + <?= I18N::translate('Publication') ?> + </label> + <div class="col-sm-4"> + <input class="form-control" type="text" id="source-publication" name="source-publication"> + </div> </div> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="source-repository"> - <?= I18N::translate('Repository') ?> - </label> - <div class="col-sm-4"> - <?= FunctionsEdit::formControlRepository($tree, null, ['id' => 'source-repository', 'name' => 'source-repository']) ?> - </div> - <label class="col-form-label col-sm-2" for="source-call-number"> - <?= I18N::translate('Call number') ?> - </label> - <div class="col-sm-4"> - <input class="form-control" type="text" id="source-call-number" name="source-call-number"> - </div> + <label class="col-form-label col-sm-2" for="source-repository"> + <?= I18N::translate('Repository') ?> + </label> + <div class="col-sm-4"> + <?= FunctionsEdit::formControlRepository($tree, null, ['id' => 'source-repository', 'name' => 'source-repository']) ?> + </div> + <label class="col-form-label col-sm-2" for="source-call-number"> + <?= I18N::translate('Call number') ?> + </label> + <div class="col-sm-4"> + <input class="form-control" type="text" id="source-call-number" name="source-call-number"> + </div> </div> <div class="form-group row"> - <label class="col-form-label col-sm-2" for="source-text"> - <?= I18N::translate('Text') ?> - </label> - <div class="col-sm-10"> - <textarea class="form-control" rows="2" id="source-text" name="TEXT"></textarea> - </div> + <label class="col-form-label col-sm-2" for="source-text"> + <?= I18N::translate('Text') ?> + </label> + <div class="col-sm-10"> + <textarea class="form-control" rows="2" id="source-text" name="TEXT"></textarea> + </div> </div> <?= view('modals/restriction-fields') ?> diff --git a/resources/views/modals/submitter-fields.php b/resources/views/modals/submitter-fields.php index ced198def0..232fee3036 100644 --- a/resources/views/modals/submitter-fields.php +++ b/resources/views/modals/submitter-fields.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group"> - <label class="col-form-label" for="submitter-name"> - <?= I18N::translate('Name') ?> - </label> - <input class="form-control" type="text" id="submitter-name" name="submitter_name" required> + <label class="col-form-label" for="submitter-name"> + <?= I18N::translate('Name') ?> + </label> + <input class="form-control" type="text" id="submitter-name" name="submitter_name" required> </div> <div class="form-group"> - <label class="col-form-label" for="submitter-address"> - <?= I18N::translate('Address') ?> - </label> - <input class="form-control" type="text" id="submitter-address" name="submitter_address"> + <label class="col-form-label" for="submitter-address"> + <?= I18N::translate('Address') ?> + </label> + <input class="form-control" type="text" id="submitter-address" name="submitter_address"> </div> <?= view('modals/restriction-fields') ?> diff --git a/resources/views/modules/GEDFact_assistant/select-census.php b/resources/views/modules/GEDFact_assistant/select-census.php index 9f95ad87f7..1ed6f949ab 100644 --- a/resources/views/modules/GEDFact_assistant/select-census.php +++ b/resources/views/modules/GEDFact_assistant/select-census.php @@ -12,15 +12,15 @@ </script> <select id="census-selector" class="form-control" onchange="selectCensus(this)"> - <option value=""><?= I18N::translate('Census date') ?></option> + <option value=""><?= I18N::translate('Census date') ?></option> - <?php foreach ($census_places as $census_place): ?> - <option value=""></option> - <?php foreach ($census_place->allCensusDates() as $census): ?> - <option value="<?= $census->censusDate() ?>" data-place="<?= $census->censusPlace() ?>" data-census="<?= get_class($census) ?>"> - <?= (explode(', ', $census->censusPlace()))[0] ?> - <?= (new Date($census->censusDate()))->minimumDate()->format('%Y') ?> - </option> - <?php endforeach ?> - <?php endforeach ?> + <?php foreach ($census_places as $census_place) : ?> + <option value=""></option> + <?php foreach ($census_place->allCensusDates() as $census) : ?> + <option value="<?= $census->censusDate() ?>" data-place="<?= $census->censusPlace() ?>" data-census="<?= get_class($census) ?>"> + <?= (explode(', ', $census->censusPlace()))[0] ?> + <?= (new Date($census->censusDate()))->minimumDate()->format('%Y') ?> + </option> + <?php endforeach ?> + <?php endforeach ?> </select> diff --git a/resources/views/modules/batch_update/admin.php b/resources/views/modules/batch_update/admin.php index 850ab9f87e..d56426fec5 100644 --- a/resources/views/modules/batch_update/admin.php +++ b/resources/views/modules/batch_update/admin.php @@ -6,96 +6,96 @@ <h1><?= $title ?></h1> <form > - <input type="hidden" name="route" value="module"> - <input type="hidden" name="module" value="batch_update"> - <input type="hidden" name="action" value="Admin"> - <input type="hidden" name="xref" value="<?= $curr_xref ?>"> - <?= csrf_field() ?> + <input type="hidden" name="route" value="module"> + <input type="hidden" name="module" value="batch_update"> + <input type="hidden" name="action" value="Admin"> + <input type="hidden" name="xref" value="<?= $curr_xref ?>"> + <?= csrf_field() ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label"><?= I18N::translate('Family tree') ?></label> - <div class="col-sm-9"> - <?= Bootstrap4::select($trees, $tree->getName(), ['id' => 'ged', 'name' => 'ged', 'onchange' => 'this.form.submit();']) ?> - </div> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label"><?= I18N::translate('Batch update') ?></label> - <div class="col-sm-9"> - <select class="form-control" name="plugin" onchange="this.form.submit();"> - <?php if ($plugin === null): ?> - <option value="" selected></option> - <?php endif ?> + <div class="row form-group"> + <label class="col-sm-3 col-form-label"><?= I18N::translate('Family tree') ?></label> + <div class="col-sm-9"> + <?= Bootstrap4::select($trees, $tree->getName(), ['id' => 'ged', 'name' => 'ged', 'onchange' => 'this.form.submit();']) ?> + </div> + </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label"><?= I18N::translate('Batch update') ?></label> + <div class="col-sm-9"> + <select class="form-control" name="plugin" onchange="this.form.submit();"> + <?php if ($plugin === null) : ?> + <option value="" selected></option> + <?php endif ?> - <?php foreach ($plugins as $key => $value): ?> - <option value="<?= $key ?>" <?= ($plugin ? '\\' . get_class($plugin) : null) === $key ? 'selected' : '' ?>> - <?= $value->getName() ?> - </option> - <?php endforeach ?> - </select> + <?php foreach ($plugins as $key => $value) : ?> + <option value="<?= $key ?>" <?= ($plugin ? '\\' . get_class($plugin) : null) === $key ? 'selected' : '' ?>> + <?= $value->getName() ?> + </option> + <?php endforeach ?> + </select> - <?php if ($plugin !== null): ?> - <p class="small text-muted"><?= $plugin->getDescription() ?></p> - <?php endif ?> - </div> - </div> + <?php if ($plugin !== null) : ?> + <p class="small text-muted"><?= $plugin->getDescription() ?></p> + <?php endif ?> + </div> + </div> - <?php if ($plugin !== null): ?> - <?= $plugin->getOptionsForm() ?> + <?php if ($plugin !== null) : ?> + <?= $plugin->getOptionsForm() ?> - <hr> + <hr> - <?php if ($record !== null): ?> - <div class="row"> - <div class="col-sm-3 d-flex flex-column justify-content-between"> - <div> - <?php if ($prev_xref === null): ?> - <button class="btn btn-primary" type="submit" disabled> - <?= I18N::translate('previous') ?> - </button> - <?php else: ?> - <button class="btn btn-primary" type="submit" onclick="this.form.xref.value='<?= e($prev_xref) ?>'"> - <?= I18N::translate('previous') ?> - </button> - <?php endif ?> + <?php if ($record !== null) : ?> + <div class="row"> + <div class="col-sm-3 d-flex flex-column justify-content-between"> + <div> + <?php if ($prev_xref === null) : ?> + <button class="btn btn-primary" type="submit" disabled> + <?= I18N::translate('previous') ?> + </button> + <?php else : ?> + <button class="btn btn-primary" type="submit" onclick="this.form.xref.value='<?= e($prev_xref) ?>'"> + <?= I18N::translate('previous') ?> + </button> + <?php endif ?> - <?php if ($next_xref === null): ?> - <button class="btn btn-primary" type="submit" disabled> - <?= I18N::translate('next') ?> - </button> - <?php else: ?> - <button class="btn btn-primary" type="submit" onclick="this.form.xref.value='<?= e($next_xref) ?>'"> - <?= I18N::translate('next') ?> - </button> - <?php endif ?> - </div> + <?php if ($next_xref === null) : ?> + <button class="btn btn-primary" type="submit" disabled> + <?= I18N::translate('next') ?> + </button> + <?php else : ?> + <button class="btn btn-primary" type="submit" onclick="this.form.xref.value='<?= e($next_xref) ?>'"> + <?= I18N::translate('next') ?> + </button> + <?php endif ?> + </div> - <div> - <button class="btn btn-primary" type="submit" name="update" value="one" onclick="this.form.method='post'"> - <?= I18N::translate('Update') ?> - </button> + <div> + <button class="btn btn-primary" type="submit" name="update" value="one" onclick="this.form.method='post'"> + <?= I18N::translate('Update') ?> + </button> - <?php if ($auto_accept): ?> - <button class="btn btn-primary" type="submit" name="update" value="all" onclick="this.form.method='post'"> - <?= I18N::translate('Update all') ?> - </button> - <?php else: ?> - <button class="btn btn-primary" disabled title="<?= I18N::translate('Your user account does not have “automatically accept changes” enabled. You will only be able to change one record at a time.') ?>"> - <?= I18N::translate('Update all') ?> - </button> - <?php endif ?> - </div> - </div> - <div class="col-sm-9"> - <a class="lead" href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> - </a> - <?= $plugin->getActionPreview($record) ?> - </div> - </div> - <?php else: ?> - <div class="alert alert-info"> - <?= I18N::translate('Nothing found.') ?> - </div> - <?php endif ?> - <?php endif ?> + <?php if ($auto_accept) : ?> + <button class="btn btn-primary" type="submit" name="update" value="all" onclick="this.form.method='post'"> + <?= I18N::translate('Update all') ?> + </button> + <?php else : ?> + <button class="btn btn-primary" disabled title="<?= I18N::translate('Your user account does not have “automatically accept changes” enabled. You will only be able to change one record at a time.') ?>"> + <?= I18N::translate('Update all') ?> + </button> + <?php endif ?> + </div> + </div> + <div class="col-sm-9"> + <a class="lead" href="<?= e($record->url()) ?>"> + <?= $record->getFullName() ?> + </a> + <?= $plugin->getActionPreview($record) ?> + </div> + </div> + <?php else : ?> + <div class="alert alert-info"> + <?= I18N::translate('Nothing found.') ?> + </div> + <?php endif ?> + <?php endif ?> </form> diff --git a/resources/views/modules/block-template.php b/resources/views/modules/block-template.php index 3c99a98c13..f6f75e182d 100644 --- a/resources/views/modules/block-template.php +++ b/resources/views/modules/block-template.php @@ -2,13 +2,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="card mb-4 wt-block wt-block-<?= e($block) ?>-block" id="block-<?= e($id) ?>"> - <div class="card-header wt-block-header wt-block-header-<?= e($block) ?>" dir="auto"> - <?php if ($config_url !== ''): ?> - <?= FontAwesome::linkIcon('preferences', I18N::translate('Preferences'), ['class' => 'btn btn-link', 'href' => $config_url]) ?> - <?php endif ?> - <?= $title ?> - </div> - <div class="card-body wt-block-content wt-block-content-<?= e($block) ?>"> - <?= $content ?> - </div> + <div class="card-header wt-block-header wt-block-header-<?= e($block) ?>" dir="auto"> + <?php if ($config_url !== '') : ?> + <?= FontAwesome::linkIcon('preferences', I18N::translate('Preferences'), ['class' => 'btn btn-link', 'href' => $config_url]) ?> + <?php endif ?> + <?= $title ?> + </div> + <div class="card-body wt-block-content wt-block-content-<?= e($block) ?>"> + <?= $content ?> + </div> </div> diff --git a/resources/views/modules/census-assistant.php b/resources/views/modules/census-assistant.php index 48dd540410..9aa70dbb20 100644 --- a/resources/views/modules/census-assistant.php +++ b/resources/views/modules/census-assistant.php @@ -3,86 +3,86 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div id="census-assistant-link" hidden> - <a href="#"> - <?= I18N::translate('Create a shared note using the census assistant') ?> - </a> + <a href="#"> + <?= I18N::translate('Create a shared note using the census assistant') ?> + </a> </div> <div id="census-assistant" hidden> - <input type="hidden" name="ca_census" id="census-assistant-class"> - <div class="form-group"> - <div class="input-group"> - <div class="input-group-prepend"> - <label class="input-group-text" for="census-assistant-title"> - <?= I18N::translate('Title') ?> - </label> - </div> - <input class="form-control" id="census-assistant-title" name="ca_title" value=""> - </div> - </div> + <input type="hidden" name="ca_census" id="census-assistant-class"> + <div class="form-group"> + <div class="input-group"> + <div class="input-group-prepend"> + <label class="input-group-text" for="census-assistant-title"> + <?= I18N::translate('Title') ?> + </label> + </div> + <input class="form-control" id="census-assistant-title" name="ca_title" value=""> + </div> + </div> - <div class="row"> - <div class="form-group col-sm-6"> - <div class="input-group"> - <div class="input-group-prepend"> - <label class="input-group-addon" for="census-assistant-citation"> - <?= I18N::translate('Citation') ?> - </label> - </div> - <input class="form-control" id="census-assistant-citation" name="ca_citation"> - </div> - </div> + <div class="row"> + <div class="form-group col-sm-6"> + <div class="input-group"> + <div class="input-group-prepend"> + <label class="input-group-addon" for="census-assistant-citation"> + <?= I18N::translate('Citation') ?> + </label> + </div> + <input class="form-control" id="census-assistant-citation" name="ca_citation"> + </div> + </div> - <div class="form-group col-sm-6"> - <div class="input-group"> - <div class="input-group-prepend"> - <label class="input-group-text" for="census-assistant-place"> - <?= I18N::translate('Place') ?> - </label> - </div> - <input class="form-control" id="census-assistant-place" name="ca_place"> - </div> - </div> - </div> + <div class="form-group col-sm-6"> + <div class="input-group"> + <div class="input-group-prepend"> + <label class="input-group-text" for="census-assistant-place"> + <?= I18N::translate('Place') ?> + </label> + </div> + <input class="form-control" id="census-assistant-place" name="ca_place"> + </div> + </div> + </div> - <div class="form-group"> - <div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text"> - <?= I18N::translate('Individuals') ?> - </span> - </div> - <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'census-assistant-individual', 'style' => 'width:100%']) ?> - <span class="input-group-btn"> - <button type="button" class="btn btn-primary" id="census-assistant-add"> - <?= FontAwesome::semanticIcon('add', I18N::translate('Add')) ?> - </button> - </span> - <span class="input-group-btn"> - <button type="button" class="btn btn-primary" id="census-assistant-head" - title="<?= I18N::translate('Head of household') ?>"> - <?= FontAwesome::semanticIcon('individual', I18N::translate('Head of household')) ?> - </button> - </span> - </div> - </div> + <div class="form-group"> + <div class="input-group"> + <div class="input-group-prepend"> + <span class="input-group-text"> + <?= I18N::translate('Individuals') ?> + </span> + </div> + <?= FunctionsEdit::formControlIndividual($individual->getTree(), $individual, ['id' => 'census-assistant-individual', 'style' => 'width:100%']) ?> + <span class="input-group-btn"> + <button type="button" class="btn btn-primary" id="census-assistant-add"> + <?= FontAwesome::semanticIcon('add', I18N::translate('Add')) ?> + </button> + </span> + <span class="input-group-btn"> + <button type="button" class="btn btn-primary" id="census-assistant-head" + title="<?= I18N::translate('Head of household') ?>"> + <?= FontAwesome::semanticIcon('individual', I18N::translate('Head of household')) ?> + </button> + </span> + </div> + </div> - <table class="table table-bordered table-small table-responsive wt-census-assistant-table" - id="census-assistant-table"> - <thead class="wt-census-assistant-header"></thead> - <tbody class="wt-census-assistant-body"></tbody> - </table> + <table class="table table-bordered table-small table-responsive wt-census-assistant-table" + id="census-assistant-table"> + <thead class="wt-census-assistant-header"></thead> + <tbody class="wt-census-assistant-body"></tbody> + </table> - <div class="form-group"> - <div class="input-group"> - <div class="input-group-prepend"> - <label class="input-group-text" for="census-assistant-notes"> - <?= I18N::translate('Notes') ?> - </label> - </div> - <input class="form-control" id="census-assistant-notes" name="ca_notes"> - </div> - </div> + <div class="form-group"> + <div class="input-group"> + <div class="input-group-prepend"> + <label class="input-group-text" for="census-assistant-notes"> + <?= I18N::translate('Notes') ?> + </label> + </div> + <input class="form-control" id="census-assistant-notes" name="ca_notes"> + </div> + </div> </div> <script> diff --git a/resources/views/modules/charts/config.php b/resources/views/modules/charts/config.php index 7664114b20..1fdb03e789 100644 --- a/resources/views/modules/charts/config.php +++ b/resources/views/modules/charts/config.php @@ -3,21 +3,21 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="type"> - <?= I18N::translate('Chart type') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($charts, $type, ['id' => 'type', 'name' => 'type']) ?> - </div> + <label class="col-sm-3 col-form-label" for="type"> + <?= I18N::translate('Chart type') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($charts, $type, ['id' => 'type', 'name' => 'type']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="pid"> - <label for="pid"> - <?= I18N::translate('Individual') ?> - </label> - </label> - <div class="col-sm-9"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'pid', 'name' => 'pid']) ?> - </div> + <label class="col-sm-3 col-form-label" for="pid"> + <label for="pid"> + <?= I18N::translate('Individual') ?> + </label> + </label> + <div class="col-sm-9"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'pid', 'name' => 'pid']) ?> + </div> </div> diff --git a/resources/views/modules/ckeditor/ckeditor-js.php b/resources/views/modules/ckeditor/ckeditor-js.php index ec4f6ed323..30a7bf8118 100644 --- a/resources/views/modules/ckeditor/ckeditor-js.php +++ b/resources/views/modules/ckeditor/ckeditor-js.php @@ -1,12 +1,12 @@ <?php use Fisharebest\Webtrees\Module; ?> <?php use Fisharebest\Webtrees\View; ?> -<?php if (Module::getModuleByName('ckeditor')): ?> - <?php View::push('javascript') ?> - <script src="<?= e(WT_CKEDITOR_BASE_URL) ?>ckeditor.js"></script> - <script src="<?= e(WT_CKEDITOR_BASE_URL) ?>adapters/jquery.js"></script> +<?php if (Module::getModuleByName('ckeditor')) : ?> + <?php View::push('javascript') ?> + <script src="<?= e(WT_CKEDITOR_BASE_URL) ?>ckeditor.js"></script> + <script src="<?= e(WT_CKEDITOR_BASE_URL) ?>adapters/jquery.js"></script> - <script> + <script> var CKEDITOR_BASEPATH = <?= json_encode(WT_CKEDITOR_BASE_URL) ?>; // Enable for all browsers @@ -20,6 +20,6 @@ $("textarea.html-edit").ckeditor(function(config){config.removePlugins = "forms";}, { language: "<?= strtolower(WT_LOCALE) ?>" }); - </script> - <?php View::endpush() ?> + </script> + <?php View::endpush() ?> <?php endif ?> diff --git a/resources/views/modules/clippings/add-options.php b/resources/views/modules/clippings/add-options.php index 8970c13d8f..51961f6b03 100644 --- a/resources/views/modules/clippings/add-options.php +++ b/resources/views/modules/clippings/add-options.php @@ -5,29 +5,29 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-options wt-page-options-clippings d-print-none" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Add to the clippings cart') ?> - </div> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::radioButtons('option', $options, $default, false, []) ?> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Add to the clippings cart') ?> + </div> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::radioButtons('option', $options, $default, false, []) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> - <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= /* I18N: A button label. */ I18N::translate('cancel') ?> - </a> - </div> - </div> + <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= /* I18N: A button label. */ I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/modules/clippings/download.php b/resources/views/modules/clippings/download.php index 869d1b9336..6b6c82aa0a 100644 --- a/resources/views/modules/clippings/download.php +++ b/resources/views/modules/clippings/download.php @@ -4,66 +4,66 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-options wt-page-options-clippings-download hidden-print"> - <input type="hidden" name="route" value="module"> - <input type="hidden" name="module" value="clippings"> - <input type="hidden" name="action" value="Download"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="module"> + <input type="hidden" name="module" value="clippings"> + <input type="hidden" name="action" value="Download"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <?php if ($is_manager): ?> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Apply privacy settings') ?> - </div> - <div class="col-sm-9 wt-page-options-value"> - <input type="radio" name="privatize_export" value="none" checked> - <?= I18N::translate('None') ?> - <br> - <input type="radio" name="privatize_export" value="gedadmin"> - <?= I18N::translate('Manager') ?> - <br> - <input type="radio" name="privatize_export" value="user"> - <?= I18N::translate('Member') ?> - <br> - <input type="radio" name="privatize_export" value="visitor"> - <?= I18N::translate('Visitor') ?> - </div> - </div> - <?php elseif ($is_member): ?> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Apply privacy settings') ?> - </div> - <div class="col-sm-9 wt-page-options-value"> - <input type="radio" name="privatize_export" value="user"> - <?= I18N::translate('Member') ?> - <br> - <input type="radio" name="privatize_export" value="visitor"> - <?= I18N::translate('Visitor') ?> - </div> - </div> - <?php endif ?> + <?php if ($is_manager) : ?> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Apply privacy settings') ?> + </div> + <div class="col-sm-9 wt-page-options-value"> + <input type="radio" name="privatize_export" value="none" checked> + <?= I18N::translate('None') ?> + <br> + <input type="radio" name="privatize_export" value="gedadmin"> + <?= I18N::translate('Manager') ?> + <br> + <input type="radio" name="privatize_export" value="user"> + <?= I18N::translate('Member') ?> + <br> + <input type="radio" name="privatize_export" value="visitor"> + <?= I18N::translate('Visitor') ?> + </div> + </div> + <?php elseif ($is_member) : ?> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Apply privacy settings') ?> + </div> + <div class="col-sm-9 wt-page-options-value"> + <input type="radio" name="privatize_export" value="user"> + <?= I18N::translate('Member') ?> + <br> + <input type="radio" name="privatize_export" value="visitor"> + <?= I18N::translate('Visitor') ?> + </div> + </div> + <?php endif ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="convert"> - <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input type="checkbox" name="convert" id="convert"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="convert"> + <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input type="checkbox" name="convert" id="convert"> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('download') ?> - <?= I18N::translate('download') ?> - </button> - <a href="<?= e(route('module', ['module' => 'clippings', 'action' => 'Show', 'ged' => $tree->getName()])) ?>" class="btn btn-secondary"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('download') ?> + <?= I18N::translate('download') ?> + </button> + <a href="<?= e(route('module', ['module' => 'clippings', 'action' => 'Show', 'ged' => $tree->getName()])) ?>" class="btn btn-secondary"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/modules/clippings/show.php b/resources/views/modules/clippings/show.php index f46214834a..c33a0d4f50 100644 --- a/resources/views/modules/clippings/show.php +++ b/resources/views/modules/clippings/show.php @@ -3,55 +3,55 @@ <h2 class="wt-page-title"><?= $title ?></h2> <p> - <?= I18N::translate('The clippings cart allows you to take extracts from this family tree and download them as a GEDCOM file.') ?> + <?= I18N::translate('The clippings cart allows you to take extracts from this family tree and download them as a GEDCOM file.') ?> </p> -<?php if (empty($records)): ?> +<?php if (empty($records)) : ?> <p> - <?= I18N::translate('Your clippings cart is empty.') ?> + <?= I18N::translate('Your clippings cart is empty.') ?> </p> -<?php else: ?> - <table class="table wt-facts-table"> - <thead> - <tr> - <th><?= I18N::translate('Record') ?></th> - <th><?= I18N::translate('Remove') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($records as $record): ?> - <tr> - <td> - <?php if ($record::RECORD_TYPE === 'INDI'): ?> - <i class="icon-indis"></i> - <?php elseif ($record::RECORD_TYPE === 'FAM'): ?> - <i class="icon-sfamily"></i> - <?php elseif ($record::RECORD_TYPE === 'SOUR'): ?> - <i class="icon-source"></i> - <?php elseif ($record::RECORD_TYPE === 'REPO'): ?> - <i class="icon-repository"></i> - <?php elseif ($record::RECORD_TYPE === 'NOTE'): ?> - <i class="icon-note"></i> - <?php elseif ($record::RECORD_TYPE === 'OBJE'): ?> - <i class="icon-media"></i> - <?php else: ?> - <i class="icon-clippings"></i> - <?php endif ?> +<?php else : ?> + <table class="table wt-facts-table"> + <thead> + <tr> + <th><?= I18N::translate('Record') ?></th> + <th><?= I18N::translate('Remove') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($records as $record) : ?> + <tr> + <td> + <?php if ($record::RECORD_TYPE === 'INDI') : ?> + <i class="icon-indis"></i> + <?php elseif ($record::RECORD_TYPE === 'FAM') : ?> + <i class="icon-sfamily"></i> + <?php elseif ($record::RECORD_TYPE === 'SOUR') : ?> + <i class="icon-source"></i> + <?php elseif ($record::RECORD_TYPE === 'REPO') : ?> + <i class="icon-repository"></i> + <?php elseif ($record::RECORD_TYPE === 'NOTE') : ?> + <i class="icon-note"></i> + <?php elseif ($record::RECORD_TYPE === 'OBJE') : ?> + <i class="icon-media"></i> + <?php else : ?> + <i class="icon-clippings"></i> + <?php endif ?> - <a href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> - </a> - </td> - <td> - <form method="post" action="<?= e(route('module', ['module' => 'clippings', 'action' => 'Remove', 'ged' => $tree->getName(), 'xref' => $record->getXref()])) ?>"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-link" title="<?= I18N::translate('Remove') ?>"> - <i class="icon-remove"></i> - </button> - </form> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> + <a href="<?= e($record->url()) ?>"> + <?= $record->getFullName() ?> + </a> + </td> + <td> + <form method="post" action="<?= e(route('module', ['module' => 'clippings', 'action' => 'Remove', 'ged' => $tree->getName(), 'xref' => $record->getXref()])) ?>"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-link" title="<?= I18N::translate('Remove') ?>"> + <i class="icon-remove"></i> + </button> + </form> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> <?php endif ?> diff --git a/resources/views/modules/descendancy/sidebar.php b/resources/views/modules/descendancy/sidebar.php index 150474d210..5d8763b807 100644 --- a/resources/views/modules/descendancy/sidebar.php +++ b/resources/views/modules/descendancy/sidebar.php @@ -2,13 +2,13 @@ <?php use Fisharebest\Webtrees\View; ?> <form method="post" action="<?= e(route('module', ['module' => 'descendancy', 'action' => 'Descendants', 'ged' => $tree->getName()])) ?>" onsubmit="return false;"> - <input type="search" name="sb_desc_name" id="sb_desc_name" placeholder="<?= I18N::translate('Search') ?>"> + <input type="search" name="sb_desc_name" id="sb_desc_name" placeholder="<?= I18N::translate('Search') ?>"> </form> <div id="sb_desc_content"> - <ul> - <?= $individual_list ?> - </ul> + <ul> + <?= $individual_list ?> + </ul> </div> <?php View::push('javascript') ?> diff --git a/resources/views/modules/edit-block-config.php b/resources/views/modules/edit-block-config.php index 4aac68e87f..ae1cf54e1a 100644 --- a/resources/views/modules/edit-block-config.php +++ b/resources/views/modules/edit-block-config.php @@ -2,29 +2,29 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <p> - <?= $block->getDescription() ?> + <?= $block->getDescription() ?> </p> <form method="post"> - <input type="hidden" name="save" value="1"> - <?= csrf_field() ?> + <input type="hidden" name="save" value="1"> + <?= csrf_field() ?> - <?= $block->editBlockConfiguration($tree, $block_id) ?> + <?= $block->editBlockConfiguration($tree, $block_id) ?> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> - <?= FontAwesome::decorativeIcon('save') ?> - <?= I18N::translate('save') ?> - </button> - <a class="btn btn-secondary" href="<?= e($cancel_url) ?>"> - <?= FontAwesome::decorativeIcon('cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> + <?= FontAwesome::decorativeIcon('save') ?> + <?= I18N::translate('save') ?> + </button> + <a class="btn btn-secondary" href="<?= e($cancel_url) ?>"> + <?= FontAwesome::decorativeIcon('cancel') ?> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> diff --git a/resources/views/modules/family_nav/sidebar-family.php b/resources/views/modules/family_nav/sidebar-family.php index f5c60effb2..0eb3a8e188 100644 --- a/resources/views/modules/family_nav/sidebar-family.php +++ b/resources/views/modules/family_nav/sidebar-family.php @@ -2,114 +2,114 @@ <?php use Fisharebest\Webtrees\I18N; ?> <table class="table table-sm wt-facts-table wt-family-navigator-family"> - <caption class="text-center wt-family-navigator-family-heading"> - <a href="<?= e($family->url()) ?>"> - <?= $title ?> - </a> - </caption> - <tbody> - <?php foreach ($family->getSpouses() as $spouse): ?> - <tr class="text-center wt-family-navigator-parent wt-gender-<?= $spouse->getSex() ?>"> - <th class="text-nowrap align-middle wt-family-navigator-label" scope="row"> - <?php if ($spouse === $individual): ?> - <?= Functions::getCloseRelationshipName($individual, $spouse) ?> - <i class="icon-selected"></i> - <?php elseif ($spouse->getPrimaryChildFamily() !== null): ?> - <div class="dropdown"> - <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($spouse->getXref()) ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= Functions::getCloseRelationshipName($individual, $spouse) ?> - </a> + <caption class="text-center wt-family-navigator-family-heading"> + <a href="<?= e($family->url()) ?>"> + <?= $title ?> + </a> + </caption> + <tbody> + <?php foreach ($family->getSpouses() as $spouse) : ?> + <tr class="text-center wt-family-navigator-parent wt-gender-<?= $spouse->getSex() ?>"> + <th class="text-nowrap align-middle wt-family-navigator-label" scope="row"> + <?php if ($spouse === $individual) : ?> + <?= Functions::getCloseRelationshipName($individual, $spouse) ?> + <i class="icon-selected"></i> + <?php elseif ($spouse->getPrimaryChildFamily() !== null) : ?> + <div class="dropdown"> + <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($spouse->getXref()) ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= Functions::getCloseRelationshipName($individual, $spouse) ?> + </a> - <div class="dropdown-menu wt-family-navigator-dropdown"> - <div class="dropdown-header wt-family-navigator-dropdown-heading"> - <?= I18N::translate('Parents') ?> - </div> - <?php foreach ($spouse->getPrimaryChildFamily()->getSpouses() as $parent): ?> - <a class="dropdown-item" href="<?= e($parent->url()) ?>"> - <?= $parent->getFullName() ?> - </a> - <?php endforeach ?> - </div> - </div> - <?php else: ?> - <?= Functions::getCloseRelationshipName($individual, $spouse) ?> - <?php endif ?> - </th> + <div class="dropdown-menu wt-family-navigator-dropdown"> + <div class="dropdown-header wt-family-navigator-dropdown-heading"> + <?= I18N::translate('Parents') ?> + </div> + <?php foreach ($spouse->getPrimaryChildFamily()->getSpouses() as $parent) : ?> + <a class="dropdown-item" href="<?= e($parent->url()) ?>"> + <?= $parent->getFullName() ?> + </a> + <?php endforeach ?> + </div> + </div> + <?php else : ?> + <?= Functions::getCloseRelationshipName($individual, $spouse) ?> + <?php endif ?> + </th> - <td class="wt-family-navigator-name"> - <?php if ($spouse->canShow()): ?> - <a href="<?= e($spouse->url()) ?>"> - <?= $spouse->getFullName() ?> - </a> - <div class="small"> - <?= $spouse->getLifeSpan() ?> - </div> - <?php else: ?> - <?= $spouse->getFullName() ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> + <td class="wt-family-navigator-name"> + <?php if ($spouse->canShow()) : ?> + <a href="<?= e($spouse->url()) ?>"> + <?= $spouse->getFullName() ?> + </a> + <div class="small"> + <?= $spouse->getLifeSpan() ?> + </div> + <?php else : ?> + <?= $spouse->getFullName() ?> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> - <?php foreach ($family->getChildren() as $child): ?> - <tr class="text-center wt-family-navigator-child wt-gender-<?= $child->getSex() ?>"> - <th class="text-nowrap align-middle" scope="row"> - <?php if ($child === $individual): ?> - <?= Functions::getCloseRelationshipName($individual, $child) ?> - <i class="icon-selected"></i> - <?php elseif ($child->getSpouseFamilies() !== []): ?> - <div class="dropdown"> - <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($child->getXref()) ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= Functions::getCloseRelationshipName($individual, $child) ?> - </a> + <?php foreach ($family->getChildren() as $child) : ?> + <tr class="text-center wt-family-navigator-child wt-gender-<?= $child->getSex() ?>"> + <th class="text-nowrap align-middle" scope="row"> + <?php if ($child === $individual) : ?> + <?= Functions::getCloseRelationshipName($individual, $child) ?> + <i class="icon-selected"></i> + <?php elseif ($child->getSpouseFamilies() !== []) : ?> + <div class="dropdown"> + <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($child->getXref()) ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= Functions::getCloseRelationshipName($individual, $child) ?> + </a> - <div class="dropdown-menu"> - <?php foreach ($child->getSpouseFamilies() as $n => $in_laws): ?> - <?php if ($n > 0) : ?> - <div class="dropdown-divider"></div> - <?php endif ?> - <div class="dropdown-header wt-family-navigator-dropdown-heading"> - <?= I18N::translate('Family') ?> - </div> + <div class="dropdown-menu"> + <?php foreach ($child->getSpouseFamilies() as $n => $in_laws) : ?> + <?php if ($n > 0) : ?> + <div class="dropdown-divider"></div> + <?php endif ?> + <div class="dropdown-header wt-family-navigator-dropdown-heading"> + <?= I18N::translate('Family') ?> + </div> - <?php foreach ($in_laws->getSpouses() as $sibling_in_law): ?> - <?php if ($sibling_in_law !== $child): ?> - <a class="dropdown-item" href="<?= e($sibling_in_law->url()) ?>"> - <?= $sibling_in_law->getFullName() ?> - </a> - <?php endif ?> - <?php endforeach ?> + <?php foreach ($in_laws->getSpouses() as $sibling_in_law) : ?> + <?php if ($sibling_in_law !== $child) : ?> + <a class="dropdown-item" href="<?= e($sibling_in_law->url()) ?>"> + <?= $sibling_in_law->getFullName() ?> + </a> + <?php endif ?> + <?php endforeach ?> - <ul> - <?php foreach ($in_laws->getChildren() as $child_in_law): ?> - <li> - <a class="dropdown-item" href="<?= e($child_in_law->url()) ?>"> - <?= $child_in_law->getFullName() ?> - </a> - </li> - <?php endforeach ?> - </ul> - <?php endforeach ?> - </div> - </div> - <?php else: ?> - <?= Functions::getCloseRelationshipName($individual, $child) ?> - <?php endif ?> - </th> + <ul> + <?php foreach ($in_laws->getChildren() as $child_in_law) : ?> + <li> + <a class="dropdown-item" href="<?= e($child_in_law->url()) ?>"> + <?= $child_in_law->getFullName() ?> + </a> + </li> + <?php endforeach ?> + </ul> + <?php endforeach ?> + </div> + </div> + <?php else : ?> + <?= Functions::getCloseRelationshipName($individual, $child) ?> + <?php endif ?> + </th> - <td> - <?php if ($child->canShow()): ?> - <a href="<?= e($child->url()) ?>"> - <?= $child->getFullName() ?> - </a> - <div class="small"> - <?= $child->getLifeSpan() ?> - </div> - <?php else: ?> - <?= $child->getFullName() ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <td> + <?php if ($child->canShow()) : ?> + <a href="<?= e($child->url()) ?>"> + <?= $child->getFullName() ?> + </a> + <div class="small"> + <?= $child->getLifeSpan() ?> + </div> + <?php else : ?> + <?= $child->getFullName() ?> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/modules/family_nav/sidebar.php b/resources/views/modules/family_nav/sidebar.php index 7e4db8edd3..40032542c1 100644 --- a/resources/views/modules/family_nav/sidebar.php +++ b/resources/views/modules/family_nav/sidebar.php @@ -1,21 +1,21 @@ <div class="wt-sidebar-content wt-sidebar-family-navigator"> - <!-- parent families --> - <?php foreach ($individual->getChildFamilies() as $family): ?> - <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getChildFamilyLabel($family)]) ?> - <?php endforeach ?> + <!-- parent families --> + <?php foreach ($individual->getChildFamilies() as $family) : ?> + <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getChildFamilyLabel($family)]) ?> + <?php endforeach ?> - <!-- step parents --> - <?php foreach ($individual->getChildStepFamilies() as $family): ?> - <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getStepFamilyLabel($family)]) ?> - <?php endforeach ?> + <!-- step parents --> + <?php foreach ($individual->getChildStepFamilies() as $family) : ?> + <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getStepFamilyLabel($family)]) ?> + <?php endforeach ?> - <!-- spouse and children --> - <?php foreach ($individual->getSpouseFamilies() as $family): ?> - <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getSpouseFamilyLabel($family)]) ?> - <?php endforeach ?> + <!-- spouse and children --> + <?php foreach ($individual->getSpouseFamilies() as $family) : ?> + <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getSpouseFamilyLabel($family)]) ?> + <?php endforeach ?> - <!-- step children --> - <?php foreach ($individual->getSpouseStepFamilies() as $family): ?> - <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $family->getFullName()]) ?> - <?php endforeach ?> + <!-- step children --> + <?php foreach ($individual->getSpouseStepFamilies() as $family) : ?> + <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $family->getFullName()]) ?> + <?php endforeach ?> </div> diff --git a/resources/views/modules/faq/config.php b/resources/views/modules/faq/config.php index 1ff5211e61..6c20ef39ee 100644 --- a/resources/views/modules/faq/config.php +++ b/resources/views/modules/faq/config.php @@ -6,98 +6,98 @@ <h1><?= $title ?></h1> <p> - <?= /* I18N: FAQ = “Frequently Asked Question” */ - I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?> - <?= I18N::translate('You may use HTML to format the answer and to add links to other websites.') ?> + <?= /* I18N: FAQ = “Frequently Asked Question” */ + I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?> + <?= I18N::translate('You may use HTML to format the answer and to add links to other websites.') ?> </p> <p> <form class="form form-inline"> - <input type="hidden" name="route" value="module"> - <input type="hidden" name="module" value="faq"> - <input type="hidden" name="action" value="Admin"> - <label for="ged" class="sr-only"> - <?= I18N::translate('Family tree') ?> - </label> - <?= Bootstrap4::select($tree_names, $tree->getName(), ['id' => 'ged', 'name' => 'ged']) ?> - <input type="submit" class="btn btn-primary" value="<?= I18N::translate('show') ?>"> + <input type="hidden" name="route" value="module"> + <input type="hidden" name="module" value="faq"> + <input type="hidden" name="action" value="Admin"> + <label for="ged" class="sr-only"> + <?= I18N::translate('Family tree') ?> + </label> + <?= Bootstrap4::select($tree_names, $tree->getName(), ['id' => 'ged', 'name' => 'ged']) ?> + <input type="submit" class="btn btn-primary" value="<?= I18N::translate('show') ?>"> </form> </p> <p> - <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'ged' => $tree->getName()])) ?>" class="btn btn-link"> + <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'ged' => $tree->getName()])) ?>" class="btn btn-link"> <?= view('icons/add') ?> - <?= /* I18N: FAQ = “Frequently Asked Question” */ - I18N::translate('Add an FAQ') ?> - </a> + <?= /* I18N: FAQ = “Frequently Asked Question” */ + I18N::translate('Add an FAQ') ?> + </a> </p> <table class="table table-bordered"> - <thead> - <tr> - <th><?= I18N::translate('Sort order') ?></th> - <th><?= I18N::translate('Family tree') ?></th> - <th><?= I18N::translate('Question') ?></th> - <th><span class="sr-only"><?= I18N::translate('Move up') ?></span></th> - <th><span class="sr-only"><?= I18N::translate('Move down') ?></span></th> - <th><span class="sr-only"><?= I18N::translate('Edit') ?></span></th> - <th><span class="sr-only"><?= I18N::translate('Delete') ?></span></th> - </tr> - </thead> - <tbody> - <?php foreach ($faqs as $faq): ?> - <tr class="faq_edit_pos"> - <td> - <?= I18N::number($faq->block_order + 1) ?> - </td> - <td> - <?php if ($faq->gedcom_id === null): ?> - <?= I18N::translate('All') ?> - <?php else: ?> - <?= e($tree->getTitle()) ?> - <?php endif ?> - </td> - <td> - <?= e($faq->header) ?> - </td> - <td> - <?php if ($faq->block_order != $min_block_order): ?> - <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminMoveUp', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-secondary"> + <thead> + <tr> + <th><?= I18N::translate('Sort order') ?></th> + <th><?= I18N::translate('Family tree') ?></th> + <th><?= I18N::translate('Question') ?></th> + <th><span class="sr-only"><?= I18N::translate('Move up') ?></span></th> + <th><span class="sr-only"><?= I18N::translate('Move down') ?></span></th> + <th><span class="sr-only"><?= I18N::translate('Edit') ?></span></th> + <th><span class="sr-only"><?= I18N::translate('Delete') ?></span></th> + </tr> + </thead> + <tbody> + <?php foreach ($faqs as $faq) : ?> + <tr class="faq_edit_pos"> + <td> + <?= I18N::number($faq->block_order + 1) ?> + </td> + <td> + <?php if ($faq->gedcom_id === null) : ?> + <?= I18N::translate('All') ?> + <?php else : ?> + <?= e($tree->getTitle()) ?> + <?php endif ?> + </td> + <td> + <?= e($faq->header) ?> + </td> + <td> + <?php if ($faq->block_order != $min_block_order) : ?> + <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminMoveUp', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-secondary"> <?= view('icons/arrow-up') ?> - <?= I18N::translate('Move up') ?> - </button> - </form> - <?php endif ?> - </td> - <td> - <?php if ($faq->block_order != $max_block_order): ?> - <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminMoveDown', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-secondary"> + <?= I18N::translate('Move up') ?> + </button> + </form> + <?php endif ?> + </td> + <td> + <?php if ($faq->block_order != $max_block_order) : ?> + <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminMoveDown', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-secondary"> <?= view('icons/arrow-down') ?> - <?= I18N::translate('Move down') ?> - </button> - </form> - <?php endif ?> - </td> - <td> - <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" class="btn btn-primary"> + <?= I18N::translate('Move down') ?> + </button> + </form> + <?php endif ?> + </td> + <td> + <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" class="btn btn-primary"> <?= view('icons/edit') ?> - <?= I18N::translate('Edit') ?> - </a> - </td> - <td> - <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminDelete', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-danger" onclick="return confirm(this.dataset.confirm);" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($faq->header)) ?>"> + <?= I18N::translate('Edit') ?> + </a> + </td> + <td> + <form action="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminDelete', 'block_id' => $faq->block_id, 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-danger" onclick="return confirm(this.dataset.confirm);" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($faq->header)) ?>"> <?= view('icons/delete') ?> - <?= I18N::translate('delete') ?> - </button> - </form> - </td> - </tr> - <?php endforeach ?> - </tbody> + <?= I18N::translate('delete') ?> + </button> + </form> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/modules/faq/edit.php b/resources/views/modules/faq/edit.php index 63cda98afd..206f1109aa 100644 --- a/resources/views/modules/faq/edit.php +++ b/resources/views/modules/faq/edit.php @@ -7,73 +7,73 @@ <h1><?= $title ?></h1> <form name="faq" class="form-horizontal" method="post"> - <?= csrf_field() ?> - <input type="hidden" name="block_id" value="<?= $block_id ?>"> + <?= csrf_field() ?> + <input type="hidden" name="block_id" value="<?= $block_id ?>"> - <div class="row form-group"> - <label for="header" class="col-sm-3 col-form-label"> - <?= I18N::translate('Question') ?> - </label> + <div class="row form-group"> + <label for="header" class="col-sm-3 col-form-label"> + <?= I18N::translate('Question') ?> + </label> - <div class="col-sm-9"> - <input type="text" class="form-control" name="header" id="header" - value="<?= e($header) ?>"> - </div> - </div> + <div class="col-sm-9"> + <input type="text" class="form-control" name="header" id="header" + value="<?= e($header) ?>"> + </div> + </div> - <div class="row form-group"> - <label for="faqbody" class="col-sm-3 col-form-label"> - <?= I18N::translate('Answer') ?> - </label> + <div class="row form-group"> + <label for="faqbody" class="col-sm-3 col-form-label"> + <?= I18N::translate('Answer') ?> + </label> - <div class="col-sm-9"> - <textarea name="faqbody" id="faqbody" class="form-control html-edit" rows="10"><?= e($faqbody) ?></textarea> - </div> - </div> + <div class="col-sm-9"> + <textarea name="faqbody" id="faqbody" class="form-control html-edit" rows="10"><?= e($faqbody) ?></textarea> + </div> + </div> - <div class="row form-group"> - <label for="xref" class="col-sm-3 col-form-label"> - <?= /* I18N: Label for a configuration option */ - I18N::translate('Show this block for which languages') ?> - </label> + <div class="row form-group"> + <label for="xref" class="col-sm-3 col-form-label"> + <?= /* I18N: Label for a configuration option */ + I18N::translate('Show this block for which languages') ?> + </label> - <div class="col-sm-9"> - <?= FunctionsEdit::editLanguageCheckboxes('languages', $languages) ?> - </div> - </div> + <div class="col-sm-9"> + <?= FunctionsEdit::editLanguageCheckboxes('languages', $languages) ?> + </div> + </div> - <div class="row form-group"> - <label for="block_order" class="col-sm-3 col-form-label"> - <?= I18N::translate('Sort order') ?> - </label> + <div class="row form-group"> + <label for="block_order" class="col-sm-3 col-form-label"> + <?= I18N::translate('Sort order') ?> + </label> - <div class="col-sm-9"> - <input type="text" name="block_order" id="block_order" class="form-control" value="<?= $block_order ?>"> - </div> - </div> + <div class="col-sm-9"> + <input type="text" name="block_order" id="block_order" class="form-control" value="<?= $block_order ?>"> + </div> + </div> - <div class="row form-group"> - <label for="gedcom_id" class="col-sm-3 col-form-label"> - <?= I18N::translate('Family tree') ?> - </label> + <div class="row form-group"> + <label for="gedcom_id" class="col-sm-3 col-form-label"> + <?= I18N::translate('Family tree') ?> + </label> - <div class="col-sm-9"> - <?= Bootstrap4::select(['' => I18N::translate('All')] + $tree_names, $tree->getName(), ['id' => 'gedcom_id', 'name' => 'gedcom_id']) ?> - <p class="small text-muted"> - <?= /* I18N: FAQ = “Frequently Asked Question” */ - I18N::translate('An FAQ can be displayed on just one of the family trees, or on all the family trees.') ?> - </p> - </div> - </div> + <div class="col-sm-9"> + <?= Bootstrap4::select(['' => I18N::translate('All')] + $tree_names, $tree->getName(), ['id' => 'gedcom_id', 'name' => 'gedcom_id']) ?> + <p class="small text-muted"> + <?= /* I18N: FAQ = “Frequently Asked Question” */ + I18N::translate('An FAQ can be displayed on just one of the family trees, or on all the family trees.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> - </div> - </div> + <?= I18N::translate('save') ?> + </button> + </div> + </div> </form> <?= view('modules/ckeditor/ckeditor-js') ?> diff --git a/resources/views/modules/faq/list.php b/resources/views/modules/faq/list.php index c4a18b74b2..fd394ba5fd 100644 --- a/resources/views/modules/faq/list.php +++ b/resources/views/modules/faq/list.php @@ -4,26 +4,26 @@ <h2 class="wt-page-title"><?= $title ?></h2> <table id="story_table" class="w-100"> - <thead> - <tr> - <th><?= I18N::translate('Story title') ?></th> - <th><?= I18N::translate('Individual') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($stories as $story): ?> - <tr> - <td> - <?= e($story->title) ?> - </td> - <td> - <a href="<?= e($story->individual->url()) ?>#tab-stories"> - <?= $story->individual->getFullName() ?> - </a> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th><?= I18N::translate('Story title') ?></th> + <th><?= I18N::translate('Individual') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($stories as $story) : ?> + <tr> + <td> + <?= e($story->title) ?> + </td> + <td> + <a href="<?= e($story->individual->url()) ?>#tab-stories"> + <?= $story->individual->getFullName() ?> + </a> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <?php View::push('javascript') ?> @@ -38,7 +38,7 @@ info: true, sorting: [[0,"asc"]], columns: [ - /* 0-name */ null, + /* 0-name */ null, /* 1-NAME */ null ], <?= I18N::datatablesI18N() ?> diff --git a/resources/views/modules/faq/show.php b/resources/views/modules/faq/show.php index 323432b01d..e1c15db4f8 100644 --- a/resources/views/modules/faq/show.php +++ b/resources/views/modules/faq/show.php @@ -3,24 +3,24 @@ <h2 class="wt-page-title"><?= $title ?></h2> <table class="faq"> - <?php foreach ($faqs as $id => $faq): ?> - <tr> - <td style="padding: 5px;"> - <a href="#faq<?= e($id) ?>"><?= e($faq->header) ?></a> - </td> - </tr> - <?php endforeach ?> + <?php foreach ($faqs as $id => $faq) : ?> + <tr> + <td style="padding: 5px;"> + <a href="#faq<?= e($id) ?>"><?= e($faq->header) ?></a> + </td> + </tr> + <?php endforeach ?> </table> -<?php foreach ($faqs as $id => $faq): ?> - <hr> - <div class="faq_title" id="faq<?= $id ?>"> - <?= e($faq->header) ?> - <div class="faq_top faq_italic"> - <a href="#content"><?= I18N::translate('back to top') ?></a> - </div> - </div> - <div class="faq_body"> - <?= substr($faq->body, 0, 1) == '<' ? e($faq->body) : nl2br(e($faq->body), false) ?> - </div> +<?php foreach ($faqs as $id => $faq) : ?> + <hr> + <div class="faq_title" id="faq<?= $id ?>"> + <?= e($faq->header) ?> + <div class="faq_top faq_italic"> + <a href="#content"><?= I18N::translate('back to top') ?></a> + </div> + </div> + <div class="faq_body"> + <?= substr($faq->body, 0, 1) == '<' ? e($faq->body) : nl2br(e($faq->body), false) ?> + </div> <?php endforeach ?> diff --git a/resources/views/modules/gedcom_block/welcome.php b/resources/views/modules/gedcom_block/welcome.php index 293867ec60..ef54eaf536 100644 --- a/resources/views/modules/gedcom_block/welcome.php +++ b/resources/views/modules/gedcom_block/welcome.php @@ -1,11 +1,11 @@ <div class="d-flex flex-wrap justify-content-around"> - <?php foreach ($links as $link): ?> - <div class="text-center m-1"> - <a href="<?= e($link['url']) ?>"> - <i class="<?= $link['icon'] ?>"></i> - <br> - <?= $link['title'] ?> - </a> - </div> - <?php endforeach ?> + <?php foreach ($links as $link) : ?> + <div class="text-center m-1"> + <a href="<?= e($link['url']) ?>"> + <i class="<?= $link['icon'] ?>"></i> + <br> + <?= $link['title'] ?> + </a> + </div> + <?php endforeach ?> </div> diff --git a/resources/views/modules/gedcom_favorites/favorites.php b/resources/views/modules/gedcom_favorites/favorites.php index e514764e4d..70349925f6 100644 --- a/resources/views/modules/gedcom_favorites/favorites.php +++ b/resources/views/modules/gedcom_favorites/favorites.php @@ -2,58 +2,58 @@ <?php use Fisharebest\Webtrees\Individual; ?> <?php use Fisharebest\Webtrees\Theme; ?> -<?php foreach ($favorites as $favorite): ?> - <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->getSex() : '' ?>"> - <?php if ($favorite->favorite_type === 'URL'): ?> - <a href="<?= e($favorite->url) ?>"><b><?= e($favorite->title) ?></b></a> - <?php elseif ($favorite->record instanceof Individual): ?> - <?= Theme::theme()->individualBoxLarge($favorite->record) ?> - <?php elseif ($favorite->record !== null) : ?> - <?= $favorite->record->formatList() ?> - <?php endif ?> +<?php foreach ($favorites as $favorite) : ?> + <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->getSex() : '' ?>"> + <?php if ($favorite->favorite_type === 'URL') : ?> + <a href="<?= e($favorite->url) ?>"><b><?= e($favorite->title) ?></b></a> + <?php elseif ($favorite->record instanceof Individual) : ?> + <?= Theme::theme()->individualBoxLarge($favorite->record) ?> + <?php elseif ($favorite->record !== null) : ?> + <?= $favorite->record->formatList() ?> + <?php endif ?> - <?= e((string) $favorite->note) ?> - </div> + <?= e((string) $favorite->note) ?> + </div> - <?php if ($is_manager): ?> - <form action="<?= e(route('module', ['module' => 'gedcom_favorites', 'action' => 'DeleteFavorite', 'ged' => $tree->getName(), 'favorite_id' => $favorite->favorite_id])) ?>" method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-link btn-sm" data-confirm="<?= I18N::translate('Are you sure you want to remove this item from your list of favorites?') ?>" onclick="return confirm(this.dataset.confirm);"> - <?= I18N::translate('Remove') ?> - </button> - </form> - <?php endif ?> + <?php if ($is_manager) : ?> + <form action="<?= e(route('module', ['module' => 'gedcom_favorites', 'action' => 'DeleteFavorite', 'ged' => $tree->getName(), 'favorite_id' => $favorite->favorite_id])) ?>" method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-link btn-sm" data-confirm="<?= I18N::translate('Are you sure you want to remove this item from your list of favorites?') ?>" onclick="return confirm(this.dataset.confirm);"> + <?= I18N::translate('Remove') ?> + </button> + </form> + <?php endif ?> <?php endforeach ?> -<?php if ($is_manager): ?> - <div class="add_fav_head"> - <a href="#" onclick="return expand_layer('add_fav<?= e($block_id) ?>');"> - <?= I18N::translate('Add a favorite') ?> - <i id="add_fav<?= e($block_id) ?>_img" class="icon-plus"></i> - </a> - </div> - <div id="add_fav<?= e($block_id) ?>" style="display: none;"> - <form action="<?= e(route('module', ['module' => 'gedcom_favorites', 'action' => 'AddFavorite', 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <div class="add_fav_ref"> - <input type="radio" name="fav_category" value="record" checked onclick="$('#xref<?= e($block_id) ?>').removeAttr('disabled'); $('#url, #title').attr('disabled','disabled').val('');"> - <label for="xref<?= e($block_id) ?>"> - <?= I18N::translate('Record') ?> - </label> - <input class="pedigree_form" data-autocomplete-type="IFSRO" type="text" name="xref" id="xref<?= e($block_id) ?>" size="5"> - </div> - <div class="add_fav_url"> - <input type="radio" name="fav_category" value="url" onclick="$('#url, #title').removeAttr('disabled'); $('#xref<?= e($block_id) ?>').attr('disabled','disabled').val('');"> - <input type="text" name="url" id="url" size="20" value="" placeholder="<?= I18N::translate('URL') ?>" disabled> - <input type="text" name="title" id="title" size="20" value="" placeholder="<?= I18N::translate('Title') ?>" disabled> - <p> - <?= I18N::translate('Enter an optional note about this favorite') ?> - </p> - <textarea name="note" rows="6" cols="50"></textarea> - </div> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('add') ?> - </button> - </form> - </div> +<?php if ($is_manager) : ?> + <div class="add_fav_head"> + <a href="#" onclick="return expand_layer('add_fav<?= e($block_id) ?>');"> + <?= I18N::translate('Add a favorite') ?> + <i id="add_fav<?= e($block_id) ?>_img" class="icon-plus"></i> + </a> + </div> + <div id="add_fav<?= e($block_id) ?>" style="display: none;"> + <form action="<?= e(route('module', ['module' => 'gedcom_favorites', 'action' => 'AddFavorite', 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <div class="add_fav_ref"> + <input type="radio" name="fav_category" value="record" checked onclick="$('#xref<?= e($block_id) ?>').removeAttr('disabled'); $('#url, #title').attr('disabled','disabled').val('');"> + <label for="xref<?= e($block_id) ?>"> + <?= I18N::translate('Record') ?> + </label> + <input class="pedigree_form" data-autocomplete-type="IFSRO" type="text" name="xref" id="xref<?= e($block_id) ?>" size="5"> + </div> + <div class="add_fav_url"> + <input type="radio" name="fav_category" value="url" onclick="$('#url, #title').removeAttr('disabled'); $('#xref<?= e($block_id) ?>').attr('disabled','disabled').val('');"> + <input type="text" name="url" id="url" size="20" value="" placeholder="<?= I18N::translate('URL') ?>" disabled> + <input type="text" name="title" id="title" size="20" value="" placeholder="<?= I18N::translate('Title') ?>" disabled> + <p> + <?= I18N::translate('Enter an optional note about this favorite') ?> + </p> + <textarea name="note" rows="6" cols="50"></textarea> + </div> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('add') ?> + </button> + </form> + </div> <?php endif ?> diff --git a/resources/views/modules/gedcom_news/edit.php b/resources/views/modules/gedcom_news/edit.php index d25be2948f..1da2e6525b 100644 --- a/resources/views/modules/gedcom_news/edit.php +++ b/resources/views/modules/gedcom_news/edit.php @@ -3,44 +3,44 @@ <h2><?= $title ?></h2> <form method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <table> - <tr> - <th> - <label for="subject"> - <?= I18N::translate('Title') ?> - </label> - </th> - <tr> - <tr> - <td> - <input type="text" id="subject" name="subject" size="50" dir="auto" autofocus value="<?= e($subject) ?>"> - </td> - </tr> - <tr> - <th> - <label for="body"> - <?= I18N::translate('Content') ?> - </label> - </th> - </tr> - <tr> - <td> - <textarea id="body" name="body" class="html-edit form-control" rows="10" dir="auto"><?= e($body) ?></textarea> - </td> - </tr> + <table> + <tr> + <th> + <label for="subject"> + <?= I18N::translate('Title') ?> + </label> + </th> + <tr> + <tr> + <td> + <input type="text" id="subject" name="subject" size="50" dir="auto" autofocus value="<?= e($subject) ?>"> + </td> + </tr> + <tr> + <th> + <label for="body"> + <?= I18N::translate('Content') ?> + </label> + </th> + </tr> + <tr> + <td> + <textarea id="body" name="body" class="html-edit form-control" rows="10" dir="auto"><?= e($body) ?></textarea> + </td> + </tr> - <tr> - <td> - <button class="btn btn-primary" type="submit"> - <?= I18N::translate('save') ?> - </button> + <tr> + <td> + <button class="btn btn-primary" type="submit"> + <?= I18N::translate('save') ?> + </button> - <a class="btn btn-secondary" href="<?= e(route('tree-page', ['ged' => $tree->getName()])) ?>"> - <?= I18N::translate('cancel') ?> - </a> - </td> - </tr> - </table> + <a class="btn btn-secondary" href="<?= e(route('tree-page', ['ged' => $tree->getName()])) ?>"> + <?= I18N::translate('cancel') ?> + </a> + </td> + </tr> + </table> </form> diff --git a/resources/views/modules/gedcom_news/list.php b/resources/views/modules/gedcom_news/list.php index 422ecef150..979e917fb3 100644 --- a/resources/views/modules/gedcom_news/list.php +++ b/resources/views/modules/gedcom_news/list.php @@ -2,48 +2,48 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsDate; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if (empty($articles)): ?> - <?= I18N::translate('No news articles have been submitted.') ?> +<?php if (empty($articles)) : ?> + <?= I18N::translate('No news articles have been submitted.') ?> <?php endif ?> -<?php foreach ($articles as $n => $article): ?> - <?php if ($n === 5 && count($articles) > 5): ?> - <p> - <a class="btn btn-link" data-toggle="collapse" data-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>"><?= I18N::translate('More news articles') ?> - </a> - </p> - <div class="collapse" id="more-news-<?= e($block_id) ?>"> - <?php endif ?> +<?php foreach ($articles as $n => $article) : ?> + <?php if ($n === 5 && count($articles) > 5) : ?> + <p> + <a class="btn btn-link" data-toggle="collapse" data-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>"><?= I18N::translate('More news articles') ?> + </a> + </p> + <div class="collapse" id="more-news-<?= e($block_id) ?>"> + <?php endif ?> - <div class="news_box"> - <div class="news_title"><?= e($article->subject) ?></div> - <div class="news_date"><?= FunctionsDate::formatTimestamp($article->updated) ?></div> - <div style="white-space: pre-wrap"><?= e($article->body) ?></div> + <div class="news_box"> + <div class="news_title"><?= e($article->subject) ?></div> + <div class="news_date"><?= FunctionsDate::formatTimestamp($article->updated) ?></div> + <div style="white-space: pre-wrap"><?= e($article->body) ?></div> - <?php if (Auth::isManager($tree)): ?> - <hr> - <form action="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'DeleteNews', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <a class="btn btn-link" href="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'EditNews', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Edit') ?> - </a> - | - <button class="btn btn-link" type="submit" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($article->subject)) ?>" onclick="return confirm(this.dataset.confirm);"> - <?= I18N::translate('Delete') ?> - </button> - </form> - <?php endif ?> - </div> + <?php if (Auth::isManager($tree)) : ?> + <hr> + <form action="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'DeleteNews', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <a class="btn btn-link" href="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'EditNews', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Edit') ?> + </a> + | + <button class="btn btn-link" type="submit" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($article->subject)) ?>" onclick="return confirm(this.dataset.confirm);"> + <?= I18N::translate('Delete') ?> + </button> + </form> + <?php endif ?> + </div> <?php endforeach ?> -<?php if (count($articles) > 5): ?> - </div> +<?php if (count($articles) > 5) : ?> + </div> <?php endif ?> -<?php if (Auth::isManager($tree)): ?> - <p> - <a href="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'EditNews', 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Add a news article') ?> - </a> - </p> +<?php if (Auth::isManager($tree)) : ?> + <p> + <a href="<?= e(route('module', ['module' => 'gedcom_news', 'action' => 'EditNews', 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Add a news article') ?> + </a> + </p> <?php endif ?> diff --git a/resources/views/modules/gedcom_stats/config.php b/resources/views/modules/gedcom_stats/config.php index 4ebebcdb0f..b330f7bc7a 100644 --- a/resources/views/modules/gedcom_stats/config.php +++ b/resources/views/modules/gedcom_stats/config.php @@ -2,66 +2,69 @@ <?php use Fisharebest\Webtrees\I18N; ?> <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Last change') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::checkbox(/* I18N: label for yes/no option */ - I18N::translate('Show date of last update'), false, ['name' => 'show_last_update', 'checked' => (bool) $show_last_update]) ?> - </div> - </div> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Last change') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::checkbox(/* I18N: label for yes/no option */ + I18N::translate('Show date of last update'), + false, + ['name' => 'show_last_update', 'checked' => (bool) $show_last_update] + ) ?> + </div> + </div> </fieldset> <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Statistics') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::checkbox(I18N::translate('Individuals'), false, ['name' => 'stat_indi', 'checked' => (bool) $stat_indi]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Total surnames'), false, ['name' => 'stat_surname', 'checked' => (bool) $stat_surname]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Families'), false, ['name' => 'stat_fam', 'checked' => (bool) $stat_fam]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Sources'), false, ['name' => 'stat_sour', 'checked' => (bool) $stat_sour]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Media objects'), false, ['name' => 'stat_media', 'checked' => (bool) $stat_media]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Repositories'), false, ['name' => 'stat_repo', 'checked' => (bool) $stat_repo]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Total events'), false, ['name' => 'stat_events', 'checked' => (bool) $stat_events]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Total users'), false, ['name' => 'stat_users', 'checked' => (bool) $stat_users]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Earliest birth'), false, ['name' => 'stat_first_birth', 'checked' => (bool) $stat_first_birth]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Latest birth'), false, ['name' => 'stat_last_birth', 'checked' => (bool) $stat_last_birth]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Earliest death'), false, ['name' => 'stat_first_death', 'checked' => (bool) $stat_first_death]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Latest death'), false, ['name' => 'stat_last_death', 'checked' => (bool) $stat_last_death]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Individual who lived the longest'), false, ['name' => 'stat_long_life', 'checked' => (bool) $stat_long_life]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Average age at death'), false, ['name' => 'stat_avg_life', 'checked' => (bool) $stat_avg_life]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Family with the most children'), false, ['name' => 'stat_most_chil', 'checked' => (bool) $stat_most_chil]) ?> - <?= Bootstrap4::checkbox(I18N::translate('Average number of children per family'), false, ['name' => 'stat_avg_chil', 'checked' => (bool) $stat_avg_chil]) ?> - </div> - </div> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Statistics') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::checkbox(I18N::translate('Individuals'), false, ['name' => 'stat_indi', 'checked' => (bool) $stat_indi]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Total surnames'), false, ['name' => 'stat_surname', 'checked' => (bool) $stat_surname]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Families'), false, ['name' => 'stat_fam', 'checked' => (bool) $stat_fam]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Sources'), false, ['name' => 'stat_sour', 'checked' => (bool) $stat_sour]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Media objects'), false, ['name' => 'stat_media', 'checked' => (bool) $stat_media]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Repositories'), false, ['name' => 'stat_repo', 'checked' => (bool) $stat_repo]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Total events'), false, ['name' => 'stat_events', 'checked' => (bool) $stat_events]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Total users'), false, ['name' => 'stat_users', 'checked' => (bool) $stat_users]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Earliest birth'), false, ['name' => 'stat_first_birth', 'checked' => (bool) $stat_first_birth]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Latest birth'), false, ['name' => 'stat_last_birth', 'checked' => (bool) $stat_last_birth]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Earliest death'), false, ['name' => 'stat_first_death', 'checked' => (bool) $stat_first_death]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Latest death'), false, ['name' => 'stat_last_death', 'checked' => (bool) $stat_last_death]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Individual who lived the longest'), false, ['name' => 'stat_long_life', 'checked' => (bool) $stat_long_life]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Average age at death'), false, ['name' => 'stat_avg_life', 'checked' => (bool) $stat_avg_life]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Family with the most children'), false, ['name' => 'stat_most_chil', 'checked' => (bool) $stat_most_chil]) ?> + <?= Bootstrap4::checkbox(I18N::translate('Average number of children per family'), false, ['name' => 'stat_avg_chil', 'checked' => (bool) $stat_avg_chil]) ?> + </div> + </div> </fieldset> <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <label for="show_common_surnames"> - <?= I18N::translate('Surnames') ?> - </label> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::checkbox(I18N::translate('Most common surnames'), false, ['name' => 'show_common_surnames', 'checked' => (bool) $show_common_surnames]) ?> - <label for="number_of_surnames"> - <?= /* I18N: ... to show in a list */ - I18N::translate('Number of surnames') ?> - <input - class="form-control" - id="number_of_surnames" - maxlength="5" - name="number_of_surnames" - pattern="[1-9][0-9]*" - required - type="text" - value="<?= e($number_of_surnames) ?>" - > - </label> - </div> - </div> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <label for="show_common_surnames"> + <?= I18N::translate('Surnames') ?> + </label> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::checkbox(I18N::translate('Most common surnames'), false, ['name' => 'show_common_surnames', 'checked' => (bool) $show_common_surnames]) ?> + <label for="number_of_surnames"> + <?= /* I18N: ... to show in a list */ + I18N::translate('Number of surnames') ?> + <input + class="form-control" + id="number_of_surnames" + maxlength="5" + name="number_of_surnames" + pattern="[1-9][0-9]*" + required + type="text" + value="<?= e($number_of_surnames) ?>" + > + </label> + </div> + </div> </fieldset> diff --git a/resources/views/modules/gedcom_stats/statistics.php b/resources/views/modules/gedcom_stats/statistics.php index 91948dd753..927b1a4fd0 100644 --- a/resources/views/modules/gedcom_stats/statistics.php +++ b/resources/views/modules/gedcom_stats/statistics.php @@ -1,247 +1,247 @@ <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($show_last_update): ?> - <p class="card-text"> - <?= I18N::translate('This family tree was last updated on %s.', strip_tags($stats->gedcomUpdated())) ?> - </p> +<?php if ($show_last_update) : ?> + <p class="card-text"> + <?= I18N::translate('This family tree was last updated on %s.', strip_tags($stats->gedcomUpdated())) ?> + </p> <?php endif ?> <div class="row"> - <div class="col-sm-4"> - <table class="table wt-facts-table"> - <caption class="sr-only"> - <?= I18N::translate('Statistics') ?> - </caption> - <tbody> - <?php if ($stat_indi): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Individuals') ?> - </th> - <td> - <?= $stats->totalIndividuals() ?> - </td> - </tr> + <div class="col-sm-4"> + <table class="table wt-facts-table"> + <caption class="sr-only"> + <?= I18N::translate('Statistics') ?> + </caption> + <tbody> + <?php if ($stat_indi) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Individuals') ?> + </th> + <td> + <?= $stats->totalIndividuals() ?> + </td> + </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Males') ?> - </th> - <td> - <?= $stats->totalSexMales() ?> - <br> - <?= $stats->totalSexMalesPercentage() ?> - </td> - </tr> + <tr> + <th scope="row"> + <?= I18N::translate('Males') ?> + </th> + <td> + <?= $stats->totalSexMales() ?> + <br> + <?= $stats->totalSexMalesPercentage() ?> + </td> + </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Females') ?> - </th> - <td> - <?= $stats->totalSexFemales() ?> - <br> - <?= $stats->totalSexFemalesPercentage() ?> - </td> - </tr> - <?php endif ?> + <tr> + <th scope="row"> + <?= I18N::translate('Females') ?> + </th> + <td> + <?= $stats->totalSexFemales() ?> + <br> + <?= $stats->totalSexFemalesPercentage() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_surname): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Surnames') ?> - </th> - <td> - <?= $stats->totalSurnames() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_surname) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Surnames') ?> + </th> + <td> + <?= $stats->totalSurnames() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_fam): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Families') ?> - </th> - <td> - <?= $stats->totalFamilies() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_fam) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Families') ?> + </th> + <td> + <?= $stats->totalFamilies() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_sour): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Sources') ?> - </th> - <td> - <?= $stats->totalSources() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_sour) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Sources') ?> + </th> + <td> + <?= $stats->totalSources() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_media): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Media objects') ?> - </th> - <td> - <?= $stats->totalMedia() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_media) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Media objects') ?> + </th> + <td> + <?= $stats->totalMedia() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_repo): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Repositories') ?> - </th> - <td> - <?= $stats->totalRepositories() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_repo) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Repositories') ?> + </th> + <td> + <?= $stats->totalRepositories() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_events): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Events') ?> - </th> - <td> - <?= $stats->totalEvents() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_events) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Events') ?> + </th> + <td> + <?= $stats->totalEvents() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_users): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Users') ?> - </th> - <td> - <?= $stats->totalUsers() ?> - </td> - </tr> - <?php endif ?> - </tbody> - </table> - </div> + <?php if ($stat_users) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Users') ?> + </th> + <td> + <?= $stats->totalUsers() ?> + </td> + </tr> + <?php endif ?> + </tbody> + </table> + </div> - <div class="col-sm-8"> - <table class="table wt-facts-table"> - <caption class="sr-only"> - <?= I18N::translate('Statistics') ?> - </caption> + <div class="col-sm-8"> + <table class="table wt-facts-table"> + <caption class="sr-only"> + <?= I18N::translate('Statistics') ?> + </caption> - <tbody> - <?php if ($stat_first_birth): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Earliest birth') ?> - </th> - <td> - <?= $stats->firstBirth() ?> - </td> - </tr> - <?php endif ?> + <tbody> + <?php if ($stat_first_birth) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Earliest birth') ?> + </th> + <td> + <?= $stats->firstBirth() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_last_birth): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Latest birth') ?> - </th> - <td> - <?= $stats->lastBirth() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_last_birth) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Latest birth') ?> + </th> + <td> + <?= $stats->lastBirth() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_first_death): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Earliest death') ?> - </th> - <td> - <?= $stats->firstDeath() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_first_death) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Earliest death') ?> + </th> + <td> + <?= $stats->firstDeath() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_last_death): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Latest death') ?> - </th> - <td> - <?= $stats->lastDeath() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_last_death) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Latest death') ?> + </th> + <td> + <?= $stats->lastDeath() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_long_life): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Individual who lived the longest') ?> - </th> - <td> - <?= $stats->longestLife() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_long_life) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Individual who lived the longest') ?> + </th> + <td> + <?= $stats->longestLife() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_avg_life): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Average age at death') ?> - </th> - <td> - <?= $stats->averageLifespan() ?> - <br> - <?= I18N::translate('Males') ?>: <?= $stats->averageLifespanMale() ?> - <br> - <?= I18N::translate('Females') ?> <?= $stats->averageLifespanFemale() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_avg_life) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Average age at death') ?> + </th> + <td> + <?= $stats->averageLifespan() ?> + <br> + <?= I18N::translate('Males') ?>: <?= $stats->averageLifespanMale() ?> + <br> + <?= I18N::translate('Females') ?> <?= $stats->averageLifespanFemale() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_most_chil): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Family with the most children') ?> - </th> - <td> - <?= e($stats->largestFamilySize()) ?> - <br> - <?= $stats->largestFamily() ?> - </td> - </tr> - <?php endif ?> + <?php if ($stat_most_chil) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Family with the most children') ?> + </th> + <td> + <?= e($stats->largestFamilySize()) ?> + <br> + <?= $stats->largestFamily() ?> + </td> + </tr> + <?php endif ?> - <?php if ($stat_avg_chil): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Average number of children per family') ?> - </th> - <td> - <?= $stats->averageChildren() ?> - </td> - </tr> - <?php endif ?> - </tbody> - </table> - </div> + <?php if ($stat_avg_chil) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Average number of children per family') ?> + </th> + <td> + <?= $stats->averageChildren() ?> + </td> + </tr> + <?php endif ?> + </tbody> + </table> + </div> </div> -<?php if (!empty($surnames)): ?> - <div class="clearfloat"> - <p> - <strong> - <?= I18N::translate('Most common surnames') ?> - </strong> - <br> - <span class="common_surnames"> - <?= $surnames ?> - </span> - </p> - </div> +<?php if (!empty($surnames)) : ?> + <div class="clearfloat"> + <p> + <strong> + <?= I18N::translate('Most common surnames') ?> + </strong> + <br> + <span class="common_surnames"> + <?= $surnames ?> + </span> + </p> + </div> <?php endif ?> diff --git a/resources/views/modules/html/config.php b/resources/views/modules/html/config.php index 693193805f..ca7166b263 100644 --- a/resources/views/modules/html/config.php +++ b/resources/views/modules/html/config.php @@ -3,58 +3,58 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="title"> - <?= I18N::translate('Title') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" id="title" name="title" value="<?= e($title) ?>"> - </div> + <label class="col-sm-3 col-form-label" for="title"> + <?= I18N::translate('Title') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" id="title" name="title" value="<?= e($title) ?>"> + </div> </div> <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="template"> - <?= I18N::translate('Templates') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select([$html => I18N::translate('Custom')] + array_flip($templates), '', ['onchange' => 'this.form.html.value=this.options[this.selectedIndex].value; CKEDITOR.instances.html.setData(document.getElementById("html").value);', 'id' => 'template']) ?> - <p class="small text-muted"> - <?= I18N::translate('To assist you in getting started with this block, we have created several standard templates. When you select one of these templates, the text area will contain a copy that you can then alter to suit your site’s requirements.') ?> - </p> - </div> + <label class="col-sm-3 col-form-label" for="template"> + <?= I18N::translate('Templates') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select([$html => I18N::translate('Custom')] + array_flip($templates), '', ['onchange' => 'this.form.html.value=this.options[this.selectedIndex].value; CKEDITOR.instances.html.setData(document.getElementById("html").value);', 'id' => 'template']) ?> + <p class="small text-muted"> + <?= I18N::translate('To assist you in getting started with this block, we have created several standard templates. When you select one of these templates, the text area will contain a copy that you can then alter to suit your site’s requirements.') ?> + </p> + </div> </div> <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="html"> - <?= I18N::translate('Content') ?> - </label> - <div class="col-sm-9"> - <p> - <?= I18N::translate('As well as using the toolbar to apply HTML formatting, you can insert database fields which are updated automatically. These special fields are marked with <b>#</b> characters. For example <b>#totalFamilies#</b> will be replaced with the actual number of families in the database. Advanced users may wish to apply CSS classes to their text, so that the formatting matches the currently selected theme.') ?> - </p> - <textarea name="html" id="html" class="html-edit form-control" rows="10"><?= e($html) ?></textarea> - </div> + <label class="col-sm-3 col-form-label" for="html"> + <?= I18N::translate('Content') ?> + </label> + <div class="col-sm-9"> + <p> + <?= I18N::translate('As well as using the toolbar to apply HTML formatting, you can insert database fields which are updated automatically. These special fields are marked with <b>#</b> characters. For example <b>#totalFamilies#</b> will be replaced with the actual number of families in the database. Advanced users may wish to apply CSS classes to their text, so that the formatting matches the currently selected theme.') ?> + </p> + <textarea name="html" id="html" class="html-edit form-control" rows="10"><?= e($html) ?></textarea> + </div> </div> <fieldset class="form-group"> - <div class="row"> - <legend class="form-control-legend col-sm-3"> - <?= I18N::translate('Show the date and time of update') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('show_timestamp', FunctionsEdit::optionsNoYes(), $show_timestamp, true) ?> - </div> - </div> + <div class="row"> + <legend class="form-control-legend col-sm-3"> + <?= I18N::translate('Show the date and time of update') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('show_timestamp', FunctionsEdit::optionsNoYes(), $show_timestamp, true) ?> + </div> + </div> </fieldset> <fieldset class="form-group"> - <div class="row"> - <legend class="form-control-legend col-sm-3"> - <?= I18N::translate('Show this block for which languages') ?> - </legend> - <div class="col-sm-9"> - <?= FunctionsEdit::editLanguageCheckboxes('lang', $languages) ?> - </div> - </div> + <div class="row"> + <legend class="form-control-legend col-sm-3"> + <?= I18N::translate('Show this block for which languages') ?> + </legend> + <div class="col-sm-9"> + <?= FunctionsEdit::editLanguageCheckboxes('lang', $languages) ?> + </div> + </div> </fieldset> <?= view('modules/ckeditor/ckeditor-js') ?> diff --git a/resources/views/modules/html/template-narrative.php b/resources/views/modules/html/template-narrative.php index 470b466a27..78cdd7fc2f 100644 --- a/resources/views/modules/html/template-narrative.php +++ b/resources/views/modules/html/template-narrative.php @@ -1,4 +1,4 @@ <?php use Fisharebest\Webtrees\I18N; ?> -<?= /* I18N: do not translate the #keywords# */ I18N::translate('This family tree was last updated on #gedcomUpdated#. There are #totalSurnames# surnames in this family tree. The earliest recorded event is the #firstEventType# of #firstEventName# in #firstEventYear#. The most recent event is the #lastEventType# of #lastEventName# in #lastEventYear#.<br><br>If you have any comments or feedback please contact #contactWebmaster#.') ?> +<?= /* I18N: do not translate the #keywords# */ I18N::translate('This family tree was last updated on #gedcomUpdated#. There are #totalSurnames# surnames in this family tree. The earliest recorded event is the #firstEventType# of #firstEventName# in #firstEventYear#. The most recent event is the #lastEventType# of #lastEventName# in #lastEventYear#.<br><br>If you have any comments or feedback please contact #contactWebmaster#.'); diff --git a/resources/views/modules/html/template-statistics.php b/resources/views/modules/html/template-statistics.php index b1c6fa5696..255c28e78c 100644 --- a/resources/views/modules/html/template-statistics.php +++ b/resources/views/modules/html/template-statistics.php @@ -1,101 +1,101 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="gedcom_stats"> - <p> - <a href="<?= e(route('tree-page', [])) ?>">#gedcomTitle#</a> - </p> + <p> + <a href="<?= e(route('tree-page', [])) ?>">#gedcomTitle#</a> + </p> - <?= I18N::translate('This family tree was last updated on %s.', '#gedcomUpdated#') ?> + <?= I18N::translate('This family tree was last updated on %s.', '#gedcomUpdated#') ?> - <div class="row"> - <div class="col col-sm-4"> - <table class="table wt-facts-table"> - <tr> - <th scope="row"><?= I18N::translate('Individuals') ?></th> - <td>#totalIndividuals#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Males') ?></th> - <td>#totalSexMales#<br>#totalSexMalesPercentage#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Females') ?></th> - <td>#totalSexFemales#<br>#totalSexFemalesPercentage#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Total surnames') ?></th> - <td>#totalSurnames#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Families') ?></th> - <td>#totalFamilies#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Sources') ?></th> - <td>#totalSources#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Media objects') ?></th> - <td>#totalMedia#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Repositories') ?></th> - <td>#totalRepositories#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Events') ?></th> - <td>#totalEvents#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Users') ?></th> - <td>#totalUsers#</td> - </tr> - </table> - </div> + <div class="row"> + <div class="col col-sm-4"> + <table class="table wt-facts-table"> + <tr> + <th scope="row"><?= I18N::translate('Individuals') ?></th> + <td>#totalIndividuals#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Males') ?></th> + <td>#totalSexMales#<br>#totalSexMalesPercentage#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Females') ?></th> + <td>#totalSexFemales#<br>#totalSexFemalesPercentage#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Total surnames') ?></th> + <td>#totalSurnames#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Families') ?></th> + <td>#totalFamilies#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Sources') ?></th> + <td>#totalSources#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Media objects') ?></th> + <td>#totalMedia#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Repositories') ?></th> + <td>#totalRepositories#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Events') ?></th> + <td>#totalEvents#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Users') ?></th> + <td>#totalUsers#</td> + </tr> + </table> + </div> - <div class="col col-sm-8"> - <table class="table wt-facts-table"> - <tr> - <th scope="row"><?= I18N::translate('Earliest birth') ?></th> - <td>#firstBirth#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Latest birth') ?></th> - <td>#lastBirth#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Earliest death') ?></th> - <td>#firstDeath#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Latest death') ?></th> - <td>#lastDeath#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Individual who lived the longest') ?></th> - <td>#longestLife#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Average age at death') ?></th> - <td>#averageLifespan#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Family with the most children') ?></th> - <td>#largestFamilySize#<br>#largestFamily#</td> - </tr> - <tr> - <th scope="row"><?= I18N::translate('Average number of children per family') ?></th> - <td>#averageChildren#</td> - </tr> - </table> - </div> - </div> + <div class="col col-sm-8"> + <table class="table wt-facts-table"> + <tr> + <th scope="row"><?= I18N::translate('Earliest birth') ?></th> + <td>#firstBirth#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Latest birth') ?></th> + <td>#lastBirth#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Earliest death') ?></th> + <td>#firstDeath#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Latest death') ?></th> + <td>#lastDeath#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Individual who lived the longest') ?></th> + <td>#longestLife#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Average age at death') ?></th> + <td>#averageLifespan#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Family with the most children') ?></th> + <td>#largestFamilySize#<br>#largestFamily#</td> + </tr> + <tr> + <th scope="row"><?= I18N::translate('Average number of children per family') ?></th> + <td>#averageChildren#</td> + </tr> + </table> + </div> + </div> - <p> - <b><?= I18N::translate('Most common surnames') ?></b> - </p> + <p> + <b><?= I18N::translate('Most common surnames') ?></b> + </p> - <p> - #commonSurnames# - </p> + <p> + #commonSurnames# + </p> </div> diff --git a/resources/views/modules/lightbox/tab.php b/resources/views/modules/lightbox/tab.php index 9c11577793..cbc96eb9e9 100644 --- a/resources/views/modules/lightbox/tab.php +++ b/resources/views/modules/lightbox/tab.php @@ -1,16 +1,16 @@ <div class="wt-album-tab py-4"> - <?php foreach ($media_list as $media): ?> - <figure class="figure text-center col-sm-6 col-md-4 col-lg-3 col-xl-2 wt-album-tab-figure"> - <?php foreach ($media->mediaFiles() as $media_file): ?> - <?php if ($media_file->isImage()): ?> - <?= $media_file->displayImage(100, 100, 'contain', ['class' => 'img-thumbnail wt-album-tab-image']) ?> - <?php endif ?> - <?php endforeach ?> - <figcaption class="figure-caption wt-album-tab-caption"> - <a href="<?= e($media->url()) ?>"> - <?= $media->getFullName() ?> - </a> - </figcaption> - </figure> - <?php endforeach ?> + <?php foreach ($media_list as $media) : ?> + <figure class="figure text-center col-sm-6 col-md-4 col-lg-3 col-xl-2 wt-album-tab-figure"> + <?php foreach ($media->mediaFiles() as $media_file) : ?> + <?php if ($media_file->isImage()) : ?> + <?= $media_file->displayImage(100, 100, 'contain', ['class' => 'img-thumbnail wt-album-tab-image']) ?> + <?php endif ?> + <?php endforeach ?> + <figcaption class="figure-caption wt-album-tab-caption"> + <a href="<?= e($media->url()) ?>"> + <?= $media->getFullName() ?> + </a> + </figcaption> + </figure> + <?php endforeach ?> </div> diff --git a/resources/views/modules/login_block/sign-in.php b/resources/views/modules/login_block/sign-in.php index fe43997a60..d1c04d42c8 100644 --- a/resources/views/modules/login_block/sign-in.php +++ b/resources/views/modules/login_block/sign-in.php @@ -1,55 +1,55 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form name="login-form" method="POST" action="<?= route('login', ['url' => route('user-page')]) ?>"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="form-group"> - <label for="username"> - <?= I18N::translate('Username') ?> - </label> - <input type="text" id="username" name="username" class="form-control"> - </div> + <div class="form-group"> + <label for="username"> + <?= I18N::translate('Username') ?> + </label> + <input type="text" id="username" name="username" class="form-control"> + </div> - <div class="form-group"> - <label for="password"> - <?= I18N::translate('Password') ?> - </label> - <input type="password" id="password" name="password" class="form-control" autocomplete="current-password"> - </div> + <div class="form-group"> + <label for="password"> + <?= I18N::translate('Password') ?> + </label> + <input type="password" id="password" name="password" class="form-control" autocomplete="current-password"> + </div> - <div> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('sign in') ?> - </button> + <div> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('sign in') ?> + </button> - <button type="button" class="btn btn-secondary" data-toggle="collapse" data-target="#forgot-password" aria-expanded="false" aria-controls="forgot-password"> - <?= I18N::translate('Forgot password?') ?> - </button> - </div> + <button type="button" class="btn btn-secondary" data-toggle="collapse" data-target="#forgot-password" aria-expanded="false" aria-controls="forgot-password"> + <?= I18N::translate('Forgot password?') ?> + </button> + </div> </form> -<?php if ($allow_register): ?> - <a class="btn btn-link" href="<?= e(route('register')) ?>"> - <?= I18N::translate('Request a new user account') ?> - </a> +<?php if ($allow_register) : ?> + <a class="btn btn-link" href="<?= e(route('register')) ?>"> + <?= I18N::translate('Request a new user account') ?> + </a> <?php endif ?> <div class="collapse" id="forgot-password"> - <form action="<?= e(route('login')) ?>" method="POST"> - <input type="hidden" name="time" value=""> - <input type="hidden" name="action" value="requestpw"> - <?= I18N::translate('Request a new password') ?> - <div class="form-group"> - <label for="new_passwd_username"> - <?= I18N::translate('Username or email address') ?> - <input type="text" id="new_passwd_username" name="new_passwd_username" class="form-control"> - </label> - </div> - <div> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('continue') ?> - </button> - </div> - </form> + <form action="<?= e(route('login')) ?>" method="POST"> + <input type="hidden" name="time" value=""> + <input type="hidden" name="action" value="requestpw"> + <?= I18N::translate('Request a new password') ?> + <div class="form-group"> + <label for="new_passwd_username"> + <?= I18N::translate('Username or email address') ?> + <input type="text" id="new_passwd_username" name="new_passwd_username" class="form-control"> + </label> + </div> + <div> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('continue') ?> + </button> + </div> + </form> </div> diff --git a/resources/views/modules/login_block/sign-out.php b/resources/views/modules/login_block/sign-out.php index 47062796f5..a5f824b6ef 100644 --- a/resources/views/modules/login_block/sign-out.php +++ b/resources/views/modules/login_block/sign-out.php @@ -5,9 +5,9 @@ </p> <form method="POST" action="<?= e(route('logout')) ?>"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('sign out') ?> - </button> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('sign out') ?> + </button> </form> diff --git a/resources/views/modules/media/tab.php b/resources/views/modules/media/tab.php index 86343b3701..5b4421070e 100644 --- a/resources/views/modules/media/tab.php +++ b/resources/views/modules/media/tab.php @@ -2,20 +2,20 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="wt-media-tab py-4"> - <table class="table wt-facts-table"> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printMainMedia($fact, 1) ?> - <?php FunctionsPrintFacts::printMainMedia($fact, 2) ?> - <?php FunctionsPrintFacts::printMainMedia($fact, 3) ?> - <?php FunctionsPrintFacts::printMainMedia($fact, 4) ?> - <?php endforeach ?> + <table class="table wt-facts-table"> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printMainMedia($fact, 1) ?> + <?php FunctionsPrintFacts::printMainMedia($fact, 2) ?> + <?php FunctionsPrintFacts::printMainMedia($fact, 3) ?> + <?php FunctionsPrintFacts::printMainMedia($fact, 4) ?> + <?php endforeach ?> - <?php if (empty($facts)): ?> - <tr> - <td colspan="2"> - <?= I18N::translate('There are no media objects for this individual.') ?> - </td> - </tr> - <?php endif ?> - </table> + <?php if (empty($facts)) : ?> + <tr> + <td colspan="2"> + <?= I18N::translate('There are no media objects for this individual.') ?> + </td> + </tr> + <?php endif ?> + </table> </div> diff --git a/resources/views/modules/notes/tab.php b/resources/views/modules/notes/tab.php index f8323e3e7f..bbb5b1e216 100644 --- a/resources/views/modules/notes/tab.php +++ b/resources/views/modules/notes/tab.php @@ -3,54 +3,54 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="wt-notes-tab py-4"> - <table class="table wt-facts-table"> - <tr> - <td colspan="2"> - <label> - <input id="show-level-2-notes" type="checkbox"> - <?= I18N::translate('Show all notes') ?> - </label> - </td> - </tr> + <table class="table wt-facts-table"> + <tr> + <td colspan="2"> + <label> + <input id="show-level-2-notes" type="checkbox"> + <?= I18N::translate('Show all notes') ?> + </label> + </td> + </tr> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printMainNotes($fact, 1) ?> - <?php FunctionsPrintFacts::printMainNotes($fact, 2) ?> - <?php FunctionsPrintFacts::printMainNotes($fact, 3) ?> - <?php FunctionsPrintFacts::printMainNotes($fact, 4) ?> - <?php endforeach ?> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printMainNotes($fact, 1) ?> + <?php FunctionsPrintFacts::printMainNotes($fact, 2) ?> + <?php FunctionsPrintFacts::printMainNotes($fact, 3) ?> + <?php FunctionsPrintFacts::printMainNotes($fact, 4) ?> + <?php endforeach ?> - <?php if (empty($facts)): ?> - <tr> - <td colspan="2"> - <?= I18N::translate('There are no notes for this individual.') ?> - </td> - </tr> - <?php endif ?> + <?php if (empty($facts)) : ?> + <tr> + <td colspan="2"> + <?= I18N::translate('There are no notes for this individual.') ?> + </td> + </tr> + <?php endif ?> - <?php if ($can_edit): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Note') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'NOTE'])) ?>"> - <?= I18N::translate('Add a note') ?> - </a> - </td> - </tr> - <tr> - <th scope="row"> - <?= I18N::translate('Shared note') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'SHARED_NOTE'])) ?>"> - <?= I18N::translate('Add a shared note') ?> - </a> - </td> - </tr> - <?php endif ?> - </table> + <?php if ($can_edit) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Note') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'NOTE'])) ?>"> + <?= I18N::translate('Add a note') ?> + </a> + </td> + </tr> + <tr> + <th scope="row"> + <?= I18N::translate('Shared note') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'SHARED_NOTE'])) ?>"> + <?= I18N::translate('Add a shared note') ?> + </a> + </td> + </tr> + <?php endif ?> + </table> </div> <?php View::push('javascript') ?> diff --git a/resources/views/modules/pedigree-map/event-sidebar.php b/resources/views/modules/pedigree-map/event-sidebar.php index 71ffe579d3..8b647768f1 100644 --- a/resources/views/modules/pedigree-map/event-sidebar.php +++ b/resources/views/modules/pedigree-map/event-sidebar.php @@ -3,26 +3,26 @@ <?= $tag ?> </div> -<?php if ($url): ?> +<?php if ($url) : ?> <a href="<?= e($url) ?>"> <?= $name ?> </a> <?php endif ?> -<?php if($value): ?> +<?php if ($value) : ?> <span> <?= $value ?> </span> <?php endif ?> <div> - <?php if($addtag): ?> + <?php if ($addtag) : ?> <?= GedcomTag::getLabel('BIRT') ?>: <?php endif ?> <?= $date ?> </div> -<?php if (!$place->isEmpty()): ?> +<?php if (!$place->isEmpty()) : ?> <div> <a href="<?= e($place->getUrl()) ?>"> <?= $place->getFullName() ?> diff --git a/resources/views/modules/pedigree-map/pedigree-map-page.php b/resources/views/modules/pedigree-map/pedigree-map-page.php index c282b420b2..fc85f6dffa 100644 --- a/resources/views/modules/pedigree-map/pedigree-map-page.php +++ b/resources/views/modules/pedigree-map/pedigree-map-page.php @@ -5,47 +5,47 @@ <h2 class="wt-page-title"><?= $title ?></h2> <form class="wt-page-options wt-page-options-pedigreemap-chart d-print-none"> - <input type="hidden" name="route" value="module"> - <input type="hidden" name="module" value="<?= $module ?>"> - <input type="hidden" name="action" value="PedigreeMap"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="module"> + <input type="hidden" name="module" value="<?= $module ?>"> + <input type="hidden" name="action" value="PedigreeMap"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= - Bootstrap4::select( - FunctionsEdit::numericOptions(range(2, $maxgenerations)), - $generations, - ['id' => 'generations', 'name' => 'generations'] - ) - ?> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= + Bootstrap4::select( + FunctionsEdit::numericOptions(range(2, $maxgenerations)), + $generations, + ['id' => 'generations', 'name' => 'generations'] + ) +?> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ - I18N::translate('view') - ?>"> - </div> - </div> + <div class="form-group row"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ + I18N::translate('view') + ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content"> - <?= $map ?> + <?= $map ?> </div> diff --git a/resources/views/modules/pedigree-map/pedigree-map.php b/resources/views/modules/pedigree-map/pedigree-map.php index e76baea1b5..411903b049 100644 --- a/resources/views/modules/pedigree-map/pedigree-map.php +++ b/resources/views/modules/pedigree-map/pedigree-map.php @@ -2,66 +2,66 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="py-4"> - <div class="row gchart osm-wrapper"> - <div id="osm-map" class="col-sm-9 wt-ajax-load osm-user-map"></div> - <ul class='col-sm-3 osm-sidebar wt-page-options-value'></ul> - </div> + <div class="row gchart osm-wrapper"> + <div id="osm-map" class="col-sm-9 wt-ajax-load osm-user-map"></div> + <ul class='col-sm-3 osm-sidebar wt-page-options-value'></ul> + </div> </div> <?php View::push('styles') ?> <style> - .osm-wrapper, .osm-user-map { - height: 45vh - } + .osm-wrapper, .osm-user-map { + height: 45vh + } - .osm-admin-map { - height: 55vh; - border: 1px solid darkGrey - } + .osm-admin-map { + height: 55vh; + border: 1px solid darkGrey + } - .osm-sidebar { - height: 100%; - overflow-y: auto; - padding: 0; - margin: 0; - border: 0; - display: none; - font-size: small; - } + .osm-sidebar { + height: 100%; + overflow-y: auto; + padding: 0; + margin: 0; + border: 0; + display: none; + font-size: small; + } - .osm-sidebar .gchart { - margin: 1px; - padding: 2px - } + .osm-sidebar .gchart { + margin: 1px; + padding: 2px + } - .osm-sidebar .gchart img { - height: 15px; - width: 25px - } + .osm-sidebar .gchart img { + height: 15px; + width: 25px + } - .osm-sidebar .border-danger:hover { - cursor: not-allowed - } + .osm-sidebar .border-danger:hover { + cursor: not-allowed + } - [dir=rtl] .leaflet-right { - right: auto; - left: 0 - } + [dir=rtl] .leaflet-right { + right: auto; + left: 0 + } - [dir=rtl] .leaflet-right .leaflet-control { - margin-right: 0; - margin-left: 10px - } + [dir=rtl] .leaflet-right .leaflet-control { + margin-right: 0; + margin-left: 10px + } - [dir=rtl] .leaflet-left { - left: auto; - right: 0 - } + [dir=rtl] .leaflet-left { + left: auto; + right: 0 + } - [dir=rtl] .leaflet-left .leaflet-control { - margin-left: 0; - margin-right: 10px - } + [dir=rtl] .leaflet-left .leaflet-control { + margin-left: 0; + margin-right: 10px + } </style> <?php View::endpush() ?> @@ -174,7 +174,7 @@ }) .on('popupopen', function (e) { let sidebar = $('.osm-sidebar'); - let item = sidebar.children(".gchart[data-id=" + e.target.feature.id + "]"); + let item = sidebar.children(".gchart[data-id=" + e.target.feature.id + "]"); item.addClass('messagebox'); sidebar.scrollTo(item); }) @@ -289,6 +289,6 @@ }; })(); - WT_OSM.drawMap(<?= json_encode($ref) ?>, <?= json_encode($type) ?>, <?= json_encode($generations ?? null) ?>); + WT_OSM.drawMap(<?= json_encode($ref) ?>, <?= json_encode($type) ?>, <?= json_encode($generations ?? null) ?>); </script> <?php View::endpush() ?> diff --git a/resources/views/modules/personal_facts/tab.php b/resources/views/modules/personal_facts/tab.php index 652d367721..f06f44482a 100644 --- a/resources/views/modules/personal_facts/tab.php +++ b/resources/views/modules/personal_facts/tab.php @@ -4,40 +4,40 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="wt-facts-tab py-4"> - <table class="table wt-facts-table"> - <tbody> - <tr> - <td colspan="2"> - <label> - <input id="show-relatives-facts" type="checkbox" data-toggle="collapse" data-target=".wt-relation-fact"> - <?= I18N::translate('Events of close relatives') ?> - </label> - <?php if ($has_historical_facts): ?> - <label> - <input id="show-historical-facts" type="checkbox" data-toggle="collapse" data-target=".wt-historic-fact"> - <?= I18N::translate('Historical facts') ?> - </label> - <?php endif ?> - </td> - </tr> + <table class="table wt-facts-table"> + <tbody> + <tr> + <td colspan="2"> + <label> + <input id="show-relatives-facts" type="checkbox" data-toggle="collapse" data-target=".wt-relation-fact"> + <?= I18N::translate('Events of close relatives') ?> + </label> + <?php if ($has_historical_facts) : ?> + <label> + <input id="show-historical-facts" type="checkbox" data-toggle="collapse" data-target=".wt-historic-fact"> + <?= I18N::translate('Historical facts') ?> + </label> + <?php endif ?> + </td> + </tr> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printFact($fact, $individual) ?> - <?php endforeach ?> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printFact($fact, $individual) ?> + <?php endforeach ?> - <?php if (empty($facts)): ?> - <tr> - <td colspan="2"> - <?= I18N::translate('There are no facts for this individual.') ?> - </td> - </tr> - <?php endif ?> + <?php if (empty($facts)) : ?> + <tr> + <td colspan="2"> + <?= I18N::translate('There are no facts for this individual.') ?> + </td> + </tr> + <?php endif ?> - <?php if ($individual->canEdit()): ?> - <?php FunctionsPrint::printAddNewFact($individual, $facts, 'INDI') ?> - <?php endif ?> - </tbody> - </table> + <?php if ($individual->canEdit()) : ?> + <?php FunctionsPrint::printAddNewFact($individual, $facts, 'INDI') ?> + <?php endif ?> + </tbody> + </table> </div> <?php View::push('javascript') ?> diff --git a/resources/views/modules/places/event-sidebar.php b/resources/views/modules/places/event-sidebar.php index ff8b72fd8f..8b647768f1 100644 --- a/resources/views/modules/places/event-sidebar.php +++ b/resources/views/modules/places/event-sidebar.php @@ -3,26 +3,26 @@ <?= $tag ?> </div> -<?php if ($url): ?> +<?php if ($url) : ?> <a href="<?= e($url) ?>"> <?= $name ?> </a> <?php endif ?> -<?php if ($value): ?> +<?php if ($value) : ?> <span> <?= $value ?> </span> <?php endif ?> <div> - <?php if ($addtag): ?> + <?php if ($addtag) : ?> <?= GedcomTag::getLabel('BIRT') ?>: <?php endif ?> <?= $date ?> </div> -<?php if (!$place->isEmpty()): ?> +<?php if (!$place->isEmpty()) : ?> <div> <a href="<?= e($place->getUrl()) ?>"> <?= $place->getFullName() ?> diff --git a/resources/views/modules/random_media/config.php b/resources/views/modules/random_media/config.php index ef4b3725ff..d7810cc0f6 100644 --- a/resources/views/modules/random_media/config.php +++ b/resources/views/modules/random_media/config.php @@ -3,41 +3,41 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="filter"> - <?= I18N::translate('Show only individuals, events, or all') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select(['indi' => I18N::translate('Individuals'), 'event' => I18N::translate('Facts and events'), 'all' => I18N::translate('All')], $filter, ['id' => 'filter', 'name' => 'filter']) ?> - </div> + <label class="col-sm-3 col-form-label" for="filter"> + <?= I18N::translate('Show only individuals, events, or all') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select(['indi' => I18N::translate('Individuals'), 'event' => I18N::translate('Facts and events'), 'all' => I18N::translate('All')], $filter, ['id' => 'filter', 'name' => 'filter']) ?> + </div> </div> <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= I18N::translate('Type') ?> - </legend> - <div class="col-sm-9"> - <?php foreach ($formats as $typeName => $typeValue): ?> - <?= Bootstrap4::checkbox($typeValue, false, ['name' => 'filter_' . $typeName, 'checked' => (bool) $filters[$typeName]]) ?> - <?php endforeach ?> - </div> - </div> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= I18N::translate('Type') ?> + </legend> + <div class="col-sm-9"> + <?php foreach ($formats as $typeName => $typeValue) : ?> + <?= Bootstrap4::checkbox($typeValue, false, ['name' => 'filter_' . $typeName, 'checked' => (bool) $filters[$typeName]]) ?> + <?php endforeach ?> + </div> + </div> </fieldset> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="controls"> - <?= I18N::translate('Show slide show controls') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('controls', FunctionsEdit::optionsNoYes(), $controls, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="controls"> + <?= I18N::translate('Show slide show controls') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('controls', FunctionsEdit::optionsNoYes(), $controls, true) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="start"> - <?= I18N::translate('Start slide show on page load') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('start', FunctionsEdit::optionsNoYes(), $start, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="start"> + <?= I18N::translate('Start slide show on page load') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('start', FunctionsEdit::optionsNoYes(), $start, true) ?> + </div> </div> diff --git a/resources/views/modules/random_media/slide-show.php b/resources/views/modules/random_media/slide-show.php index c3c95087da..7616663c82 100644 --- a/resources/views/modules/random_media/slide-show.php +++ b/resources/views/modules/random_media/slide-show.php @@ -3,86 +3,86 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="text-center slide-show-container"> - <?php if ($show_controls): ?> - <div class="slide-show-controls"> - <?= FontAwesome::linkIcon('media-play', I18N::translate('Play'), ['href' => '#', 'hidden' => $start_automatically]) ?> - <?= FontAwesome::linkIcon('media-stop', I18N::translate('Stop'), ['href' => '#', 'hidden' => !$start_automatically]) ?> - <?= FontAwesome::linkIcon('media-next', I18N::translate('Next image'), ['href' => '#']) ?> - </div> - <?php endif ?> + <?php if ($show_controls) : ?> + <div class="slide-show-controls"> + <?= FontAwesome::linkIcon('media-play', I18N::translate('Play'), ['href' => '#', 'hidden' => $start_automatically]) ?> + <?= FontAwesome::linkIcon('media-stop', I18N::translate('Stop'), ['href' => '#', 'hidden' => !$start_automatically]) ?> + <?= FontAwesome::linkIcon('media-next', I18N::translate('Next image'), ['href' => '#']) ?> + </div> + <?php endif ?> - <figure class="text-center slide-show-figure"> - <?= $media_file->displayImage(200, 200, '', ['class' => 'slide-show-image']) ?> - <figcaption class="slide-show-figcaption"> - <a href="<?= e($media->url()) ?>"> - <b><?= $media->getFullName() ?></b> - </a> - </figcaption> - </figure> + <figure class="text-center slide-show-figure"> + <?= $media_file->displayImage(200, 200, '', ['class' => 'slide-show-image']) ?> + <figcaption class="slide-show-figcaption"> + <a href="<?= e($media->url()) ?>"> + <b><?= $media->getFullName() ?></b> + </a> + </figcaption> + </figure> - <p class="slide-show-notes"> - <?= FunctionsPrint::printFactNotes($tree, $media->getGedcom(), 1) ?> - </p> + <p class="slide-show-notes"> + <?= FunctionsPrint::printFactNotes($tree, $media->getGedcom(), 1) ?> + </p> - <ul class="slide-show-links"> - <?php foreach ($media->linkedIndividuals('OBJE') as $individual): ?> - <?= I18N::translate('Individual') ?> — - <a href="<?= e($individual->url()) ?>" class="slide-show-link"> - <?= $individual->getFullName() ?> - </a> - <br> - <?php endforeach ?> + <ul class="slide-show-links"> + <?php foreach ($media->linkedIndividuals('OBJE') as $individual) : ?> + <?= I18N::translate('Individual') ?> — + <a href="<?= e($individual->url()) ?>" class="slide-show-link"> + <?= $individual->getFullName() ?> + </a> + <br> + <?php endforeach ?> - <?php foreach ($media->linkedFamilies('OBJE') as $family): ?> - <?= I18N::translate('View this family') ?> — - <a href="<?= e($family->url()) ?>" class="slide-show-link"> - <?= $family->getFullName() ?> - </a> - <br> - <?php endforeach ?> + <?php foreach ($media->linkedFamilies('OBJE') as $family) : ?> + <?= I18N::translate('View this family') ?> — + <a href="<?= e($family->url()) ?>" class="slide-show-link"> + <?= $family->getFullName() ?> + </a> + <br> + <?php endforeach ?> - <?php foreach ($media->linkedSources('OBJE') as $source): ?> - <?= I18N::translate('View this source') ?> — - <a href="<?= e($source->url()) ?>" class="slide-show-link"> - <?= $source->getFullName() ?> - </a> - <br> - <?php endforeach ?> - </ul> + <?php foreach ($media->linkedSources('OBJE') as $source) : ?> + <?= I18N::translate('View this source') ?> — + <a href="<?= e($source->url()) ?>" class="slide-show-link"> + <?= $source->getFullName() ?> + </a> + <br> + <?php endforeach ?> + </ul> </div> <script> - // Reload automatically? - var play = <?= json_encode($start_automatically); ?>; + // Reload automatically? + var play = <?= json_encode($start_automatically); ?>; - function slideShowReload() { - if (play) { - var block = $("#block-<?= $block_id ?>").parent(); - clearTimeout(timeout); - block.load(block.data('ajaxUrl') + '&start=' + (play ? '1' : '0')); - } + function slideShowReload() { + if (play) { + var block = $("#block-<?= $block_id ?>").parent(); + clearTimeout(timeout); + block.load(block.data('ajaxUrl') + '&start=' + (play ? '1' : '0')); + } - return false; - } + return false; + } - $(".wt-icon-media-play").on('click', function () { - $(".wt-icon-media-play").parent().attr('hidden', true); - $(".wt-icon-media-stop").parent().attr('hidden', false); - play = true; - return slideShowReload(); - }); + $(".wt-icon-media-play").on('click', function () { + $(".wt-icon-media-play").parent().attr('hidden', true); + $(".wt-icon-media-stop").parent().attr('hidden', false); + play = true; + return slideShowReload(); + }); - $(".wt-icon-media-stop").on('click', function () { - $(".wt-icon-media-stop").parent().attr('hidden', true); - $(".wt-icon-media-play").parent().attr('hidden', false); - play = false; - return false; - }); + $(".wt-icon-media-stop").on('click', function () { + $(".wt-icon-media-stop").parent().attr('hidden', true); + $(".wt-icon-media-play").parent().attr('hidden', false); + play = false; + return false; + }); - $(".wt-icon-media-next").on('click', function () { - play = true; - return slideShowReload(); - }); + $(".wt-icon-media-next").on('click', function () { + play = true; + return slideShowReload(); + }); - var timeout = setTimeout(slideShowReload, 6000); + var timeout = setTimeout(slideShowReload, 6000); </script> diff --git a/resources/views/modules/recent_changes/changes-list.php b/resources/views/modules/recent_changes/changes-list.php index 4837279906..4c67b10788 100644 --- a/resources/views/modules/recent_changes/changes-list.php +++ b/resources/views/modules/recent_changes/changes-list.php @@ -1,16 +1,16 @@ <?php use Fisharebest\Webtrees\I18N; ?> -<?php foreach ($records as $record): ?> - <a href="<?= e($record->url()) ?>" class="list_item name2"> - <?= $record->getFullName() ?> - </a> - <div class="indent mb-1"> - <?php if ($record->lastChangeTimestamp() !== ''): ?> - <?php if ($show_user): ?> - <?= /* I18N: [a record was] Changed on <date/time> by <user> */I18N::translate('Changed on %1$s by %2$s', $record->lastChangeTimestamp(), e($record->lastChangeUser())) ?> - <?php else: ?> - <?= /* I18N: [a record was] Changed on <date/time> */ I18N::translate('Changed on %1$s', $record->lastChangeTimestamp()) ?> - <?php endif ?> - <?php endif ?> - </div> +<?php foreach ($records as $record) : ?> + <a href="<?= e($record->url()) ?>" class="list_item name2"> + <?= $record->getFullName() ?> + </a> + <div class="indent mb-1"> + <?php if ($record->lastChangeTimestamp() !== '') : ?> + <?php if ($show_user) : ?> + <?= /* I18N: [a record was] Changed on <date/time> by <user> */I18N::translate('Changed on %1$s by %2$s', $record->lastChangeTimestamp(), e($record->lastChangeUser())) ?> + <?php else : ?> + <?= /* I18N: [a record was] Changed on <date/time> */ I18N::translate('Changed on %1$s', $record->lastChangeTimestamp()) ?> + <?php endif ?> + <?php endif ?> + </div> <?php endforeach ?> diff --git a/resources/views/modules/recent_changes/changes-table.php b/resources/views/modules/recent_changes/changes-table.php index 896746bf37..e09677e89b 100644 --- a/resources/views/modules/recent_changes/changes-table.php +++ b/resources/views/modules/recent_changes/changes-table.php @@ -3,60 +3,60 @@ <?php use Fisharebest\Webtrees\View; ?> <table class="table table-sm datatables wt-table-changes" data-filter="false" data-info="false" data-paging="false"> - <thead> - <tr> - <th> - <span class="sr-only"> - <?= I18N::translate('Type') ?> - </span> - </th> - <th> - <?= I18N::translate('Record') ?> - </th> - <th> - <?= I18N::translate('Last change') ?> - </th> - <?php if ($show_user): ?> - <th> - <?= I18N::translate('User') ?> - </th> - <?php endif ?> - </tr> - </thead> - <tbody> - <?php foreach ($records as $record): ?> - <tr> - <td data-sort="<?= $record::RECORD_TYPE ?>" class="text-centre"> - <?php if ($record::RECORD_TYPE === 'INDI') : ?> - <?= FontAwesome::semanticIcon('individual', I18N::translate('Individual')) ?> - <?php elseif ($record::RECORD_TYPE === 'FAM'): ?> - <?= FontAwesome::semanticIcon('family', I18N::translate('Family')) ?> - <?php elseif ($record::RECORD_TYPE === 'OBJE'): ?> - <?= FontAwesome::semanticIcon('media', I18N::translate('Media')) ?> - <?php elseif ($record::RECORD_TYPE === 'NOTE'): ?> - <?= FontAwesome::semanticIcon('note', I18N::translate('Note')) ?> - <?php elseif ($record::RECORD_TYPE === 'SOUR'): ?> - <?= FontAwesome::semanticIcon('source', I18N::translate('Source')) ?> - <?php elseif ($record::RECORD_TYPE === 'SUBM'): ?> - <?= FontAwesome::semanticIcon('submitter', I18N::translate('Submitter')) ?> - <?php elseif ($record::RECORD_TYPE === 'REPO'): ?> - <?= FontAwesome::semanticIcon('repository', I18N::translate('Repository')) ?> - <?php endif ?> - </td> - <td data-sort="<?= e($record->getSortName()) ?>"> - <a href="<?= e($record->url()) ?>"><?= $record->getFullName() ?></a> - </td> - <td data-sort="<?= $record->lastChangeTimestamp(true) ?>"> - <?= $record->lastChangeTimestamp() ?> - </td> - <?php if ($show_user): ?> - <td> - <?= e($record->lastChangeUser()) ?> - </td> - <?php endif ?> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th> + <span class="sr-only"> + <?= I18N::translate('Type') ?> + </span> + </th> + <th> + <?= I18N::translate('Record') ?> + </th> + <th> + <?= I18N::translate('Last change') ?> + </th> + <?php if ($show_user) : ?> + <th> + <?= I18N::translate('User') ?> + </th> + <?php endif ?> + </tr> + </thead> + <tbody> + <?php foreach ($records as $record) : ?> + <tr> + <td data-sort="<?= $record::RECORD_TYPE ?>" class="text-centre"> + <?php if ($record::RECORD_TYPE === 'INDI') : ?> + <?= FontAwesome::semanticIcon('individual', I18N::translate('Individual')) ?> + <?php elseif ($record::RECORD_TYPE === 'FAM') : ?> + <?= FontAwesome::semanticIcon('family', I18N::translate('Family')) ?> + <?php elseif ($record::RECORD_TYPE === 'OBJE') : ?> + <?= FontAwesome::semanticIcon('media', I18N::translate('Media')) ?> + <?php elseif ($record::RECORD_TYPE === 'NOTE') : ?> + <?= FontAwesome::semanticIcon('note', I18N::translate('Note')) ?> + <?php elseif ($record::RECORD_TYPE === 'SOUR') : ?> + <?= FontAwesome::semanticIcon('source', I18N::translate('Source')) ?> + <?php elseif ($record::RECORD_TYPE === 'SUBM') : ?> + <?= FontAwesome::semanticIcon('submitter', I18N::translate('Submitter')) ?> + <?php elseif ($record::RECORD_TYPE === 'REPO') : ?> + <?= FontAwesome::semanticIcon('repository', I18N::translate('Repository')) ?> + <?php endif ?> + </td> + <td data-sort="<?= e($record->getSortName()) ?>"> + <a href="<?= e($record->url()) ?>"><?= $record->getFullName() ?></a> + </td> + <td data-sort="<?= $record->lastChangeTimestamp(true) ?>"> + <?= $record->lastChangeTimestamp() ?> + </td> + <?php if ($show_user) : ?> + <td> + <?= e($record->lastChangeUser()) ?> + </td> + <?php endif ?> + </tr> + <?php endforeach ?> + </tbody> </table> <?php View::push('javascript') ?> diff --git a/resources/views/modules/recent_changes/config.php b/resources/views/modules/recent_changes/config.php index 32bfd9f2b8..cf44fd55e8 100644 --- a/resources/views/modules/recent_changes/config.php +++ b/resources/views/modules/recent_changes/config.php @@ -3,38 +3,38 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="days"> - <?= I18N::translate('Number of days to show') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="days" name="days" type="text" value="<?= e($days) ?>"> - <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?> - </div> + <label class="col-sm-3 col-form-label" for="days"> + <?= I18N::translate('Number of days to show') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="days" name="days" type="text" value="<?= e($days) ?>"> + <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="infoStyle"> - <?= I18N::translate('Presentation style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="infoStyle"> + <?= I18N::translate('Presentation style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="sortStyle"> - <?= I18N::translate('Sort order') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($sort_styles, $sortStyle, ['id' => 'sortStyle', 'name' => 'sortStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="sortStyle"> + <?= I18N::translate('Sort order') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($sort_styles, $sortStyle, ['id' => 'sortStyle', 'name' => 'sortStyle']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="show_usere"> - <?= /* I18N: label for a yes/no option */ I18N::translate('Show the user who made the change') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('show_user', FunctionsEdit::optionsNoYes(), $show_user, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="show_usere"> + <?= /* I18N: label for a yes/no option */ I18N::translate('Show the user who made the change') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('show_user', FunctionsEdit::optionsNoYes(), $show_user, true) ?> + </div> </div> diff --git a/resources/views/modules/relationships_chart/config.php b/resources/views/modules/relationships_chart/config.php index 862e115761..13c20ce21d 100644 --- a/resources/views/modules/relationships_chart/config.php +++ b/resources/views/modules/relationships_chart/config.php @@ -5,42 +5,42 @@ <h1><?= $title ?></h1> <p> - <?= I18N::translate('Searching for all possible relationships can take a lot of time in complex trees.') ?> + <?= I18N::translate('Searching for all possible relationships can take a lot of time in complex trees.') ?> </p> <form method="post"> - <?= csrf_field() ?> - <?php foreach ($all_trees as $tree): ?> - <h2><?= e($tree->getTitle()) ?></h2> - <div class="row form-group"> - <label class="col-sm-3 col-form-label" for="relationship-ancestors-<?= $tree->getTreeId() ?>"> - <?= /* I18N: Configuration option */ - I18N::translate('Relationships') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($ancestors_options, $tree->getPreference('RELATIONSHIP_ANCESTORS', $default_ancestors), ['id' => 'relationship-ancestors-' . $tree->getTreeId(), 'name' => 'relationship-ancestors-' . $tree->getTreeId()]) ?> - </div> - </div> + <?= csrf_field() ?> + <?php foreach ($all_trees as $tree) : ?> + <h2><?= e($tree->getTitle()) ?></h2> + <div class="row form-group"> + <label class="col-sm-3 col-form-label" for="relationship-ancestors-<?= $tree->getTreeId() ?>"> + <?= /* I18N: Configuration option */ + I18N::translate('Relationships') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($ancestors_options, $tree->getPreference('RELATIONSHIP_ANCESTORS', $default_ancestors), ['id' => 'relationship-ancestors-' . $tree->getTreeId(), 'name' => 'relationship-ancestors-' . $tree->getTreeId()]) ?> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: Configuration option */ - I18N::translate('How much recursion to use when searching for relationships') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('relationship-recursion-' . $tree->getTreeId(), $recursion_options, $tree->getPreference('RELATIONSHIP_RECURSION', $default_recursion), true) ?> - </div> - </div> - </fieldset> - <?php endforeach ?> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: Configuration option */ + I18N::translate('How much recursion to use when searching for relationships') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('relationship-recursion-' . $tree->getTreeId(), $recursion_options, $tree->getPreference('RELATIONSHIP_RECURSION', $default_recursion), true) ?> + </div> + </div> + </fieldset> + <?php endforeach ?> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> - </div> - </div> + <?= I18N::translate('save') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/modules/relatives/family.php b/resources/views/modules/relatives/family.php index 1a1e82099c..51727f8fc5 100644 --- a/resources/views/modules/relatives/family.php +++ b/resources/views/modules/relatives/family.php @@ -6,209 +6,209 @@ <?php use Fisharebest\Webtrees\Theme; ?> <table class="table table-sm wt-facts-table"> - <caption> - <i class="icon-cfamily"></i> - <a href="<?= e($family->url()) ?>"><?= $label ?></a> - </caption> + <caption> + <i class="icon-cfamily"></i> + <a href="<?= e($family->url()) ?>"><?= $label ?></a> + </caption> - <tbody> - <?php - $found = false; - foreach ($family->getFacts('HUSB', false, $fam_access_level) as $fact) { - $found |= !$fact->isPendingDeletion(); - $person = $fact->getTarget(); - if ($person instanceof Individual) { - $row_class = 'wt-gender-' . $person->getSex(); - if ($fact->isPendingAddition()) { - $row_class .= ' new'; - } elseif ($fact->isPendingDeletion()) { - $row_class .= ' old'; - } - ?> - <tr class="<?= $row_class ?>"> - <th scope="row"> - <?= $individual === $person ? '<i class="icon-selected"></i>' : '' ?> - <?= Functions::getCloseRelationshipName($individual, $person) ?> - </th> - <td class="border-0 p-0"> - <?= Theme::theme()->individualBoxLarge($person) ?> - </td> - </tr> - <?php - } - } - if (!$found && $family->canEdit()) { - ?> - <tr> - <th scope="row"></th> - <td> - <a href="<?= e(route('add-spouse-to-family', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref(), 'famtag' => 'HUSB'])) ?>"> - <?= I18N::translate('Add a husband to this family') ?> - </a> - </td> - </tr> - <?php - } + <tbody> + <?php + $found = false; + foreach ($family->getFacts('HUSB', false, $fam_access_level) as $fact) { + $found |= !$fact->isPendingDeletion(); + $person = $fact->getTarget(); + if ($person instanceof Individual) { + $row_class = 'wt-gender-' . $person->getSex(); + if ($fact->isPendingAddition()) { + $row_class .= ' new'; + } elseif ($fact->isPendingDeletion()) { + $row_class .= ' old'; + } + ?> + <tr class="<?= $row_class ?>"> + <th scope="row"> + <?= $individual === $person ? '<i class="icon-selected"></i>' : '' ?> + <?= Functions::getCloseRelationshipName($individual, $person) ?> + </th> + <td class="border-0 p-0"> + <?= Theme::theme()->individualBoxLarge($person) ?> + </td> + </tr> + <?php + } + } + if (!$found && $family->canEdit()) { + ?> + <tr> + <th scope="row"></th> + <td> + <a href="<?= e(route('add-spouse-to-family', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref(), 'famtag' => 'HUSB'])) ?>"> + <?= I18N::translate('Add a husband to this family') ?> + </a> + </td> + </tr> + <?php + } - $found = false; - foreach ($family->getFacts('WIFE', false, $fam_access_level) as $fact) { - $person = $fact->getTarget(); - if ($person instanceof Individual) { - $found |= !$fact->isPendingDeletion(); - $row_class = 'wt-gender-' . $person->getSex(); - if ($fact->isPendingAddition()) { - $row_class .= ' new'; - } elseif ($fact->isPendingDeletion()) { - $row_class .= ' old'; - } - ?> + $found = false; + foreach ($family->getFacts('WIFE', false, $fam_access_level) as $fact) { + $person = $fact->getTarget(); + if ($person instanceof Individual) { + $found |= !$fact->isPendingDeletion(); + $row_class = 'wt-gender-' . $person->getSex(); + if ($fact->isPendingAddition()) { + $row_class .= ' new'; + } elseif ($fact->isPendingDeletion()) { + $row_class .= ' old'; + } + ?> - <tr class="<?= $row_class ?>"> - <th scope="row"> - <?= $individual === $person ? '<i class="icon-selected"></i>' : '' ?> - <?= Functions::getCloseRelationshipName($individual, $person) ?> - </th> - <td class="border-0 p-0"> - <?= Theme::theme()->individualBoxLarge($person) ?> - </td> - </tr> - <?php - } - } - if (!$found && $family->canEdit()) { ?> - <tr> - <th scope="row"></th> - <td> - <a href="<?= e(route('add-spouse-to-family', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref(), 'famtag' => 'WIFE'])) ?>"> - <?= I18N::translate('Add a wife to this family') ?> - </a> - </td> - </tr> + <tr class="<?= $row_class ?>"> + <th scope="row"> + <?= $individual === $person ? '<i class="icon-selected"></i>' : '' ?> + <?= Functions::getCloseRelationshipName($individual, $person) ?> + </th> + <td class="border-0 p-0"> + <?= Theme::theme()->individualBoxLarge($person) ?> + </td> + </tr> + <?php + } + } + if (!$found && $family->canEdit()) { ?> + <tr> + <th scope="row"></th> + <td> + <a href="<?= e(route('add-spouse-to-family', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref(), 'famtag' => 'WIFE'])) ?>"> + <?= I18N::translate('Add a wife to this family') ?> + </a> + </td> + </tr> - <?php } ?> + <?php } ?> - <?php - ///// MARR ///// - $found = false; - $prev = new Date(''); - foreach ($family->getFacts(WT_EVENTS_MARR . '|' . WT_EVENTS_DIV, true) as $fact) { - $found |= !$fact->isPendingDeletion(); - if ($fact->isPendingAddition()) { - $row_class = 'new'; - } elseif ($fact->isPendingDeletion()) { - $row_class = 'old'; - } else { - $row_class = ''; - } - ?> + <?php + ///// MARR ///// + $found = false; + $prev = new Date(''); + foreach ($family->getFacts(WT_EVENTS_MARR . '|' . WT_EVENTS_DIV, true) as $fact) { + $found |= !$fact->isPendingDeletion(); + if ($fact->isPendingAddition()) { + $row_class = 'new'; + } elseif ($fact->isPendingDeletion()) { + $row_class = 'old'; + } else { + $row_class = ''; + } + ?> - <tr class="<?= $row_class ?>"> - <th scope="row"> - </th> - <td> - <?= GedcomTag::getLabelValue($fact->getTag(), $fact->getDate()->display() . ' — ' . $fact->getPlace()->getFullName()) ?> - </td> - </tr> + <tr class="<?= $row_class ?>"> + <th scope="row"> + </th> + <td> + <?= GedcomTag::getLabelValue($fact->getTag(), $fact->getDate()->display() . ' — ' . $fact->getPlace()->getFullName()) ?> + </td> + </tr> - <?php - if (!$prev->isOK() && $fact->getDate()->isOK()) { - $prev = $fact->getDate(); - } - } + <?php + if (!$prev->isOK() && $fact->getDate()->isOK()) { + $prev = $fact->getDate(); + } + } - if (!$found && $family->canShow() && $family->canEdit()) { - ?> - <tr> - <th scope="row"> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref(), 'fact' => 'MARR'])) ?>"> - <?= I18N::translate('Add marriage details') ?> - </a> - </td> - </tr> - <?php - } + if (!$found && $family->canShow() && $family->canEdit()) { + ?> + <tr> + <th scope="row"> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref(), 'fact' => 'MARR'])) ?>"> + <?= I18N::translate('Add marriage details') ?> + </a> + </td> + </tr> + <?php + } - ///// CHIL ///// - $child_number = 0; - foreach ($family->getFacts('CHIL', false, $fam_access_level) as $fact) { - $person = $fact->getTarget(); - if ($person instanceof Individual) { - $row_class = 'wt-gender-' . $person->getSex(); - if ($fact->isPendingAddition()) { - $child_number++; - $row_class .= ' new'; - } elseif ($fact->isPendingDeletion()) { - $row_class .= ' old'; - } else { - $child_number++; - } - $next = new Date(''); - foreach ($person->getFacts(WT_EVENTS_BIRT, true) as $bfact) { - if ($bfact->getDate()->isOK()) { - $next = $bfact->getDate(); - break; - } - } - ?> + ///// CHIL ///// + $child_number = 0; + foreach ($family->getFacts('CHIL', false, $fam_access_level) as $fact) { + $person = $fact->getTarget(); + if ($person instanceof Individual) { + $row_class = 'wt-gender-' . $person->getSex(); + if ($fact->isPendingAddition()) { + $child_number++; + $row_class .= ' new'; + } elseif ($fact->isPendingDeletion()) { + $row_class .= ' old'; + } else { + $child_number++; + } + $next = new Date(''); + foreach ($person->getFacts(WT_EVENTS_BIRT, true) as $bfact) { + if ($bfact->getDate()->isOK()) { + $next = $bfact->getDate(); + break; + } + } + ?> - <tr class="<?= $row_class ?>"> - <th scope="row"> - <?php if ($individual === $person): ?> - <i class="icon-selected"></i> - <?php endif ?> + <tr class="<?= $row_class ?>"> + <th scope="row"> + <?php if ($individual === $person) : ?> + <i class="icon-selected"></i> + <?php endif ?> - <?php if ($prev->isOK() && $next->isOK()): ?> - <div class="elderdate age"> - <?php $days = $next->maximumJulianDay() - $prev->minimumJulianDay(); ?> - <?php if ($days < 0 || $child_number > 1 && $days > 1 && $days < 240): ?> - <i class="icon-warning"></i> - <?php endif ?> + <?php if ($prev->isOK() && $next->isOK()) : ?> + <div class="elderdate age"> + <?php $days = $next->maximumJulianDay() - $prev->minimumJulianDay(); ?> + <?php if ($days < 0 || $child_number > 1 && $days > 1 && $days < 240) : ?> + <i class="icon-warning"></i> + <?php endif ?> - <?php $months = round($days / 30); ?> - <?php if (abs($months) === 12 || abs($months) >= 24): ?> - <?= I18N::plural('%s year', '%s years', round($months / 12), I18N::number(round($months / 12))) ?> - <?php elseif ($months !== 0): ?> - <?= I18N::plural('%s month', '%s months', $months, I18N::number($months)) ?> - <?php endif ?> - </div> - <?php endif ?> + <?php $months = round($days / 30); ?> + <?php if (abs($months) === 12 || abs($months) >= 24) : ?> + <?= I18N::plural('%s year', '%s years', round($months / 12), I18N::number(round($months / 12))) ?> + <?php elseif ($months !== 0) : ?> + <?= I18N::plural('%s month', '%s months', $months, I18N::number($months)) ?> + <?php endif ?> + </div> + <?php endif ?> - <?= Functions::getCloseRelationshipName($individual, $person) ?> - </th> - <td class="border-0 p-0"> - <?= Theme::theme()->individualBoxLarge($person) ?> - </td> - </tr> - <?php - $prev = $next; - } - } ?> + <?= Functions::getCloseRelationshipName($individual, $person) ?> + </th> + <td class="border-0 p-0"> + <?= Theme::theme()->individualBoxLarge($person) ?> + </td> + </tr> + <?php + $prev = $next; + } + } ?> - <?php if ($family->canEdit()): ?> - <tr> - <th scope="row"> - <?php if (count($family->getChildren()) > 1): ?> - <a href="<?= e(route('reorder-children', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>"> - <i class="icon-media-shuffle"></i> <?= I18N::translate('Re-order children') ?> - </a> - <?php endif; ?> - </th> - <td> - <a href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>"> - <?php if ($type == 'FAMS'): ?> - <?= I18N::translate('Add a son or daughter') ?> - <?php else: ?> - <?= I18N::translate('Add a brother or sister') ?> - <?php endif ?> - </a> + <?php if ($family->canEdit()) : ?> + <tr> + <th scope="row"> + <?php if (count($family->getChildren()) > 1) : ?> + <a href="<?= e(route('reorder-children', ['ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>"> + <i class="icon-media-shuffle"></i> <?= I18N::translate('Re-order children') ?> + </a> + <?php endif; ?> + </th> + <td> + <a href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>"> + <?php if ($type == 'FAMS') : ?> + <?= I18N::translate('Add a son or daughter') ?> + <?php else : ?> + <?= I18N::translate('Add a brother or sister') ?> + <?php endif ?> + </a> - <a href="<?= e(route('add-child-to-family', ['gender' => 'M', 'ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>" class="icon-sex_m_15x15"></a> + <a href="<?= e(route('add-child-to-family', ['gender' => 'M', 'ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>" class="icon-sex_m_15x15"></a> - <a href="<?= e(route('add-child-to-family', ['gender' => 'F', 'ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>" class="icon-sex_f_15x15"></a> - </td> - </tr> - <?php endif ?> - </tbody> + <a href="<?= e(route('add-child-to-family', ['gender' => 'F', 'ged' => $family->getTree()->getName(), 'xref' => $family->getXref()])) ?>" class="icon-sex_f_15x15"></a> + </td> + </tr> + <?php endif ?> + </tbody> </table> diff --git a/resources/views/modules/relatives/tab.php b/resources/views/modules/relatives/tab.php index 88d97f9ee3..38e1fd4692 100644 --- a/resources/views/modules/relatives/tab.php +++ b/resources/views/modules/relatives/tab.php @@ -2,138 +2,138 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="wt-sources-tab py-4"> - <table class="table table-sm wt-facts-table" role="presentation"> - <tbody> - <tr> - <td> - <label> - <input id="show-date-differences" type="checkbox" checked> - <?= I18N::translate('Date differences') ?> - </label> - </td> - </tr> - </tbody> + <table class="table table-sm wt-facts-table" role="presentation"> + <tbody> + <tr> + <td> + <label> + <input id="show-date-differences" type="checkbox" checked> + <?= I18N::translate('Date differences') ?> + </label> + </td> + </tr> + </tbody> </table> -<?php if (empty($parent_families) && $can_edit): ?> - <table class="table table-sm wt-facts-table" role="presentation"> - <tbody> - <tr> - <td> - <a href="<?= e(route('add-parent-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'gender' => 'M'])) ?>"> - <?= I18N::translate('Add a father') ?> - </a> - </td> - </tr> - <tr> - <td> - <a href="<?= e(route('add-parent-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'gender' => 'F'])) ?>"> - <?= I18N::translate('Add a mother') ?> - </a> - </td> - </tr> - </tbody> - </table> +<?php if (empty($parent_families) && $can_edit) : ?> + <table class="table table-sm wt-facts-table" role="presentation"> + <tbody> + <tr> + <td> + <a href="<?= e(route('add-parent-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'gender' => 'M'])) ?>"> + <?= I18N::translate('Add a father') ?> + </a> + </td> + </tr> + <tr> + <td> + <a href="<?= e(route('add-parent-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'gender' => 'F'])) ?>"> + <?= I18N::translate('Add a mother') ?> + </a> + </td> + </tr> + </tbody> + </table> <?php endif ?> <!-- Parents --> -<?php foreach ($parent_families as $family): ?> - <?= view('modules/relatives/family', [ - 'individual' => $individual, - 'family' => $family, - 'type' => 'FAMC', - 'label' => $individual->getChildFamilyLabel($family), - 'fam_access_level' => $fam_access_level, - ]) ?> +<?php foreach ($parent_families as $family) : ?> + <?= view('modules/relatives/family', [ + 'individual' => $individual, + 'family' => $family, + 'type' => 'FAMC', + 'label' => $individual->getChildFamilyLabel($family), + 'fam_access_level' => $fam_access_level, + ]) ?> <?php endforeach ?> <!-- step-parents --> -<?php foreach ($step_parent_families as $family): ?> - <?= view('modules/relatives/family', [ - 'individual' => $individual, - 'family' => $family, - 'type' => 'FAMC', - 'label' => $individual->getStepFamilyLabel($family), - 'fam_access_level' => $fam_access_level, - ]) ?> +<?php foreach ($step_parent_families as $family) : ?> + <?= view('modules/relatives/family', [ + 'individual' => $individual, + 'family' => $family, + 'type' => 'FAMC', + 'label' => $individual->getStepFamilyLabel($family), + 'fam_access_level' => $fam_access_level, + ]) ?> <?php endforeach ?> <!-- spouses --> -<?php foreach ($spouse_families as $family): ?> - <?= view('modules/relatives/family', [ - 'individual' => $individual, - 'family' => $family, - 'type' => 'FAMS', - 'label' => $individual->getSpouseFamilyLabel($family), - 'fam_access_level' => $fam_access_level, - ]) ?> +<?php foreach ($spouse_families as $family) : ?> + <?= view('modules/relatives/family', [ + 'individual' => $individual, + 'family' => $family, + 'type' => 'FAMS', + 'label' => $individual->getSpouseFamilyLabel($family), + 'fam_access_level' => $fam_access_level, + ]) ?> <?php endforeach ?> <!-- step-children --> -<?php foreach ($step_child_familiess as $family): ?> - <?= view('modules/relatives/family', [ - 'individual' => $individual, - 'family' => $family, - 'type' => 'FAMS', - 'label' => $family->getFullName(), - 'fam_access_level' => $fam_access_level, - ]) ?> +<?php foreach ($step_child_familiess as $family) : ?> + <?= view('modules/relatives/family', [ + 'individual' => $individual, + 'family' => $family, + 'type' => 'FAMS', + 'label' => $family->getFullName(), + 'fam_access_level' => $fam_access_level, + ]) ?> <?php endforeach ?> -<?php if ($can_edit): ?> - <br> - <table class="table table-sm wt-facts-table" role="presentation"> - <tbody> - <?php if (count($spouse_families) > 1): ?> - <tr> - <td> - <a href="<?= e(route('reorder-spouses', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Re-order families') ?> - </a> - </td> - </tr> - <?php endif ?> - <tr> - <td> - <a href="<?= e(route('link-child-to-family', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?= I18N::translate('Link this individual to an existing family as a child') ?> - </a> - </td> - </tr> +<?php if ($can_edit) : ?> + <br> + <table class="table table-sm wt-facts-table" role="presentation"> + <tbody> + <?php if (count($spouse_families) > 1) : ?> + <tr> + <td> + <a href="<?= e(route('reorder-spouses', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Re-order families') ?> + </a> + </td> + </tr> + <?php endif ?> + <tr> + <td> + <a href="<?= e(route('link-child-to-family', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?= I18N::translate('Link this individual to an existing family as a child') ?> + </a> + </td> + </tr> - <tr> - <td> - <a href="<?= e(route('add-spouse-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?php if ($individual->getSex() !== 'F'): ?> - <?= I18N::translate('Add a wife') ?> - <?php else: ?> - <?= I18N::translate('Add a husband') ?> - <?php endif ?> - </a> - </td> - </tr> + <tr> + <td> + <a href="<?= e(route('add-spouse-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?php if ($individual->getSex() !== 'F') : ?> + <?= I18N::translate('Add a wife') ?> + <?php else : ?> + <?= I18N::translate('Add a husband') ?> + <?php endif ?> + </a> + </td> + </tr> - <tr> - <td> - <a href="<?= e(route('link-spouse-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> - <?php if ($individual->getSex() !== 'F'): ?> - <?= I18N::translate('Add a wife using an existing individual') ?> - <?php else: ?> - <?= I18N::translate('Add a husband using an existing individual') ?> - <?php endif ?> - </a> - </td> - </tr> + <tr> + <td> + <a href="<?= e(route('link-spouse-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>"> + <?php if ($individual->getSex() !== 'F') : ?> + <?= I18N::translate('Add a wife using an existing individual') ?> + <?php else : ?> + <?= I18N::translate('Add a husband using an existing individual') ?> + <?php endif ?> + </a> + </td> + </tr> - <tr> - <td> - <a href="<?= e(route('add-child-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'gender' => 'U'])) ?>"> - <?= I18N::translate('Add a child to create a one-parent family') ?> - </a> - </td> - </tr> - </tbody> - </table> + <tr> + <td> + <a href="<?= e(route('add-child-to-individual', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'gender' => 'U'])) ?>"> + <?= I18N::translate('Add a child to create a one-parent family') ?> + </a> + </td> + </tr> + </tbody> + </table> <?php endif ?> </div> diff --git a/resources/views/modules/review_changes/config.php b/resources/views/modules/review_changes/config.php index c02a3880f2..551d7bd112 100644 --- a/resources/views/modules/review_changes/config.php +++ b/resources/views/modules/review_changes/config.php @@ -3,25 +3,25 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('This block will show editors a list of records with pending changes that need to be reviewed by a moderator. It also generates daily emails to moderators whenever pending changes exist.') ?> + <?= I18N::translate('This block will show editors a list of records with pending changes that need to be reviewed by a moderator. It also generates daily emails to moderators whenever pending changes exist.') ?> </p> <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3"> - <?= /* I18N: Label for a configuration option */ I18N::translate('Send out reminder emails') ?> - </legend> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('sendmail', FunctionsEdit::optionsNoYes(), $sendmail, true) ?> - </div> - </div> + <div class="row"> + <legend class="col-form-label col-sm-3"> + <?= /* I18N: Label for a configuration option */ I18N::translate('Send out reminder emails') ?> + </legend> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('sendmail', FunctionsEdit::optionsNoYes(), $sendmail, true) ?> + </div> + </div> </fieldset> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="days"> - <?= I18N::translate('Reminder email frequency (days)') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" name="days" id="days" value="<?= e($days) ?>"> - </div> + <label class="col-sm-3 col-form-label" for="days"> + <?= I18N::translate('Reminder email frequency (days)') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" name="days" id="days" value="<?= e($days) ?>"> + </div> </div> diff --git a/resources/views/modules/sitemap/config.php b/resources/views/modules/sitemap/config.php index 412a1f0e9a..5f3f12e255 100644 --- a/resources/views/modules/sitemap/config.php +++ b/resources/views/modules/sitemap/config.php @@ -6,22 +6,22 @@ <h1><?= $title ?></h1> <p> - <?= /* I18N: The www.sitemaps.org site is translated into many languages (e.g. http://www.sitemaps.org/fr/) - choose an appropriate URL. */ I18N::translate('Sitemaps are a way for webmasters to tell search engines about the pages on a website that are available for crawling. All major search engines support sitemaps. For more information, see <a href="http://www.sitemaps.org/">www.sitemaps.org</a>.') ?> + <?= /* I18N: The www.sitemaps.org site is translated into many languages (e.g. http://www.sitemaps.org/fr/) - choose an appropriate URL. */ I18N::translate('Sitemaps are a way for webmasters to tell search engines about the pages on a website that are available for crawling. All major search engines support sitemaps. For more information, see <a href="http://www.sitemaps.org/">www.sitemaps.org</a>.') ?> </p> <p> - <?= /* I18N: Label for a configuration option */ I18N::translate('Which family trees should be included in the sitemaps') ?> + <?= /* I18N: Label for a configuration option */ I18N::translate('Which family trees should be included in the sitemaps') ?> </p> <form action="<?= e(route('module', ['module' => 'sitemap', 'action' => 'Admin'])) ?>" method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <?php foreach ($all_trees as $tree): ?> - <?= Bootstrap4::checkbox($tree->getTitle(), false, ['name' => 'sitemap' . $tree->getTreeId(), 'checked' => (bool) $tree->getPreference('include_in_sitemap')]) ?> -<?php endforeach ?> + <?php foreach ($all_trees as $tree) : ?> + <?= Bootstrap4::checkbox($tree->getTitle(), false, ['name' => 'sitemap' . $tree->getTreeId(), 'checked' => (bool) $tree->getPreference('include_in_sitemap')]) ?> + <?php endforeach ?> <button type="submit" class="btn btn-primary"> - <?= I18N::translate('save') ?> + <?= I18N::translate('save') ?> </button> </form> @@ -29,7 +29,7 @@ <hr> <p> - <?= I18N::translate('To tell search engines that sitemaps are available, you should add the following line to your robots.txt file.') ?> + <?= I18N::translate('To tell search engines that sitemaps are available, you should add the following line to your robots.txt file.') ?> </p> <pre>Sitemap: <?= e($sitemap_url) ?></pre> @@ -37,15 +37,15 @@ <hr> <p> - <?= I18N::translate('To tell search engines that sitemaps are available, you can use the following links.') ?> + <?= I18N::translate('To tell search engines that sitemaps are available, you can use the following links.') ?> </p> <ul> - <?php foreach ($submit_urls as $search_engine => $url): ?> - <li> - <a href="<?= e($url) ?>"> - <?= e($search_engine) ?> - </a> - </li> - <?php endforeach ?> + <?php foreach ($submit_urls as $search_engine => $url) : ?> + <li> + <a href="<?= e($url) ?>"> + <?= e($search_engine) ?> + </a> + </li> + <?php endforeach ?> </ul> diff --git a/resources/views/modules/sitemap/sitemap-file.xml.php b/resources/views/modules/sitemap/sitemap-file.xml.php index d81137909b..451ff3cc32 100644 --- a/resources/views/modules/sitemap/sitemap-file.xml.php +++ b/resources/views/modules/sitemap/sitemap-file.xml.php @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> - <?php foreach ($records as $record): ?> - <url> - <loc><?= e($record->url()) ?></loc> - <?php if ($record->getFirstFact('CHAN') !== null): ?> - <lastmod><?= $record->getFirstFact('CHAN')->getDate()->minimumDate()->Format('%Y-%m-%d') ?></lastmod> - <?php endif ?> - </url> - <?php endforeach ?> + <?php foreach ($records as $record) : ?> + <url> + <loc><?= e($record->url()) ?></loc> + <?php if ($record->getFirstFact('CHAN') !== null) : ?> + <lastmod><?= $record->getFirstFact('CHAN')->getDate()->minimumDate()->Format('%Y-%m-%d') ?></lastmod> + <?php endif ?> + </url> + <?php endforeach ?> </urlset> diff --git a/resources/views/modules/sitemap/sitemap-index.xml.php b/resources/views/modules/sitemap/sitemap-index.xml.php index 4daf2fe59c..62b5e79643 100644 --- a/resources/views/modules/sitemap/sitemap-index.xml.php +++ b/resources/views/modules/sitemap/sitemap-index.xml.php @@ -1,68 +1,68 @@ <?xml version="1.0" encoding="UTF-8" ?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> - <?php foreach ($count_individuals as $tree_id => $count): ?> - <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?> - <sitemap> - <loc> - <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?> - </loc> - <lastmod> - <?= $last_mod ?> - </lastmod> - </sitemap> - <?php endfor ?> - <?php endforeach ?> - - <?php foreach ($count_media as $tree_id => $count): ?> - <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?> - <sitemap> - <loc> - <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-m-' . $i])) ?> - </loc> - <lastmod> - <?= $last_mod ?> - </lastmod> - </sitemap> - <?php endfor ?> - <?php endforeach ?> + <?php foreach ($count_individuals as $tree_id => $count) : ?> + <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?> + <sitemap> + <loc> + <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?> + </loc> + <lastmod> + <?= $last_mod ?> + </lastmod> + </sitemap> + <?php endfor ?> + <?php endforeach ?> + + <?php foreach ($count_media as $tree_id => $count) : ?> + <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?> + <sitemap> + <loc> + <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-m-' . $i])) ?> + </loc> + <lastmod> + <?= $last_mod ?> + </lastmod> + </sitemap> + <?php endfor ?> + <?php endforeach ?> - <?php foreach ($count_notes as $tree_id => $count): ?> - <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?> - <sitemap> - <loc> - <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?> - </loc> - <lastmod> - <?= $last_mod ?> - </lastmod> - </sitemap> - <?php endfor ?> - <?php endforeach ?> - - <?php foreach ($count_repositories as $tree_id => $count): ?> - <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?> - <sitemap> - <loc> - <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-r-' . $i])) ?> - </loc> - <lastmod> - <?= $last_mod ?> - </lastmod> - </sitemap> - <?php endfor ?> - <?php endforeach ?> + <?php foreach ($count_notes as $tree_id => $count) : ?> + <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?> + <sitemap> + <loc> + <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?> + </loc> + <lastmod> + <?= $last_mod ?> + </lastmod> + </sitemap> + <?php endfor ?> + <?php endforeach ?> + + <?php foreach ($count_repositories as $tree_id => $count) : ?> + <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?> + <sitemap> + <loc> + <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-r-' . $i])) ?> + </loc> + <lastmod> + <?= $last_mod ?> + </lastmod> + </sitemap> + <?php endfor ?> + <?php endforeach ?> - <?php foreach ($count_sources as $tree_id => $count): ?> - <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?> - <sitemap> - <loc> - <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-s-' . $i])) ?> - </loc> - <lastmod> - <?= $last_mod ?> - </lastmod> - </sitemap> - <?php endfor ?> - <?php endforeach ?> + <?php foreach ($count_sources as $tree_id => $count) : ?> + <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?> + <sitemap> + <loc> + <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-s-' . $i])) ?> + </loc> + <lastmod> + <?= $last_mod ?> + </lastmod> + </sitemap> + <?php endfor ?> + <?php endforeach ?> </sitemapindex> diff --git a/resources/views/modules/sources_tab/tab.php b/resources/views/modules/sources_tab/tab.php index 2132edf4e8..7bb486123a 100644 --- a/resources/views/modules/sources_tab/tab.php +++ b/resources/views/modules/sources_tab/tab.php @@ -3,42 +3,42 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="wt-sources-tab py-4"> - <table class="table wt-facts-table"> - <tr> - <td colspan="2"> - <label> - <input id="show-level-2-sources" type="checkbox"> - <?= I18N::translate('Show all sources') ?> - </label> - </td> - </tr> + <table class="table wt-facts-table"> + <tr> + <td colspan="2"> + <label> + <input id="show-level-2-sources" type="checkbox"> + <?= I18N::translate('Show all sources') ?> + </label> + </td> + </tr> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printMainSources($fact, 1) ?> - <?php FunctionsPrintFacts::printMainSources($fact, 2) ?> - <?php endforeach ?> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printMainSources($fact, 1) ?> + <?php FunctionsPrintFacts::printMainSources($fact, 2) ?> + <?php endforeach ?> - <?php if (empty($facts)): ?> - <tr> - <td colspan="2"> - <?= I18N::translate('There are no source citations for this individual.') ?> - </td> - </tr> - <?php endif ?> + <?php if (empty($facts)) : ?> + <tr> + <td colspan="2"> + <?= I18N::translate('There are no source citations for this individual.') ?> + </td> + </tr> + <?php endif ?> - <?php if ($can_edit): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Source') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'SOUR'])) ?>"> - <?= I18N::translate('Add a source citation') ?> - </a> - </td> - </tr> - <?php endif ?> - </table> + <?php if ($can_edit) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Source') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref(), 'fact' => 'SOUR'])) ?>"> + <?= I18N::translate('Add a source citation') ?> + </a> + </td> + </tr> + <?php endif ?> + </table> </div> <?php View::push('javascript') ?> diff --git a/resources/views/modules/stories/config.php b/resources/views/modules/stories/config.php index 84878a8c6c..82026dd0a8 100644 --- a/resources/views/modules/stories/config.php +++ b/resources/views/modules/stories/config.php @@ -6,67 +6,67 @@ <h1><?= $title ?></h1> <form class="form-inline mb-4"> - <input type="hidden" name="route" value="module"> - <input type="hidden" name="module" value="stories"> - <input type="hidden" name="action" value="Admin"> + <input type="hidden" name="route" value="module"> + <input type="hidden" name="module" value="stories"> + <input type="hidden" name="action" value="Admin"> - <label for="ged" class="sr-only"> - <?= I18N::translate('Family tree') ?> - </label> + <label for="ged" class="sr-only"> + <?= I18N::translate('Family tree') ?> + </label> - <?= Bootstrap4::select($tree_names, $tree->getName(), ['id' => 'ged', 'name' => 'ged']) ?> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('show') ?> - </button> + <?= Bootstrap4::select($tree_names, $tree->getName(), ['id' => 'ged', 'name' => 'ged']) ?> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('show') ?> + </button> </form> <p> - <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'ged' => $tree->getName()])) ?>" class="btn btn-link"> + <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'ged' => $tree->getName()])) ?>" class="btn btn-link"> <?= view('icons/add') ?> - <?= I18N::translate('Add a story') ?> - </a> + <?= I18N::translate('Add a story') ?> + </a> </p> <table class="table table-bordered table-sm"> - <thead> - <tr> - <th><?= I18N::translate('Individual') ?></th> - <th><?= I18N::translate('Story title') ?></th> - <th><?= I18N::translate('Edit') ?></th> - <th><?= I18N::translate('Delete') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($stories as $story): ?> - <tr> - <td> - <?php if ($story->individual !== null): ?> - <a href="<?= e($story->individual->url()) ?>#tab-stories"> - <?= $story->individual->getFullName() ?> - </a> - <?php else: ?> - <?= $story->xref ?> - <?php endif ?> - </td> - <td> - <?= e($story->title) ?> - </td> - <td> - <a class="btn btn-primary" href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'ged' => $tree->getName(), 'block_id' => $story->block_id])) ?>"> + <thead> + <tr> + <th><?= I18N::translate('Individual') ?></th> + <th><?= I18N::translate('Story title') ?></th> + <th><?= I18N::translate('Edit') ?></th> + <th><?= I18N::translate('Delete') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($stories as $story) : ?> + <tr> + <td> + <?php if ($story->individual !== null) : ?> + <a href="<?= e($story->individual->url()) ?>#tab-stories"> + <?= $story->individual->getFullName() ?> + </a> + <?php else : ?> + <?= $story->xref ?> + <?php endif ?> + </td> + <td> + <?= e($story->title) ?> + </td> + <td> + <a class="btn btn-primary" href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'ged' => $tree->getName(), 'block_id' => $story->block_id])) ?>"> <?= view('icons/edit') ?> <?= I18N::translate('Edit') ?> - </a> - </td> - <td> - <form action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminDelete', 'ged' => $tree->getName(), 'block_id' => $story->block_id])) ?>" method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-danger" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($story->title)) ?>" onclick="return confirm(this.dataset.confirm);"> + </a> + </td> + <td> + <form action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminDelete', 'ged' => $tree->getName(), 'block_id' => $story->block_id])) ?>" method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-danger" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($story->title)) ?>" onclick="return confirm(this.dataset.confirm);"> <?= view('icons/delete') ?> <?= I18N::translate('Delete') ?> - </button> - </form> - </td> - </tr> - <?php endforeach ?> - </tbody> + </button> + </form> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/modules/stories/edit.php b/resources/views/modules/stories/edit.php index f369cd4f7f..7265dd04cc 100644 --- a/resources/views/modules/stories/edit.php +++ b/resources/views/modules/stories/edit.php @@ -6,57 +6,57 @@ <h1><?= $title ?></h1> <form class="form-horizontal" method="post" action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $block_id, 'ged' => $tree->getName()])) ?>"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="row form-group"> - <label for="xref" class="col-sm-3 col-form-label"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label for="xref" class="col-sm-3 col-form-label"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label for="story-title" class="col-sm-3 col-form-label"> - <?= I18N::translate('Story title') ?> - </label> - <div class="col-sm-9"> - <input type="text" class="form-control" name="story_title" id="story-title" value="<?= e($story_title) ?>"> - </div> - </div> + <div class="row form-group"> + <label for="story-title" class="col-sm-3 col-form-label"> + <?= I18N::translate('Story title') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" name="story_title" id="story-title" value="<?= e($story_title) ?>"> + </div> + </div> - <div class="row form-group"> - <label for="story-body" class="col-sm-3 col-form-label"> - <?= I18N::translate('Story') ?> - </label> - <div class="col-sm-9"> - <textarea name="story_body" id="story-body" class="html-edit form-control" rows="10"><?= e($story_body) ?></textarea> - </div> - </div> + <div class="row form-group"> + <label for="story-body" class="col-sm-3 col-form-label"> + <?= I18N::translate('Story') ?> + </label> + <div class="col-sm-9"> + <textarea name="story_body" id="story-body" class="html-edit form-control" rows="10"><?= e($story_body) ?></textarea> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label"> - <?= I18N::translate('Show this block for which languages') ?> - </label> - <div class="col-sm-9"> - <?= FunctionsEdit::editLanguageCheckboxes('languages', $languages) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label"> + <?= I18N::translate('Show this block for which languages') ?> + </label> + <div class="col-sm-9"> + <?= FunctionsEdit::editLanguageCheckboxes('languages', $languages) ?> + </div> + </div> - <div class="row form-group"> - <div class="offset-sm-3 col-sm-9"> - <button type="submit" class="btn btn-primary"> + <div class="row form-group"> + <div class="offset-sm-3 col-sm-9"> + <button type="submit" class="btn btn-primary"> <?= view('icons/save') ?> - <?= I18N::translate('save') ?> - </button> + <?= I18N::translate('save') ?> + </button> - <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'Admin', 'ged' => $tree->getName()])) ?>" class="btn btn-secondary"> + <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'Admin', 'ged' => $tree->getName()])) ?>" class="btn btn-secondary"> <?= view('icons/cancel') ?> - <?= I18N::translate('cancel') ?> - </a> - </div> - </div> + <?= I18N::translate('cancel') ?> + </a> + </div> + </div> </form> <?= view('modules/ckeditor/ckeditor-js') ?> diff --git a/resources/views/modules/stories/list.php b/resources/views/modules/stories/list.php index c4a18b74b2..fd394ba5fd 100644 --- a/resources/views/modules/stories/list.php +++ b/resources/views/modules/stories/list.php @@ -4,26 +4,26 @@ <h2 class="wt-page-title"><?= $title ?></h2> <table id="story_table" class="w-100"> - <thead> - <tr> - <th><?= I18N::translate('Story title') ?></th> - <th><?= I18N::translate('Individual') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($stories as $story): ?> - <tr> - <td> - <?= e($story->title) ?> - </td> - <td> - <a href="<?= e($story->individual->url()) ?>#tab-stories"> - <?= $story->individual->getFullName() ?> - </a> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th><?= I18N::translate('Story title') ?></th> + <th><?= I18N::translate('Individual') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($stories as $story) : ?> + <tr> + <td> + <?= e($story->title) ?> + </td> + <td> + <a href="<?= e($story->individual->url()) ?>#tab-stories"> + <?= $story->individual->getFullName() ?> + </a> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <?php View::push('javascript') ?> @@ -38,7 +38,7 @@ info: true, sorting: [[0,"asc"]], columns: [ - /* 0-name */ null, + /* 0-name */ null, /* 1-NAME */ null ], <?= I18N::datatablesI18N() ?> diff --git a/resources/views/modules/stories/tab.php b/resources/views/modules/stories/tab.php index 8ed4205ece..f22a01abce 100644 --- a/resources/views/modules/stories/tab.php +++ b/resources/views/modules/stories/tab.php @@ -1,27 +1,27 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="wt-stories-tab py-4"> - <?php foreach ($stories as $story): ?> - <div class="story_title descriptionbox center rela"> - <?= e($story->title) ?> - </div> - <div class="story_body optionbox"> - <?= $story->story_body ?> - </div> - <?php if ($is_admin): ?> - <div class="story_edit"> - <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $story->block_id, 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Edit the story') ?> - </a> - </div> - <?php endif ?> - <?php endforeach ?> + <?php foreach ($stories as $story) : ?> + <div class="story_title descriptionbox center rela"> + <?= e($story->title) ?> + </div> + <div class="story_body optionbox"> + <?= $story->story_body ?> + </div> + <?php if ($is_admin) : ?> + <div class="story_edit"> + <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $story->block_id, 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Edit the story') ?> + </a> + </div> + <?php endif ?> + <?php endforeach ?> - <?php if ($is_admin && empty($stories)): ?> - <div> - <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'xref' => $individual->getXref(), 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Add a story') ?> - </a> - </div> - <?php endif ?> + <?php if ($is_admin && empty($stories)) : ?> + <div> + <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'xref' => $individual->getXref(), 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Add a story') ?> + </a> + </div> + <?php endif ?> </div> diff --git a/resources/views/modules/todays_events/config.php b/resources/views/modules/todays_events/config.php index aca4499fbc..4d408aee70 100644 --- a/resources/views/modules/todays_events/config.php +++ b/resources/views/modules/todays_events/config.php @@ -3,37 +3,37 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="filter"> - <?= I18N::translate('Show only events of living individuals') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('filter', FunctionsEdit::optionsNoYes(), $filter, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="filter"> + <?= I18N::translate('Show only events of living individuals') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('filter', FunctionsEdit::optionsNoYes(), $filter, true) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="events"> - <?= I18N::translate('Events') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_events, $event_array, ['id' => 'events', 'name' => 'events[]', 'class' => 'select2']) ?> - </div> + <label class="col-sm-3 col-form-label" for="events"> + <?= I18N::translate('Events') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_events, $event_array, ['id' => 'events', 'name' => 'events[]', 'class' => 'select2']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="infoStyle"> - <?= /* I18N: Label for a configuration option */ I18N::translate('Presentation style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="infoStyle"> + <?= /* I18N: Label for a configuration option */ I18N::translate('Presentation style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="sortStyle"> - <?= /* I18N: Label for a configuration option */ I18N::translate('Sort order') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($sort_styles, $sortStyle, ['id' => 'sortStyle', 'name' => 'sortStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="sortStyle"> + <?= /* I18N: Label for a configuration option */ I18N::translate('Sort order') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($sort_styles, $sortStyle, ['id' => 'sortStyle', 'name' => 'sortStyle']) ?> + </div> </div> diff --git a/resources/views/modules/todays_events/empty.php b/resources/views/modules/todays_events/empty.php index f74d15a4dc..6f674718da 100644 --- a/resources/views/modules/todays_events/empty.php +++ b/resources/views/modules/todays_events/empty.php @@ -1,5 +1,5 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="details_label"> - <?= I18N::translate('No events exist for today.') ?> + <?= I18N::translate('No events exist for today.') ?> </div> diff --git a/resources/views/modules/todays_events/list.php b/resources/views/modules/todays_events/list.php index dd48eb4872..f5b89e5d39 100644 --- a/resources/views/modules/todays_events/list.php +++ b/resources/views/modules/todays_events/list.php @@ -1,19 +1,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <?php use Fisharebest\Webtrees\Individual; ?> -<?php foreach ($facts as $fact): ?> - <?php $record = $fact->getParent(); ?> - <a href="<?= e($record->url()) ?>" class="list_item name2"> - <?= $record->getFullName() ?> - </a> - <?php if ($record instanceof Individual): ?> - <?= $record->getSexImage() ?> - <?php endif ?> - <div class="indent"> - <?= $fact->getLabel() . ' — ' . $fact->getDate()->display(true); ?> - <?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?> - <?php if (!$fact->getPlace()->isEmpty()): ?> - <?= ' — <a href="' . $fact->getPlace()->getURL() . '">' . $fact->getPlace()->getFullName() . '</a>'; ?> - <?php endif ?> - </div> +<?php foreach ($facts as $fact) : ?> + <?php $record = $fact->getParent(); ?> + <a href="<?= e($record->url()) ?>" class="list_item name2"> + <?= $record->getFullName() ?> + </a> + <?php if ($record instanceof Individual) : ?> + <?= $record->getSexImage() ?> + <?php endif ?> + <div class="indent"> + <?= $fact->getLabel() . ' — ' . $fact->getDate()->display(true); ?> + <?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?> + <?php if (!$fact->getPlace()->isEmpty()) : ?> + <?= ' — <a href="' . $fact->getPlace()->getURL() . '">' . $fact->getPlace()->getFullName() . '</a>'; ?> + <?php endif ?> + </div> <?php endforeach ?> diff --git a/resources/views/modules/todays_events/table.php b/resources/views/modules/todays_events/table.php index 72b142cc66..1447460601 100644 --- a/resources/views/modules/todays_events/table.php +++ b/resources/views/modules/todays_events/table.php @@ -3,47 +3,47 @@ <?php use Fisharebest\Webtrees\View; ?> <table class="table table-sm datatable wt-table-events" data-info="false" data-paging="false" data-searching="false" data-sorting="<?= e('[[1, "asc" ]]') ?>"> - <thead> - <tr> - <th> - <?= I18N::translate('Record') ?> - </th> - <th> - <?= I18N::translate('Date') ?> - </th> - <th> - <i class="icon-reminder"></i> - <span class="sr-only"><?= I18N::translate('Anniversary') ?></span> - </th> - <th> - <?= I18N::translate('Event') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($facts as $fact): ?> - <?php $record = $fact->getParent(); ?> - <tr> - <td data-sort="<?= e($record->getSortName()) ?>"> - <a href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> - </a> - <?php if ($record instanceof Individual): ?> - <?= $record->getSexImage() ?> - <?php endif ?> - </td> - <td data-sort="<?= $fact->getDate()->julianDay() ?>"> - <?= $fact->getDate()->display(true); ?> - </td> - <td data-sort="<?= $fact->anniv ?>"> - <?= $fact->anniv ?> - </td> - <td data-sort="<?= $fact->getLabel() ?>"> - <?= $fact->getLabel() ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th> + <?= I18N::translate('Record') ?> + </th> + <th> + <?= I18N::translate('Date') ?> + </th> + <th> + <i class="icon-reminder"></i> + <span class="sr-only"><?= I18N::translate('Anniversary') ?></span> + </th> + <th> + <?= I18N::translate('Event') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($facts as $fact) : ?> + <?php $record = $fact->getParent(); ?> + <tr> + <td data-sort="<?= e($record->getSortName()) ?>"> + <a href="<?= e($record->url()) ?>"> + <?= $record->getFullName() ?> + </a> + <?php if ($record instanceof Individual) : ?> + <?= $record->getSexImage() ?> + <?php endif ?> + </td> + <td data-sort="<?= $fact->getDate()->julianDay() ?>"> + <?= $fact->getDate()->display(true); ?> + </td> + <td data-sort="<?= $fact->anniv ?>"> + <?= $fact->anniv ?> + </td> + <td data-sort="<?= $fact->getLabel() ?>"> + <?= $fact->getLabel() ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <?php View::push('javascript') ?> diff --git a/resources/views/modules/todo/config.php b/resources/views/modules/todo/config.php index aaefae1df3..610fe6b5ef 100644 --- a/resources/views/modules/todo/config.php +++ b/resources/views/modules/todo/config.php @@ -3,35 +3,35 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('Research tasks are special events, added to individuals in your family tree, which identify the need for further research. You can use them as a reminder to check facts against more reliable sources, to obtain documents or photographs, to resolve conflicting information, etc.') ?> - <?= I18N::translate('To create new research tasks, you must first add “research task” to the list of facts and events in the family tree’s preferences.') ?> - <?= I18N::translate('Research tasks are stored using the custom GEDCOM tag “_TODO”. Other genealogy applications may not recognize this tag.') ?> + <?= I18N::translate('Research tasks are special events, added to individuals in your family tree, which identify the need for further research. You can use them as a reminder to check facts against more reliable sources, to obtain documents or photographs, to resolve conflicting information, etc.') ?> + <?= I18N::translate('To create new research tasks, you must first add “research task” to the list of facts and events in the family tree’s preferences.') ?> + <?= I18N::translate('Research tasks are stored using the custom GEDCOM tag “_TODO”. Other genealogy applications may not recognize this tag.') ?> </p> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="show_other"> - <?= I18N::translate('Show research tasks that are assigned to other users') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('show_other', FunctionsEdit::optionsNoYes(), $show_other, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="show_other"> + <?= I18N::translate('Show research tasks that are assigned to other users') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('show_other', FunctionsEdit::optionsNoYes(), $show_other, true) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="show_unassigned"> - <?= I18N::translate('Show research tasks that are not assigned to any user') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('show_unassigned', FunctionsEdit::optionsNoYes(), $show_unassigned, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="show_unassigned"> + <?= I18N::translate('Show research tasks that are not assigned to any user') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('show_unassigned', FunctionsEdit::optionsNoYes(), $show_unassigned, true) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="show_future"> - <?= I18N::translate('Show research tasks that have a date in the future') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('show_future', FunctionsEdit::optionsNoYes(), $show_future, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="show_future"> + <?= I18N::translate('Show research tasks that have a date in the future') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('show_future', FunctionsEdit::optionsNoYes(), $show_future, true) ?> + </div> </div> diff --git a/resources/views/modules/todo/research-tasks.php b/resources/views/modules/todo/research-tasks.php index e5b259b920..8d433cd801 100644 --- a/resources/views/modules/todo/research-tasks.php +++ b/resources/views/modules/todo/research-tasks.php @@ -1,41 +1,41 @@ <?php use Fisharebest\Webtrees\I18N; ?> <table class="table table-bordered table-sm datatables wt-table-tasks" data-columns="[null, null, null, null]" data-info="false" data-paging="false" data-searching="false" data-state-save="true"> - <thead> - <tr> - <th class="d-none d-md-table-cell wt-side-block-optional"> - <?= I18N::translate('Date') ?> - </th> - <th> - <?= I18N::translate('Record') ?> - </th> - <th class="d-none d-md-table-cell wt-side-block-optional"> - <?= I18N::translate('Username') ?> - </th> - <th> - <?= I18N::translate('Research task') ?> - </th> - </tr> - </thead> + <thead> + <tr> + <th class="d-none d-md-table-cell wt-side-block-optional"> + <?= I18N::translate('Date') ?> + </th> + <th> + <?= I18N::translate('Record') ?> + </th> + <th class="d-none d-md-table-cell wt-side-block-optional"> + <?= I18N::translate('Username') ?> + </th> + <th> + <?= I18N::translate('Research task') ?> + </th> + </tr> + </thead> - <tbody> - <?php foreach ($tasks as $task): ?> - <tr> - <td data-sort="<?= $task->getDate()->julianDay() ?>" class="d-none d-md-table-cell wt-side-block-optional"> - <?= $task->getDate()->display() ?> - </td> - <td data-sort="<?= e($task->getParent()->getSortName()) ?>"> - <a href="<?= e($task->getParent()->url()) ?>"> - <?= $task->getParent()->getFullName() ?> - </a> - </td> - <td class="d-none d-md-table-cell wt-side-block-optional"> - <?= e($task->getAttribute('_WT_USER')) ?> - </td> - <td dir="auto"> - <?= e($task->getValue()) ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <tbody> + <?php foreach ($tasks as $task) : ?> + <tr> + <td data-sort="<?= $task->getDate()->julianDay() ?>" class="d-none d-md-table-cell wt-side-block-optional"> + <?= $task->getDate()->display() ?> + </td> + <td data-sort="<?= e($task->getParent()->getSortName()) ?>"> + <a href="<?= e($task->getParent()->url()) ?>"> + <?= $task->getParent()->getFullName() ?> + </a> + </td> + <td class="d-none d-md-table-cell wt-side-block-optional"> + <?= e($task->getAttribute('_WT_USER')) ?> + </td> + <td dir="auto"> + <?= e($task->getValue()) ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> diff --git a/resources/views/modules/top10_givnnames/config.php b/resources/views/modules/top10_givnnames/config.php index e123d24ce0..78fa6ab645 100644 --- a/resources/views/modules/top10_givnnames/config.php +++ b/resources/views/modules/top10_givnnames/config.php @@ -2,19 +2,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="num"> - <?= /* I18N: ... to show in a list */ I18N::translate('Number of given names') ?> - </label> - <div class="col-sm-9"> - <input type="text" id="num" name="num" size="2" value="<?= $num ?>"> - </div> + <label class="col-sm-3 col-form-label" for="num"> + <?= /* I18N: ... to show in a list */ I18N::translate('Number of given names') ?> + </label> + <div class="col-sm-9"> + <input type="text" id="num" name="num" size="2" value="<?= $num ?>"> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="infoStyle"> - <?= I18N::translate('Presentation style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="infoStyle"> + <?= I18N::translate('Presentation style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> + </div> </div> diff --git a/resources/views/modules/top10_givnnames/list.php b/resources/views/modules/top10_givnnames/list.php index e63ac8401b..68dc2616f0 100644 --- a/resources/views/modules/top10_givnnames/list.php +++ b/resources/views/modules/top10_givnnames/list.php @@ -1,8 +1,8 @@ <?php use Fisharebest\Webtrees\I18N; ?> <dl> - <dt><?= I18N::translate('Males') ?></dt> - <dd><?= $males ?></dd> - <dt><?= I18N::translate('Females') ?></dt> - <dd><?= $females ?></dd> + <dt><?= I18N::translate('Males') ?></dt> + <dd><?= $males ?></dd> + <dt><?= I18N::translate('Females') ?></dt> + <dd><?= $females ?></dd> </dl> diff --git a/resources/views/modules/top10_pageviews/config.php b/resources/views/modules/top10_pageviews/config.php index 2c4fd6561e..b1b166f0e3 100644 --- a/resources/views/modules/top10_pageviews/config.php +++ b/resources/views/modules/top10_pageviews/config.php @@ -2,19 +2,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="num"> - <?= /* I18N: ... to show in a list */ I18N::translate('Number of pages') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="num" name="num" type="text" value="<?= e($num) ?>"> - </div> + <label class="col-sm-3 col-form-label" for="num"> + <?= /* I18N: ... to show in a list */ I18N::translate('Number of pages') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="num" name="num" type="text" value="<?= e($num) ?>"> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="count_placement"> - <?= /* I18N: Label for a configuration option */ I18N::translate('Show counts before or after name') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($options, $count_placement, ['id' => 'count_placement', 'name' => 'count_placement']) ?> - </div> + <label class="col-sm-3 col-form-label" for="count_placement"> + <?= /* I18N: Label for a configuration option */ I18N::translate('Show counts before or after name') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($options, $count_placement, ['id' => 'count_placement', 'name' => 'count_placement']) ?> + </div> </div> diff --git a/resources/views/modules/top10_surnames/config.php b/resources/views/modules/top10_surnames/config.php index 63f001cad4..727460c3c2 100644 --- a/resources/views/modules/top10_surnames/config.php +++ b/resources/views/modules/top10_surnames/config.php @@ -2,19 +2,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="num"> - <?= /* I18N: ... to show in a list */ I18N::translate('Number of surnames') ?> - </label> - <div class="col-sm-9"> - <input class="form-control"id="num" name="num" type="text" value="<?= e($num) ?>"> - </div> + <label class="col-sm-3 col-form-label" for="num"> + <?= /* I18N: ... to show in a list */ I18N::translate('Number of surnames') ?> + </label> + <div class="col-sm-9"> + <input class="form-control"id="num" name="num" type="text" value="<?= e($num) ?>"> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="infoStyle"> - <?= I18N::translate('Presentation style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="infoStyle"> + <?= I18N::translate('Presentation style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> + </div> </div> diff --git a/resources/views/modules/tree/tab.php b/resources/views/modules/tree/tab.php index aa5856c707..947857f6af 100644 --- a/resources/views/modules/tree/tab.php +++ b/resources/views/modules/tree/tab.php @@ -1,7 +1,7 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="wt-tree-tab py-4"> - <?= $html ?> + <?= $html ?> </div> <?php View::push('javascript') ?> @@ -14,6 +14,6 @@ newSheet.setAttribute("href","<?= $treeview_css ?>"); document.head.appendChild(newSheet); - <?= $js ?> + <?= $js ?> </script> <?php View::endpush() ?> diff --git a/resources/views/modules/upcoming_events/config.php b/resources/views/modules/upcoming_events/config.php index a1a2d11380..e5c8226671 100644 --- a/resources/views/modules/upcoming_events/config.php +++ b/resources/views/modules/upcoming_events/config.php @@ -3,47 +3,47 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="days"> - <?= I18N::translate('Number of days to show') ?> - </label> - <div class="col-sm-9"> - <input type="text" name="days" id="days" size="2" value="<?= $days ?>"> - <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?> - </div> + <label class="col-sm-3 col-form-label" for="days"> + <?= I18N::translate('Number of days to show') ?> + </label> + <div class="col-sm-9"> + <input type="text" name="days" id="days" size="2" value="<?= $days ?>"> + <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="filter"> - <?= I18N::translate('Show only events of living individuals') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::radioButtons('filter', FunctionsEdit::optionsNoYes(), $filter, true) ?> - </div> + <label class="col-sm-3 col-form-label" for="filter"> + <?= I18N::translate('Show only events of living individuals') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::radioButtons('filter', FunctionsEdit::optionsNoYes(), $filter, true) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="events"> - <?= I18N::translate('Events') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::multiSelect($all_events, $event_array, ['id' => 'events', 'name' => 'events[]', 'class' => 'select2']) ?> - </div> + <label class="col-sm-3 col-form-label" for="events"> + <?= I18N::translate('Events') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::multiSelect($all_events, $event_array, ['id' => 'events', 'name' => 'events[]', 'class' => 'select2']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="infoStyle"> - <?= /* I18N: Label for a configuration option */ I18N::translate('Presentation style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="infoStyle"> + <?= /* I18N: Label for a configuration option */ I18N::translate('Presentation style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($info_styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="sortStyle"> - <?= /* I18N: Label for a configuration option */ I18N::translate('Sort order') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($sort_styles, $sortStyle, ['id' => 'sortStyle', 'name' => 'sortStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="sortStyle"> + <?= /* I18N: Label for a configuration option */ I18N::translate('Sort order') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($sort_styles, $sortStyle, ['id' => 'sortStyle', 'name' => 'sortStyle']) ?> + </div> </div> diff --git a/resources/views/modules/upcoming_events/list.php b/resources/views/modules/upcoming_events/list.php index dd48eb4872..f5b89e5d39 100644 --- a/resources/views/modules/upcoming_events/list.php +++ b/resources/views/modules/upcoming_events/list.php @@ -1,19 +1,19 @@ <?php use Fisharebest\Webtrees\I18N; ?> <?php use Fisharebest\Webtrees\Individual; ?> -<?php foreach ($facts as $fact): ?> - <?php $record = $fact->getParent(); ?> - <a href="<?= e($record->url()) ?>" class="list_item name2"> - <?= $record->getFullName() ?> - </a> - <?php if ($record instanceof Individual): ?> - <?= $record->getSexImage() ?> - <?php endif ?> - <div class="indent"> - <?= $fact->getLabel() . ' — ' . $fact->getDate()->display(true); ?> - <?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?> - <?php if (!$fact->getPlace()->isEmpty()): ?> - <?= ' — <a href="' . $fact->getPlace()->getURL() . '">' . $fact->getPlace()->getFullName() . '</a>'; ?> - <?php endif ?> - </div> +<?php foreach ($facts as $fact) : ?> + <?php $record = $fact->getParent(); ?> + <a href="<?= e($record->url()) ?>" class="list_item name2"> + <?= $record->getFullName() ?> + </a> + <?php if ($record instanceof Individual) : ?> + <?= $record->getSexImage() ?> + <?php endif ?> + <div class="indent"> + <?= $fact->getLabel() . ' — ' . $fact->getDate()->display(true); ?> + <?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?> + <?php if (!$fact->getPlace()->isEmpty()) : ?> + <?= ' — <a href="' . $fact->getPlace()->getURL() . '">' . $fact->getPlace()->getFullName() . '</a>'; ?> + <?php endif ?> + </div> <?php endforeach ?> diff --git a/resources/views/modules/upcoming_events/table.php b/resources/views/modules/upcoming_events/table.php index 72b142cc66..1447460601 100644 --- a/resources/views/modules/upcoming_events/table.php +++ b/resources/views/modules/upcoming_events/table.php @@ -3,47 +3,47 @@ <?php use Fisharebest\Webtrees\View; ?> <table class="table table-sm datatable wt-table-events" data-info="false" data-paging="false" data-searching="false" data-sorting="<?= e('[[1, "asc" ]]') ?>"> - <thead> - <tr> - <th> - <?= I18N::translate('Record') ?> - </th> - <th> - <?= I18N::translate('Date') ?> - </th> - <th> - <i class="icon-reminder"></i> - <span class="sr-only"><?= I18N::translate('Anniversary') ?></span> - </th> - <th> - <?= I18N::translate('Event') ?> - </th> - </tr> - </thead> - <tbody> - <?php foreach ($facts as $fact): ?> - <?php $record = $fact->getParent(); ?> - <tr> - <td data-sort="<?= e($record->getSortName()) ?>"> - <a href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> - </a> - <?php if ($record instanceof Individual): ?> - <?= $record->getSexImage() ?> - <?php endif ?> - </td> - <td data-sort="<?= $fact->getDate()->julianDay() ?>"> - <?= $fact->getDate()->display(true); ?> - </td> - <td data-sort="<?= $fact->anniv ?>"> - <?= $fact->anniv ?> - </td> - <td data-sort="<?= $fact->getLabel() ?>"> - <?= $fact->getLabel() ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <thead> + <tr> + <th> + <?= I18N::translate('Record') ?> + </th> + <th> + <?= I18N::translate('Date') ?> + </th> + <th> + <i class="icon-reminder"></i> + <span class="sr-only"><?= I18N::translate('Anniversary') ?></span> + </th> + <th> + <?= I18N::translate('Event') ?> + </th> + </tr> + </thead> + <tbody> + <?php foreach ($facts as $fact) : ?> + <?php $record = $fact->getParent(); ?> + <tr> + <td data-sort="<?= e($record->getSortName()) ?>"> + <a href="<?= e($record->url()) ?>"> + <?= $record->getFullName() ?> + </a> + <?php if ($record instanceof Individual) : ?> + <?= $record->getSexImage() ?> + <?php endif ?> + </td> + <td data-sort="<?= $fact->getDate()->julianDay() ?>"> + <?= $fact->getDate()->display(true); ?> + </td> + <td data-sort="<?= $fact->anniv ?>"> + <?= $fact->anniv ?> + </td> + <td data-sort="<?= $fact->getLabel() ?>"> + <?= $fact->getLabel() ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <?php View::push('javascript') ?> diff --git a/resources/views/modules/user_blog/edit.php b/resources/views/modules/user_blog/edit.php index 4d974a5193..1998d123d7 100644 --- a/resources/views/modules/user_blog/edit.php +++ b/resources/views/modules/user_blog/edit.php @@ -3,44 +3,44 @@ <h2><?= $title ?></h2> <form method="post"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <table> - <tr> - <th> - <label for="subject"> - <?= I18N::translate('Title') ?> - </label> - </th> - <tr> - <tr> - <td> - <input type="text" id="subject" name="subject" size="50" dir="auto" autofocus value="<?= e($subject) ?>"> - </td> - </tr> - <tr> - <th> - <label for="body"> - <?= I18N::translate('Content') ?> - </label> - </th> - </tr> - <tr> - <td> - <textarea id="body" name="body" class="html-edit form-control" rows="10" dir="auto"><?= e($body) ?></textarea> - </td> - </tr> + <table> + <tr> + <th> + <label for="subject"> + <?= I18N::translate('Title') ?> + </label> + </th> + <tr> + <tr> + <td> + <input type="text" id="subject" name="subject" size="50" dir="auto" autofocus value="<?= e($subject) ?>"> + </td> + </tr> + <tr> + <th> + <label for="body"> + <?= I18N::translate('Content') ?> + </label> + </th> + </tr> + <tr> + <td> + <textarea id="body" name="body" class="html-edit form-control" rows="10" dir="auto"><?= e($body) ?></textarea> + </td> + </tr> - <tr> - <td> - <button class="btn btn-primary" type="submit"> - <?= I18N::translate('save') ?> - </button> + <tr> + <td> + <button class="btn btn-primary" type="submit"> + <?= I18N::translate('save') ?> + </button> - <a class="btn btn-secondary" href="<?= e(route('user-page', ['ged' => $tree->getName()])) ?>"> - <?= I18N::translate('cancel') ?> - </a> - </td> - </tr> - </table> + <a class="btn btn-secondary" href="<?= e(route('user-page', ['ged' => $tree->getName()])) ?>"> + <?= I18N::translate('cancel') ?> + </a> + </td> + </tr> + </table> </form> diff --git a/resources/views/modules/user_blog/list.php b/resources/views/modules/user_blog/list.php index 26cd4f2ba1..10115ce0b3 100644 --- a/resources/views/modules/user_blog/list.php +++ b/resources/views/modules/user_blog/list.php @@ -2,46 +2,46 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsDate; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if (empty($articles)): ?> - <?= I18N::translate('No news articles have been submitted.') ?> +<?php if (empty($articles)) : ?> + <?= I18N::translate('No news articles have been submitted.') ?> <?php endif ?> -<?php foreach ($articles as $n => $article): ?> - <?php if ($n === 5 && count($articles) > 5): ?> - <p> - <a class="btn btn-link" data-toggle="collapse" data-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>"><?= I18N::translate('More news articles') ?> - </a> - </p> - <div class="collapse" id="more-news-<?= e($block_id) ?>"> - <?php endif ?> +<?php foreach ($articles as $n => $article) : ?> + <?php if ($n === 5 && count($articles) > 5) : ?> + <p> + <a class="btn btn-link" data-toggle="collapse" data-target="#more-news-<?= e($block_id) ?>" role="button" aria-expanded="false" aria-controls="more-news-<?= e($block_id) ?>"><?= I18N::translate('More news articles') ?> + </a> + </p> + <div class="collapse" id="more-news-<?= e($block_id) ?>"> + <?php endif ?> - <div class="news_box"> - <div class="news_title"><?= e($article->subject) ?></div> - <div class="news_date"><?= FunctionsDate::formatTimestamp($article->updated) ?></div> - <div style="white-space: pre-wrap"><?= e($article->body) ?></div> + <div class="news_box"> + <div class="news_title"><?= e($article->subject) ?></div> + <div class="news_date"><?= FunctionsDate::formatTimestamp($article->updated) ?></div> + <div style="white-space: pre-wrap"><?= e($article->body) ?></div> - <?php if (Auth::isManager($tree)): ?> - <hr> - <form action="<?= e(route('module', ['module' => 'user_blog', 'action' => 'DeleteJournal', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <a class="btn btn-link" href="<?= e(route('module', ['module' => 'user_blog', 'action' => 'EditJournal', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Edit') ?> - </a> - | - <button class="btn btn-link" type="submit" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($article->subject)) ?>" onclick="return confirm(this.dataset.confirm);"> - <?= I18N::translate('Delete') ?> - </button> - </form> - <?php endif ?> - </div> + <?php if (Auth::isManager($tree)) : ?> + <hr> + <form action="<?= e(route('module', ['module' => 'user_blog', 'action' => 'DeleteJournal', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <a class="btn btn-link" href="<?= e(route('module', ['module' => 'user_blog', 'action' => 'EditJournal', 'news_id' => $article->news_id, 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Edit') ?> + </a> + | + <button class="btn btn-link" type="submit" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($article->subject)) ?>" onclick="return confirm(this.dataset.confirm);"> + <?= I18N::translate('Delete') ?> + </button> + </form> + <?php endif ?> + </div> <?php endforeach ?> -<?php if (count($articles) > 5): ?> - </div> +<?php if (count($articles) > 5) : ?> + </div> <?php endif ?> <p> - <a href="<?= e(route('module', ['module' => 'user_blog', 'action' => 'EditJournal', 'ged' => $tree->getName()])) ?>"> - <?= I18N::translate('Add a news article') ?> - </a> + <a href="<?= e(route('module', ['module' => 'user_blog', 'action' => 'EditJournal', 'ged' => $tree->getName()])) ?>"> + <?= I18N::translate('Add a news article') ?> + </a> </p> diff --git a/resources/views/modules/user_favorites/favorites.php b/resources/views/modules/user_favorites/favorites.php index 3b88b22f5b..fb32842a35 100644 --- a/resources/views/modules/user_favorites/favorites.php +++ b/resources/views/modules/user_favorites/favorites.php @@ -2,56 +2,56 @@ <?php use Fisharebest\Webtrees\Individual; ?> <?php use Fisharebest\Webtrees\Theme; ?> -<?php foreach ($favorites as $favorite): ?> - <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->getSex() : '' ?>"> - <?php if ($favorite->favorite_type === 'URL'): ?> - <a href="<?= e($favorite->url) ?>"><b><?= e($favorite->title) ?></b></a> - <?php elseif ($favorite->record instanceof Individual): ?> - <?= Theme::theme()->individualBoxLarge($favorite->record) ?> - <?php elseif ($favorite->record !== null) : ?> - <?= $favorite->record->formatList() ?> - <?php endif ?> +<?php foreach ($favorites as $favorite) : ?> + <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->getSex() : '' ?>"> + <?php if ($favorite->favorite_type === 'URL') : ?> + <a href="<?= e($favorite->url) ?>"><b><?= e($favorite->title) ?></b></a> + <?php elseif ($favorite->record instanceof Individual) : ?> + <?= Theme::theme()->individualBoxLarge($favorite->record) ?> + <?php elseif ($favorite->record !== null) : ?> + <?= $favorite->record->formatList() ?> + <?php endif ?> - <div class="wt-favorites-block-note"> + <div class="wt-favorites-block-note"> <?= e((string) $favorite->note) ?> </div> - </div> + </div> - <form action="<?= e(route('module', ['module' => 'user_favorites', 'action' => 'DeleteFavorite', 'ged' => $tree->getName(), 'favorite_id' => $favorite->favorite_id])) ?>" method="post"> - <?= csrf_field() ?> - <button type="submit" class="btn btn-link btn-sm" data-confirm="<?= I18N::translate('Are you sure you want to remove this item from your list of favorites?') ?>" onclick="return confirm(this.dataset.confirm);"> - <?= I18N::translate('Remove') ?> - </button> - </form> + <form action="<?= e(route('module', ['module' => 'user_favorites', 'action' => 'DeleteFavorite', 'ged' => $tree->getName(), 'favorite_id' => $favorite->favorite_id])) ?>" method="post"> + <?= csrf_field() ?> + <button type="submit" class="btn btn-link btn-sm" data-confirm="<?= I18N::translate('Are you sure you want to remove this item from your list of favorites?') ?>" onclick="return confirm(this.dataset.confirm);"> + <?= I18N::translate('Remove') ?> + </button> + </form> <?php endforeach ?> <div class="add_fav_head"> - <a href="#" onclick="return expand_layer('add_fav<?= e($block_id) ?>');"> - <?= I18N::translate('Add a favorite') ?> - <i id="add_fav<?= e($block_id) ?>_img" class="icon-plus"></i> - </a> + <a href="#" onclick="return expand_layer('add_fav<?= e($block_id) ?>');"> + <?= I18N::translate('Add a favorite') ?> + <i id="add_fav<?= e($block_id) ?>_img" class="icon-plus"></i> + </a> </div> <div id="add_fav<?= e($block_id) ?>" style="display: none;"> - <form action="<?= e(route('module', ['module' => 'user_favorites', 'action' => 'AddFavorite', 'ged' => $tree->getName()])) ?>" method="post"> - <?= csrf_field() ?> - <div class="add_fav_ref"> - <input type="radio" name="fav_category" value="record" checked onclick="$('#xref<?= e($block_id) ?>').removeAttr('disabled'); $('#url, #title').attr('disabled','disabled').val('');"> - <label for="xref<?= e($block_id) ?>"> - <?= I18N::translate('Record') ?> - </label> - <input class="pedigree_form" data-autocomplete-type="IFSRO" type="text" name="xref" id="xref<?= e($block_id) ?>" size="5"> - </div> - <div class="add_fav_url"> - <input type="radio" name="fav_category" value="url" onclick="$('#url, #title').removeAttr('disabled'); $('#xref<?= e($block_id) ?>').attr('disabled','disabled').val('');"> - <input type="text" name="url" id="url" size="20" value="" placeholder="<?= I18N::translate('URL') ?>" disabled> - <input type="text" name="title" id="title" size="20" value="" placeholder="<?= I18N::translate('Title') ?>" disabled> - <p> - <?= I18N::translate('Enter an optional note about this favorite') ?> - </p> - <textarea name="note" rows="6" cols="50"></textarea> - </div> - <button type="submit" class="btn btn-primary"> - <?= /* I18N: A button label. */ I18N::translate('add') ?> - </button> - </form> + <form action="<?= e(route('module', ['module' => 'user_favorites', 'action' => 'AddFavorite', 'ged' => $tree->getName()])) ?>" method="post"> + <?= csrf_field() ?> + <div class="add_fav_ref"> + <input type="radio" name="fav_category" value="record" checked onclick="$('#xref<?= e($block_id) ?>').removeAttr('disabled'); $('#url, #title').attr('disabled','disabled').val('');"> + <label for="xref<?= e($block_id) ?>"> + <?= I18N::translate('Record') ?> + </label> + <input class="pedigree_form" data-autocomplete-type="IFSRO" type="text" name="xref" id="xref<?= e($block_id) ?>" size="5"> + </div> + <div class="add_fav_url"> + <input type="radio" name="fav_category" value="url" onclick="$('#url, #title').removeAttr('disabled'); $('#xref<?= e($block_id) ?>').attr('disabled','disabled').val('');"> + <input type="text" name="url" id="url" size="20" value="" placeholder="<?= I18N::translate('URL') ?>" disabled> + <input type="text" name="title" id="title" size="20" value="" placeholder="<?= I18N::translate('Title') ?>" disabled> + <p> + <?= I18N::translate('Enter an optional note about this favorite') ?> + </p> + <textarea name="note" rows="6" cols="50"></textarea> + </div> + <button type="submit" class="btn btn-primary"> + <?= /* I18N: A button label. */ I18N::translate('add') ?> + </button> + </form> </div> diff --git a/resources/views/modules/user_welcome/welcome.php b/resources/views/modules/user_welcome/welcome.php index 293867ec60..ef54eaf536 100644 --- a/resources/views/modules/user_welcome/welcome.php +++ b/resources/views/modules/user_welcome/welcome.php @@ -1,11 +1,11 @@ <div class="d-flex flex-wrap justify-content-around"> - <?php foreach ($links as $link): ?> - <div class="text-center m-1"> - <a href="<?= e($link['url']) ?>"> - <i class="<?= $link['icon'] ?>"></i> - <br> - <?= $link['title'] ?> - </a> - </div> - <?php endforeach ?> + <?php foreach ($links as $link) : ?> + <div class="text-center m-1"> + <a href="<?= e($link['url']) ?>"> + <i class="<?= $link['icon'] ?>"></i> + <br> + <?= $link['title'] ?> + </a> + </div> + <?php endforeach ?> </div> diff --git a/resources/views/modules/yahrzeit/config.php b/resources/views/modules/yahrzeit/config.php index d2ba63585a..6e8657af13 100644 --- a/resources/views/modules/yahrzeit/config.php +++ b/resources/views/modules/yahrzeit/config.php @@ -2,31 +2,31 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="days"> - <?= I18N::translate('Number of days to show') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" type="text" id="days" name="days" value="<?= e($days) ?>"> - <em> - <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?> - </em> - </div> + <label class="col-sm-3 col-form-label" for="days"> + <?= I18N::translate('Number of days to show') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" type="text" id="days" name="days" value="<?= e($days) ?>"> + <em> + <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?> + </em> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="infoStyle"> - <?= I18N::translate('Presentation style') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> - </div> + <label class="col-sm-3 col-form-label" for="infoStyle"> + <?= I18N::translate('Presentation style') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($styles, $infoStyle, ['id' => 'infoStyle', 'name' => 'infoStyle']) ?> + </div> </div> <div class="form-group row"> - <label class="col-sm-3 col-form-label" for="calendar"> - <?= I18N::translate('Calendar') ?> - </label> - <div class="col-sm-9"> - <?= Bootstrap4::select($calendars, $calendar, ['id' => 'calendar', 'name' => 'calendar']) ?> - </div> + <label class="col-sm-3 col-form-label" for="calendar"> + <?= I18N::translate('Calendar') ?> + </label> + <div class="col-sm-9"> + <?= Bootstrap4::select($calendars, $calendar, ['id' => 'calendar', 'name' => 'calendar']) ?> + </div> </div> diff --git a/resources/views/modules/yahrzeit/list.php b/resources/views/modules/yahrzeit/list.php index 8447afe56b..bd70ebebac 100644 --- a/resources/views/modules/yahrzeit/list.php +++ b/resources/views/modules/yahrzeit/list.php @@ -1,12 +1,12 @@ <?php use Fisharebest\Webtrees\I18N; ?>' -<?php foreach ($yahrzeits as $yahrzeit): ?> - <a href="<?= e($yahrzeit->individual->url()) ?>" class="list_item name2"> - <?= $yahrzeit->individual->getFullName() ?> - </a> - <?= $yahrzeit->individual->getSexImage() ?> - <div class="indent"> - <?= $yahrzeit->fact->getDate()->display(true) ?>, - <?= I18N::translate('%s year anniversary', $yahrzeit->fact->anniv) ?> - </div> +<?php foreach ($yahrzeits as $yahrzeit) : ?> + <a href="<?= e($yahrzeit->individual->url()) ?>" class="list_item name2"> + <?= $yahrzeit->individual->getFullName() ?> + </a> + <?= $yahrzeit->individual->getSexImage() ?> + <div class="indent"> + <?= $yahrzeit->fact->getDate()->display(true) ?>, + <?= I18N::translate('%s year anniversary', $yahrzeit->fact->anniv) ?> + </div> <?php endforeach ?> diff --git a/resources/views/modules/yahrzeit/table.php b/resources/views/modules/yahrzeit/table.php index de260dfe51..f3fc005cb6 100644 --- a/resources/views/modules/yahrzeit/table.php +++ b/resources/views/modules/yahrzeit/table.php @@ -1,39 +1,39 @@ <?php use Fisharebest\Webtrees\I18N; ?> <table class="table table-sm datatable wt-table-yahrzeits" data-info="false" data-paging="false" data-searching="false" data-sorting="<?= e('[[3, "asc" ]]') ?>"> - <thead> - <tr> - <th><?= I18N::translate('Name') ?></th> - <th><?= I18N::translate('Death') ?></th> - <th><i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i></th> - <th><?= I18N::translate('Yahrzeit') ?></th> - </tr> - </thead> - <tbody> + <thead> + <tr> + <th><?= I18N::translate('Name') ?></th> + <th><?= I18N::translate('Death') ?></th> + <th><i class="icon-reminder" title="<?= I18N::translate('Anniversary') ?>"></i></th> + <th><?= I18N::translate('Yahrzeit') ?></th> + </tr> + </thead> + <tbody> - <?php foreach ($yahrzeits as $yahrzeit): ?> - <tr> - <td data-sort="<?= e($yahrzeit->individual->getSortName()) ?>"> - <a href="<?= e($yahrzeit->individual->url()) ?>"> - <?= $yahrzeit->individual->getFullname() ?> - <?php if ($yahrzeit->individual->getAddName()): ?> - <br> - <?= $yahrzeit->individual->getAddName() ?> - <?php endif ?> - </a> - </td> - <td data-sort="<?= e($yahrzeit->fact_date->julianDay()) ?>"> - <?= $yahrzeit->fact_date->display(true) ?> - </td> - <td data-sort="<?= e($yahrzeit->fact->anniv) ?>"> - <?= I18N::number($yahrzeit->fact->anniv) ?> - </td> - <td data-sort="<?= e($yahrzeit->yahrzeit_date->julianDay()) ?>"> - <?= $yahrzeit->yahrzeit_date->display(true) ?> - </td> - </tr> - <?php endforeach ?> - </tbody> + <?php foreach ($yahrzeits as $yahrzeit) : ?> + <tr> + <td data-sort="<?= e($yahrzeit->individual->getSortName()) ?>"> + <a href="<?= e($yahrzeit->individual->url()) ?>"> + <?= $yahrzeit->individual->getFullname() ?> + <?php if ($yahrzeit->individual->getAddName()) : ?> + <br> + <?= $yahrzeit->individual->getAddName() ?> + <?php endif ?> + </a> + </td> + <td data-sort="<?= e($yahrzeit->fact_date->julianDay()) ?>"> + <?= $yahrzeit->fact_date->display(true) ?> + </td> + <td data-sort="<?= e($yahrzeit->fact->anniv) ?>"> + <?= I18N::number($yahrzeit->fact->anniv) ?> + </td> + <td data-sort="<?= e($yahrzeit->yahrzeit_date->julianDay()) ?>"> + <?= $yahrzeit->yahrzeit_date->display(true) ?> + </td> + </tr> + <?php endforeach ?> + </tbody> </table> <script> diff --git a/resources/views/note-page-menu.php b/resources/views/note-page-menu.php index 5ea3f55f0c..04d671aa70 100644 --- a/resources/views/note-page-menu.php +++ b/resources/views/note-page-menu.php @@ -3,21 +3,21 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <a class="dropdown-item menu-note-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <a class="dropdown-item menu-note-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-note-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-note-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> diff --git a/resources/views/note-page.php b/resources/views/note-page.php index 060f8c07e9..8581f1d304 100644 --- a/resources/views/note-page.php +++ b/resources/views/note-page.php @@ -5,112 +5,112 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($note->isPendingDeletion()): ?> - <?php if (Auth::isModerator($note->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This note has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($note->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This note has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> -<?php elseif ($note->isPendingAddition()): ?> - <?php if (Auth::isModerator($note->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This note has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($note->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This note has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> +<?php if ($note->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($note->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This note has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($note->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This note has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> +<?php elseif ($note->isPendingAddition()) : ?> + <?php if (Auth::isModerator($note->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This note has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($note->getXref()) . '\', \'' . e($note->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($note->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This note has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> <?php endif ?> <div class="d-flex mb-4"> - <h2 class="wt-page-title mx-auto"> - <?= $note->getFullName() ?> - </h2> - <?php if ($note->canEdit() && !$note->isPendingDeletion()): ?> - <?= view('note-page-menu', ['record' => $note]) ?> - <?php endif ?> + <h2 class="wt-page-title mx-auto"> + <?= $note->getFullName() ?> + </h2> + <?php if ($note->canEdit() && !$note->isPendingDeletion()) : ?> + <?= view('note-page-menu', ['record' => $note]) ?> + <?php endif ?> </div> <div class="wt-page-content"> - <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> - <?= I18N::translate('Details') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> - <?= I18N::translate('Individuals') ?> - <?= Bootstrap4::badgeCount($individuals) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> - <?= I18N::translate('Families') ?> - <?= Bootstrap4::badgeCount($families) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($media_objects) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#media"> - <?= I18N::translate('Media objects') ?> - <?= Bootstrap4::badgeCount($media_objects) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> - <?= I18N::translate('Sources') ?> - <?= Bootstrap4::badgeCount($sources) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> - <?= I18N::translate('Notes') ?> - <?= Bootstrap4::badgeCount($notes) ?> - </a> - </li> - </ul> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> + <?= I18N::translate('Details') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> + <?= I18N::translate('Individuals') ?> + <?= Bootstrap4::badgeCount($individuals) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> + <?= I18N::translate('Families') ?> + <?= Bootstrap4::badgeCount($families) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($media_objects) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#media"> + <?= I18N::translate('Media objects') ?> + <?= Bootstrap4::badgeCount($media_objects) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> + <?= I18N::translate('Sources') ?> + <?= Bootstrap4::badgeCount($sources) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> + <?= I18N::translate('Notes') ?> + <?= Bootstrap4::badgeCount($notes) ?> + </a> + </li> + </ul> - <div class="tab-content"> - <div class="tab-pane active fade show" role="tabpanel" id="details"> - <table class="table wt-facts-table"> - <tr> - <th scope="row"> - <?= I18N::translate('Shared note') ?> - <?php if (Auth::isEditor($note->getTree())): ?> - <div class="editfacts"> - <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => route('edit-note-object', ['xref' => $note->getXref(), 'ged' => $note->getTree()->getName()])]) ?> - </div> - <?php endif ?> - </th> - <td><?= $text ?></td> - </tr> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printFact($fact, $note) ?> - <?php endforeach ?> + <div class="tab-content"> + <div class="tab-pane active fade show" role="tabpanel" id="details"> + <table class="table wt-facts-table"> + <tr> + <th scope="row"> + <?= I18N::translate('Shared note') ?> + <?php if (Auth::isEditor($note->getTree())) : ?> + <div class="editfacts"> + <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => route('edit-note-object', ['xref' => $note->getXref(), 'ged' => $note->getTree()->getName()])]) ?> + </div> + <?php endif ?> + </th> + <td><?= $text ?></td> + </tr> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printFact($fact, $note) ?> + <?php endforeach ?> - <?php if ($note->canEdit()): ?> - <?php FunctionsPrint::printAddNewFact($note, $facts, 'NOTE') ?> - <?php endif ?> - </table> - </div> + <?php if ($note->canEdit()) : ?> + <?php FunctionsPrint::printAddNewFact($note, $facts, 'NOTE') ?> + <?php endif ?> + </table> + </div> - <div class="tab-pane fade" role="tabpanel" id="individuals"> - <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="individuals"> + <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="families"> - <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="families"> + <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="media"> - <?= view('lists/media-table', ['media_objects' => $media_objects, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="media"> + <?= view('lists/media-table', ['media_objects' => $media_objects, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="sources"> - <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="sources"> + <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="notes"> - <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> - </div> - </div> + <div class="tab-pane fade" role="tabpanel" id="notes"> + <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> + </div> + </div> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/pedigree-chart.php b/resources/views/pedigree-chart.php index a57a9d305a..6dd111c6eb 100644 --- a/resources/views/pedigree-chart.php +++ b/resources/views/pedigree-chart.php @@ -3,35 +3,35 @@ <?php use Fisharebest\Webtrees\Theme; ?> <div id="pedigree-page"> - <div id="pedigree_chart" class="layout<?= e($orientation) ?>"> - <?php foreach ($nodes as $i => $node): ?> - <div id="sosa_<?= ($i + 1) ?>" class="shadow d-flex align-items-center<?= e($flex_direction) ?>" style="<?= e($posn) ?>:<?= e($node['x']) ?>px; top:<?= e($node['y']) ?>px; position:absolute;"> - <?php if ($orientation === $oldest_at_top): ?> - <?php if ($i >= $last_gen_start): ?> - <?= $node['previous_gen'] ?> - <?php endif ?> - <?php else: ?> - <?php if ($i === 0): ?> - <?= $child_menu ?> - <?php endif ?> - <?php endif ?> + <div id="pedigree_chart" class="layout<?= e($orientation) ?>"> + <?php foreach ($nodes as $i => $node) : ?> + <div id="sosa_<?= ($i + 1) ?>" class="shadow d-flex align-items-center<?= e($flex_direction) ?>" style="<?= e($posn) ?>:<?= e($node['x']) ?>px; top:<?= e($node['y']) ?>px; position:absolute;"> + <?php if ($orientation === $oldest_at_top) : ?> + <?php if ($i >= $last_gen_start) : ?> + <?= $node['previous_gen'] ?> + <?php endif ?> + <?php else : ?> + <?php if ($i === 0) : ?> + <?= $child_menu ?> + <?php endif ?> + <?php endif ?> - <?php FunctionsPrint::printPedigreePerson($nodes[$i]['indi']) ?> + <?php FunctionsPrint::printPedigreePerson($nodes[$i]['indi']) ?> - <?php if ($orientation === $oldest_at_top): ?> - <?php if ($i === 0): ?> - <?= $child_menu ?> - <?php endif ?> - <?php else: ?> - <?php if ($i >= $last_gen_start): ?> - <?= $node['previous_gen'] ?> - <?php endif ?> - <?php endif ?> - </div> - <?php endforeach ?> - <canvas id="pedigree_canvas" width="<?= e($canvas_width) ?>" height="<?= e($canvas_height) ?>"> - </canvas> - </div> + <?php if ($orientation === $oldest_at_top) : ?> + <?php if ($i === 0) : ?> + <?= $child_menu ?> + <?php endif ?> + <?php else : ?> + <?php if ($i >= $last_gen_start) : ?> + <?= $node['previous_gen'] ?> + <?php endif ?> + <?php endif ?> + </div> + <?php endforeach ?> + <canvas id="pedigree_canvas" width="<?= e($canvas_width) ?>" height="<?= e($canvas_height) ?>"> + </canvas> + </div> </div> <script> diff --git a/resources/views/pedigree-page.php b/resources/views/pedigree-page.php index e58c9443dd..ec6faa6a9e 100644 --- a/resources/views/pedigree-page.php +++ b/resources/views/pedigree-page.php @@ -3,46 +3,46 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-pedigree-chart d-print-none"> - <input type="hidden" name="route" value="pedigree"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="pedigree"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> - <?= I18N::translate('Generations') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($generation_options, $generations, ['id' => 'generations', 'name' => 'generations']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> + <?= I18N::translate('Generations') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($generation_options, $generations, ['id' => 'generations', 'name' => 'generations']) ?> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="orientation"> - <?= I18N::translate('Layout') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::select($orientations, $orientation, ['id' => 'orientation', 'name' => 'orientation']) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="orientation"> + <?= I18N::translate('Layout') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::select($orientations, $orientation, ['id' => 'orientation', 'name' => 'orientation']) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> + </div> + </div> </form> <div class="wt-ajax-load wt-page-content wt-chart wt-pedigree-chart" data-ajax-url="<?= e(route('pedigree-chart', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName(), 'generations' => $generations, 'orientation' => $orientation])) ?>"></div> diff --git a/resources/views/pending-changes-page.php b/resources/views/pending-changes-page.php index bf376e7357..20829a3725 100644 --- a/resources/views/pending-changes-page.php +++ b/resources/views/pending-changes-page.php @@ -3,112 +3,112 @@ <?php use Fisharebest\Webtrees\Tree; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> -<?php if (empty($changes)): ?> - <p> - <?= I18N::translate('There are no pending changes.') ?> - </p> - <p> - <a class="btn btn-primary" href="<?= e($url) ?>"> - <?= I18N::translate('continue') ?> - </a> - </p> +<?php if (empty($changes)) : ?> + <p> + <?= I18N::translate('There are no pending changes.') ?> + </p> + <p> + <a class="btn btn-primary" href="<?= e($url) ?>"> + <?= I18N::translate('continue') ?> + </a> + </p> <?php endif ?> <ul class="nav nav-tabs" role="tablist"> - <?php foreach ($changes as $tree_id => $gedcom_changes): ?> - <li class="nav-item"> - <a class="nav-link <?= $tree_id === $active_tree_id ? 'active' : '' ?>" data-toggle="tab" href="#tree-<?= e($tree_id) ?>" aria-controls="tree-<?= e($tree_id) ?>" id="tree-<?= e($tree_id) ?>-tab"> - <?= e(Tree::findById($tree_id)->getTitle()) ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($gedcom_changes)) ?> - </span> - </a> - </li> - <?php endforeach ?> + <?php foreach ($changes as $tree_id => $gedcom_changes) : ?> + <li class="nav-item"> + <a class="nav-link <?= $tree_id === $active_tree_id ? 'active' : '' ?>" data-toggle="tab" href="#tree-<?= e($tree_id) ?>" aria-controls="tree-<?= e($tree_id) ?>" id="tree-<?= e($tree_id) ?>-tab"> + <?= e(Tree::findById($tree_id)->getTitle()) ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($gedcom_changes)) ?> + </span> + </a> + </li> + <?php endforeach ?> </ul> <div class="tab-content"> - <?php foreach ($changes as $tree_id => $gedcom_changes): ?> - <div class="tab-pane fade <?= $tree_id === $active_tree_id ? 'show active' : '' ?>" id="tree-<?= e($tree_id) ?>" role="tabpanel" aria-labelledby="tree-<?= e($tree_id) ?>-tab"> - <?php foreach ($gedcom_changes as $xref => $record_changes): ?> - <h3 class="pt-2"> - <a href="<?= e($record_changes[0]->record->url()) ?>"><?= $record_changes[0]->record->getFullName() ?></a> - </h3> + <?php foreach ($changes as $tree_id => $gedcom_changes) : ?> + <div class="tab-pane fade <?= $tree_id === $active_tree_id ? 'show active' : '' ?>" id="tree-<?= e($tree_id) ?>" role="tabpanel" aria-labelledby="tree-<?= e($tree_id) ?>-tab"> + <?php foreach ($gedcom_changes as $xref => $record_changes) : ?> + <h3 class="pt-2"> + <a href="<?= e($record_changes[0]->record->url()) ?>"><?= $record_changes[0]->record->getFullName() ?></a> + </h3> - <table class="table table-bordered table-sm"> - <thead class="thead-default"> - <tr> - <th><?= I18N::translate('Accept') ?></th> - <th><?= I18N::translate('Changes') ?></th> - <th><?= I18N::translate('User') ?></th> - <th><?= I18N::translate('Date') ?></th> - <th><?= I18N::translate('Reject') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($record_changes as $record_change): ?> - <tr> - <td> - <form action="<?= e(route('accept-pending', ['change_id' => $record_change->change_id, 'xref' => $record_change->xref, 'ged' => $record_change->gedcom_name, 'url' => $url])) ?>" method="POST"> - <?= csrf_field() ?> - <button class="btn btn-primary" type="submit"> - <?= I18N::translate('Accept') ?> - </button> - </form> - </td> - <td> - <?php foreach ($record_change->record->getFacts() as $fact): ?> - <?php if ($fact->getTag() !== 'CHAN' && $fact->isPendingAddition()): ?> - <div class="new"> - <?= strip_tags($fact->summary()) ?> - </div> - <?php elseif ($fact->getTag() !== 'CHAN' && $fact->isPendingDeletion()): ?> - <div class="old"> - <?= strip_tags($fact->summary()) ?> - </div> - <?php endif ?> - <?php endforeach ?> - </td> - <td> - <a href="<?= e(route('message', ['to' => $record_change->user_name, 'subject' => I18N::translate('Pending changes') . ' - ' . strip_tags($record_change->record->getFullName()), 'body' => WT_BASE_URL . $record_change->record->url(), 'ged' => $record_change->gedcom_name])) ?>" title="<?= I18N::translate('Send a message') ?>"> - <?= e($record_change->real_name) ?> - <?= e($record_change->user_name) ?> - </a> - </td> - <td> - <?= FunctionsDate::formatTimestamp($record_change->change_timestamp) ?> - </td> - <td> - <form action="<?= e(route('reject-pending', ['change_id' => $record_change->change_id, 'xref' => $record_change->xref, 'ged' => $record_change->gedcom_name, 'url' => $url])) ?>" method="POST"> - <?= csrf_field() ?> - <button class="btn btn-secondary" type="submit"> - <?= I18N::translate('Reject') ?> - </button> - </form> - </td> - </tr> - <?php endforeach ?> - </tbody> - </table> - <?php endforeach ?> + <table class="table table-bordered table-sm"> + <thead class="thead-default"> + <tr> + <th><?= I18N::translate('Accept') ?></th> + <th><?= I18N::translate('Changes') ?></th> + <th><?= I18N::translate('User') ?></th> + <th><?= I18N::translate('Date') ?></th> + <th><?= I18N::translate('Reject') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($record_changes as $record_change) : ?> + <tr> + <td> + <form action="<?= e(route('accept-pending', ['change_id' => $record_change->change_id, 'xref' => $record_change->xref, 'ged' => $record_change->gedcom_name, 'url' => $url])) ?>" method="POST"> + <?= csrf_field() ?> + <button class="btn btn-primary" type="submit"> + <?= I18N::translate('Accept') ?> + </button> + </form> + </td> + <td> + <?php foreach ($record_change->record->getFacts() as $fact) : ?> + <?php if ($fact->getTag() !== 'CHAN' && $fact->isPendingAddition()) : ?> + <div class="new"> + <?= strip_tags($fact->summary()) ?> + </div> + <?php elseif ($fact->getTag() !== 'CHAN' && $fact->isPendingDeletion()) : ?> + <div class="old"> + <?= strip_tags($fact->summary()) ?> + </div> + <?php endif ?> + <?php endforeach ?> + </td> + <td> + <a href="<?= e(route('message', ['to' => $record_change->user_name, 'subject' => I18N::translate('Pending changes') . ' - ' . strip_tags($record_change->record->getFullName()), 'body' => WT_BASE_URL . $record_change->record->url(), 'ged' => $record_change->gedcom_name])) ?>" title="<?= I18N::translate('Send a message') ?>"> + <?= e($record_change->real_name) ?> - <?= e($record_change->user_name) ?> + </a> + </td> + <td> + <?= FunctionsDate::formatTimestamp($record_change->change_timestamp) ?> + </td> + <td> + <form action="<?= e(route('reject-pending', ['change_id' => $record_change->change_id, 'xref' => $record_change->xref, 'ged' => $record_change->gedcom_name, 'url' => $url])) ?>" method="POST"> + <?= csrf_field() ?> + <button class="btn btn-secondary" type="submit"> + <?= I18N::translate('Reject') ?> + </button> + </form> + </td> + </tr> + <?php endforeach ?> + </tbody> + </table> + <?php endforeach ?> - <div class="d-flex justify-content-between"> - <form action="<?= e(route('accept-all-changes', ['ged' => $tree->getName(), 'url' => $url])) ?>" method="POST"> - <?= csrf_field() ?> - <button class="btn btn-primary" type="submit"> - <?= I18N::translate('Accept all changes') ?> - </button> - </form> + <div class="d-flex justify-content-between"> + <form action="<?= e(route('accept-all-changes', ['ged' => $tree->getName(), 'url' => $url])) ?>" method="POST"> + <?= csrf_field() ?> + <button class="btn btn-primary" type="submit"> + <?= I18N::translate('Accept all changes') ?> + </button> + </form> - <form action="<?= e(route('reject-all-changes', ['ged' => $tree->getName(), 'url' => $url])) ?>" method="POST"> - <?= csrf_field() ?> - <button class="btn btn-secondary" type="submit" data-confirm="<?= I18N::translate('Are you sure you want to reject all the changes to this family tree?') ?>" onclick="return confirm(this.dataset.confirm);"> - <?= I18N::translate('Reject all changes') ?> - </button> - </form> - </div> - </div> - <?php endforeach ?> + <form action="<?= e(route('reject-all-changes', ['ged' => $tree->getName(), 'url' => $url])) ?>" method="POST"> + <?= csrf_field() ?> + <button class="btn btn-secondary" type="submit" data-confirm="<?= I18N::translate('Are you sure you want to reject all the changes to this family tree?') ?>" onclick="return confirm(this.dataset.confirm);"> + <?= I18N::translate('Reject all changes') ?> + </button> + </form> + </div> + </div> + <?php endforeach ?> </div> diff --git a/resources/views/place-events.php b/resources/views/place-events.php index 2632d3b796..08d7a1c6ea 100644 --- a/resources/views/place-events.php +++ b/resources/views/place-events.php @@ -2,39 +2,39 @@ <?php use Fisharebest\Webtrees\I18N; ?> <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link active<?= empty($indilist) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> - <?= I18N::translate('Individuals') ?> - <?= Bootstrap4::badgeCount($indilist) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($famlist) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> - <?= I18N::translate('Families') ?> - <?= Bootstrap4::badgeCount($famlist) ?> - </a> - </li> + <li class="nav-item"> + <a class="nav-link active<?= empty($indilist) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> + <?= I18N::translate('Individuals') ?> + <?= Bootstrap4::badgeCount($indilist) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($famlist) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> + <?= I18N::translate('Families') ?> + <?= Bootstrap4::badgeCount($famlist) ?> + </a> + </li> </ul> <div class="tab-content"> - <div class="tab-pane fade show active" role="tabpanel" id="individuals"> - <?php if (empty($indilist)): ?> - <p><?= I18N::translate('No results found.') ?></p> - <?php else: ?> - <?= view('lists/individuals-table', [ - 'individuals' => $indilist, - 'sosa' => false, - 'tree' => $tree, - ]) ?> - <?php endif ?> - </div> + <div class="tab-pane fade show active" role="tabpanel" id="individuals"> + <?php if (empty($indilist)) : ?> + <p><?= I18N::translate('No results found.') ?></p> + <?php else : ?> + <?= view('lists/individuals-table', [ + 'individuals' => $indilist, + 'sosa' => false, + 'tree' => $tree, + ]) ?> + <?php endif ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="families"> - <?php if (empty($famlist)): ?> - <p><?= I18N::translate('No results found.') ?></p> - <?php else: ?> - <?= view('lists/families-table', [ - 'families' => $famlist, - ]) ?> - <?php endif ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="families"> + <?php if (empty($famlist)) : ?> + <p><?= I18N::translate('No results found.') ?></p> + <?php else : ?> + <?= view('lists/families-table', [ + 'families' => $famlist, + ]) ?> + <?php endif ?> + </div> </div> diff --git a/resources/views/place-hierarchy.php b/resources/views/place-hierarchy.php index 6801d77638..15489351b5 100644 --- a/resources/views/place-hierarchy.php +++ b/resources/views/place-hierarchy.php @@ -8,9 +8,9 @@ </span> </div> <div class="row"> - <?php foreach ($columns as $column): ?> + <?php foreach ($columns as $column) : ?> <ul class="col list_value_wrap mr-1"> - <?php foreach ($column as $item): ?> + <?php foreach ($column as $item) : ?> <li> <a href="<?= $item->getURL() ?>"><?= $item->getPlaceName() ?></a> </li> diff --git a/resources/views/place-list.php b/resources/views/place-list.php index 4d75ceddac..2d60ddad40 100644 --- a/resources/views/place-list.php +++ b/resources/views/place-list.php @@ -1,20 +1,20 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="row"> - <span class="col list_label mr-1"> - <i class="icon-place"></i> - <?= I18N::translate('Place list') ?> - </span> + <span class="col list_label mr-1"> + <i class="icon-place"></i> + <?= I18N::translate('Place list') ?> + </span> </div> <div class="row"> - <?php foreach ($columns as $column): ?> - <ul class="col list_value_wrap mr-1"> - <?php foreach ($column as $item): ?> - <li> - <a href="<?= $item->getURL() ?>"><?= $item->getReverseName() ?></a> - </li> - <?php endforeach ?> - </ul> - <?php endforeach ?> + <?php foreach ($columns as $column) : ?> + <ul class="col list_value_wrap mr-1"> + <?php foreach ($column as $item) : ?> + <li> + <a href="<?= $item->getURL() ?>"><?= $item->getReverseName() ?></a> + </li> + <?php endforeach ?> + </ul> + <?php endforeach ?> </div> diff --git a/resources/views/place-sidebar.php b/resources/views/place-sidebar.php index b6193095a1..d2d37e9429 100644 --- a/resources/views/place-sidebar.php +++ b/resources/views/place-sidebar.php @@ -3,36 +3,36 @@ <div class="offset-1 w-75 d-table"> <div class="d-table-row"> <div class="d-table-cell label"> - <?php if ($showlink): ?> + <?php if ($showlink) : ?> <a href="<?= $place->getURL() ?>"> - <?= $place->getPlaceName() ?> + <?= $place->getPlaceName() ?> </a> - <?php else: ?> - <?= $place->getPlaceName() ?> - <?php endif ?> + <?php else : ?> + <?= $place->getPlaceName() ?> + <?php endif ?> </div> <div class="d-table-cell text-right"> - <?php if ($flag): ?> + <?php if ($flag) : ?> <img src='<?= $flag ?>'> - <?php endif ?> + <?php endif ?> </div> </div> <div class="d-table-row"> <div class="d-table-cell"> - <?= I18N::translate('Individuals') ?> + <?= I18N::translate('Individuals') ?> </div> <div class="d-table-cell text-right"> - <?= $stats['INDI'] ?> + <?= $stats['INDI'] ?> </div> </div> <div class="d-table-row"> <div class="d-table-cell"> - <?= I18N::translate('Families') ?> + <?= I18N::translate('Families') ?> </div> <div class="d-table-cell text-right"> - <?= $stats['FAM'] ?> + <?= $stats['FAM'] ?> </div> </div> </div> diff --git a/resources/views/places-page.php b/resources/views/places-page.php index 6b7070daac..06e1e3e1da 100644 --- a/resources/views/places-page.php +++ b/resources/views/places-page.php @@ -4,31 +4,31 @@ <div class="container"> <h4><?= $title ?></h4> <h5 class="center"> - <?php if ($current): ?> + <?php if ($current) : ?> <a href="<?= e(route('place-hierarchy', ['ged' => $tree->getName()])) ?>"> <?= I18N::translate('World') ?> </a> - <?php else: ?> + <?php else : ?> <?= I18N::translate('World') ?> <?php endif ?> - <?php foreach ($breadcrumbs as $item): ?> + <?php foreach ($breadcrumbs as $item) : ?> - <a href="<?= $item->getURL() ?>" dir="auto"><?= $item->getPlaceName() ?></a> <?php endforeach ?> - <?php if ($current): ?> + <?php if ($current) : ?> - <?= $current->getPlaceName() ?> <?php endif ?> </h5> - <?php if ($note): ?> + <?php if ($note) : ?> <div class="center small text-muted"> <?= I18N::translate("Places without valid co-ordinates are not shown on the map and have a red border around the sidebar entry") ?> </div> <?php endif ?> <?= $content ?> <div class="center"> - <?php if ($showeventslink): ?> + <?php if ($showeventslink) : ?> <a class="formField" href= <?= e(route('place-hierarchy', ['ged' => $tree->getName(), 'parent' => $parent, 'action' => 'hierarchy-e'])) ?>> <?= I18N::translate('View table of events occurring in %s', $place) ?> </a> diff --git a/resources/views/privacy-policy.php b/resources/views/privacy-policy.php index 8590d0e90c..a77daff71f 100644 --- a/resources/views/privacy-policy.php +++ b/resources/views/privacy-policy.php @@ -1,29 +1,29 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <p> - <?= I18N::translate('The data in this website has been collected for the purposes of genealogical research.') ?> + <?= I18N::translate('The data in this website has been collected for the purposes of genealogical research.') ?> </p> <h3> - <?= I18N::translate('Cookies') ?> + <?= I18N::translate('Cookies') ?> </h3> <p> - <?= I18N::translate('This site uses cookies to store your preferences on this site, such as the language you have selected.') ?> + <?= I18N::translate('This site uses cookies to store your preferences on this site, such as the language you have selected.') ?> </p> <h3> - <?= I18N::translate('Tracking and analytics') ?> + <?= I18N::translate('Tracking and analytics') ?> </h3> -<?php if ($uses_analytics): ?> +<?php if ($uses_analytics) : ?> <p> - <?= I18N::translate('This site does not use any third-party tracking or analytics services.') ?> + <?= I18N::translate('This site does not use any third-party tracking or analytics services.') ?> </p> -<?php else: ?> +<?php else : ?> <?php endif ?> diff --git a/resources/views/register-page.php b/resources/views/register-page.php index e79f164123..6df8c44f53 100644 --- a/resources/views/register-page.php +++ b/resources/views/register-page.php @@ -2,99 +2,99 @@ <?php use Fisharebest\Webtrees\View; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> -<?php if ($show_caution): ?> - <div class="wt-register-caution"> - <?= I18N::translate('<div class="largeError">Notice:</div><div class="error">By completing and submitting this form, you agree:<ul><li>to protect the privacy of living individuals listed on our site;</li><li>and in the text box below, to explain to whom you are related, or to provide us with information on someone who should be listed on our website.</li></ul></div>') ?> - </div> +<?php if ($show_caution) : ?> + <div class="wt-register-caution"> + <?= I18N::translate('<div class="largeError">Notice:</div><div class="error">By completing and submitting this form, you agree:<ul><li>to protect the privacy of living individuals listed on our site;</li><li>and in the text box below, to explain to whom you are related, or to provide us with information on someone who should be listed on our website.</li></ul></div>') ?> + </div> <?php endif ?> <form autocomplete="off" class="wt-page-options wt-page-options-register" method="post" action="<?= e(route('register')) ?>"> - <?= csrf_field() ?> - <input name="ged" type="hidden" value="<?= e($tree->getName()) ?>"> + <?= csrf_field() ?> + <input name="ged" type="hidden" value="<?= e($tree->getName()) ?>"> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="realname"> - <?= I18N::translate('Real name') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="text" id="realname" name="realname" required maxlength="64" value="<?= e($realname) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="realname"> + <?= I18N::translate('Real name') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="text" id="realname" name="realname" required maxlength="64" value="<?= e($realname) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> + </p> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> - <?= I18N::translate('Email address') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> + <?= I18N::translate('Email address') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> + </p> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> - <?= I18N::translate('Username') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($username) ?>" autocomplete="username"> - <p class="small text-muted"> - <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> + <?= I18N::translate('Username') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($username) ?>" autocomplete="username"> + <p class="small text-muted"> + <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> + </p> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="password1"> - <?= I18N::translate('Password') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" type="password" id="password1" name="password1" placeholder="<?= /* I18N: placeholder text for new-password field */ I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" pattern="<?= WT_REGEX_PASSWORD ?>" onchange="document.getElementById('password2').pattern = regex_quote(this.value);" required> - <p class="small text-muted"> - <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="password1"> + <?= I18N::translate('Password') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" type="password" id="password1" name="password1" placeholder="<?= /* I18N: placeholder text for new-password field */ I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" pattern="<?= WT_REGEX_PASSWORD ?>" onchange="document.getElementById('password2').pattern = regex_quote(this.value);" required> + <p class="small text-muted"> + <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> + </p> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="password2"> - <?= I18N::translate('Confirm password') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control" required type="password" id="password2" name="password2" placeholder="<?= /* I18N: placeholder text for repeat-password field */ I18N::translate('Type the password again.') ?>" pattern="<?= WT_REGEX_PASSWORD ?>"> - <p class="small text-muted"> - <?= I18N::translate('Type your password again, to make sure you have typed it correctly.') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="password2"> + <?= I18N::translate('Confirm password') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control" required type="password" id="password2" name="password2" placeholder="<?= /* I18N: placeholder text for repeat-password field */ I18N::translate('Type the password again.') ?>" pattern="<?= WT_REGEX_PASSWORD ?>"> + <p class="small text-muted"> + <?= I18N::translate('Type your password again, to make sure you have typed it correctly.') ?> + </p> + </div> + </div> - <div class="form-group row"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="comments"> - <?= I18N::translate('Comments') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <textarea class="form-control" required rows="4" id="comments" name="comments" placeholder="<?php /* I18N: placeholder text for registration-comments field */ I18N::translate('Explain why you are requesting an account.') ?>"><?= e($comments) ?></textarea> - <p class="small text-muted"> - <?= I18N::translate('Use this field to tell the site administrator why you are requesting an account and how you are related to the genealogy displayed on this site. You can also use this to enter any other comments you may have for the site administrator.') ?> - </p> - </div> - </div> + <div class="form-group row"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="comments"> + <?= I18N::translate('Comments') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <textarea class="form-control" required rows="4" id="comments" name="comments" placeholder="<?php /* I18N: placeholder text for registration-comments field */ I18N::translate('Explain why you are requesting an account.') ?>"><?= e($comments) ?></textarea> + <p class="small text-muted"> + <?= I18N::translate('Use this field to tell the site administrator why you are requesting an account and how you are related to the genealogy displayed on this site. You can also use this to enter any other comments you may have for the site administrator.') ?> + </p> + </div> + </div> - <div class="form-group row"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> - <div class="col-sm-9 wt-page-options-value"> - <button class="btn btn-primary"> - <?= I18N::translate('continue') ?> - </button> - </div> + <div class="form-group row"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> + <div class="col-sm-9 wt-page-options-value"> + <button class="btn btn-primary"> + <?= I18N::translate('continue') ?> + </button> + </div> </form> diff --git a/resources/views/register-success-page.php b/resources/views/register-success-page.php index c44d88c1e8..9544fd6476 100644 --- a/resources/views/register-success-page.php +++ b/resources/views/register-success-page.php @@ -1,15 +1,15 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <div class="wt-page-content"> - <p> - <?= I18N::translate('Hello %s…<br>Thank you for your registration.', e($user->getRealName())) ?> - </p> + <p> + <?= I18N::translate('Hello %s…<br>Thank you for your registration.', e($user->getRealName())) ?> + </p> - <p> - <?= I18N::translate('We will now send a confirmation email to the address <b>%s</b>. You must verify your account request by following instructions in the confirmation email. If you do not confirm your account request within seven days, your application will be rejected automatically. You will have to apply again.<br><br>After you have followed the instructions in the confirmation email, the administrator still has to approve your request before your account can be used.<br><br>To sign in to this website, you will need to know your username and password.', $user->getEmail()) ?> - </p> + <p> + <?= I18N::translate('We will now send a confirmation email to the address <b>%s</b>. You must verify your account request by following instructions in the confirmation email. If you do not confirm your account request within seven days, your application will be rejected automatically. You will have to apply again.<br><br>After you have followed the instructions in the confirmation email, the administrator still has to approve your request before your account can be used.<br><br>To sign in to this website, you will need to know your username and password.', $user->getEmail()) ?> + </p> </div> diff --git a/resources/views/relationships-page.php b/resources/views/relationships-page.php index 67cd248aaa..9756829d6a 100644 --- a/resources/views/relationships-page.php +++ b/resources/views/relationships-page.php @@ -4,88 +4,88 @@ <?php use Fisharebest\Webtrees\View; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-relationships-chart d-print-none"> - <input type="hidden" name="route" value="relationships"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="route" value="relationships"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref1"> - <?= I18N::translate('Individual 1') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual1, [ - 'id' => 'xref1', - 'name' => 'xref1', - ]) ?> - <button class="btn btn-link small" id="btn-swap-individuals" type="button"> - <?= /* I18N: Reverse the order of two individuals */ - I18N::translate('Swap individuals') ?> - </button> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref1"> + <?= I18N::translate('Individual 1') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual1, [ + 'id' => 'xref1', + 'name' => 'xref1', + ]) ?> + <button class="btn btn-link small" id="btn-swap-individuals" type="button"> + <?= /* I18N: Reverse the order of two individuals */ + I18N::translate('Swap individuals') ?> + </button> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref2"> - <?= I18N::translate('Individual 2') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, $individual2, [ - 'id' => 'xref2', - 'name' => 'xref2', - ]) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref2"> + <?= I18N::translate('Individual 2') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, $individual2, [ + 'id' => 'xref2', + 'name' => 'xref2', + ]) ?> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?php if ($ancestors_only): ?> - <input type="hidden" name="ancestors" value="1"> - <?= I18N::translate('Find relationships via ancestors') ?> - <?php else: ?> - <?= Bootstrap4::radioButtons('ancestors', $ancestors_options, $ancestors, false) ?> - <?php endif ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?php if ($ancestors_only) : ?> + <input type="hidden" name="ancestors" value="1"> + <?= I18N::translate('Find relationships via ancestors') ?> + <?php else : ?> + <?= Bootstrap4::radioButtons('ancestors', $ancestors_options, $ancestors, false) ?> + <?php endif ?> + </div> + </div> + </fieldset> - <fieldset class="form-group"> - <div class="row"> - <legend class="col-form-label col-sm-3 wt-page-options-label"> - </legend> - <div class="col-sm-9 wt-page-options-value"> - <?php if ($max_recursion === 0): ?> - <?= I18N::translate('Find the closest relationships') ?> - <input type="hidden" name="recursion" value="0"> - <?php else: ?> - <?= Bootstrap4::radioButtons('recursion', $recursion_options, $recursion, false) ?> - <?php endif ?> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <legend class="col-form-label col-sm-3 wt-page-options-label"> + </legend> + <div class="col-sm-9 wt-page-options-value"> + <?php if ($max_recursion === 0) : ?> + <?= I18N::translate('Find the closest relationships') ?> + <input type="hidden" name="recursion" value="0"> + <?php else : ?> + <?= Bootstrap4::radioButtons('recursion', $recursion_options, $recursion, false) ?> + <?php endif ?> + </div> + </div> + </fieldset> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ - I18N::translate('view') ?>"> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ + I18N::translate('view') ?>"> + </div> + </div> </form> -<?php if ($individual1 !== null && $individual2 !== null): ?> - <div class="wt-ajax-load wt-page-content wt-chart wt-relationships-chart" data-ajax-url="<?= e(route('relationships-chart', [ - 'xref1' => $individual1->getXref(), - 'xref2' => $individual2->getXref(), - 'ged' => $individual2->getTree()->getName(), - 'recursion' => $recursion, - 'ancestors' => $ancestors, - ])) ?>"></div> +<?php if ($individual1 !== null && $individual2 !== null) : ?> + <div class="wt-ajax-load wt-page-content wt-chart wt-relationships-chart" data-ajax-url="<?= e(route('relationships-chart', [ + 'xref1' => $individual1->getXref(), + 'xref2' => $individual2->getXref(), + 'ged' => $individual2->getTree()->getName(), + 'recursion' => $recursion, + 'ancestors' => $ancestors, + ])) ?>"></div> <?php endif ?> <?php View::push('javascript') ?> diff --git a/resources/views/report-select-page.php b/resources/views/report-select-page.php index 67ef2ed3c0..31fcbbeaee 100644 --- a/resources/views/report-select-page.php +++ b/resources/views/report-select-page.php @@ -1,33 +1,33 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-report-select"> - <input type="hidden" name="route" value="report-setup"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="report"> - <?= I18N::translate('Report') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <select class="form-control" id="report" name="report"> - <?php foreach ($reports as $file => $report): ?> - <option value="<?= e($file) ?>"> - <?= e($report) ?> - </option> - <?php endforeach ?> - </select> - </div> - </div> + <input type="hidden" name="route" value="report-setup"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="report"> + <?= I18N::translate('Report') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <select class="form-control" id="report" name="report"> + <?php foreach ($reports as $file => $report) : ?> + <option value="<?= e($file) ?>"> + <?= e($report) ?> + </option> + <?php endforeach ?> + </select> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('continue') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/report-setup-page.php b/resources/views/report-setup-page.php index bbd8887028..117c77962c 100644 --- a/resources/views/report-setup-page.php +++ b/resources/views/report-setup-page.php @@ -1,60 +1,60 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-report-setup"> - <input type="hidden" name="route" value="report-run"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="report" value="<?= e($report) ?>"> + <input type="hidden" name="route" value="report-run"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="report" value="<?= e($report) ?>"> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Description') ?> - </div> - <div class="col-sm-9 wt-page-options-value"> - <?= $description ?> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Description') ?> + </div> + <div class="col-sm-9 wt-page-options-value"> + <?= $description ?> + </div> + </div> - <?php foreach ($inputs as $n => $input): ?> - <input type="hidden" name="varnames[]" value="<?= e($input['name']) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="input-<?= $n ?>"> - <?= I18N::translate($input['value']) ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= $input['control'] ?> - <?= $input['extra'] ?> - </div> - </div> - <?php endforeach ?> + <?php foreach ($inputs as $n => $input) : ?> + <input type="hidden" name="varnames[]" value="<?= e($input['name']) ?>"> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="input-<?= $n ?>"> + <?= I18N::translate($input['value']) ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= $input['control'] ?> + <?= $input['extra'] ?> + </div> + </div> + <?php endforeach ?> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + </div> - <div class="col-sm-9 wt-page-options-value d-flex justify-content-around"> - <div class="text-center"> - <label for="HTML"><i class="icon-mime-text-html"></i></label> - <br> - <input type="radio" name="output" id="HTML" value="HTML" checked> - </div> - <div class="text-center"> - <label for="PDF"><i class="icon-mime-application-pdf"></i></label> - <br> - <input type="radio" name="output" value="PDF" id="PDF"> - </div> - </div> - </div> + <div class="col-sm-9 wt-page-options-value d-flex justify-content-around"> + <div class="text-center"> + <label for="HTML"><i class="icon-mime-text-html"></i></label> + <br> + <input type="radio" name="output" id="HTML" value="HTML" checked> + </div> + <div class="text-center"> + <label for="PDF"><i class="icon-mime-application-pdf"></i></label> + <br> + <input type="radio" name="output" value="PDF" id="PDF"> + </div> + </div> + </div> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <button type="submit" class="btn btn-primary"> - <?= I18N::translate('continue') ?> - </button> - </div> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <button type="submit" class="btn btn-primary"> + <?= I18N::translate('continue') ?> + </button> + </div> + </div> </form> diff --git a/resources/views/repository-page-menu.php b/resources/views/repository-page-menu.php index 2a2c8ea638..385bb9d66c 100644 --- a/resources/views/repository-page-menu.php +++ b/resources/views/repository-page-menu.php @@ -3,21 +3,21 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <a class="dropdown-item menu-repo-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <a class="dropdown-item menu-repo-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-repo-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-repo-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> diff --git a/resources/views/repository-page.php b/resources/views/repository-page.php index 7d3ca51aa1..41ae46c090 100644 --- a/resources/views/repository-page.php +++ b/resources/views/repository-page.php @@ -4,61 +4,61 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($repository->isPendingDeletion()): ?> - <?php if (Auth::isModerator($repository->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This repository has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($repository->getXref()) . '\', \'' . e($repository->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($repository->getXref()) . '\', \'' . e($repository->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($repository->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This repository has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> -<?php elseif ($repository->isPendingAddition()): ?> - <?php if (Auth::isModerator($repository->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This repository has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($repository->getXref()) . '\', \'' . e($repository->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . $repository->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($repository->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This repository has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> +<?php if ($repository->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($repository->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This repository has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($repository->getXref()) . '\', \'' . e($repository->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($repository->getXref()) . '\', \'' . e($repository->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($repository->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This repository has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> +<?php elseif ($repository->isPendingAddition()) : ?> + <?php if (Auth::isModerator($repository->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This repository has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($repository->getXref()) . '\', \'' . e($repository->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . $repository->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($repository->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This repository has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> <?php endif ?> <div class="d-flex mb-4"> - <h2 class="wt-page-title mx-auto"> - <?= $repository->getFullName() ?> - </h2> - <?php if ($repository->canEdit() && !$repository->isPendingDeletion()): ?> - <?= view('repository-page-menu', ['record' => $repository]) ?> - <?php endif ?> + <h2 class="wt-page-title mx-auto"> + <?= $repository->getFullName() ?> + </h2> + <?php if ($repository->canEdit() && !$repository->isPendingDeletion()) : ?> + <?= view('repository-page-menu', ['record' => $repository]) ?> + <?php endif ?> </div> <div class="wt-page-content"> - <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> - <?= I18N::translate('Details') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> - <?= I18N::translate('Sources') ?> - <?= Bootstrap4::badgeCount($sources) ?> - </a> - </li> - </ul> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> + <?= I18N::translate('Details') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($sources) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#sources"> + <?= I18N::translate('Sources') ?> + <?= Bootstrap4::badgeCount($sources) ?> + </a> + </li> + </ul> - <div class="tab-content"> - <div class="tab-pane fade show active" role="tabpanel" id="details"> - <table class="table wt-facts-table"> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printFact($fact, $repository) ?> - <?php endforeach ?> + <div class="tab-content"> + <div class="tab-pane fade show active" role="tabpanel" id="details"> + <table class="table wt-facts-table"> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printFact($fact, $repository) ?> + <?php endforeach ?> - <?php if ($repository->canEdit()): ?> - <?php FunctionsPrint::printAddNewFact($repository, $facts, 'REPO') ?> - <?php endif ?> - </table> - </div> + <?php if ($repository->canEdit()) : ?> + <?php FunctionsPrint::printAddNewFact($repository, $facts, 'REPO') ?> + <?php endif ?> + </table> + </div> - <div class="tab-pane fade" role="tabpanel" id="sources"> - <?= view('lists/sources-table', ['sources' => $sources]) ?> - </div> - </div> + <div class="tab-pane fade" role="tabpanel" id="sources"> + <?= view('lists/sources-table', ['sources' => $sources]) ?> + </div> + </div> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/search-advanced-field.php b/resources/views/search-advanced-field.php index 07ea45f6a1..4dbf66bbbf 100644 --- a/resources/views/search-advanced-field.php +++ b/resources/views/search-advanced-field.php @@ -2,21 +2,21 @@ <?php use Fisharebest\Webtrees\GedcomTag; ?> <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="fields[<?= e($field_name) ?>]"> - <?= GedcomTag::getLabel($field_name) ?> - </label> + <label class="col-sm-3 col-form-label wt-page-options-label" for="fields[<?= e($field_name) ?>]"> + <?= GedcomTag::getLabel($field_name) ?> + </label> - <div class="col-sm-6 wt-page-options-value"> - <input class="form-control form-control" type="text" id="fields[<?= e($field_name) ?>]" name="fields[<?= e($field_name) ?>]" value="<?= e($field_value) ?>"> - </div> + <div class="col-sm-6 wt-page-options-value"> + <input class="form-control form-control" type="text" id="fields[<?= e($field_name) ?>]" name="fields[<?= e($field_name) ?>]" value="<?= e($field_value) ?>"> + </div> - <div class="col-sm-3 wt-page-options-value"> - <?php if (preg_match('/(GIVN|SURN)$/', $field_name)): ?> - <?= Bootstrap4::select($name_options, $modifier, ['name' => 'modifiers[' . $field_name . ']']) ?> - <?php endif ?> + <div class="col-sm-3 wt-page-options-value"> + <?php if (preg_match('/(GIVN|SURN)$/', $field_name)) : ?> + <?= Bootstrap4::select($name_options, $modifier, ['name' => 'modifiers[' . $field_name . ']']) ?> + <?php endif ?> - <?php if (preg_match('/(DATE)$/', $field_name)): ?> - <?= Bootstrap4::select($date_options, $modifier, ['name' => 'modifiers[' . $field_name . ']']) ?> - <?php endif ?> - </div> + <?php if (preg_match('/(DATE)$/', $field_name)) : ?> + <?= Bootstrap4::select($date_options, $modifier, ['name' => 'modifiers[' . $field_name . ']']) ?> + <?php endif ?> + </div> </div> diff --git a/resources/views/search-advanced-page.php b/resources/views/search-advanced-page.php index 82737a5aef..147878197a 100644 --- a/resources/views/search-advanced-page.php +++ b/resources/views/search-advanced-page.php @@ -2,82 +2,82 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <div id="advanced-search-page"> - <form class="wt-page-options wt-page-options-search-advanced hidden-print mb-4"> - <input type="hidden" name="route" value="search-advanced"> + <form class="wt-page-options wt-page-options-search-advanced hidden-print mb-4"> + <input type="hidden" name="route" value="search-advanced"> - <div class="row form-group wt-page-options-label mt-4"> - <div class="form-row mx-auto"> - <?= I18N::translate('Individual') ?> - </div> - </div> + <div class="row form-group wt-page-options-label mt-4"> + <div class="form-row mx-auto"> + <?= I18N::translate('Individual') ?> + </div> + </div> - <?php foreach ($fields as $field_name => $field_value): ?> - <?php if (substr($field_name, 0, 5) !== 'FAMC:'): ?> - <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?> - <?php endif ?> - <?php endforeach ?> + <?php foreach ($fields as $field_name => $field_value) : ?> + <?php if (substr($field_name, 0, 5) !== 'FAMC:') : ?> + <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?> + <?php endif ?> + <?php endforeach ?> - <div class="row form-group"> - <div class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Add more fields') ?> - </div> + <div class="row form-group"> + <div class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Add more fields') ?> + </div> - <div class="col-sm-3 wt-page-options-value"> - <?= Bootstrap4::select(['' => ''] + $other_fields, '', ['name' => 'other_field']) ?> - </div> + <div class="col-sm-3 wt-page-options-value"> + <?= Bootstrap4::select(['' => ''] + $other_fields, '', ['name' => 'other_field']) ?> + </div> - <div class="col-sm-3 wt-page-options-value"> - <input type="text" class="form-control" name="other_value"> - </div> + <div class="col-sm-3 wt-page-options-value"> + <input type="text" class="form-control" name="other_value"> + </div> - <div class="col-sm-3 wt-page-options-value"> - </div> - </div> + <div class="col-sm-3 wt-page-options-value"> + </div> + </div> - <div class="row form-group wt-page-options-label mt-4"> - <div class="form-row mx-auto"> - <?= I18N::translate('Father') ?> - </div> - </div> + <div class="row form-group wt-page-options-label mt-4"> + <div class="form-row mx-auto"> + <?= I18N::translate('Father') ?> + </div> + </div> - <?php foreach ($fields as $field_name => $field_value): ?> - <?php if (substr($field_name, 0, 10) === 'FAMC:HUSB:'): ?> - <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?> - <?php endif ?> - <?php endforeach ?> + <?php foreach ($fields as $field_name => $field_value) : ?> + <?php if (substr($field_name, 0, 10) === 'FAMC:HUSB:') : ?> + <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?> + <?php endif ?> + <?php endforeach ?> - <div class="row form-group wt-page-options-label mt-4"> - <div class="form-row mx-auto"> - <?= I18N::translate('Mother') ?> - </div> - </div> + <div class="row form-group wt-page-options-label mt-4"> + <div class="form-row mx-auto"> + <?= I18N::translate('Mother') ?> + </div> + </div> - <?php foreach ($fields as $field_name => $field_value): ?> - <?php if (substr($field_name, 0, 10) === 'FAMC:WIFE:'): ?> - <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?> - <?php endif ?> - <?php endforeach ?> + <?php foreach ($fields as $field_name => $field_value) : ?> + <?php if (substr($field_name, 0, 10) === 'FAMC:WIFE:') : ?> + <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?> + <?php endif ?> + <?php endforeach ?> - <div class="row form-group my-3"> - <div class="form-row mx-auto"> - <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ - I18N::translate('search') ?>"> - </div> - </div> - </form> + <div class="row form-group my-3"> + <div class="form-row mx-auto"> + <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ + I18N::translate('search') ?>"> + </div> + </div> + </form> </div> -<?php if (true): ?> - <?php if (empty($individuals)): ?> - <div class="alert alert-info row"> - <?= I18N::translate('No results found.') ?> - </div> - <?php else: ?> - <?= view('search-results', ['individuals' => $individuals, 'search_families' => false, 'search_individuals' => true, 'search_notes' => false, 'search_sources' => false, 'search_repositories' => false]) ?> - <?php endif ?> +<?php if (true) : ?> + <?php if (empty($individuals)) : ?> + <div class="alert alert-info row"> + <?= I18N::translate('No results found.') ?> + </div> + <?php else : ?> + <?= view('search-results', ['individuals' => $individuals, 'search_families' => false, 'search_individuals' => true, 'search_notes' => false, 'search_sources' => false, 'search_repositories' => false]) ?> + <?php endif ?> <?php endif ?> diff --git a/resources/views/search-general-page.php b/resources/views/search-general-page.php index a9f2c85962..bf682c0e1d 100644 --- a/resources/views/search-general-page.php +++ b/resources/views/search-general-page.php @@ -1,116 +1,116 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-search hidden-print mb-4" name="searchform"> - <input type="hidden" name="route" value="search-general"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="query"> - <?= I18N::translate('Search for') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <div class="input-group input-group-sm"> - <input id="query" class="form-control form-control-sm" type="text" name="query" value="<?= e($query) ?>" required> - <?= view('edit/input-addon-keyboard', ['id' => 'query']) ?> - </div> - </div> - </div> - <fieldset class="form-group"> - <div class="row"> - <label class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Records') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" <?= $search_individuals ? 'checked' : '' ?> name="search_individuals" type="checkbox"> - <?= I18N::translate('Individuals') ?> - </label> - </div> + <input type="hidden" name="route" value="search-general"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="query"> + <?= I18N::translate('Search for') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <div class="input-group input-group-sm"> + <input id="query" class="form-control form-control-sm" type="text" name="query" value="<?= e($query) ?>" required> + <?= view('edit/input-addon-keyboard', ['id' => 'query']) ?> + </div> + </div> + </div> + <fieldset class="form-group"> + <div class="row"> + <label class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Records') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" <?= $search_individuals ? 'checked' : '' ?> name="search_individuals" type="checkbox"> + <?= I18N::translate('Individuals') ?> + </label> + </div> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" <?= $search_families ? 'checked' : '' ?> name="search_families" type="checkbox"> - <?= I18N::translate('Families') ?> - </label> - </div> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" <?= $search_families ? 'checked' : '' ?> name="search_families" type="checkbox"> + <?= I18N::translate('Families') ?> + </label> + </div> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" <?= $search_sources ? 'checked' : '' ?> name="search_sources" type="checkbox"> - <?= I18N::translate('Sources') ?> - </label> - </div> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" <?= $search_sources ? 'checked' : '' ?> name="search_sources" type="checkbox"> + <?= I18N::translate('Sources') ?> + </label> + </div> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" <?= $search_repositories ? 'checked' : '' ?> name="search_repositories" type="checkbox"> - <?= I18N::translate('Repositories') ?> - </label> - </div> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" <?= $search_repositories ? 'checked' : '' ?> name="search_repositories" type="checkbox"> + <?= I18N::translate('Repositories') ?> + </label> + </div> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" <?= $search_notes ? 'checked' : '' ?> name="search_notes" type="checkbox"> - <?= I18N::translate('Shared notes') ?> - </label> - </div> - </div> - </div> - </fieldset> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" <?= $search_notes ? 'checked' : '' ?> name="search_notes" type="checkbox"> + <?= I18N::translate('Shared notes') ?> + </label> + </div> + </div> + </div> + </fieldset> - <?php if (count($all_trees) > 1): ?> - <fieldset class="form-group"> - <div class="row"> - <label class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Family trees') ?> - </label> - <div class="col-sm-9 wt-page-options-value pt-2"> - <div class="d-flex justify-content-between"> - <div id="search-trees" class="form-check"> - <?php foreach ($all_trees as $tree): ?> - <div class="col px-0"> - <label class="form-check-label"> - <input class="form-check form-check-input" type="checkbox" <?= in_array($tree, $search_trees) ? 'checked' : '' ?> value="<?= ($tree->getName()) ?>" name="search_trees[]"> - <?= e($tree->getTitle()) ?> - </label> - </div> - <?php endforeach ?> - </div> - <?php if (count($all_trees) > 3): ?> - <div class="d-row align-self-end mb-2"> - <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select all (of the family trees) */ I18N::translate('select all') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', true);});return false;"> - <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select none (of the family trees) */ I18N::translate('select none') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', false);});return false;"> - <?php if (count($all_trees) > 10): ?> - <input type="button" value="<?= I18N::translate('invert selection') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', !$(this).attr('checked'));});return false;"> - <?php endif ?> - </div> - <?php endif ?> - </div> - </div> - </div> - </fieldset> - <?php endif ?> + <?php if (count($all_trees) > 1) : ?> + <fieldset class="form-group"> + <div class="row"> + <label class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Family trees') ?> + </label> + <div class="col-sm-9 wt-page-options-value pt-2"> + <div class="d-flex justify-content-between"> + <div id="search-trees" class="form-check"> + <?php foreach ($all_trees as $tree) : ?> + <div class="col px-0"> + <label class="form-check-label"> + <input class="form-check form-check-input" type="checkbox" <?= in_array($tree, $search_trees) ? 'checked' : '' ?> value="<?= ($tree->getName()) ?>" name="search_trees[]"> + <?= e($tree->getTitle()) ?> + </label> + </div> + <?php endforeach ?> + </div> + <?php if (count($all_trees) > 3) : ?> + <div class="d-row align-self-end mb-2"> + <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select all (of the family trees) */ I18N::translate('select all') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', true);});return false;"> + <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select none (of the family trees) */ I18N::translate('select none') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', false);});return false;"> + <?php if (count($all_trees) > 10) : ?> + <input type="button" value="<?= I18N::translate('invert selection') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', !$(this).attr('checked'));});return false;"> + <?php endif ?> + </div> + <?php endif ?> + </div> + </div> + </div> + </fieldset> + <?php endif ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label"></label> - <div class="col-sm-9 wt-page-options-value"> - <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ I18N::translate('search') ?>"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label"></label> + <div class="col-sm-9 wt-page-options-value"> + <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ I18N::translate('search') ?>"> + </div> + </div> </form> -<?php if ($query !== ''): ?> - <?php if (empty($individuals) && empty($families) && empty($repositories) && empty($sources) && empty($notes)): ?> - <div class="alert alert-info row"> - <?= I18N::translate('No results found.') ?> - </div> - <?php else: ?> - <?= view('search-results', ['families' => $families, 'individuals' => $individuals, 'notes' => $notes, 'repositories' => $repositories, 'sources' => $sources, 'search_families' => $search_families, 'search_individuals' => $search_individuals, 'search_notes' => $search_notes, 'search_repositories' => $search_repositories, 'search_sources' => $search_sources]) ?> - <?php endif ?> +<?php if ($query !== '') : ?> + <?php if (empty($individuals) && empty($families) && empty($repositories) && empty($sources) && empty($notes)) : ?> + <div class="alert alert-info row"> + <?= I18N::translate('No results found.') ?> + </div> + <?php else : ?> + <?= view('search-results', ['families' => $families, 'individuals' => $individuals, 'notes' => $notes, 'repositories' => $repositories, 'sources' => $sources, 'search_families' => $search_families, 'search_individuals' => $search_individuals, 'search_notes' => $search_notes, 'search_repositories' => $search_repositories, 'search_sources' => $search_sources]) ?> + <?php endif ?> <?php endif ?> <?= view('modals/on-screen-keyboard') ?> diff --git a/resources/views/search-phonetic-page.php b/resources/views/search-phonetic-page.php index 29a37fb246..4d32a0e4a5 100644 --- a/resources/views/search-phonetic-page.php +++ b/resources/views/search-phonetic-page.php @@ -1,116 +1,116 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-ancestors-chart hidden-print mb-4" name="searchform"> - <input type="hidden" name="route" value="search-phonetic"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="firstname"> - <?= I18N::translate('Given name') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <div class="input-group input-group-sm"> - <input class= "form-control form-control-sm" type="text" name="firstname" id="firstname" value="<?= e($firstname) ?>" autofocus> - <?= view('edit/input-addon-keyboard', ['id' => 'firstname']) ?> - </div> - </div> - </div> + <input type="hidden" name="route" value="search-phonetic"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="firstname"> + <?= I18N::translate('Given name') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <div class="input-group input-group-sm"> + <input class= "form-control form-control-sm" type="text" name="firstname" id="firstname" value="<?= e($firstname) ?>" autofocus> + <?= view('edit/input-addon-keyboard', ['id' => 'firstname']) ?> + </div> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="lastname"> - <?= I18N::translate('Surname') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <div class="input-group input-group-sm"> - <input class="form-control form-control-sm" type="text" name="lastname" id="lastname" value="<?= e($lastname) ?>"> - <?= view('edit/input-addon-keyboard', ['id' => 'lastname']) ?> - </div> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="lastname"> + <?= I18N::translate('Surname') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <div class="input-group input-group-sm"> + <input class="form-control form-control-sm" type="text" name="lastname" id="lastname" value="<?= e($lastname) ?>"> + <?= view('edit/input-addon-keyboard', ['id' => 'lastname']) ?> + </div> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="place"> - <?= I18N::translate('Place') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control form-control-sm" type="text" name="place" id="place" value="<?= e($place) ?>"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="place"> + <?= I18N::translate('Place') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control form-control-sm" type="text" name="place" id="place" value="<?= e($place) ?>"> + </div> + </div> - <fieldset class="form-group"> - <div class="row"> - <label class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Phonetic algorithm') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" type="radio" name="soundex" value="Russell" <?= $soundex === 'Russell' ? 'checked' : '' ?>> - <?= I18N::translate('Russell') ?> - </label> - </div> - <div class="form-check form-check-inline"> - <label class="form-check-label"> - <input class="form-check-input" type="radio" name="soundex" value="DaitchM" <?= $soundex === 'DaitchM' ? 'checked' : '' ?>> - <?= I18N::translate('Daitch-Mokotoff') ?> - </label> - </div> - </div> - </div> - </fieldset> + <fieldset class="form-group"> + <div class="row"> + <label class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Phonetic algorithm') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" type="radio" name="soundex" value="Russell" <?= $soundex === 'Russell' ? 'checked' : '' ?>> + <?= I18N::translate('Russell') ?> + </label> + </div> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input class="form-check-input" type="radio" name="soundex" value="DaitchM" <?= $soundex === 'DaitchM' ? 'checked' : '' ?>> + <?= I18N::translate('Daitch-Mokotoff') ?> + </label> + </div> + </div> + </div> + </fieldset> - <?php if (count($all_trees) > 1): ?> - <fieldset class="form-group"> - <div class="row"> - <label class="col-sm-3 col-form-label wt-page-options-label"> - <?= I18N::translate('Family trees') ?> - </label> - <div class="col-sm-9 wt-page-options-value pt-2"> - <div class="d-flex justify-content-between"> - <div id="search-trees" class="form-check"> - <?php foreach ($all_trees as $tree): ?> - <div class="col px-0"> - <label class="form-check-label"> - <input class="form-check form-check-input" type="checkbox" <?= in_array($tree, $search_trees) ? 'checked' : '' ?> value="<?= ($tree->getName()) ?>" name="search_trees[]"> - <?= e($tree->getTitle()) ?> - </label> - </div> - <?php endforeach ?> - </div> - <?php if (count($all_trees) > 3): ?> - <div class="d-row align-self-end mb-2"> - <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select all (of the family trees) */ I18N::translate('select all') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', true);});return false;"> - <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select none (of the family trees) */ I18N::translate('select none') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', false);});return false;"> - <?php if (count($all_trees) > 10): ?> - <input type="button" value="<?= I18N::translate('invert selection') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', !$(this).attr('checked'));});return false;"> - <?php endif ?> - </div> - <?php endif ?> - </div> - </div> - </div> - </fieldset> - <?php endif ?> + <?php if (count($all_trees) > 1) : ?> + <fieldset class="form-group"> + <div class="row"> + <label class="col-sm-3 col-form-label wt-page-options-label"> + <?= I18N::translate('Family trees') ?> + </label> + <div class="col-sm-9 wt-page-options-value pt-2"> + <div class="d-flex justify-content-between"> + <div id="search-trees" class="form-check"> + <?php foreach ($all_trees as $tree) : ?> + <div class="col px-0"> + <label class="form-check-label"> + <input class="form-check form-check-input" type="checkbox" <?= in_array($tree, $search_trees) ? 'checked' : '' ?> value="<?= ($tree->getName()) ?>" name="search_trees[]"> + <?= e($tree->getTitle()) ?> + </label> + </div> + <?php endforeach ?> + </div> + <?php if (count($all_trees) > 3) : ?> + <div class="d-row align-self-end mb-2"> + <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select all (of the family trees) */ I18N::translate('select all') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', true);});return false;"> + <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select none (of the family trees) */ I18N::translate('select none') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', false);});return false;"> + <?php if (count($all_trees) > 10) : ?> + <input type="button" value="<?= I18N::translate('invert selection') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', !$(this).attr('checked'));});return false;"> + <?php endif ?> + </div> + <?php endif ?> + </div> + </div> + </div> + </fieldset> + <?php endif ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label"></label> - <div class="col-sm-9 wt-page-options-value"> - <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ I18N::translate('search') ?>"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label"></label> + <div class="col-sm-9 wt-page-options-value"> + <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ I18N::translate('search') ?>"> + </div> + </div> </form> -<?php if ($firstname !== '' || $lastname !== '' || $place !== ''): ?> - <?php if (empty($individuals)): ?> - <div class="alert alert-info row"> - <?= I18N::translate('No results found.') ?> - </div> - <?php else: ?> - <?= view('search-results', ['individuals' => $individuals, 'search_families' => false, 'search_individuals' => true, 'search_notes' => false, 'search_sources' => false, 'search_repositories' => false]) ?> - <?php endif ?> +<?php if ($firstname !== '' || $lastname !== '' || $place !== '') : ?> + <?php if (empty($individuals)) : ?> + <div class="alert alert-info row"> + <?= I18N::translate('No results found.') ?> + </div> + <?php else : ?> + <?= view('search-results', ['individuals' => $individuals, 'search_families' => false, 'search_individuals' => true, 'search_notes' => false, 'search_sources' => false, 'search_repositories' => false]) ?> + <?php endif ?> <?php endif ?> <?= view('modals/on-screen-keyboard') ?> diff --git a/resources/views/search-replace-page.php b/resources/views/search-replace-page.php index 3fa5fc9022..0a379e7825 100644 --- a/resources/views/search-replace-page.php +++ b/resources/views/search-replace-page.php @@ -2,42 +2,42 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-ancestors-chart hidden-print" method="post" action="<?= e(route('search-replace', ['ged' => $tree->getName()])) ?>"> - <?= csrf_field() ?> + <?= csrf_field() ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="search"> - <?= I18N::translate('Search for') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control form-control-sm" id="search" name="search" value="<?= e($search) ?>" type="text" autofocus> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="search"> + <?= I18N::translate('Search for') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control form-control-sm" id="search" name="search" value="<?= e($search) ?>" type="text" autofocus> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="replace"> - <?= I18N::translate('Replace with') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <input class="form-control form-control-sm" id="replace" name="replace" value="<?= e($replace) ?>" type="text"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="replace"> + <?= I18N::translate('Replace with') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <input class="form-control form-control-sm" id="replace" name="replace" value="<?= e($replace) ?>" type="text"> + </div> + </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label"> - <?= /* I18N: A button label. */ I18N::translate('Search') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= Bootstrap4::radioButtons('context', ['all' => I18N::translate('Entire record'), 'name' => I18N::translate('Names'), 'place' => I18N::translate('Places')], $context, false) ?> - </div> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label"></label> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('replace') ?>"> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label"> + <?= /* I18N: A button label. */ I18N::translate('Search') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= Bootstrap4::radioButtons('context', ['all' => I18N::translate('Entire record'), 'name' => I18N::translate('Names'), 'place' => I18N::translate('Places')], $context, false) ?> + </div> + </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label"></label> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('replace') ?>"> + </div> + </div> </form> diff --git a/resources/views/search-results.php b/resources/views/search-results.php index 2e35416c16..8e21ab740f 100644 --- a/resources/views/search-results.php +++ b/resources/views/search-results.php @@ -2,94 +2,94 @@ <?php use Fisharebest\Webtrees\View; ?> <div class="wt-search-results"> - <ul class="nav nav-tabs wt-search-results-tabs" role="tablist"> - <?php if ($search_individuals): ?> - <li class="nav-item"> - <a class="nav-link <?= empty($individuals) ? 'text-muted' : '' ?>" id="individuals-tab" data-toggle="tab" href="#individuals" role="tab" aria-controls="individuals"> - <?= I18N::translate('Individuals') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($individuals)) ?> - </span> - </a> - </li> - <?php endif ?> + <ul class="nav nav-tabs wt-search-results-tabs" role="tablist"> + <?php if ($search_individuals) : ?> + <li class="nav-item"> + <a class="nav-link <?= empty($individuals) ? 'text-muted' : '' ?>" id="individuals-tab" data-toggle="tab" href="#individuals" role="tab" aria-controls="individuals"> + <?= I18N::translate('Individuals') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($individuals)) ?> + </span> + </a> + </li> + <?php endif ?> - <?php if ($search_families): ?> - <li class="nav-item"> - <a class="nav-link <?= empty($families) ? 'text-muted' : '' ?>" id="families-tab" data-toggle="tab" href="#families" role="tab" aria-controls="families"> - <?= I18N::translate('Families') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($families)) ?> - </span> - </a> - </li> - <?php endif ?> + <?php if ($search_families) : ?> + <li class="nav-item"> + <a class="nav-link <?= empty($families) ? 'text-muted' : '' ?>" id="families-tab" data-toggle="tab" href="#families" role="tab" aria-controls="families"> + <?= I18N::translate('Families') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($families)) ?> + </span> + </a> + </li> + <?php endif ?> - <?php if ($search_sources): ?> - <li class="nav-item"> - <a class="nav-link <?= empty($sources) ? 'text-muted' : '' ?>" id="sources-tab" data-toggle="tab" href="#sources" role="tab" aria-controls="sources"> - <?= I18N::translate('Sources') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($sources)) ?> - </span> - </a> - </li> - <?php endif ?> + <?php if ($search_sources) : ?> + <li class="nav-item"> + <a class="nav-link <?= empty($sources) ? 'text-muted' : '' ?>" id="sources-tab" data-toggle="tab" href="#sources" role="tab" aria-controls="sources"> + <?= I18N::translate('Sources') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($sources)) ?> + </span> + </a> + </li> + <?php endif ?> - <?php if ($search_repositories): ?> - <li class="nav-item"> - <a class="nav-link <?= empty($repositories) ? 'text-muted' : '' ?>" id="repositories-tab" data-toggle="tab" href="#repositories" role="tab" aria-controls="repositories"> - <?= I18N::translate('Repositories') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($repositories)) ?> - </span> - </a> - </li> - <?php endif ?> + <?php if ($search_repositories) : ?> + <li class="nav-item"> + <a class="nav-link <?= empty($repositories) ? 'text-muted' : '' ?>" id="repositories-tab" data-toggle="tab" href="#repositories" role="tab" aria-controls="repositories"> + <?= I18N::translate('Repositories') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($repositories)) ?> + </span> + </a> + </li> + <?php endif ?> - <?php if ($search_notes): ?> - <li class="nav-item"> - <a class="nav-link <?= empty($notes) ? 'text-muted' : '' ?>" id="notes-tab" data-toggle="tab" href="#notes" role="tab" aria-controls="notes"> - <?= I18N::translate('Notes') ?> - <span class="badge badge-secondary"> - <?= I18N::number(count($notes)) ?> - </span> - </a> - </li> - <?php endif ?> - </ul> + <?php if ($search_notes) : ?> + <li class="nav-item"> + <a class="nav-link <?= empty($notes) ? 'text-muted' : '' ?>" id="notes-tab" data-toggle="tab" href="#notes" role="tab" aria-controls="notes"> + <?= I18N::translate('Notes') ?> + <span class="badge badge-secondary"> + <?= I18N::number(count($notes)) ?> + </span> + </a> + </li> + <?php endif ?> + </ul> - <div class="tab-content wt-search-results-content"> - <?php if ($search_individuals): ?> - <div class="tab-pane fade" id="individuals" role="tabpanel" aria-labelledby="individuals-tab"> - <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> - </div> - <?php endif ?> + <div class="tab-content wt-search-results-content"> + <?php if ($search_individuals) : ?> + <div class="tab-pane fade" id="individuals" role="tabpanel" aria-labelledby="individuals-tab"> + <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> + </div> + <?php endif ?> - <?php if ($search_families): ?> - <div class="tab-pane fade" id="families" role="tabpanel" aria-labelledby="families-tab"> - <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> - </div> - <?php endif ?> + <?php if ($search_families) : ?> + <div class="tab-pane fade" id="families" role="tabpanel" aria-labelledby="families-tab"> + <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> + </div> + <?php endif ?> - <?php if ($search_sources): ?> - <div class="tab-pane fade" id="sources" role="tabpanel" aria-labelledby="sources-tab"> - <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> - </div> - <?php endif ?> + <?php if ($search_sources) : ?> + <div class="tab-pane fade" id="sources" role="tabpanel" aria-labelledby="sources-tab"> + <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> + </div> + <?php endif ?> - <?php if ($search_repositories): ?> - <div class="tab-pane fade" id="repositories" role="tabpanel" aria-labelledby="repositories-tab"> - <?= view('lists/repositories-table', ['repositories' => $repositories, 'tree' => $tree]) ?> - </div> - <?php endif ?> + <?php if ($search_repositories) : ?> + <div class="tab-pane fade" id="repositories" role="tabpanel" aria-labelledby="repositories-tab"> + <?= view('lists/repositories-table', ['repositories' => $repositories, 'tree' => $tree]) ?> + </div> + <?php endif ?> - <?php if ($search_notes): ?> - <div class="tab-pane fade" id="notes" role="tabpanel" aria-labelledby="notes-tab"> - <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> - </div> - <?php endif ?> - </div> + <?php if ($search_notes) : ?> + <div class="tab-pane fade" id="notes" role="tabpanel" aria-labelledby="notes-tab"> + <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> + </div> + <?php endif ?> + </div> </div> <?php View::push('javascript') ?> diff --git a/resources/views/selects/individual.php b/resources/views/selects/individual.php index 01d792460a..b851ed95eb 100644 --- a/resources/views/selects/individual.php +++ b/resources/views/selects/individual.php @@ -1,6 +1,6 @@ <?php use Fisharebest\Webtrees\MediaFile; ?> -<?php if ($individual->findHighlightedMediaFile() instanceof MediaFile): ?> - <?= $individual->findHighlightedMediaFile()->displayImage(30, 40, 'crop', []) ?> +<?php if ($individual->findHighlightedMediaFile() instanceof MediaFile) : ?> + <?= $individual->findHighlightedMediaFile()->displayImage(30, 40, 'crop', []) ?> <?php endif; ?> <?= $individual->getFullName() ?>, <?= $individual->getLifeSpan() ?> diff --git a/resources/views/selects/media.php b/resources/views/selects/media.php index 2cd7928f46..3f74baff3a 100644 --- a/resources/views/selects/media.php +++ b/resources/views/selects/media.php @@ -1,4 +1,4 @@ -<?php foreach ($media->mediaFiles() as $media_file): ?> - <?= $media_file->displayImage(30, 40, 'crop', []) ?> +<?php foreach ($media->mediaFiles() as $media_file) : ?> + <?= $media_file->displayImage(30, 40, 'crop', []) ?> <?php endforeach ?> -<?= $media->getFullName() ?> +<?= $media->getFullName(); diff --git a/resources/views/setup/step-1-language.php b/resources/views/setup/step-1-language.php index 74f2e85bd9..f268edf0d0 100644 --- a/resources/views/setup/step-1-language.php +++ b/resources/views/setup/step-1-language.php @@ -1,36 +1,36 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form method="POST" autocomplete="off"> - <input name="route" type="hidden" value="setup"> - <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> - <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> - <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> - <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> - <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> - <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> - <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> - <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> - <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> - <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> + <input name="route" type="hidden" value="setup"> + <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> + <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> + <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> + <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> + <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> + <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> + <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> + <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> + <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> + <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="lang"> - <?= I18N::translate('Language') ?> - </label> - <div class="col-sm-9"> - <select class="form-control" id="lang" name="lang"> - <?php foreach ($locales as $locale): ?> - <option value="<?= $locale->languageTag() ?>" <?= $lang === $locale->languageTag() ? 'selected' : '' ?>> - <?= $locale->endonym() ?> - </option> - <?php endforeach ?> - </select> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="lang"> + <?= I18N::translate('Language') ?> + </label> + <div class="col-sm-9"> + <select class="form-control" id="lang" name="lang"> + <?php foreach ($locales as $locale) : ?> + <option value="<?= $locale->languageTag() ?>" <?= $lang === $locale->languageTag() ? 'selected' : '' ?>> + <?= $locale->endonym() ?> + </option> + <?php endforeach ?> + </select> + </div> + </div> - <hr> + <hr> - <button class="btn btn-primary" name="step" type="submit" value="2"> - <?= I18N::translate('next') ?> - </button> + <button class="btn btn-primary" name="step" type="submit" value="2"> + <?= I18N::translate('next') ?> + </button> </form> diff --git a/resources/views/setup/step-2-server-checks.php b/resources/views/setup/step-2-server-checks.php index d65d6cacdc..b10016a2bc 100644 --- a/resources/views/setup/step-2-server-checks.php +++ b/resources/views/setup/step-2-server-checks.php @@ -1,70 +1,70 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form method="POST" autocomplete="off"> - <input name="route" type="hidden" value="setup"> - <input name="lang" type="hidden" value="<?= e($lang) ?>"> - <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> - <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> - <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> - <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> - <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> - <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> - <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> - <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> - <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> - <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> + <input name="route" type="hidden" value="setup"> + <input name="lang" type="hidden" value="<?= e($lang) ?>"> + <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> + <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> + <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> + <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> + <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> + <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> + <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> + <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> + <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> + <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> - <h2><?= I18N::translate('Checking server configuration') ?></h2> + <h2><?= I18N::translate('Checking server configuration') ?></h2> - <?php foreach ($errors as $error): ?> - <p class="alert alert-danger"><?= $error ?></p> - <?php endforeach ?> + <?php foreach ($errors as $error) : ?> + <p class="alert alert-danger"><?= $error ?></p> + <?php endforeach ?> - <?php foreach ($warnings as $warning): ?> - <p class="alert alert-warning"><?= $warning ?></p> - <?php endforeach ?> + <?php foreach ($warnings as $warning) : ?> + <p class="alert alert-warning"><?= $warning ?></p> + <?php endforeach ?> - <?php if (empty($errors) && empty($warnings)): ?> - <p> - <?= I18N::translate('The server configuration is OK.') ?> - </p> - <?php endif ?> + <?php if (empty($errors) && empty($warnings)) : ?> + <p> + <?= I18N::translate('The server configuration is OK.') ?> + </p> + <?php endif ?> - <h2><?= I18N::translate('Checking server capacity') ?></h2> + <h2><?= I18N::translate('Checking server capacity') ?></h2> - <p> - <?= I18N::translate('The memory and CPU time requirements depend on the number of individuals in your family tree.') ?> - </p> - <p> - <?= I18N::translate('The following list shows typical requirements.') ?> - </p> - <p> - <?= I18N::translate('Small systems (500 individuals): 16–32 MB, 10–20 seconds') ?> - <br> - <?= I18N::translate('Medium systems (5,000 individuals): 32–64 MB, 20–40 seconds') ?> - <br> - <?= I18N::translate('Large systems (50,000 individuals): 64–128 MB, 40–80 seconds') ?> - </p> + <p> + <?= I18N::translate('The memory and CPU time requirements depend on the number of individuals in your family tree.') ?> + </p> + <p> + <?= I18N::translate('The following list shows typical requirements.') ?> + </p> + <p> + <?= I18N::translate('Small systems (500 individuals): 16–32 MB, 10–20 seconds') ?> + <br> + <?= I18N::translate('Medium systems (5,000 individuals): 32–64 MB, 20–40 seconds') ?> + <br> + <?= I18N::translate('Large systems (50,000 individuals): 64–128 MB, 40–80 seconds') ?> + </p> - <p class="alert alert-<?= $memory_limit < 32 || $cpu_limit > 0 && $cpu_limit < 20 ? 'danger' : 'success' ?>"> - <?= I18N::translate('This server’s memory limit is %s MB and its CPU time limit is %s seconds.', I18N::number($memory_limit), I18N::number($cpu_limit)) ?> - </p> + <p class="alert alert-<?= $memory_limit < 32 || $cpu_limit > 0 && $cpu_limit < 20 ? 'danger' : 'success' ?>"> + <?= I18N::translate('This server’s memory limit is %s MB and its CPU time limit is %s seconds.', I18N::number($memory_limit), I18N::number($cpu_limit)) ?> + </p> - <p> - <?= I18N::translate('If you try to exceed these limits, you may experience server time-outs and blank pages.') ?> - </p> + <p> + <?= I18N::translate('If you try to exceed these limits, you may experience server time-outs and blank pages.') ?> + </p> - <p> - <?= I18N::translate('If your server’s security policy permits it, you will be able to request increased memory or CPU time using the webtrees administration page. Otherwise, you will need to contact your server’s administrator.') ?> - </p> + <p> + <?= I18N::translate('If your server’s security policy permits it, you will be able to request increased memory or CPU time using the webtrees administration page. Otherwise, you will need to contact your server’s administrator.') ?> + </p> - <hr> + <hr> - <button class="btn btn-primary" name="step" type="submit" value="3"> - <?= I18N::translate('next') ?> - </button> + <button class="btn btn-primary" name="step" type="submit" value="3"> + <?= I18N::translate('next') ?> + </button> - <button class="btn btn-link" name="step" type="submit" value="1"> - <?= I18N::translate('previous') ?> - </button> + <button class="btn btn-link" name="step" type="submit" value="1"> + <?= I18N::translate('previous') ?> + </button> </form> diff --git a/resources/views/setup/step-3-database-connection.php b/resources/views/setup/step-3-database-connection.php index 3c13a860e6..1cc4f8ddc1 100644 --- a/resources/views/setup/step-3-database-connection.php +++ b/resources/views/setup/step-3-database-connection.php @@ -1,88 +1,88 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form method="POST" autocomplete="off"> - <input name="route" type="hidden" value="setup"> - <input name="lang" type="hidden" value="<?= e($lang) ?>"> - <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> - <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> - <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> - <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> - <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> - <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> + <input name="route" type="hidden" value="setup"> + <input name="lang" type="hidden" value="<?= e($lang) ?>"> + <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> + <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> + <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> + <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> + <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> + <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> - <h2><?= I18N::translate('Connection to database server') ?></h2> + <h2><?= I18N::translate('Connection to database server') ?></h2> - <p> - <?= I18N::translate('webtrees needs a MySQL database, version %s or later.', '5') ?> - </p> + <p> + <?= I18N::translate('webtrees needs a MySQL database, version %s or later.', '5') ?> + </p> - <p> - <?= I18N::translate('Your server’s administrator will provide you with the connection details.') ?> - </p> + <p> + <?= I18N::translate('Your server’s administrator will provide you with the connection details.') ?> + </p> - <h3><?= I18N::translate('Database connection') ?></h3> + <h3><?= I18N::translate('Database connection') ?></h3> - <?php if ($db_conn_error): ?> - <p class="alert alert-danger"> - <?= $db_conn_error ?> - </p> - <?php endif ?> + <?php if ($db_conn_error) : ?> + <p class="alert alert-danger"> + <?= $db_conn_error ?> + </p> + <?php endif ?> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="dbhost"> - <?= I18N::translate('Server name') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr" required> - <p class="small text-muted"> - <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="dbhost"> + <?= I18N::translate('Server name') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr" required> + <p class="small text-muted"> + <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="dbport"> - <?= I18N::translate('Port number') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr" required> - <p class="small text-muted"> - <?= I18N::translate('Most sites are configured to use the default value of 3306.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="dbport"> + <?= I18N::translate('Port number') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr" required> + <p class="small text-muted"> + <?= I18N::translate('Most sites are configured to use the default value of 3306.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="dbuser"> - <?= I18N::translate('Database user account') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr" required> - <p class="small text-muted"> - <?= I18N::translate('This is case sensitive.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="dbuser"> + <?= I18N::translate('Database user account') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr" required> + <p class="small text-muted"> + <?= I18N::translate('This is case sensitive.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="dbpass"> - <?= I18N::translate('Database password') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" id="dbpass" name="dbpass" type="password" value="<?= e($dbpass) ?>" dir="ltr"> - <p class="small text-muted"> - <?= I18N::translate('This is case sensitive.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="dbpass"> + <?= I18N::translate('Database password') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" id="dbpass" name="dbpass" type="password" value="<?= e($dbpass) ?>" dir="ltr"> + <p class="small text-muted"> + <?= I18N::translate('This is case sensitive.') ?> + </p> + </div> + </div> - <hr> + <hr> - <button class="btn btn-primary" name="step" type="submit" value="4"> - <?= I18N::translate('next') ?> - </button> + <button class="btn btn-primary" name="step" type="submit" value="4"> + <?= I18N::translate('next') ?> + </button> - <button class="btn btn-link" name="step" type="submit" value="2"> - <?= I18N::translate('previous') ?> - </button> + <button class="btn btn-link" name="step" type="submit" value="2"> + <?= I18N::translate('previous') ?> + </button> </form> diff --git a/resources/views/setup/step-4-database-name.php b/resources/views/setup/step-4-database-name.php index 0f76a798a0..86b06271b1 100644 --- a/resources/views/setup/step-4-database-name.php +++ b/resources/views/setup/step-4-database-name.php @@ -1,62 +1,62 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form method="POST" autocomplete="off"> - <input name="route" type="hidden" value="setup"> - <input name="lang" type="hidden" value="<?= e($lang) ?>"> - <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> - <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> - <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> - <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> - <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> - <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> - <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> - <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> + <input name="route" type="hidden" value="setup"> + <input name="lang" type="hidden" value="<?= e($lang) ?>"> + <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> + <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> + <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> + <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> + <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> + <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> + <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> + <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> - <h2> - <?= I18N::translate('Database and table names') ?> - </h2> + <h2> + <?= I18N::translate('Database and table names') ?> + </h2> - <p> - <?= I18N::translate('A database server can store many separate databases. You need to select an existing database (created by your server’s administrator) or create a new one (if your database user account has sufficient privileges).') ?> - </p> + <p> + <?= I18N::translate('A database server can store many separate databases. You need to select an existing database (created by your server’s administrator) or create a new one (if your database user account has sufficient privileges).') ?> + </p> - <?php if ($db_conn_error): ?> - <p class="alert alert-danger"> - <?= $db_error ?> - </p> - <?php endif ?> + <?php if ($db_conn_error) : ?> + <p class="alert alert-danger"> + <?= $db_error ?> + </p> + <?php endif ?> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="dbname"> - <?= I18N::translate('Database name') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="^[^`]+$" required type="text" value="<?= e($dbname) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This is case sensitive. If a database with this name does not already exist webtrees will attempt to create one for you. Success will depend on permissions set for your web server, but you will be notified if this fails.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="dbname"> + <?= I18N::translate('Database name') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="^[^`]+$" required type="text" value="<?= e($dbname) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This is case sensitive. If a database with this name does not already exist webtrees will attempt to create one for you. Success will depend on permissions set for your web server, but you will be notified if this fails.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="tblpfx"> - <?= I18N::translate('Table prefix') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" dir="ltr" id="tblpfx" name="tblpfx" pattern="^[^`]*$" type="text" value="<?= e($tblpfx) ?>"> - <p class="small text-muted"> - <?= I18N::translate('The prefix is optional, but recommended. By giving the table names a unique prefix you can let several different applications share the same database. “wt_” is suggested, but can be anything you want.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="tblpfx"> + <?= I18N::translate('Table prefix') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" dir="ltr" id="tblpfx" name="tblpfx" pattern="^[^`]*$" type="text" value="<?= e($tblpfx) ?>"> + <p class="small text-muted"> + <?= I18N::translate('The prefix is optional, but recommended. By giving the table names a unique prefix you can let several different applications share the same database. “wt_” is suggested, but can be anything you want.') ?> + </p> + </div> + </div> - <hr> + <hr> - <button class="btn btn-primary" name="step" type="submit" value="5"> - <?= I18N::translate('next') ?> - </button> + <button class="btn btn-primary" name="step" type="submit" value="5"> + <?= I18N::translate('next') ?> + </button> - <button class="btn btn-link" name="step" type="submit" value="3"> - <?= I18N::translate('previous') ?> - </button> + <button class="btn btn-link" name="step" type="submit" value="3"> + <?= I18N::translate('previous') ?> + </button> </form> diff --git a/resources/views/setup/step-5-administrator.php b/resources/views/setup/step-5-administrator.php index 6313405caa..6d3ee9382d 100644 --- a/resources/views/setup/step-5-administrator.php +++ b/resources/views/setup/step-5-administrator.php @@ -1,82 +1,82 @@ <?php use Fisharebest\Webtrees\I18N; ?> <form method="POST" autocomplete="off"> - <input name="route" type="hidden" value="setup"> - <input name="lang" type="hidden" value="<?= e($lang) ?>"> - <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> - <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> - <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> - <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> - <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> - <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> + <input name="route" type="hidden" value="setup"> + <input name="lang" type="hidden" value="<?= e($lang) ?>"> + <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>"> + <input name="dbport" type="hidden" value="<?= e($dbport) ?>"> + <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>"> + <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>"> + <input name="dbname" type="hidden" value="<?= e($dbname) ?>"> + <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>"> - <h2><?= I18N::translate('Administrator account') ?></h2> + <h2><?= I18N::translate('Administrator account') ?></h2> - <p> - <?= I18N::translate('You need to set up an administrator account. This account can control all aspects of this webtrees installation. Please choose a strong password.') ?> - </p> + <p> + <?= I18N::translate('You need to set up an administrator account. This account can control all aspects of this webtrees installation. Please choose a strong password.') ?> + </p> - <?php if ($wt_user_error): ?> - <p class="alert alert-danger"> - <?= $wt_user_error ?> - </p> - <?php endif ?> + <?php if ($wt_user_error) : ?> + <p class="alert alert-danger"> + <?= $wt_user_error ?> + </p> + <?php endif ?> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="wtname"> - <?= I18N::translate('Your name') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" dir="ltr" id="wtname" name="wtname" required type="text" value="<?= e($wtname) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="wtname"> + <?= I18N::translate('Your name') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" dir="ltr" id="wtname" name="wtname" required type="text" value="<?= e($wtname) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="wtuser"> - <?= I18N::translate('Username') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" dir="ltr" id="wtuser" name="wtuser" required type="text" value="<?= e($wtuser) ?>"> - <p class="small text-muted"> - <?= I18N::translate('You will use this to sign in to webtrees.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="wtuser"> + <?= I18N::translate('Username') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" dir="ltr" id="wtuser" name="wtuser" required type="text" value="<?= e($wtuser) ?>"> + <p class="small text-muted"> + <?= I18N::translate('You will use this to sign in to webtrees.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="wtpass"> - <?= I18N::translate('Password') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" dir="ltr" id="wtpass" name="wtpass" pattern=".{6,}" required type="password" value="<?= e($wtpass) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This must be at least six characters long. It is case-sensitive.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="wtpass"> + <?= I18N::translate('Password') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" dir="ltr" id="wtpass" name="wtpass" pattern=".{6,}" required type="password" value="<?= e($wtpass) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This must be at least six characters long. It is case-sensitive.') ?> + </p> + </div> + </div> - <div class="row form-group"> - <label class="col-form-label col-sm-3" for="wtemail"> - <?= I18N::translate('Email address') ?> - </label> - <div class="col-sm-9"> - <input class="form-control" dir="ltr" id="wtemail" name="wtemail" required type="email" value="<?= e($wtemail) ?>"> - <p class="small text-muted"> - <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> - </p> - </div> - </div> + <div class="row form-group"> + <label class="col-form-label col-sm-3" for="wtemail"> + <?= I18N::translate('Email address') ?> + </label> + <div class="col-sm-9"> + <input class="form-control" dir="ltr" id="wtemail" name="wtemail" required type="email" value="<?= e($wtemail) ?>"> + <p class="small text-muted"> + <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?> + </p> + </div> + </div> - <hr> + <hr> - <button class="btn btn-primary" name="step" type="submit" value="6"> - <?= I18N::translate('next') ?> - </button> + <button class="btn btn-primary" name="step" type="submit" value="6"> + <?= I18N::translate('next') ?> + </button> - <button class="btn btn-link" name="step" type="submit" value="4"> - <?= I18N::translate('previous') ?> - </button> + <button class="btn btn-link" name="step" type="submit" value="4"> + <?= I18N::translate('previous') ?> + </button> </form> diff --git a/resources/views/setup/step-6-failed.php b/resources/views/setup/step-6-failed.php index 3adf65c035..1b8a0d5b12 100644 --- a/resources/views/setup/step-6-failed.php +++ b/resources/views/setup/step-6-failed.php @@ -1,13 +1,13 @@ <?php use Fisharebest\Webtrees\I18N; ?> <p> - <?= I18N::translate('An unexpected database error occurred.') ?> + <?= I18N::translate('An unexpected database error occurred.') ?> </p> <pre> - <?= $error ?> + <?= $error ?> </pre> <p> - <?= I18N::translate('The webtrees developers would be very interested to learn about this error. If you contact them, they will help you resolve the problem.') ?> + <?= I18N::translate('The webtrees developers would be very interested to learn about this error. If you contact them, they will help you resolve the problem.') ?> </p> diff --git a/resources/views/source-page-menu.php b/resources/views/source-page-menu.php index 9a1d4e9e53..570d1287bf 100644 --- a/resources/views/source-page-menu.php +++ b/resources/views/source-page-menu.php @@ -3,22 +3,22 @@ <?php use Fisharebest\Webtrees\I18N; ?> <div class="dropdown wt-page-menu"> - <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <?= FontAwesome::decorativeIcon('edit') ?> - <?= I18N::translate('edit') ?> - </button> - <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> - <a class="dropdown-item menu-sour-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> - <?= I18N::translate('Delete') ?> - </a> + <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <?= FontAwesome::decorativeIcon('edit') ?> + <?= I18N::translate('edit') ?> + </button> + <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> + <a class="dropdown-item menu-sour-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');"> + <?= I18N::translate('Delete') ?> + </a> - <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')): ?> - <div class="dropdown-divider"></div> + <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> + <div class="dropdown-divider"></div> - <a class="dropdown-item menu-sour-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> - <?= I18N::translate('Edit the raw GEDCOM') ?> - </a> - <?php endif ?> - </div> + <a class="dropdown-item menu-sour-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>"> + <?= I18N::translate('Edit the raw GEDCOM') ?> + </a> + <?php endif ?> + </div> </div> diff --git a/resources/views/source-page.php b/resources/views/source-page.php index 0b7503d5e1..e2d9c34937 100644 --- a/resources/views/source-page.php +++ b/resources/views/source-page.php @@ -4,103 +4,103 @@ <?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> <?php use Fisharebest\Webtrees\I18N; ?> -<?php if ($source->isPendingDeletion()): ?> - <?php if (Auth::isModerator($source->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This source has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($source->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This source has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> -<?php elseif ($source->isPendingAddition()): ?> - <?php if (Auth::isModerator($source->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This source has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . $source->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php elseif (Auth::isEditor($source->getTree())): ?> - <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This source has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> - <?php endif ?> +<?php if ($source->isPendingDeletion()) : ?> + <?php if (Auth::isModerator($source->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This source has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($source->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This source has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> +<?php elseif ($source->isPendingAddition()) : ?> + <?php if (Auth::isModerator($source->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This source has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . $source->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php elseif (Auth::isEditor($source->getTree())) : ?> + <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This source has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> + <?php endif ?> <?php endif ?> <div class="d-flex mb-4"> - <h2 class="wt-page-title mx-auto"> - <?= $source->getFullName() ?> - </h2> - <?php if ($source->canEdit() && !$source->isPendingDeletion()): ?> - <?= view('source-page-menu', ['record' => $source]) ?> - <?php endif ?> + <h2 class="wt-page-title mx-auto"> + <?= $source->getFullName() ?> + </h2> + <?php if ($source->canEdit() && !$source->isPendingDeletion()) : ?> + <?= view('source-page-menu', ['record' => $source]) ?> + <?php endif ?> </div> <div class="wt-page-content"> - <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> - <?= I18N::translate('Details') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> - <?= I18N::translate('Individuals') ?> - <?= Bootstrap4::badgeCount($individuals) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> - <?= I18N::translate('Families') ?> - <?= Bootstrap4::badgeCount($families) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($media_objects) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#media"> - <?= I18N::translate('Media objects') ?> - <?= Bootstrap4::badgeCount($media_objects) ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> - <?= I18N::translate('Notes') ?> - <?= Bootstrap4::badgeCount($notes) ?> - </a> - </li> - </ul> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" role="tab" href="#details"> + <?= I18N::translate('Details') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($individuals) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals"> + <?= I18N::translate('Individuals') ?> + <?= Bootstrap4::badgeCount($individuals) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($families) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families"> + <?= I18N::translate('Families') ?> + <?= Bootstrap4::badgeCount($families) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($media_objects) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#media"> + <?= I18N::translate('Media objects') ?> + <?= Bootstrap4::badgeCount($media_objects) ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link<?= empty($notes) ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#notes"> + <?= I18N::translate('Notes') ?> + <?= Bootstrap4::badgeCount($notes) ?> + </a> + </li> + </ul> - <div class="tab-content"> - <div class="tab-pane fade show active" role="tabpanel" id="details"> - <table class="table wt-facts-table"> - <?php foreach ($facts as $fact): ?> - <?php FunctionsPrintFacts::printFact($fact, $source) ?> - <?php endforeach ?> + <div class="tab-content"> + <div class="tab-pane fade show active" role="tabpanel" id="details"> + <table class="table wt-facts-table"> + <?php foreach ($facts as $fact) : ?> + <?php FunctionsPrintFacts::printFact($fact, $source) ?> + <?php endforeach ?> - <?php if ($source->canEdit()): ?> - <?php FunctionsPrint::printAddNewFact($source, $facts, 'SOUR') ?> - <?php if ($source->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($source->getTree())): ?> - <tr> - <th scope="row"> - <?= I18N::translate('Media object') ?> - </th> - <td> - <a href="<?= e(route('add-fact', ['ged' => $source->getTree()->getName(), 'xref' => $source->getXref(), 'fact' => 'OBJE'])) ?>"> - <?= I18N::translate('Add a media object') ?> - </a> - </td> - </tr> - <?php endif ?> - <?php endif ?> - </table> - </div> + <?php if ($source->canEdit()) : ?> + <?php FunctionsPrint::printAddNewFact($source, $facts, 'SOUR') ?> + <?php if ($source->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($source->getTree())) : ?> + <tr> + <th scope="row"> + <?= I18N::translate('Media object') ?> + </th> + <td> + <a href="<?= e(route('add-fact', ['ged' => $source->getTree()->getName(), 'xref' => $source->getXref(), 'fact' => 'OBJE'])) ?>"> + <?= I18N::translate('Add a media object') ?> + </a> + </td> + </tr> + <?php endif ?> + <?php endif ?> + </table> + </div> - <div class="tab-pane fade" role="tabpanel" id="individuals"> - <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="individuals"> + <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="families"> - <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="families"> + <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="media"> - <?= view('lists/media-table', ['media_objects' => $media_objects, 'tree' => $tree]) ?> - </div> + <div class="tab-pane fade" role="tabpanel" id="media"> + <?= view('lists/media-table', ['media_objects' => $media_objects, 'tree' => $tree]) ?> + </div> - <div class="tab-pane fade" role="tabpanel" id="notes"> - <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> - </div> - </div> + <div class="tab-pane fade" role="tabpanel" id="notes"> + <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> + </div> + </div> </div> <?= view('modals/ajax') ?> diff --git a/resources/views/statistics-chart-families.php b/resources/views/statistics-chart-families.php index 3538f9faaf..9097fa3bd7 100644 --- a/resources/views/statistics-chart-families.php +++ b/resources/views/statistics-chart-families.php @@ -1,144 +1,144 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h3> - <?= I18N::translate('Total families: %s', $stats->totalFamilies()) ?> + <?= I18N::translate('Total families: %s', $stats->totalFamilies()) ?> </h3> <table> - <tr> - <td><?= I18N::translate('Total marriages') ?></td> - <td><?= I18N::translate('Total divorces') ?></td> - </tr> - <tr> - <td><?= $stats->totalMarriages() ?></td> - <td><?= $stats->totalDivorces() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Marriages by century') ?></td> - <td><?= I18N::translate('Divorces by century') ?></td> - </tr> - <tr> - <td><?= $stats->statsMarr() ?></td> - <td><?= $stats->statsDiv() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Earliest marriage') ?></td> - <td><?= I18N::translate('Earliest divorce') ?></td> - </tr> - <tr> - <td><?= $stats->firstMarriage() ?></td> - <td><?= $stats->firstDivorce() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Latest marriage') ?></td> - <td><?= I18N::translate('Latest divorce') ?></td> - </tr> - <tr> - <td><?= $stats->lastMarriage() ?></td> - <td><?= $stats->lastDivorce() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Total marriages') ?></td> + <td><?= I18N::translate('Total divorces') ?></td> + </tr> + <tr> + <td><?= $stats->totalMarriages() ?></td> + <td><?= $stats->totalDivorces() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Marriages by century') ?></td> + <td><?= I18N::translate('Divorces by century') ?></td> + </tr> + <tr> + <td><?= $stats->statsMarr() ?></td> + <td><?= $stats->statsDiv() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Earliest marriage') ?></td> + <td><?= I18N::translate('Earliest divorce') ?></td> + </tr> + <tr> + <td><?= $stats->firstMarriage() ?></td> + <td><?= $stats->firstDivorce() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Latest marriage') ?></td> + <td><?= I18N::translate('Latest divorce') ?></td> + </tr> + <tr> + <td><?= $stats->lastMarriage() ?></td> + <td><?= $stats->lastDivorce() ?></td> + </tr> </table> <h3><?= I18N::translate('Length of marriage') ?></h3> <table> - <tr> - <td><?= I18N::translate('Longest marriage'), ' - ', $stats->topAgeOfMarriage() ?></td> - <td><?= I18N::translate('Shortest marriage'), ' - ', $stats->minAgeOfMarriage() ?></td> - </tr> - <tr> - <td><?= $stats->topAgeOfMarriageFamily() ?></td> - <td><?= $stats->minAgeOfMarriageFamily() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Longest marriage'), ' - ', $stats->topAgeOfMarriage() ?></td> + <td><?= I18N::translate('Shortest marriage'), ' - ', $stats->minAgeOfMarriage() ?></td> + </tr> + <tr> + <td><?= $stats->topAgeOfMarriageFamily() ?></td> + <td><?= $stats->minAgeOfMarriageFamily() ?></td> + </tr> </table> <h3><?= I18N::translate('Age in year of marriage') ?></h3> <table> - <tr> - <td><?= I18N::translate('Youngest male'), ' - ', $stats->youngestMarriageMaleAge(true) ?></td> - <td><?= I18N::translate('Youngest female'), ' - ', $stats->youngestMarriageFemaleAge(true) ?></td> - </tr> - <tr> - <td><?= $stats->youngestMarriageMale() ?></td> - <td><?= $stats->youngestMarriageFemale() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Oldest male'), ' - ', $stats->oldestMarriageMaleAge(true) ?></td> - <td><?= I18N::translate('Oldest female'), ' - ', $stats->oldestMarriageFemaleAge(true) ?></td> - </tr> - <tr> - <td><?= $stats->oldestMarriageMale() ?></td> - <td><?= $stats->oldestMarriageFemale() ?></td> - </tr> - <tr> - <td colspan="2"><?= $stats->statsMarrAge() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Youngest male'), ' - ', $stats->youngestMarriageMaleAge(true) ?></td> + <td><?= I18N::translate('Youngest female'), ' - ', $stats->youngestMarriageFemaleAge(true) ?></td> + </tr> + <tr> + <td><?= $stats->youngestMarriageMale() ?></td> + <td><?= $stats->youngestMarriageFemale() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Oldest male'), ' - ', $stats->oldestMarriageMaleAge(true) ?></td> + <td><?= I18N::translate('Oldest female'), ' - ', $stats->oldestMarriageFemaleAge(true) ?></td> + </tr> + <tr> + <td><?= $stats->oldestMarriageMale() ?></td> + <td><?= $stats->oldestMarriageFemale() ?></td> + </tr> + <tr> + <td colspan="2"><?= $stats->statsMarrAge() ?></td> + </tr> </table> <h3><?= I18N::translate('Age at birth of child') ?></h3> <table> - <tr> - <td><?= I18N::translate('Youngest father'), ' - ', $stats->youngestFatherAge(true) ?></td> - <td><?= I18N::translate('Youngest mother'), ' - ', $stats->youngestMotherAge(true) ?></td> - </tr> - <tr> - <td><?= $stats->youngestFather() ?></td> - <td><?= $stats->youngestMother() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Oldest father'), ' - ', $stats->oldestFatherAge(true) ?></td> - <td><?= I18N::translate('Oldest mother'), ' - ', $stats->oldestMotherAge(true) ?></td> - </tr> - <tr> - <td><?= $stats->oldestFather() ?></td> - <td><?= $stats->oldestMother() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Youngest father'), ' - ', $stats->youngestFatherAge(true) ?></td> + <td><?= I18N::translate('Youngest mother'), ' - ', $stats->youngestMotherAge(true) ?></td> + </tr> + <tr> + <td><?= $stats->youngestFather() ?></td> + <td><?= $stats->youngestMother() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Oldest father'), ' - ', $stats->oldestFatherAge(true) ?></td> + <td><?= I18N::translate('Oldest mother'), ' - ', $stats->oldestMotherAge(true) ?></td> + </tr> + <tr> + <td><?= $stats->oldestFather() ?></td> + <td><?= $stats->oldestMother() ?></td> + </tr> </table> <h3><?= I18N::translate('Children in family') ?></h3> <table> - <tr> - <td><?= I18N::translate('Average number of children per family') ?></td> - <td><?= I18N::translate('Number of families without children') ?></td> - </tr> - <tr> - <td><?= $stats->averageChildren() ?></td> - <td><?= $stats->noChildrenFamilies() ?></td> - </tr> - <tr> - <td><?= $stats->statsChildren() ?></td> - <td><?= $stats->chartNoChildrenFamilies() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Largest families') ?></td> - <td><?= I18N::translate('Largest number of grandchildren') ?></td> - </tr> - <tr> - <td><?= $stats->topTenLargestFamilyList() ?></td> - <td><?= $stats->topTenLargestGrandFamilyList() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Average number of children per family') ?></td> + <td><?= I18N::translate('Number of families without children') ?></td> + </tr> + <tr> + <td><?= $stats->averageChildren() ?></td> + <td><?= $stats->noChildrenFamilies() ?></td> + </tr> + <tr> + <td><?= $stats->statsChildren() ?></td> + <td><?= $stats->chartNoChildrenFamilies() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Largest families') ?></td> + <td><?= I18N::translate('Largest number of grandchildren') ?></td> + </tr> + <tr> + <td><?= $stats->topTenLargestFamilyList() ?></td> + <td><?= $stats->topTenLargestGrandFamilyList() ?></td> + </tr> </table> <h3><?= I18N::translate('Age difference') ?></h3> <table> - <tr> - <td><?= I18N::translate('Age between siblings') ?></td> - <td><?= I18N::translate('Greatest age between siblings') ?></td> - </tr> - <tr> - <td><?= $stats->topAgeBetweenSiblingsList() ?></td> - <td><?= $stats->topAgeBetweenSiblingsFullName() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Age between husband and wife') ?></td> - <td><?= I18N::translate('Age between wife and husband') ?></td> - </tr> - <tr> - <td><?= $stats->ageBetweenSpousesMFList() ?></td> - <td><?= $stats->ageBetweenSpousesFMList() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Age between siblings') ?></td> + <td><?= I18N::translate('Greatest age between siblings') ?></td> + </tr> + <tr> + <td><?= $stats->topAgeBetweenSiblingsList() ?></td> + <td><?= $stats->topAgeBetweenSiblingsFullName() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Age between husband and wife') ?></td> + <td><?= I18N::translate('Age between wife and husband') ?></td> + </tr> + <tr> + <td><?= $stats->ageBetweenSpousesMFList() ?></td> + <td><?= $stats->ageBetweenSpousesFMList() ?></td> + </tr> </table> diff --git a/resources/views/statistics-chart-individuals.php b/resources/views/statistics-chart-individuals.php index 597b39eed3..7980441272 100644 --- a/resources/views/statistics-chart-individuals.php +++ b/resources/views/statistics-chart-individuals.php @@ -1,136 +1,136 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h3> - <?= I18N::translate('Total individuals: %s', $stats->totalIndividuals()) ?> + <?= I18N::translate('Total individuals: %s', $stats->totalIndividuals()) ?> </h3> <table class="table table-sm table-bordered"> - <thead> - <tr> - <th><?= I18N::translate('Total males') ?></th> - <th><?= I18N::translate('Total females') ?></th> - <th><?= I18N::translate('Total living') ?></th> - <th><?= I18N::translate('Total dead') ?></th> - </tr> - </thead> - <tbody> - <tr> - <td><?= $stats->totalSexMales() ?></td> - <td><?= $stats->totalSexFemales() ?></td> - <td><?= $stats->totalLiving() ?></td> - <td><?= $stats->totalDeceased() ?></td> - </tr> - </tbody> - <tfoot> - <tr> - <td colspan="2"><?= $stats->chartSex() ?></td> - <td colspan="2"><?= $stats->chartMortality() ?></td> - </tr> - </tfoot> + <thead> + <tr> + <th><?= I18N::translate('Total males') ?></th> + <th><?= I18N::translate('Total females') ?></th> + <th><?= I18N::translate('Total living') ?></th> + <th><?= I18N::translate('Total dead') ?></th> + </tr> + </thead> + <tbody> + <tr> + <td><?= $stats->totalSexMales() ?></td> + <td><?= $stats->totalSexFemales() ?></td> + <td><?= $stats->totalLiving() ?></td> + <td><?= $stats->totalDeceased() ?></td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"><?= $stats->chartSex() ?></td> + <td colspan="2"><?= $stats->chartMortality() ?></td> + </tr> + </tfoot> </table> <h3><?= I18N::translate('Events') ?></h3> <table class="table table-sm table-bordered"> - <tbody> - <tr> - <th><?= I18N::translate('Total births') ?></th> - <th><?= I18N::translate('Total deaths') ?></th> - </tr> - <tr> - <td><?= $stats->totalBirths() ?></td> - <td><?= $stats->totalDeaths() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Births by century') ?></td> - <td><?= I18N::translate('Deaths by century') ?></td> - </tr> - <tr> - <td><?= $stats->statsBirth() ?></td> - <td><?= $stats->statsDeath() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Earliest birth') ?></td> - <td><?= I18N::translate('Earliest death') ?></td> - </tr> - <tr> - <td><?= $stats->firstBirth() ?></td> - <td><?= $stats->firstDeath() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Latest birth') ?></td> - <td><?= I18N::translate('Latest death') ?></td> - </tr> - <tr> - <td><?= $stats->lastBirth() ?></td> - <td><?= $stats->lastDeath() ?></td> - </tr> - </tbody> + <tbody> + <tr> + <th><?= I18N::translate('Total births') ?></th> + <th><?= I18N::translate('Total deaths') ?></th> + </tr> + <tr> + <td><?= $stats->totalBirths() ?></td> + <td><?= $stats->totalDeaths() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Births by century') ?></td> + <td><?= I18N::translate('Deaths by century') ?></td> + </tr> + <tr> + <td><?= $stats->statsBirth() ?></td> + <td><?= $stats->statsDeath() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Earliest birth') ?></td> + <td><?= I18N::translate('Earliest death') ?></td> + </tr> + <tr> + <td><?= $stats->firstBirth() ?></td> + <td><?= $stats->firstDeath() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Latest birth') ?></td> + <td><?= I18N::translate('Latest death') ?></td> + </tr> + <tr> + <td><?= $stats->lastBirth() ?></td> + <td><?= $stats->lastDeath() ?></td> + </tr> + </tbody> </table> <h3><?= I18N::translate('Lifespan') ?></h3> <table> - <tr> - <td><?= I18N::translate('Average age at death') ?></td> - <td><?= I18N::translate('Males') ?></td> - <td><?= I18N::translate('Females') ?></td> - </tr> - <tr> - <td><?= $stats->averageLifespan(true) ?></td> - <td><?= $stats->averageLifespanMale(true) ?></td> - <td><?= $stats->averageLifespanFemale(true) ?></td> - </tr> - <tr> - <td colspan="3"><?= $stats->statsAge() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Average age at death') ?></td> + <td><?= I18N::translate('Males') ?></td> + <td><?= I18N::translate('Females') ?></td> + </tr> + <tr> + <td><?= $stats->averageLifespan(true) ?></td> + <td><?= $stats->averageLifespanMale(true) ?></td> + <td><?= $stats->averageLifespanFemale(true) ?></td> + </tr> + <tr> + <td colspan="3"><?= $stats->statsAge() ?></td> + </tr> </table> <h3><?= I18N::translate('Greatest age at death') ?></h3> <table> - <tr> - <td><?= I18N::translate('Males') ?></td> - <td><?= I18N::translate('Females') ?></td> - </tr> - <tr> - <td><?= $stats->topTenOldestMaleList() ?></td> - <td><?= $stats->topTenOldestFemaleList() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Males') ?></td> + <td><?= I18N::translate('Females') ?></td> + </tr> + <tr> + <td><?= $stats->topTenOldestMaleList() ?></td> + <td><?= $stats->topTenOldestFemaleList() ?></td> + </tr> </table> -<?php if ($show_oldest_living): ?> - <h3><?= I18N::translate('Oldest living individuals') ?></h3> +<?php if ($show_oldest_living) : ?> + <h3><?= I18N::translate('Oldest living individuals') ?></h3> - <table> - <tr> - <td><?= I18N::translate('Males') ?></td> - <td><?= I18N::translate('Females') ?></td> - </tr> - <tr> - <td><?= $stats->topTenOldestMaleListAlive() ?></td> - <td><?= $stats->topTenOldestFemaleListAlive() ?></td> - </tr> - </table> + <table> + <tr> + <td><?= I18N::translate('Males') ?></td> + <td><?= I18N::translate('Females') ?></td> + </tr> + <tr> + <td><?= $stats->topTenOldestMaleListAlive() ?></td> + <td><?= $stats->topTenOldestFemaleListAlive() ?></td> + </tr> + </table> <?php endif ?> <h3><?= I18N::translate('Names') ?></h3> <table> - <tr> - <td><?= I18N::translate('Total surnames') ?></td> - <td><?= I18N::translate('Total given names') ?></td> - </tr> - <tr> - <td><?= $stats->totalSurnames() ?></td> - <td><?= $stats->totalGivennames() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Top surnames') ?></td> - <td><?= I18N::translate('Top given names') ?></td> - </tr> - <tr> - <td><?= $stats->chartCommonSurnames() ?></td> - <td><?= $stats->chartCommonGiven() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Total surnames') ?></td> + <td><?= I18N::translate('Total given names') ?></td> + </tr> + <tr> + <td><?= $stats->totalSurnames() ?></td> + <td><?= $stats->totalGivennames() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Top surnames') ?></td> + <td><?= I18N::translate('Top given names') ?></td> + </tr> + <tr> + <td><?= $stats->chartCommonSurnames() ?></td> + <td><?= $stats->chartCommonGiven() ?></td> + </tr> </table> diff --git a/resources/views/statistics-chart-other.php b/resources/views/statistics-chart-other.php index f81413adf8..d30979de96 100644 --- a/resources/views/statistics-chart-other.php +++ b/resources/views/statistics-chart-other.php @@ -1,85 +1,85 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h3> - <?= I18N::translate('Records') ?>: <?= $stats->totalRecords() ?> + <?= I18N::translate('Records') ?>: <?= $stats->totalRecords() ?> </h3> <table> - <tr> - <td><?= I18N::translate('Media objects') ?></td> - <td><?= I18N::translate('Sources') ?></td> - <td><?= I18N::translate('Notes') ?></td> - <td><?= I18N::translate('Repositories') ?></td> - </tr> - <tr> - <td><?= $stats->totalMedia() ?></td> - <td><?= $stats->totalSources() ?></td> - <td><?= $stats->totalNotes() ?></td> - <td><?= $stats->totalRepositories() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Media objects') ?></td> + <td><?= I18N::translate('Sources') ?></td> + <td><?= I18N::translate('Notes') ?></td> + <td><?= I18N::translate('Repositories') ?></td> + </tr> + <tr> + <td><?= $stats->totalMedia() ?></td> + <td><?= $stats->totalSources() ?></td> + <td><?= $stats->totalNotes() ?></td> + <td><?= $stats->totalRepositories() ?></td> + </tr> </table> <h3><?= I18N::translate('Total events'), ': ', $stats->totalEvents() ?></h3> <table> - <tr> - <td><?= I18N::translate('First event'), ' - ', $stats->firstEventType() ?></td> - <td><?= I18N::translate('Last event'), ' - ', $stats->lastEventType() ?></td> - </tr> - <tr> - <td><?= $stats->firstEvent() ?></td> - <td><?= $stats->lastEvent() ?></td> - </tr> + <tr> + <td><?= I18N::translate('First event'), ' - ', $stats->firstEventType() ?></td> + <td><?= I18N::translate('Last event'), ' - ', $stats->lastEventType() ?></td> + </tr> + <tr> + <td><?= $stats->firstEvent() ?></td> + <td><?= $stats->lastEvent() ?></td> + </tr> </table> <h3><?= I18N::translate('Media objects'), ': ', $stats->totalMedia() ?></h3> <table> - <tr> - <td><?= I18N::translate('Media objects') ?></td> - </tr> - <tr> - <td><?= $stats->chartMedia() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Media objects') ?></td> + </tr> + <tr> + <td><?= $stats->chartMedia() ?></td> + </tr> </table> <h3><?= I18N::translate('Sources'), ': ', $stats->totalSources() ?></h3> <table> - <tr> - <td><?= I18N::translate('Individuals with sources') ?></td> - <td><?= I18N::translate('Families with sources') ?></td> - </tr> - <tr> - <td><?= $stats->totalIndisWithSources() ?></td> - <td><?= $stats->totalFamsWithSources() ?></td> - </tr> - <tr> - <td><?= $stats->chartIndisWithSources() ?></td> - <td><?= $stats->chartFamsWithSources() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Individuals with sources') ?></td> + <td><?= I18N::translate('Families with sources') ?></td> + </tr> + <tr> + <td><?= $stats->totalIndisWithSources() ?></td> + <td><?= $stats->totalFamsWithSources() ?></td> + </tr> + <tr> + <td><?= $stats->chartIndisWithSources() ?></td> + <td><?= $stats->chartFamsWithSources() ?></td> + </tr> </table> <h3><?= I18N::translate('Places'), ': ', $stats->totalPlaces() ?></h3> <table> - <tr> - <td><?= I18N::translate('Birth places') ?></td> - <td><?= I18N::translate('Death places') ?></td> - </tr> - <tr> - <td><?= $stats->commonBirthPlacesList() ?></td> - <td><?= $stats->commonDeathPlacesList() ?></td> - </tr> - <tr> - <td><?= I18N::translate('Marriage places') ?></td> - <td><?= I18N::translate('Events in countries') ?></td> - </tr> - <tr> - <td><?= $stats->commonMarriagePlacesList() ?></td> - <td><?= $stats->commonCountriesList() ?></td> - </tr> - <tr> - <td colspan="2"><?= $stats->chartDistribution() ?></td> - </tr> + <tr> + <td><?= I18N::translate('Birth places') ?></td> + <td><?= I18N::translate('Death places') ?></td> + </tr> + <tr> + <td><?= $stats->commonBirthPlacesList() ?></td> + <td><?= $stats->commonDeathPlacesList() ?></td> + </tr> + <tr> + <td><?= I18N::translate('Marriage places') ?></td> + <td><?= I18N::translate('Events in countries') ?></td> + </tr> + <tr> + <td><?= $stats->commonMarriagePlacesList() ?></td> + <td><?= $stats->commonCountriesList() ?></td> + </tr> + <tr> + <td colspan="2"><?= $stats->chartDistribution() ?></td> + </tr> </table> diff --git a/resources/views/statistics-page.php b/resources/views/statistics-page.php index 9e492aac4e..6c713abdff 100644 --- a/resources/views/statistics-page.php +++ b/resources/views/statistics-page.php @@ -2,39 +2,39 @@ <?php use Fisharebest\Webtrees\View; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <div class="wt-page-content wt-chart wt-statistics-chart" id="statistics-tabs"> - <ul class="nav nav-tabs" role="tablist"> - <li class="nav-item"> - <a class="nav-link" href="#individual-statistics" data-toggle="tab" data-href="<?= e(route('statistics-individuals', ['ged' => $tree->getName()])) ?>" role="tab"> - <?= I18N::translate('Individuals') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#family-statistics" data-toggle="tab" data-href="<?= e(route('statistics-families', ['ged' => $tree->getName()])) ?>" role="tab"> - <?= I18N::translate('Families') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#other-statistics" data-toggle="tab" data-href="<?= e(route('statistics-other', ['ged' => $tree->getName()])) ?>" role="tab"> - <?= I18N::translate('Others') ?> - </a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#custom-statistics" data-toggle="tab" data-href="<?= e(route('statistics-options', ['ged' => $tree->getName()])) ?>" role="tab"> - <?= I18N::translate('Custom') ?> - </a> - </li> - </ul> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link" href="#individual-statistics" data-toggle="tab" data-href="<?= e(route('statistics-individuals', ['ged' => $tree->getName()])) ?>" role="tab"> + <?= I18N::translate('Individuals') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#family-statistics" data-toggle="tab" data-href="<?= e(route('statistics-families', ['ged' => $tree->getName()])) ?>" role="tab"> + <?= I18N::translate('Families') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#other-statistics" data-toggle="tab" data-href="<?= e(route('statistics-other', ['ged' => $tree->getName()])) ?>" role="tab"> + <?= I18N::translate('Others') ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#custom-statistics" data-toggle="tab" data-href="<?= e(route('statistics-options', ['ged' => $tree->getName()])) ?>" role="tab"> + <?= I18N::translate('Custom') ?> + </a> + </li> + </ul> - <div class="tab-content"> - <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="individual-statistics"></div> - <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="family-statistics"></div> - <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="other-statistics"></div> - <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="custom-statistics"></div> - </div> + <div class="tab-content"> + <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="individual-statistics"></div> + <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="family-statistics"></div> + <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="other-statistics"></div> + <div class="tab-pane fade wt-ajax-load" role="tabpanel" id="custom-statistics"></div> + </div> </div> <?php View::push('javascript') ?> diff --git a/resources/views/timeline-chart.php b/resources/views/timeline-chart.php index eb8eebe60d..296f5efd5d 100644 --- a/resources/views/timeline-chart.php +++ b/resources/views/timeline-chart.php @@ -13,19 +13,19 @@ var birthyears = []; var birthmonths = []; var birthdays = []; - <?php - foreach ($individuals as $c => $indi) { - if (!empty($birthyears[$indi->getXref()])) { - echo 'birthyears[' . $c . ']=' . $birthyears[$indi->getXref()] . ';'; - } - if (!empty($birthmonths[$indi->getXref()])) { - echo 'birthmonths[' . $c . ']=' . $birthmonths[$indi->getXref()] . ';'; - } - if (!empty($birthdays[$indi->getXref()])) { - echo 'birthdays[' . $c . ']=' . $birthdays[$indi->getXref()] . ';'; - } - } - ?> + <?php + foreach ($individuals as $c => $indi) { + if (!empty($birthyears[$indi->getXref()])) { + echo 'birthyears[' . $c . ']=' . $birthyears[$indi->getXref()] . ';'; + } + if (!empty($birthmonths[$indi->getXref()])) { + echo 'birthmonths[' . $c . ']=' . $birthmonths[$indi->getXref()] . ';'; + } + if (!empty($birthdays[$indi->getXref()])) { + echo 'birthdays[' . $c . ']=' . $birthdays[$indi->getXref()] . ';'; + } + } + ?> var bheight = <?= $bheight ?>; var scale = <?= $scale ?>; @@ -245,186 +245,186 @@ </script> <div id="timeline_chart"> - <!-- print the timeline line image --> - <div id="line" style="position:absolute; <?= I18N::direction() === 'ltr' ? 'left:22px;' : 'right:22px;' ?> top:0;"> - <img src="<?= Theme::theme()->parameter('image-vline') ?>" width="3" height="<?= 0 + ($topyear - $baseyear) * $scale ?>"> - </div> + <!-- print the timeline line image --> + <div id="line" style="position:absolute; <?= I18N::direction() === 'ltr' ? 'left:22px;' : 'right:22px;' ?> top:0;"> + <img src="<?= Theme::theme()->parameter('image-vline') ?>" width="3" height="<?= 0 + ($topyear - $baseyear) * $scale ?>"> + </div> - <!-- print divs for the grid --> - <div id="scale<?= e($baseyear) ?>" style="position:absolute; <?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>:0; top:-5px; font-size: 7pt; text-align: <?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>;"> - <?= $baseyear ?> - </div> - <?php - // at a scale of 25 or higher, show every year - $mod = 25 / $scale; - if ($mod < 1) { - $mod = 1; - } - for ($i = $baseyear + 1; $i < $topyear; $i++) { - if ($i % $mod === 0) { - echo '<div id="scale' . $i . '" style="position:absolute; ' . (I18N::direction() === 'ltr' ? 'left:0;' : 'right:0;') . ' top:' . ((($i - $baseyear) * $scale) - $scale / 2) . 'px; font-size: 7pt; text-align:' . (I18N::direction() === 'ltr' ? 'left' : 'right') . ';">'; - echo $i; - echo '</div>'; - } - } - echo ''; - ?> - <div id="scale<?= e($topyear) ?>" style="position:absolute; <?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>:0; top:<?= ($topyear - $baseyear) * $scale ?>px; font-size: 7pt; text-align:<?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>;"> - <?= e($topyear) ?> - </div> + <!-- print divs for the grid --> + <div id="scale<?= e($baseyear) ?>" style="position:absolute; <?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>:0; top:-5px; font-size: 7pt; text-align: <?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>;"> + <?= $baseyear ?> + </div> + <?php + // at a scale of 25 or higher, show every year + $mod = 25 / $scale; + if ($mod < 1) { + $mod = 1; + } + for ($i = $baseyear + 1; $i < $topyear; $i++) { + if ($i % $mod === 0) { + echo '<div id="scale' . $i . '" style="position:absolute; ' . (I18N::direction() === 'ltr' ? 'left:0;' : 'right:0;') . ' top:' . ((($i - $baseyear) * $scale) - $scale / 2) . 'px; font-size: 7pt; text-align:' . (I18N::direction() === 'ltr' ? 'left' : 'right') . ';">'; + echo $i; + echo '</div>'; + } + } + echo ''; + ?> + <div id="scale<?= e($topyear) ?>" style="position:absolute; <?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>:0; top:<?= ($topyear - $baseyear) * $scale ?>px; font-size: 7pt; text-align:<?= I18N::direction() === 'ltr' ? 'left' : 'right' ?>;"> + <?= e($topyear) ?> + </div> - <?php foreach ($indifacts as $factcount => $event): ?> - <?php - $desc = $event->getValue(); - $gdate = $event->getDate(); - $date = $gdate->minimumDate(); - $date = $date->convertToCalendar('gregorian'); - $year = $date->y; - $month = max(1, $date->m); - $day = max(1, $date->d); - $xoffset = 0 + 22; - $yoffset = 0 + (($year - $baseyear) * $scale) - ($scale); - $yoffset = $yoffset + (($month / 12) * $scale); - $yoffset = $yoffset + (($day / 30) * ($scale / 12)); - $yoffset = (int) ($yoffset); - $place = (int) ($yoffset / $bheight); - $i = 1; - $j = 0; - $tyoffset = 0; - while (isset($placements[$place])) { - if ($i === $j) { - $tyoffset = $bheight * $i; - $i++; - } else { - $tyoffset = -1 * $bheight * $j; - $j++; - } - $place = (int) (($yoffset + $tyoffset) / $bheight); - } - $yoffset += $tyoffset; - $xoffset += abs($tyoffset); - $placements[$place] = $yoffset; + <?php foreach ($indifacts as $factcount => $event) : ?> + <?php + $desc = $event->getValue(); + $gdate = $event->getDate(); + $date = $gdate->minimumDate(); + $date = $date->convertToCalendar('gregorian'); + $year = $date->y; + $month = max(1, $date->m); + $day = max(1, $date->d); + $xoffset = 0 + 22; + $yoffset = 0 + (($year - $baseyear) * $scale) - ($scale); + $yoffset = $yoffset + (($month / 12) * $scale); + $yoffset = $yoffset + (($day / 30) * ($scale / 12)); + $yoffset = (int) ($yoffset); + $place = (int) ($yoffset / $bheight); + $i = 1; + $j = 0; + $tyoffset = 0; + while (isset($placements[$place])) { + if ($i === $j) { + $tyoffset = $bheight * $i; + $i++; + } else { + $tyoffset = -1 * $bheight * $j; + $j++; + } + $place = (int) (($yoffset + $tyoffset) / $bheight); + } + $yoffset += $tyoffset; + $xoffset += abs($tyoffset); + $placements[$place] = $yoffset; - echo "<div id=\"fact$factcount\" style=\"position:absolute; " . (I18N::direction() === 'ltr' ? 'left: ' . ($xoffset) : 'right: ' . ($xoffset)) . 'px; top:' . ($yoffset) . 'px; font-size: 8pt; height: ' . ($bheight) . "px;\" onmousedown=\"factMouseDown(this, '" . $factcount . "', " . ($yoffset - $tyoffset) . ');">'; - echo '<table cellspacing="0" cellpadding="0" border="0" style="cursor: hand;"><tr><td>'; - echo '<img src="' . Theme::theme()->parameter('image-hline') . '" name="boxline' . $factcount . '" id="boxline' . $factcount . '" height="3" width="10" style="padding-'; - if (I18N::direction() === 'ltr') { - echo 'left: 3px;">'; - } else { - echo 'right: 3px;">'; - } + echo "<div id=\"fact$factcount\" style=\"position:absolute; " . (I18N::direction() === 'ltr' ? 'left: ' . ($xoffset) : 'right: ' . ($xoffset)) . 'px; top:' . ($yoffset) . 'px; font-size: 8pt; height: ' . ($bheight) . "px;\" onmousedown=\"factMouseDown(this, '" . $factcount . "', " . ($yoffset - $tyoffset) . ');">'; + echo '<table cellspacing="0" cellpadding="0" border="0" style="cursor: hand;"><tr><td>'; + echo '<img src="' . Theme::theme()->parameter('image-hline') . '" name="boxline' . $factcount . '" id="boxline' . $factcount . '" height="3" width="10" style="padding-'; + if (I18N::direction() === 'ltr') { + echo 'left: 3px;">'; + } else { + echo 'right: 3px;">'; + } - $col = array_search($event->getParent(), $individuals); - if ($col === false) { - // Marriage event - use the color of the husband - $col = array_search($event->getParent()->getHusband(), $individuals); - } - if ($col === false) { - // Marriage event - use the color of the wife - $col = array_search($event->getParent()->getWife(), $individuals); - } - $col = $col % 6; - echo '</td><td class="person' . $col . '">'; - if (count($individuals) > 6) { - // We only have six colours, so show naes if more than this number - echo $event->getParent()->getFullName() . ' — '; - } - $record = $event->getParent(); - echo $event->getLabel(); - echo ' — '; - if ($record instanceof Individual) { - echo FunctionsPrint::formatFactDate($event, $record, false, false); - } elseif ($record instanceof Family) { - echo $gdate->display(); - if ($record->getHusband() && $record->getHusband()->getBirthDate()->isOK()) { - $ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getHusband()->getBirthDate(), $gdate)); - } else { - $ageh = null; - } - if ($record->getWife() && $record->getWife()->getBirthDate()->isOK()) { - $agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getWife()->getBirthDate(), $gdate)); - } else { - $agew = null; - } - if ($ageh && $agew) { - echo '<span class="age"> ', I18N::translate('Husband’s age'), ' ', $ageh, ' ', I18N::translate('Wife’s age'), ' ', $agew, '</span>'; - } elseif ($ageh) { - echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>'; - } elseif ($agew) { - echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>'; - } - } - echo ' ' . e($desc); - if (!$event->getPlace()->isEmpty()) { - echo ' — ' . $event->getPlace()->getShortName(); - } - // Print spouses names for family events - if ($event->getParent() instanceof Family) { - echo ' — <a href="', e($event->getParent()->url()), '">', $event->getParent()->getFullName(), '</a>'; - } - echo '</td></tr></table>'; - echo '</div>'; - if (I18N::direction() === 'ltr') { - $img = 'image-dline2'; - $ypos = '0%'; - } else { - $img = 'image-dline'; - $ypos = '100%'; - } - $dyoffset = ($yoffset - $tyoffset) + $bheight / 3; - if ($tyoffset < 0) { - $dyoffset = $yoffset + $bheight / 3; - if (I18N::direction() === 'ltr') { - $img = 'image-dline'; - $ypos = '100%'; - } else { - $img = 'image-dline2'; - $ypos = '0%'; - } - } - ?> + $col = array_search($event->getParent(), $individuals); + if ($col === false) { + // Marriage event - use the color of the husband + $col = array_search($event->getParent()->getHusband(), $individuals); + } + if ($col === false) { + // Marriage event - use the color of the wife + $col = array_search($event->getParent()->getWife(), $individuals); + } + $col = $col % 6; + echo '</td><td class="person' . $col . '">'; + if (count($individuals) > 6) { + // We only have six colours, so show naes if more than this number + echo $event->getParent()->getFullName() . ' — '; + } + $record = $event->getParent(); + echo $event->getLabel(); + echo ' — '; + if ($record instanceof Individual) { + echo FunctionsPrint::formatFactDate($event, $record, false, false); + } elseif ($record instanceof Family) { + echo $gdate->display(); + if ($record->getHusband() && $record->getHusband()->getBirthDate()->isOK()) { + $ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getHusband()->getBirthDate(), $gdate)); + } else { + $ageh = null; + } + if ($record->getWife() && $record->getWife()->getBirthDate()->isOK()) { + $agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getWife()->getBirthDate(), $gdate)); + } else { + $agew = null; + } + if ($ageh && $agew) { + echo '<span class="age"> ', I18N::translate('Husband’s age'), ' ', $ageh, ' ', I18N::translate('Wife’s age'), ' ', $agew, '</span>'; + } elseif ($ageh) { + echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>'; + } elseif ($agew) { + echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>'; + } + } + echo ' ' . e($desc); + if (!$event->getPlace()->isEmpty()) { + echo ' — ' . $event->getPlace()->getShortName(); + } + // Print spouses names for family events + if ($event->getParent() instanceof Family) { + echo ' — <a href="', e($event->getParent()->url()), '">', $event->getParent()->getFullName(), '</a>'; + } + echo '</td></tr></table>'; + echo '</div>'; + if (I18N::direction() === 'ltr') { + $img = 'image-dline2'; + $ypos = '0%'; + } else { + $img = 'image-dline'; + $ypos = '100%'; + } + $dyoffset = ($yoffset - $tyoffset) + $bheight / 3; + if ($tyoffset < 0) { + $dyoffset = $yoffset + $bheight / 3; + if (I18N::direction() === 'ltr') { + $img = 'image-dline'; + $ypos = '100%'; + } else { + $img = 'image-dline2'; + $ypos = '0%'; + } + } + ?> - <!-- diagonal line --> - <div id="dbox<?= $factcount ?>" style="position:absolute; <?= (I18N::direction() === 'ltr' ? 'left: ' . (0 + 25) : 'right: ' . (0 + 25)) ?>px; top:<?= ($dyoffset) ?>px; font-size: 8pt; height: <?= abs($tyoffset) ?>px; width: <?= abs($tyoffset) ?>px; background-image: url('<?= Theme::theme()->parameter($img) ?>'); background-position: 0% <?= $ypos ?>;"> - </div> - <?php endforeach ?> + <!-- diagonal line --> + <div id="dbox<?= $factcount ?>" style="position:absolute; <?= (I18N::direction() === 'ltr' ? 'left: ' . (0 + 25) : 'right: ' . (0 + 25)) ?>px; top:<?= ($dyoffset) ?>px; font-size: 8pt; height: <?= abs($tyoffset) ?>px; width: <?= abs($tyoffset) ?>px; background-image: url('<?= Theme::theme()->parameter($img) ?>'); background-position: 0% <?= $ypos ?>;"> + </div> + <?php endforeach ?> - <!-- age cursors --> - <?php foreach ($individuals as $p => $indi): ?> - <?php $ageyoffset = 0 + ($bheight * $p); ?> - <div id="agebox<?= $p ?>" style="cursor:move; position:absolute; <?= I18N::direction() === 'ltr' ? 'left:20px;' : 'right:20px;' ?> top:<?= $ageyoffset ?>px; height:<?= $bheight ?>px; display:none;" onmousedown="ageCursorMouseDown(this, <?= $p ?>);"> - <table cellspacing="0" cellpadding="0"> - <tr> - <td> - <img src="<?= Theme::theme()->parameter('image-hline') ?>" name="ageline<?= $p ?>" id="ageline<?= $p ?>" width="25" height="3"> - </td> - <td> - <?php if (!empty($birthyears[$indi->getXref()])): ?> - <?php $tyear = round(($ageyoffset + ($bheight / 2)) / $scale) + $baseyear; ?> - <table class="person<?= $p % 6 ?>" style="cursor: hand;"> - <tr> - <td> - <?= I18N::translate('Year:') ?> - <span id="yearform<?= $p ?>" class="field"> - <?= $tyear ?> - </span> - </td> - <td> - (<?= I18N::translate('Age') ?> <span id="ageform<?= $p ?>" class="field"><?= $tyear - $birthyears[$indi->getXref()] ?></span>) - </td> - </tr> - </table> - <?php endif ?> - </td> - </tr> - </table> - <br> - <br> - <br> - </div> - <br> - <br> - <br> - <br> - <?php endforeach ?> + <!-- age cursors --> + <?php foreach ($individuals as $p => $indi) : ?> + <?php $ageyoffset = 0 + ($bheight * $p); ?> + <div id="agebox<?= $p ?>" style="cursor:move; position:absolute; <?= I18N::direction() === 'ltr' ? 'left:20px;' : 'right:20px;' ?> top:<?= $ageyoffset ?>px; height:<?= $bheight ?>px; display:none;" onmousedown="ageCursorMouseDown(this, <?= $p ?>);"> + <table cellspacing="0" cellpadding="0"> + <tr> + <td> + <img src="<?= Theme::theme()->parameter('image-hline') ?>" name="ageline<?= $p ?>" id="ageline<?= $p ?>" width="25" height="3"> + </td> + <td> + <?php if (!empty($birthyears[$indi->getXref()])) : ?> + <?php $tyear = round(($ageyoffset + ($bheight / 2)) / $scale) + $baseyear; ?> + <table class="person<?= $p % 6 ?>" style="cursor: hand;"> + <tr> + <td> + <?= I18N::translate('Year:') ?> + <span id="yearform<?= $p ?>" class="field"> + <?= $tyear ?> + </span> + </td> + <td> + (<?= I18N::translate('Age') ?> <span id="ageform<?= $p ?>" class="field"><?= $tyear - $birthyears[$indi->getXref()] ?></span>) + </td> + </tr> + </table> + <?php endif ?> + </td> + </tr> + </table> + <br> + <br> + <br> + </div> + <br> + <br> + <br> + <br> + <?php endforeach ?> </div> diff --git a/resources/views/timeline-page.php b/resources/views/timeline-page.php index f74afc7ea3..3daf2b6c6d 100644 --- a/resources/views/timeline-page.php +++ b/resources/views/timeline-page.php @@ -2,73 +2,73 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <form class="wt-page-options wt-page-options-timeline-chart d-print-none"> - <input type="hidden" name="route" value="timeline"> - <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> - <input type="hidden" name="scale" value="<?= e($scale) ?>"> + <input type="hidden" name="route" value="timeline"> + <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> + <input type="hidden" name="scale" value="<?= e($scale) ?>"> - <?php foreach ($individuals as $individual): ?> - <input name="xrefs[]" type="hidden" value="<?= e($individual->getXref()) ?>"> - <?php endforeach ?> + <?php foreach ($individuals as $individual) : ?> + <input name="xrefs[]" type="hidden" value="<?= e($individual->getXref()) ?>"> + <?php endforeach ?> - <div class="row form-group"> - <label class="col-sm-3 col-form-label wt-page-options-label" for="xref-add"> - <?= I18N::translate('Individual') ?> - </label> - <div class="col-sm-9 wt-page-options-value"> - <?= FunctionsEdit::formControlIndividual($tree, null, [ - 'id' => 'xref-add', - 'name' => 'xrefs[]', - ]) ?> - </div> - </div> + <div class="row form-group"> + <label class="col-sm-3 col-form-label wt-page-options-label" for="xref-add"> + <?= I18N::translate('Individual') ?> + </label> + <div class="col-sm-9 wt-page-options-value"> + <?= FunctionsEdit::formControlIndividual($tree, null, [ + 'id' => 'xref-add', + 'name' => 'xrefs[]', + ]) ?> + </div> + </div> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ - I18N::translate('add') ?>"> - <a class="btn btn-secondary" href="<?= e(route('timeline', ['ged' => $tree->getName()])) ?>"> - <?= /* I18N: A button label. */ I18N::translate('reset') ?> - </a> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ + I18N::translate('add') ?>"> + <a class="btn btn-secondary" href="<?= e(route('timeline', ['ged' => $tree->getName()])) ?>"> + <?= /* I18N: A button label. */ I18N::translate('reset') ?> + </a> + </div> + </div> - <div class="row form-group"> - <div class="col-form-label col-sm-3 wt-page-options-label"></div> - <div class="col-sm-9 wt-page-options-value"> - <a href="<?= e($zoom_in_url) ?>" class="icon-zoomin" title="<?= I18N::translate('Zoom in') ?>"></a> - <a href="<?= e($zoom_out_url) ?>" class="icon-zoomout" title="<?= I18N::translate('Zoom out') ?>"></a> - </div> - </div> + <div class="row form-group"> + <div class="col-form-label col-sm-3 wt-page-options-label"></div> + <div class="col-sm-9 wt-page-options-value"> + <a href="<?= e($zoom_in_url) ?>" class="icon-zoomin" title="<?= I18N::translate('Zoom in') ?>"></a> + <a href="<?= e($zoom_out_url) ?>" class="icon-zoomout" title="<?= I18N::translate('Zoom out') ?>"></a> + </div> + </div> </form> <div class="row my-4"> - <?php foreach ($individuals as $n => $individual): ?> - <div class="col-md-6 col-lg-4 col-xl-3 person<?= $n % 6 ?>"> - <?= $individual->getSexImage('large'); ?> - <a href="<?= e($individual->url()) ?>"> - <?= $individual->getFullName() ?> - <?php if ($individual->getAddName() !== ''): ?> - <br> - <?= $individual->getAddName() ?> - <?php endif ?> - </a> - <a href="<?= e($remove_urls[$individual->getXref()]) ?>"> - <?= I18N::translate('Remove individual') ?> - </a> - <?php if ($individual->getBirthDate()->isOK()): ?> - <br> - <label> - <input type="checkbox" name="agebar<?= $n ?>" value="ON" onclick="$('#agebox<?= $n ?>').toggle();"> - <?= /* I18N: an age indicator, which can be dragged around the screen */ I18N::translate('Show an age cursor') ?> - </label> - <?php endif ?> - </div> - <?php endforeach ?> + <?php foreach ($individuals as $n => $individual) : ?> + <div class="col-md-6 col-lg-4 col-xl-3 person<?= $n % 6 ?>"> + <?= $individual->getSexImage('large'); ?> + <a href="<?= e($individual->url()) ?>"> + <?= $individual->getFullName() ?> + <?php if ($individual->getAddName() !== '') : ?> + <br> + <?= $individual->getAddName() ?> + <?php endif ?> + </a> + <a href="<?= e($remove_urls[$individual->getXref()]) ?>"> + <?= I18N::translate('Remove individual') ?> + </a> + <?php if ($individual->getBirthDate()->isOK()) : ?> + <br> + <label> + <input type="checkbox" name="agebar<?= $n ?>" value="ON" onclick="$('#agebox<?= $n ?>').toggle();"> + <?= /* I18N: an age indicator, which can be dragged around the screen */ I18N::translate('Show an age cursor') ?> + </label> + <?php endif ?> + </div> + <?php endforeach ?> </div> <div class="wt-ajax-load wt-page-content wt-chart wt-timeline-chart" data-ajax-url="<?= e($chart_url) ?>"></div> diff --git a/resources/views/tree-page-block.php b/resources/views/tree-page-block.php index dcc1d842a2..5f9f973758 100644 --- a/resources/views/tree-page-block.php +++ b/resources/views/tree-page-block.php @@ -1,6 +1,6 @@ -<?php if ($block->loadAjax()): ?> - <div class="wt-ajax-load" data-ajax-url="<?= e(route('tree-page-block', ['ged' => $tree->getName(), 'block_id' => $block_id])) ?>"> - </div> -<?php else: ?> - <?= $block->getBlock($tree, $block_id) ?> +<?php if ($block->loadAjax()) : ?> + <div class="wt-ajax-load" data-ajax-url="<?= e(route('tree-page-block', ['ged' => $tree->getName(), 'block_id' => $block_id])) ?>"> + </div> +<?php else : ?> + <?= $block->getBlock($tree, $block_id) ?> <?php endif ?> diff --git a/resources/views/tree-page.php b/resources/views/tree-page.php index ae5eb038ef..06a4721c58 100644 --- a/resources/views/tree-page.php +++ b/resources/views/tree-page.php @@ -1,20 +1,20 @@ <div class="row"> - <?php if (empty($main_blocks) || empty($side_blocks)): ?> - <div class="col-md-12 wt-main-blocks"> - <?php foreach ($main_blocks + $side_blocks as $block_id => $block): ?> - <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> - <?php endforeach ?> - </div> - <?php else: ?> - <div class="col-md-8 wt-main-blocks"> - <?php foreach ($main_blocks as $block_id => $block): ?> - <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> - <?php endforeach ?> - </div> - <div class="col-md-4 wt-side-blocks"> - <?php foreach ($side_blocks as $block_id => $block): ?> - <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> - <?php endforeach ?> - </div> - <?php endif ?> + <?php if (empty($main_blocks) || empty($side_blocks)) : ?> + <div class="col-md-12 wt-main-blocks"> + <?php foreach ($main_blocks + $side_blocks as $block_id => $block) : ?> + <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> + <?php endforeach ?> + </div> + <?php else : ?> + <div class="col-md-8 wt-main-blocks"> + <?php foreach ($main_blocks as $block_id => $block) : ?> + <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> + <?php endforeach ?> + </div> + <div class="col-md-4 wt-side-blocks"> + <?php foreach ($side_blocks as $block_id => $block) : ?> + <?= view('tree-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> + <?php endforeach ?> + </div> + <?php endif ?> </div> diff --git a/resources/views/user-page-block.php b/resources/views/user-page-block.php index 837e78e896..51e8838bbc 100644 --- a/resources/views/user-page-block.php +++ b/resources/views/user-page-block.php @@ -1,6 +1,6 @@ -<?php if ($block->loadAjax()): ?> - <div class="wt-ajax-load" data-ajax-url="<?= e(route('user-page-block', ['ged' => $tree->getName(), 'block_id' => $block_id])) ?>"> - </div> -<?php else: ?> - <?= $block->getBlock($tree, $block_id) ?> +<?php if ($block->loadAjax()) : ?> + <div class="wt-ajax-load" data-ajax-url="<?= e(route('user-page-block', ['ged' => $tree->getName(), 'block_id' => $block_id])) ?>"> + </div> +<?php else : ?> + <?= $block->getBlock($tree, $block_id) ?> <?php endif ?> diff --git a/resources/views/user-page.php b/resources/views/user-page.php index fdab393e95..c227d363d2 100644 --- a/resources/views/user-page.php +++ b/resources/views/user-page.php @@ -1,24 +1,24 @@ <h2 class="text-center"> - <?= $title ?> + <?= $title ?> </h2> <div class="row"> - <?php if (empty($main_blocks) || empty($side_blocks)): ?> - <div class="col-md-12 wt-main-blocks"> - <?php foreach ($main_blocks + $side_blocks as $block_id => $block): ?> - <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> - <?php endforeach ?> - </div> - <?php else: ?> - <div class="col-md-8 wt-main-blocks"> - <?php foreach ($main_blocks as $block_id => $block): ?> - <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> - <?php endforeach ?> - </div> - <div class="col-md-4 wt-side-blocks"> - <?php foreach ($side_blocks as $block_id => $block): ?> - <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> - <?php endforeach ?> - </div> - <?php endif ?> + <?php if (empty($main_blocks) || empty($side_blocks)) : ?> + <div class="col-md-12 wt-main-blocks"> + <?php foreach ($main_blocks + $side_blocks as $block_id => $block) : ?> + <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> + <?php endforeach ?> + </div> + <?php else : ?> + <div class="col-md-8 wt-main-blocks"> + <?php foreach ($main_blocks as $block_id => $block) : ?> + <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> + <?php endforeach ?> + </div> + <div class="col-md-4 wt-side-blocks"> + <?php foreach ($side_blocks as $block_id => $block) : ?> + <?= view('user-page-block', ['block_id' => $block_id, 'block' => $block, 'tree' => $tree]) ?> + <?php endforeach ?> + </div> + <?php endif ?> </div> diff --git a/resources/views/verify-failure-page.php b/resources/views/verify-failure-page.php index 1e245d58ef..905f354c0e 100644 --- a/resources/views/verify-failure-page.php +++ b/resources/views/verify-failure-page.php @@ -1,11 +1,11 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <div class="wt-page-content"> - <p> - <?= I18N::translate('Could not verify the information you entered. Please try again or contact the site administrator for more information.') ?> - </p> + <p> + <?= I18N::translate('Could not verify the information you entered. Please try again or contact the site administrator for more information.') ?> + </p> </div> diff --git a/resources/views/verify-success-page.php b/resources/views/verify-success-page.php index 70a4f438be..0004319ab0 100644 --- a/resources/views/verify-success-page.php +++ b/resources/views/verify-success-page.php @@ -1,14 +1,14 @@ <?php use Fisharebest\Webtrees\I18N; ?> <h2 class="wt-page-title"> - <?= $title ?> + <?= $title ?> </h2> <div class="wt-page-content"> - <p> - <?= I18N::translate('You have confirmed your request to become a registered user.') ?> - </p> - <p> - <?= I18N::translate('The administrator has been informed. As soon as they give you permission to sign in, you can sign in with your username and password.') ?> - </p> + <p> + <?= I18N::translate('You have confirmed your request to become a registered user.') ?> + </p> + <p> + <?= I18N::translate('The administrator has been informed. As soon as they give you permission to sign in, you can sign in with your username and password.') ?> + </p> </div> |
