diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-03-09 16:00:13 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-03-09 16:00:13 +0100 |
commit | ab450600d76f79190b956f7f74cbc6a04ebcdf71 (patch) | |
tree | 892ef48ae03d0c2213108c0e7c82ba6af043658d /includes/view | |
parent | f40b78faace47a564e0efbc613fac85b69ed8b3a (diff) |
better integration of angeltypes about
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/AngelTypes_view.php | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 08305930..b98cb6f5 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -105,9 +105,10 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel function AngelTypes_list_view($angeltypes, $admin_angeltypes) { return page(array( msg(), - $admin_angeltypes ? buttons(array( - button(page_link_to('angeltypes') . '&action=edit', _("New angeltype"), 'add') - )) : '', + buttons(array( + $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _("New angeltype"), 'add') : '', + button(page_link_to('angeltypes') . '&action=about', _("Teams/Job description")) + )), table(array( 'name' => _("Name"), 'restricted' => '<img src="pic/icons/lock.png" alt="' . _("Restricted") . '" title="' . _("Restricted") . '" />', @@ -117,13 +118,30 @@ function AngelTypes_list_view($angeltypes, $admin_angeltypes) { )); } -function AngelTypes_about_view($angeltypes) { +function AngelTypes_about_view($angeltypes, $user_logged_in) { + global $faq_url; + $content = array( - '<p>' . _("Here is the list of teams and their tasks:") . '</p>' + buttons(array( + ! $user_logged_in ? button(page_link_to('register'), register_title()) : '', + ! $user_logged_in ? button(page_link_to('login'), login_title()) : '', + button($faq_url, _("FAQ")) + )), + '<p>' . _("Here is the list of teams and their tasks. If you have questions, read the FAQ.") . '</p>' ); $parsedown = new Parsedown(); foreach ($angeltypes as $angeltype) { $content[] = '<h2>' . $angeltype['name'] . '</h2>'; + + if (isset($angeltype['user_angeltype_id'])) { + $buttons = array(); + if ($angeltype['user_angeltype_id'] != null) + $buttons[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'], _("leave"), 'cancel'); + else + $buttons[] = button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("join"), 'add'); + $content[] = buttons($buttons); + } + if ($angeltype['restricted']) $content[] = info(_("This angeltype is restricted by double-opt-in by a team coordinator. Please show up at the according introduction meetings."), true); $content[] = $parsedown->parse($angeltype['description']); |