1*22e73debSGreg Roach<?php 2*22e73debSGreg Roach 3*22e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptChange; 4*22e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptTree; 5*22e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectChange; 6*22e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectTree; 7*22e73debSGreg Roachuse Fisharebest\Webtrees\I18N; 8*22e73debSGreg Roachuse Fisharebest\Webtrees\Tree; 9*22e73debSGreg Roach 10*22e73debSGreg Roach?> 11dd6b2bfcSGreg Roach 12dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 13dd6b2bfcSGreg Roach <?= $title ?> 14dd6b2bfcSGreg Roach</h2> 15dd6b2bfcSGreg Roach 1654c1ab5eSGreg Roach<?php if ($changes === []) : ?> 17dd6b2bfcSGreg Roach <p> 18dd6b2bfcSGreg Roach <?= I18N::translate('There are no pending changes.') ?> 19dd6b2bfcSGreg Roach </p> 20dd6b2bfcSGreg Roach <p> 21dd6b2bfcSGreg Roach <a class="btn btn-primary" href="<?= e($url) ?>"> 22dd6b2bfcSGreg Roach <?= I18N::translate('continue') ?> 23dd6b2bfcSGreg Roach </a> 24dd6b2bfcSGreg Roach </p> 25dd6b2bfcSGreg Roach<?php endif ?> 26dd6b2bfcSGreg Roach 27dd6b2bfcSGreg Roach<ul class="nav nav-tabs" role="tablist"> 28dd6b2bfcSGreg Roach <?php foreach ($changes as $tree_id => $gedcom_changes) : ?> 29dd6b2bfcSGreg Roach <li class="nav-item"> 30dd6b2bfcSGreg Roach <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"> 31cc13d6d8SGreg Roach <?= e(Tree::findById($tree_id)->title()) ?> 32dd6b2bfcSGreg Roach <span class="badge badge-secondary"> 33dd6b2bfcSGreg Roach <?= I18N::number(count($gedcom_changes)) ?> 34dd6b2bfcSGreg Roach </span> 35dd6b2bfcSGreg Roach </a> 36dd6b2bfcSGreg Roach </li> 37dd6b2bfcSGreg Roach <?php endforeach ?> 38dd6b2bfcSGreg Roach</ul> 39dd6b2bfcSGreg Roach 40dd6b2bfcSGreg Roach<div class="tab-content"> 41dd6b2bfcSGreg Roach <?php foreach ($changes as $tree_id => $gedcom_changes) : ?> 42dd6b2bfcSGreg Roach <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"> 43dd6b2bfcSGreg Roach <?php foreach ($gedcom_changes as $xref => $record_changes) : ?> 44dd6b2bfcSGreg Roach <h3 class="pt-2"> 4539ca88baSGreg Roach <a href="<?= e($record_changes[0]->record->url()) ?>"><?= $record_changes[0]->record->fullName() ?></a> 46dd6b2bfcSGreg Roach </h3> 47dd6b2bfcSGreg Roach 48dd6b2bfcSGreg Roach <table class="table table-bordered table-sm"> 49dd6b2bfcSGreg Roach <thead class="thead-default"> 50dd6b2bfcSGreg Roach <tr> 51dd6b2bfcSGreg Roach <th><?= I18N::translate('Accept') ?></th> 52dd6b2bfcSGreg Roach <th><?= I18N::translate('Changes') ?></th> 53dd6b2bfcSGreg Roach <th><?= I18N::translate('User') ?></th> 54dd6b2bfcSGreg Roach <th><?= I18N::translate('Date') ?></th> 55dd6b2bfcSGreg Roach <th><?= I18N::translate('Reject') ?></th> 56dd6b2bfcSGreg Roach </tr> 57dd6b2bfcSGreg Roach </thead> 58dd6b2bfcSGreg Roach <tbody> 59dd6b2bfcSGreg Roach <?php foreach ($record_changes as $record_change) : ?> 60dd6b2bfcSGreg Roach <tr> 61dd6b2bfcSGreg Roach <td> 62*22e73debSGreg Roach <a class="btn btn-primary" href="#" data-post-url="<?= e(route(PendingChangesAcceptChange::class, ['tree' => $record_change->gedcom_name, 'xref' => $record_change->xref, 'change' => $record_change->change_id])) ?>"> 63dd6b2bfcSGreg Roach <?= I18N::translate('Accept') ?> 64*22e73debSGreg Roach </a> 65dd6b2bfcSGreg Roach </td> 66*22e73debSGreg Roach 67dd6b2bfcSGreg Roach <td> 6830158ae7SGreg Roach <?php foreach ($record_change->record->facts() as $fact) : ?> 69dd6b2bfcSGreg Roach <?php if ($fact->getTag() !== 'CHAN' && $fact->isPendingAddition()) : ?> 70dd6b2bfcSGreg Roach <div class="new"> 71dd6b2bfcSGreg Roach <?= strip_tags($fact->summary()) ?> 72dd6b2bfcSGreg Roach </div> 73dd6b2bfcSGreg Roach <?php elseif ($fact->getTag() !== 'CHAN' && $fact->isPendingDeletion()) : ?> 74dd6b2bfcSGreg Roach <div class="old"> 75dd6b2bfcSGreg Roach <?= strip_tags($fact->summary()) ?> 76dd6b2bfcSGreg Roach </div> 77dd6b2bfcSGreg Roach <?php endif ?> 78dd6b2bfcSGreg Roach <?php endforeach ?> 79dd6b2bfcSGreg Roach </td> 80*22e73debSGreg Roach 81dd6b2bfcSGreg Roach <td> 82d72b284aSGreg Roach <a href="<?= e(route('message', ['to' => $record_change->user_name, 'subject' => I18N::translate('Pending changes') . ' - ' . strip_tags($record_change->record->fullName()), 'body' => $record_change->record->url(), 'tree' => $record_change->gedcom_name])) ?>" title="<?= I18N::translate('Send a message') ?>"> 83dd6b2bfcSGreg Roach <?= e($record_change->real_name) ?> - <?= e($record_change->user_name) ?> 84dd6b2bfcSGreg Roach </a> 85dd6b2bfcSGreg Roach </td> 86*22e73debSGreg Roach 87dd6b2bfcSGreg Roach <td> 884459dc9aSGreg Roach <?= view('components/datetime', ['timestamp' => $record_change->change_time]) ?> 89dd6b2bfcSGreg Roach </td> 90*22e73debSGreg Roach 91dd6b2bfcSGreg Roach <td> 92*22e73debSGreg Roach <a class="btn btn-secondary" href="#" data-post-url="<?= e(route(PendingChangesRejectChange::class, ['tree' => $record_change->gedcom_name, 'xref' => $record_change->xref, 'change' => $record_change->change_id])) ?>"> 93dd6b2bfcSGreg Roach <?= I18N::translate('Reject') ?> 94*22e73debSGreg Roach </a> 95dd6b2bfcSGreg Roach </td> 96dd6b2bfcSGreg Roach </tr> 97dd6b2bfcSGreg Roach <?php endforeach ?> 98dd6b2bfcSGreg Roach </tbody> 99dd6b2bfcSGreg Roach </table> 100dd6b2bfcSGreg Roach <?php endforeach ?> 101dd6b2bfcSGreg Roach 102dd6b2bfcSGreg Roach <div class="d-flex justify-content-between"> 103*22e73debSGreg Roach <a class="btn btn-primary" href="#" data-post-url="<?= e(route(PendingChangesAcceptTree::class, ['tree' => $tree->name()])) ?>"> 104dd6b2bfcSGreg Roach <?= I18N::translate('Accept all changes') ?> 105*22e73debSGreg Roach </a> 106dd6b2bfcSGreg Roach 107*22e73debSGreg Roach <a class="btn btn-secondary" href="#" 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?') ?>"> 108dd6b2bfcSGreg Roach <?= I18N::translate('Reject all changes') ?> 109*22e73debSGreg Roach </a> 110dd6b2bfcSGreg Roach </div> 111dd6b2bfcSGreg Roach </div> 112dd6b2bfcSGreg Roach <?php endforeach ?> 113dd6b2bfcSGreg Roach</div> 114