summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2015-07-27 17:14:41 +0200
committerPhilip Häusler <msquare@notrademark.de>2015-07-27 17:14:41 +0200
commit6376b90e9f7527f85542b4835fc56c4c9afb5604 (patch)
treee6fc60dcc9cfc7860d9ed5643e4a16efd11bad01
parent8f13613c9c9fcae071b451b84fd229e5b83b0cfc (diff)
introduce table buttons to angeltype view
-rw-r--r--includes/view/AngelTypes_view.php20
1 files 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(
- '<a href="' . page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $member['user_angeltype_id'] . '" class="ok">' . _("confirm") . '</a>',
- '<a href="' . page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'] . '" class="cancel">' . _("deny") . '</a>'
- ));
+ $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'] = '<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
$member['actions'] = '';
$coordinators[] = $member;
} else {
if ($admin_user_angeltypes)
- $member['actions'] = join(" ", array(
- $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>' : '',
- '<a href="' . page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $member['user_angeltype_id'] . '" class="cancel">' . _("remove") . '</a>'
- ));
+ $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;
}
}