From 5e8453992810181facf168d6aaede9d2dcd61dba Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Sun, 5 Jan 2014 19:30:06 +0100 Subject: rewritten angeltypes and user angeltypes --- includes/controller/angeltypes_controller.php | 196 +++++++++++++++ includes/controller/user_angeltypes_controller.php | 272 +++++++++++++++++++++ 2 files changed, 468 insertions(+) create mode 100644 includes/controller/angeltypes_controller.php create mode 100644 includes/controller/user_angeltypes_controller.php (limited to 'includes/controller') diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php new file mode 100644 index 00000000..03c9651d --- /dev/null +++ b/includes/controller/angeltypes_controller.php @@ -0,0 +1,196 @@ +' . _("view") . '' + ); + + if (in_array('admin_angel_types', $privileges)) { + $actions[] = '' . _("edit") . ''; + $actions[] = '' . _("delete") . ''; + } + + $angeltype['membership'] = ""; + if ($angeltype['user_angeltype_id'] != null) { + if ($angeltype['restricted']) { + if ($angeltype['confirm_user_id'] == null) + $angeltype['membership'] = '' . _( ' . _("Unconfirmed"); + else + $angeltype['membership'] = '' . _( ' . _("Member"); + } else + $angeltype['membership'] = '' . _( ' . _("Member"); + $actions[] = '' . _("leave") . ''; + } else { + $angeltype['membership'] = ''; + $actions[] = '' . _("join") . ''; + } + + $angeltype['restricted'] = $angeltype['restricted'] ? '' . _(' : ''; + $angeltype['name'] = '' . $angeltype['name'] . ''; + + $angeltype['actions'] = join(" ", $actions); + } + + return array( + angeltypes_title(), + AngelTypes_list_view($angeltypes, in_array('admin_angel_types', $privileges)) + ); +} +?> \ No newline at end of file diff --git a/includes/controller/user_angeltypes_controller.php b/includes/controller/user_angeltypes_controller.php new file mode 100644 index 00000000..d110f7a7 --- /dev/null +++ b/includes/controller/user_angeltypes_controller.php @@ -0,0 +1,272 @@ + \ No newline at end of file -- cgit v1.2.3-70-g09d2