From c57e450ed252837eff3f7913fa46c168bd645392 Mon Sep 17 00:00:00 2001 From: Felix Favre Date: Sat, 23 Aug 2014 16:25:51 +0200 Subject: Changed Angeltypes List Actions to Bootstrap Button Group --- includes/controller/angeltypes_controller.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index ba0d65d9..93c0e6bf 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -201,25 +201,31 @@ function angeltypes_list_controller() { foreach ($angeltypes as &$angeltype) { $actions = array( - '' . _("view") . '' + button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'],_("view"),"btn-xs") + //'' . _("view") . '' ); if (in_array('admin_angel_types', $privileges)) { - $actions[] = '' . _("edit") . ''; - $actions[] = '' . _("delete") . ''; + $actions[] = button(page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'], _("edit"), "btn-xs"); + $actions[] = button(page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'], _("delete"), "btn-xs"); + + //$actions[] = '' . _("edit") . ''; + //$actions[] = '' . _("delete") . ''; } $angeltype['membership'] = AngelType_render_membership($angeltype); if ($angeltype['user_angeltype_id'] != null) { - $actions[] = '' . _("leave") . ''; + //$actions[] = '' . _("leave") . ''; + $actions[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'], _("leave"), "btn-xs"); } else { - $actions[] = '' . _("join") . ''; + $actions[] = button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("join"), "btn-xs"); + //$actions[] = '' . _("join") . ''; } $angeltype['restricted'] = $angeltype['restricted'] ? '' . _(' : ''; $angeltype['name'] = '' . $angeltype['name'] . ''; - $angeltype['actions'] = join(" ", $actions); + $angeltype['actions'] = buttons($actions); } return array( -- cgit v1.2.3-54-g00ecf