From 6376b90e9f7527f85542b4835fc56c4c9afb5604 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Mon, 27 Jul 2015 17:14:41 +0200 Subject: introduce table buttons to angeltype view --- includes/view/AngelTypes_view.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 697c750f..ce38a096 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -103,23 +103,25 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel foreach ($members as $member) { $member['Nick'] = User_Nick_render($member); if ($angeltype['restricted'] && $member['confirm_user_id'] == null) { - $member['actions'] = join(" ", array( - '' . _("confirm") . '', - '' . _("deny") . '' - )); + $member['actions'] = table_buttons([ + button(page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'], _("confirm"), 'btn-xs'), + button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], _("deny"), 'btn-xs') + ]); $members_unconfirmed[] = $member; } elseif ($member['coordinator']) { if ($admin_angeltypes) - $member['actions'] = '' . _("Remove coordinator rights") . ''; + $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 $member['actions'] = ''; $coordinators[] = $member; } else { if ($admin_user_angeltypes) - $member['actions'] = join(" ", array( - $admin_angeltypes ? '' . _("Add coordinator rights") . '' : '', - '' . _("remove") . '' - )); + $member['actions'] = table_buttons([ + $admin_angeltypes ? button(page_link_to('user_angeltypes') . '&action=update&user_angeltype_id=' . $member['user_angeltype_id'] . '&coordinator=1', _("Add coordinator rights"), 'btn-xs') : '', + button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'], _("remove"), 'btn-xs') + ]); $members_confirmed[] = $member; } } -- cgit v1.2.3-70-g09d2