1040e7dbaSGreg Roach<?php 2040e7dbaSGreg Roach 396aa0555SGreg Roachuse Fisharebest\Webtrees\Auth; 46fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteUser; 52627f99aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\HomePage; 6b4144a6dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Masquerade; 74c3563c0SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserEditPage; 8040e7dbaSGreg Roachuse Fisharebest\Webtrees\I18N; 996aa0555SGreg Roachuse Fisharebest\Webtrees\User; 1096aa0555SGreg Roach 1196aa0555SGreg Roach/** 1296aa0555SGreg Roach * @var stdClass $row 1396aa0555SGreg Roach * @var User $self 1496aa0555SGreg Roach * @var User $user 1596aa0555SGreg Roach */ 16040e7dbaSGreg Roach 17040e7dbaSGreg Roach?> 18040e7dbaSGreg Roach 19040e7dbaSGreg Roach<div class="dropdown"> 20315eb316SGreg Roach <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" id="edit-user-button-<?= $row->user_id ?>" aria-haspopup="true" aria-expanded="false"> 21040e7dbaSGreg Roach <?= view('icons/menu') ?> 22040e7dbaSGreg Roach </button> 23040e7dbaSGreg Roach <div class="dropdown-menu" aria-labelledby="edit-user-button-<?= $row->user_id ?>"> 24040e7dbaSGreg Roach <div class="dropdown-item"> 25040e7dbaSGreg Roach <?= view('icons/edit') ?> 264c3563c0SGreg Roach <a href="<?= e(route(UserEditPage::class, ['user_id' => $row->user_id])) ?>"> 27040e7dbaSGreg Roach <?= I18N::translate('Edit') ?> 28040e7dbaSGreg Roach </a> 29040e7dbaSGreg Roach </div> 30040e7dbaSGreg Roach 31040e7dbaSGreg Roach <div class="divider"></div> 32040e7dbaSGreg Roach 3396aa0555SGreg Roach <?php if ($user->id() !== $self->id()) : ?> 34040e7dbaSGreg Roach <div class="dropdown-item"> 35040e7dbaSGreg Roach <?= view('icons/user') ?> 36*d4786c66SGreg Roach <a href="#" data-wt-post-url="<?= e(route(Masquerade::class, ['user_id' => $row->user_id])) ?>" data-wt-reload-url="<?= e(route(HomePage::class)) ?>"> 37040e7dbaSGreg Roach <?= I18N::translate('Masquerade as this user') ?> 38040e7dbaSGreg Roach </a> 39040e7dbaSGreg Roach </div> 40040e7dbaSGreg Roach 4196aa0555SGreg Roach <?php if (!Auth::isAdmin($user)) : ?> 42040e7dbaSGreg Roach <div class="dropdown-item"> 43040e7dbaSGreg Roach <?= view('icons/delete') ?> 44*d4786c66SGreg Roach <a href="#" data-wt-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($row->user_name)) ?>" data-wt-post-url="<?= e(route(DeleteUser::class, ['user_id' => $row->user_id])) ?>"> 45040e7dbaSGreg Roach <?= I18N::translate('Delete') ?> 46040e7dbaSGreg Roach </a> 47040e7dbaSGreg Roach </div> 48040e7dbaSGreg Roach <?php endif ?> 4996aa0555SGreg Roach <?php endif ?> 50040e7dbaSGreg Roach </div> 51040e7dbaSGreg Roach</div> 52