introduce table buttons to angeltype view
This commit is contained in:
parent
8f13613c9c
commit
6376b90e9f
|
@ -103,23 +103,25 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel
|
||||||
foreach ($members as $member) {
|
foreach ($members as $member) {
|
||||||
$member['Nick'] = User_Nick_render($member);
|
$member['Nick'] = User_Nick_render($member);
|
||||||
if ($angeltype['restricted'] && $member['confirm_user_id'] == null) {
|
if ($angeltype['restricted'] && $member['confirm_user_id'] == null) {
|
||||||
$member['actions'] = join(" ", array(
|
$member['actions'] = table_buttons([
|
||||||
'<a href="' . page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'] . '" class="ok">' . _("confirm") . '</a>',
|
button(page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'], _("confirm"), 'btn-xs'),
|
||||||
'<a href="' . page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'] . '" class="cancel">' . _("deny") . '</a>'
|
button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], _("deny"), 'btn-xs')
|
||||||
));
|
]);
|
||||||
$members_unconfirmed[] = $member;
|
$members_unconfirmed[] = $member;
|
||||||
} elseif ($member['coordinator']) {
|
} elseif ($member['coordinator']) {
|
||||||
if ($admin_angeltypes)
|
if ($admin_angeltypes)
|
||||||
$member['actions'] = '<a href="' . page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&coordinator=0" class="cancel">' . _("Remove coordinator rights") . '</a>';
|
$member['actions'] = table_buttons([
|
||||||
|
button(page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&coordinator=0', _("Remove coordinator rights"), 'btn-xs')
|
||||||
|
]);
|
||||||
else
|
else
|
||||||
$member['actions'] = '';
|
$member['actions'] = '';
|
||||||
$coordinators[] = $member;
|
$coordinators[] = $member;
|
||||||
} else {
|
} else {
|
||||||
if ($admin_user_angeltypes)
|
if ($admin_user_angeltypes)
|
||||||
$member['actions'] = join(" ", array(
|
$member['actions'] = table_buttons([
|
||||||
$admin_angeltypes ? '<a href="' . page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&coordinator=1" class="add">' . _("Add coordinator rights") . '</a>' : '',
|
$admin_angeltypes ? button(page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&coordinator=1', _("Add coordinator rights"), 'btn-xs') : '',
|
||||||
'<a href="' . page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'] . '" class="cancel">' . _("remove") . '</a>'
|
button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], _("remove"), 'btn-xs')
|
||||||
));
|
]);
|
||||||
$members_confirmed[] = $member;
|
$members_confirmed[] = $member;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue