1040e7dbaSGreg Roach<?php 2040e7dbaSGreg Roach 396aa0555SGreg Roachuse Fisharebest\Webtrees\Auth; 4*6fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteUser; 52627f99aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\HomePage; 6b4144a6dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Masquerade; 7040e7dbaSGreg Roachuse Fisharebest\Webtrees\I18N; 896aa0555SGreg Roachuse Fisharebest\Webtrees\User; 996aa0555SGreg Roach 1096aa0555SGreg Roach/** 1196aa0555SGreg Roach * @var stdClass $row 1296aa0555SGreg Roach * @var User $self 1396aa0555SGreg Roach * @var User $user 1496aa0555SGreg Roach */ 15040e7dbaSGreg Roach 16040e7dbaSGreg Roach?> 17040e7dbaSGreg Roach 18040e7dbaSGreg Roach<div class="dropdown"> 19040e7dbaSGreg Roach <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" id="edit-user-button-<?= $row->user_id ?>" aria-haspopup="true" aria-expanded="false"> 20040e7dbaSGreg Roach <?= view('icons/menu') ?> 21040e7dbaSGreg Roach </button> 22040e7dbaSGreg Roach <div class="dropdown-menu" aria-labelledby="edit-user-button-<?= $row->user_id ?>"> 23040e7dbaSGreg Roach <div class="dropdown-item"> 24040e7dbaSGreg Roach <?= view('icons/edit') ?> 25040e7dbaSGreg Roach <a href="<?= e(route('admin-users-edit', ['user_id' => $row->user_id])) ?>"> 26040e7dbaSGreg Roach <?= I18N::translate('Edit') ?> 27040e7dbaSGreg Roach </a> 28040e7dbaSGreg Roach </div> 29040e7dbaSGreg Roach 30040e7dbaSGreg Roach <div class="divider"></div> 31040e7dbaSGreg Roach 3296aa0555SGreg Roach <?php if ($user->id() !== $self->id()) : ?> 33040e7dbaSGreg Roach <div class="dropdown-item"> 34040e7dbaSGreg Roach <?= view('icons/user') ?> 352627f99aSGreg Roach <a href="#" data-post-url="<?= e(route(Masquerade::class, ['user_id' => $row->user_id])) ?>" data-reload-url="<?= e(route(HomePage::class)) ?>"> 36040e7dbaSGreg Roach <?= I18N::translate('Masquerade as this user') ?> 37040e7dbaSGreg Roach </a> 38040e7dbaSGreg Roach </div> 39040e7dbaSGreg Roach 4096aa0555SGreg Roach <?php if (!Auth::isAdmin($user)) : ?> 41040e7dbaSGreg Roach <div class="dropdown-item"> 42040e7dbaSGreg Roach <?= view('icons/delete') ?> 43*6fd01894SGreg Roach <a href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($row->user_name)) ?>" data-post-url="<?= e(route(DeleteUser::class, ['user_id' => $row->user_id])) ?>"> 44040e7dbaSGreg Roach <?= I18N::translate('Delete') ?> 45040e7dbaSGreg Roach </a> 46040e7dbaSGreg Roach </div> 47040e7dbaSGreg Roach <?php endif ?> 4896aa0555SGreg Roach <?php endif ?> 49040e7dbaSGreg Roach </div> 50040e7dbaSGreg Roach</div> 51