From 191ba6e1b14b94a3a46c16ca488f388c82120bad Mon Sep 17 00:00:00 2001 From: Felix Favre Date: Sat, 6 Dec 2014 18:16:18 +0100 Subject: replace all the remaining old icons with glyphicons --- includes/view/AngelTypes_view.php | 80 +++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'includes/view') diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index 2058ec0a..c6f5becf 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -15,17 +15,17 @@ function AngelType_render_membership($user_angeltype) { if ($user_angeltype['user_angeltype_id'] != null) { if ($user_angeltype['restricted']) { if ($user_angeltype['confirm_user_id'] == null) - $membership = '' . _( ' . _("Unconfirmed"); + $membership = glyph('lock') . _("Unconfirmed"); elseif ($user_angeltype['coordinator']) - $membership = '' . _( ' . _("Coordinator"); + $membership = glyph_bool(true) . _("Coordinator"); else - $membership = '' . _( ' . _("Member"); + $membership = glyph_bool(true) . _("Member"); } elseif ($user_angeltype['coordinator']) - $membership = '' . _( ' . _("Coordinator"); + $membership = glyph_bool(true) . _("Coordinator"); else - $membership = '' . _( ' . _("Member"); + $membership = glyph_bool(true) . _("Member"); } else { - $membership = ''; + $membership = glyph_bool(false); } return $membership; } @@ -35,15 +35,15 @@ function AngelType_delete_view($angeltype) { info(sprintf(_("Do you want to delete angeltype %s?"), $angeltype['name']), true), buttons(array( button(page_link_to('angeltypes'), _("cancel"), 'cancel'), - button(page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'] . '&confirmed', _("delete"), 'ok') - )) + button(page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'] . '&confirmed', _("delete"), 'ok') + )) )); } function AngelType_edit_view($name, $restricted, $description, $coordinator_mode) { return page_with_title(sprintf(_("Edit %s"), $name), array( buttons(array( - button(page_link_to('angeltypes'), _("Angeltypes"), 'back') + button(page_link_to('angeltypes'), _("Angeltypes"), 'back') )), msg(), form(array( @@ -52,16 +52,16 @@ function AngelType_edit_view($name, $restricted, $description, $coordinator_mode form_info("", _("Restricted angel types can only be used by an angel if enabled by an archangel (double opt-in).")), form_textarea('description', _("Description"), $description), form_info("", _("Please use markdown for the description.")), - form_submit('submit', _("Save")) - )) + form_submit('submit', _("Save")) + )) )); } function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angeltypes, $admin_angeltypes, $coordinator) { $buttons = array( - button(page_link_to('angeltypes'), _("Angeltypes"), 'back') + button(page_link_to('angeltypes'), _("Angeltypes"), 'back') ); - + if ($user_angeltype == null) $buttons[] = button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("join"), 'add'); else { @@ -69,24 +69,24 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel error(sprintf(_("You are unconfirmed for this angeltype. Please go to the introduction for %s to get confirmed."), $angeltype['name'])); $buttons[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $user_angeltype['id'], _("leave"), 'cancel'); } - + if ($admin_angeltypes || $coordinator) $buttons[] = button(page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'], _("edit"), 'edit'); if ($admin_angeltypes) $buttons[] = button(page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'], _("delete"), 'delete'); - + $page = array( msg(), - buttons($buttons) + buttons($buttons) ); - + $page[] = '

' . _("Description") . '

'; $parsedown = new Parsedown(); if ($angeltype['description'] != "") $page[] = '
' . $parsedown->parse($angeltype['description']) . '
'; - + // Team-Coordinators list missing - + $coordinators = array(); $members_confirmed = array(); $members_unconfirmed = array(); @@ -95,7 +95,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel if ($angeltype['restricted'] && $member['confirm_user_id'] == null) { $member['actions'] = join(" ", array( '' . _("confirm") . '', - '' . _("deny") . '' + '' . _("deny") . '' )); $members_unconfirmed[] = $member; } elseif ($member['coordinator']) { @@ -108,7 +108,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel if ($admin_user_angeltypes) $member['actions'] = join(" ", array( $admin_angeltypes ? '' . _("Add coordinator rights") . '' : '', - '' . _("remove") . '' + '' . _("remove") . '' )); $members_confirmed[] = $member; } @@ -118,74 +118,74 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel $page[] = table(array( 'Nick' => _("Nick"), 'DECT' => _("DECT"), - 'actions' => "" + 'actions' => "" ), $coordinators); } $page[] = '

' . _("Members") . '

'; if ($admin_user_angeltypes) $page[] = buttons(array( - button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("Add"), 'add') + button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("Add"), 'add') )); $page[] = table(array( 'Nick' => _("Nick"), 'DECT' => _("DECT"), - 'actions' => "" + 'actions' => "" ), $members_confirmed); - + if ($admin_user_angeltypes && $angeltype['restricted'] && count($members_unconfirmed) > 0) { $page[] = '

' . _("Unconfirmed") . '

'; $page[] = buttons(array( button(page_link_to('user_angeltypes') . '&action=confirm_all&angeltype_id=' . $angeltype['id'], _("confirm all"), 'ok'), - button(page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'], _("deny all"), 'cancel') + button(page_link_to('user_angeltypes') . '&action=delete_all&angeltype_id=' . $angeltype['id'], _("deny all"), 'cancel') )); $page[] = table(array( 'Nick' => _("Nick"), 'DECT' => _("DECT"), - 'actions' => "" + 'actions' => "" ), $members_unconfirmed); } - + return page_with_title(sprintf(_("Team %s"), $angeltype['name']), $page); } /** * Display the list of angeltypes. * - * @param array $angeltypes + * @param array $angeltypes */ function AngelTypes_list_view($angeltypes, $admin_angeltypes) { return page_with_title(angeltypes_title(), array( msg(), buttons(array( $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _("New angeltype"), 'add') : '', - button(page_link_to('angeltypes') . '&action=about', _("Teams/Job description")) + button(page_link_to('angeltypes') . '&action=about', _("Teams/Job description")) )), table(array( 'name' => _("Name"), - 'restricted' => '' . _(', + 'restricted' => glyph('lock') . _("Restricted"), 'membership' => _("Membership"), - 'actions' => "" - ), $angeltypes) + 'actions' => "" + ), $angeltypes) )); } function AngelTypes_about_view($angeltypes, $user_logged_in) { global $faq_url; - + $content = array( buttons(array( ! $user_logged_in ? button(page_link_to('register'), register_title()) : '', ! $user_logged_in ? button(page_link_to('login'), login_title()) : '', $user_logged_in ? button(page_link_to('angeltypes'), angeltypes_title(), 'back') : '', - button($faq_url, _("FAQ")) + button($faq_url, _("FAQ")) )), '

' . _("Here is the list of teams and their tasks. If you have questions, read the FAQ.") . '

', - '
' + '
' ); $parsedown = new Parsedown(); foreach ($angeltypes as $angeltype) { $content[] = '

' . $angeltype['name'] . '

'; - + if (isset($angeltype['user_angeltype_id'])) { $buttons = array(); if ($angeltype['user_angeltype_id'] != null) @@ -194,15 +194,15 @@ function AngelTypes_about_view($angeltypes, $user_logged_in) { $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); if ($angeltype['description'] != "") $content[] = '
' . $parsedown->parse($angeltype['description']) . '
'; $content[] = '
'; } - + return page_with_title(_("Teams/Job description"), $content); } -?> \ No newline at end of file +?> -- cgit v1.2.3-54-g00ecf