summaryrefslogtreecommitdiff
path: root/includes/view/UserAngelTypes_view.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-28 16:21:10 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-28 17:34:00 +0200
commit73175e2b64c85c7a8c528c76452cd82ffa99f925 (patch)
tree7464fe30c04fe245424646a98cfd6247d060e517 /includes/view/UserAngelTypes_view.php
parente1762e7764d4ee4f37757ecd2630f62a440dbf0e (diff)
#337: Added routing
Diffstat (limited to 'includes/view/UserAngelTypes_view.php')
-rw-r--r--includes/view/UserAngelTypes_view.php73
1 files changed, 57 insertions, 16 deletions
diff --git a/includes/view/UserAngelTypes_view.php b/includes/view/UserAngelTypes_view.php
index 15d99961..98f6c3e9 100644
--- a/includes/view/UserAngelTypes_view.php
+++ b/includes/view/UserAngelTypes_view.php
@@ -19,12 +19,18 @@ function UserAngelType_update_view($user_angeltype, $user, $angeltype, $supporte
User_Nick_render($user)
), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
- page_link_to('user_angeltypes')
- . '&action=update&user_angeltype_id=' . $user_angeltype['id']
- . '&supporter=' . ($supporter ? '1' : '0')
- . '&confirmed',
+ page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]),
+ _('cancel'),
+ 'cancel'
+ ),
+ button(
+ page_link_to('user_angeltypes', [
+ 'action' => 'update',
+ 'user_angeltype_id' => $user_angeltype['id'],
+ 'supporter' => ($supporter ? '1' : '0'),
+ 'confirmed' => 1,
+ ]),
_('yes'),
'ok'
)
@@ -42,9 +48,19 @@ function UserAngelTypes_delete_all_view($angeltype)
msg(),
info(sprintf(_('Do you really want to deny all users for %s?'), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
- page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'] . '&confirmed',
+ page_link_to(
+ 'angeltypes',
+ ['action' => 'view', 'angeltype_id' => $angeltype['id']]
+ ),
+ _('cancel'),
+ 'cancel'
+ ),
+ button(
+ page_link_to(
+ 'user_angeltypes',
+ ['action' => 'delete_all', 'angeltype_id' => $angeltype['id'], 'confirmed' => 1]
+ ),
_('yes'),
'ok'
)
@@ -62,9 +78,11 @@ function UserAngelTypes_confirm_all_view($angeltype)
msg(),
info(sprintf(_('Do you really want to confirm all users for %s?'), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
+ button(page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]), _('cancel'),
+ 'cancel'),
button(
- page_link_to('user_angeltypes') . '&action=confirm_all&angeltype_id=' . $angeltype['id'] . '&confirmed',
+ page_link_to('user_angeltypes',
+ ['action' => 'confirm_all', 'angeltype_id' => $angeltype['id'], 'confirmed' => 1]),
_('yes'),
'ok'
)
@@ -84,9 +102,16 @@ function UserAngelType_confirm_view($user_angeltype, $user, $angeltype)
msg(),
info(sprintf(_('Do you really want to confirm %s for %s?'), User_Nick_render($user), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
- page_link_to('user_angeltypes') . '&action=confirm&user_angeltype_id=' . $user_angeltype['id'] . '&confirmed',
+ page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]),
+ _('cancel'),
+ 'cancel'
+ ),
+ button(
+ page_link_to(
+ 'user_angeltypes',
+ ['action' => 'confirm', 'user_angeltype_id' => $user_angeltype['id'], 'confirmed' => 1]
+ ),
_('yes'),
'ok'
)
@@ -106,9 +131,14 @@ function UserAngelType_delete_view($user_angeltype, $user, $angeltype)
msg(),
info(sprintf(_('Do you really want to delete %s from %s?'), User_Nick_render($user), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
- page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $user_angeltype['id'] . '&confirmed',
+ page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]),
+ _('cancel'),
+ 'cancel'
+ ),
+ button(
+ page_link_to('user_angeltypes',
+ ['action' => 'delete', 'user_angeltype_id' => $user_angeltype['id'], 'confirmed' => 1]),
_('yes'),
'ok'
)
@@ -132,7 +162,11 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id)
return page_with_title(_('Add user to angeltype'), [
msg(),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('back'), 'back')
+ button(
+ page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]),
+ _('back'),
+ 'back'
+ )
]),
form([
form_info(_('Angeltype'), $angeltype['name']),
@@ -153,9 +187,16 @@ function UserAngelType_join_view($user, $angeltype)
msg(),
info(sprintf(_('Do you really want to add %s to %s?'), User_Nick_render($user), $angeltype['name']), true),
buttons([
- button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _('cancel'), 'cancel'),
button(
- page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'] . '&user_id=' . $user['UID'] . '&confirmed',
+ page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]),
+ _('cancel'),
+ 'cancel'
+ ),
+ button(
+ page_link_to(
+ 'user_angeltypes',
+ ['action' => 'add', 'angeltype_id' => $angeltype['id'], 'user_id' => $user['UID'], 'confirmed' => 1]
+ ),
_('save'),
'ok'
)