diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-01-18 09:07:34 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-01-18 09:07:34 +0000 |
| commit | ba7c3e26ff663c2e583d184a239141932e62a3f8 (patch) | |
| tree | ed5b411c9641634381ea02f77a56eb5213794591 /resources | |
| parent | 9cda3358cd19b6360510e506ea6bc78aabcc768b (diff) | |
| download | webtrees-ba7c3e26ff663c2e583d184a239141932e62a3f8.tar.gz webtrees-ba7c3e26ff663c2e583d184a239141932e62a3f8.tar.bz2 webtrees-ba7c3e26ff663c2e583d184a239141932e62a3f8.zip | |
Do not show accept/reject all buttons when there are no more pending changes
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/views/pending-changes-page.phtml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/views/pending-changes-page.phtml b/resources/views/pending-changes-page.phtml index 5650e06b71..494f27123d 100644 --- a/resources/views/pending-changes-page.phtml +++ b/resources/views/pending-changes-page.phtml @@ -95,12 +95,14 @@ use Fisharebest\Webtrees\Tree; </table> <?php endforeach ?> -<div class="d-flex justify-content-between"> - <button type="button" class="btn btn-primary" data-post-url="<?= e(route(PendingChangesAcceptTree::class, ['tree' => $tree->name(), 'n' => count($changes)])) ?>"> - <?= I18N::translate('Accept all changes') ?> - </button> +<?php if ($changes !== []) : ?> + <div class="d-flex justify-content-between"> + <button type="button" class="btn btn-primary" data-post-url="<?= e(route(PendingChangesAcceptTree::class, ['tree' => $tree->name(), 'n' => count($changes)])) ?>"> + <?= I18N::translate('Accept all changes') ?> + </button> - <button type="button" class="btn btn-secondary" data-post-url="<?= e(route(PendingChangesRejectTree::class, ['tree' => $tree->name()])) ?>" data-confirm="<?= I18N::translate('Are you sure you want to reject all the changes to this family tree?') ?>"> - <?= I18N::translate('Reject all changes') ?> - </button> -</div> + <button type="button" class="btn btn-secondary" data-post-url="<?= e(route(PendingChangesRejectTree::class, ['tree' => $tree->name()])) ?>" data-confirm="<?= I18N::translate('Are you sure you want to reject all the changes to this family tree?') ?>"> + <?= I18N::translate('Reject all changes') ?> + </button> + </div> +<?php endif ?> |
