diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-08-22 22:34:13 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-08-22 22:34:13 +0200 |
commit | 74647e16d37fac9425a4561b49618b52cdc3e75c (patch) | |
tree | 7bfd868f8ef2646e65ffd8dbdf63dd8bf91723e3 /includes/view | |
parent | 721aa7f160db36e53d03081bbda73970b702eeb7 (diff) |
add basic bootstrap theme
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/AngelTypes_view.php | 24 | ||||
-rw-r--r-- | includes/view/Questions_view.php | 2 | ||||
-rw-r--r-- | includes/view/ShiftEntry_view.php | 4 | ||||
-rw-r--r-- | includes/view/UserAngelTypes_view.php | 14 | ||||
-rw-r--r-- | includes/view/User_view.php | 11 |
5 files changed, 32 insertions, 23 deletions
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index fd1ab6e8..2058ec0a 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -31,7 +31,7 @@ function AngelType_render_membership($user_angeltype) { } function AngelType_delete_view($angeltype) { - return page(array( + return page_with_title(sprintf(_("Delete angeltype %s"), $angeltype['name']), array( info(sprintf(_("Do you want to delete angeltype %s?"), $angeltype['name']), true), buttons(array( button(page_link_to('angeltypes'), _("cancel"), 'cancel'), @@ -41,7 +41,7 @@ function AngelType_delete_view($angeltype) { } function AngelType_edit_view($name, $restricted, $description, $coordinator_mode) { - return page(array( + return page_with_title(sprintf(_("Edit %s"), $name), array( buttons(array( button(page_link_to('angeltypes'), _("Angeltypes"), 'back') )), @@ -82,9 +82,10 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel $page[] = '<h3>' . _("Description") . '</h3>'; $parsedown = new Parsedown(); - $page[] = $parsedown->parse($angeltype['description']); - - // Team-Coordinators list missing + if ($angeltype['description'] != "") + $page[] = '<div class="well">' . $parsedown->parse($angeltype['description']) . '</div>'; + + // Team-Coordinators list missing $coordinators = array(); $members_confirmed = array(); @@ -144,7 +145,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel ), $members_unconfirmed); } - return page($page); + return page_with_title(sprintf(_("Team %s"), $angeltype['name']), $page); } /** @@ -153,7 +154,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel * @param array $angeltypes */ function AngelTypes_list_view($angeltypes, $admin_angeltypes) { - return page(array( + return page_with_title(angeltypes_title(), array( msg(), buttons(array( $admin_angeltypes ? button(page_link_to('angeltypes') . '&action=edit', _("New angeltype"), 'add') : '', @@ -178,7 +179,8 @@ function AngelTypes_about_view($angeltypes, $user_logged_in) { $user_logged_in ? button(page_link_to('angeltypes'), angeltypes_title(), 'back') : '', button($faq_url, _("FAQ")) )), - '<p>' . _("Here is the list of teams and their tasks. If you have questions, read the FAQ.") . '</p>' + '<p>' . _("Here is the list of teams and their tasks. If you have questions, read the FAQ.") . '</p>', + '<hr />' ); $parsedown = new Parsedown(); foreach ($angeltypes as $angeltype) { @@ -195,10 +197,12 @@ function AngelTypes_about_view($angeltypes, $user_logged_in) { 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']); + if ($angeltype['description'] != "") + $content[] = '<div class="well">' . $parsedown->parse($angeltype['description']) . '</div>'; + $content[] = '<hr />'; } - return page($content); + return page_with_title(_("Teams/Job description"), $content); } ?>
\ No newline at end of file diff --git a/includes/view/Questions_view.php b/includes/view/Questions_view.php index be2375bb..c766125b 100644 --- a/includes/view/Questions_view.php +++ b/includes/view/Questions_view.php @@ -12,7 +12,7 @@ function Questions_view($open_questions, $answered_questions, $ask_action) { $question['actions'] = '<a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">' . _("delete") . '</a>'; } - return page(array( + return page_with_title(questions_title(), array( msg(), '<h2>' . _("Open questions") . '</h2>', table(array( diff --git a/includes/view/ShiftEntry_view.php b/includes/view/ShiftEntry_view.php index b815ba73..c8690689 100644 --- a/includes/view/ShiftEntry_view.php +++ b/includes/view/ShiftEntry_view.php @@ -18,9 +18,9 @@ function ShiftEntry_edit_view($angel, $date, $location, $title, $type, $comment, form_textarea('freeload_comment', _("Freeload comment (Only for shift coordination):"), $freeload_comment) ); } else { - $freeload_form = $freeloaded ? "" : ""; + $freeload_form = ""; } - return page(array( + return page_with_title(_("Edit shift entry"), array( form(array( form_info(_("Angel:"), $angel), form_info(_("Date, Duration:"), $date), diff --git a/includes/view/UserAngelTypes_view.php b/includes/view/UserAngelTypes_view.php index 68bb1ec9..29bde3c4 100644 --- a/includes/view/UserAngelTypes_view.php +++ b/includes/view/UserAngelTypes_view.php @@ -1,6 +1,6 @@ <?php function UserAngelType_update_view($user_angeltype, $user, $angeltype, $coordinator) { - return page(array( + return page_with_title($coordinator ? _("Add coordinator rights") : _("Remove coordinator rights"), array( msg(), info(sprintf($coordinator ? _("Do you really want to add coordinator rights for %s to %s?") : _("Do you really want to remove coordinator rights for %s from %s?"), $angeltype['name'], User_Nick_render($user)), true), buttons(array( @@ -11,7 +11,7 @@ function UserAngelType_update_view($user_angeltype, $user, $angeltype, $coordina } function UserAngelTypes_delete_all_view($angeltype) { - return page(array( + return page_with_title(_("Deny all users"), array( msg(), info(sprintf(_("Do you really want to deny all users for %s?"), $angeltype['name']), true), buttons(array( @@ -22,7 +22,7 @@ function UserAngelTypes_delete_all_view($angeltype) { } function UserAngelTypes_confirm_all_view($angeltype) { - return page(array( + return page_with_title(_("Confirm all users"), array( msg(), info(sprintf(_("Do you really want to confirm all users for %s?"), $angeltype['name']), true), buttons(array( @@ -33,7 +33,7 @@ function UserAngelTypes_confirm_all_view($angeltype) { } function UserAngelType_confirm_view($user_angeltype, $user, $angeltype) { - return page(array( + return page_with_title(_("Confirm angeltype for user"), array( msg(), info(sprintf(_("Do you really want to confirm %s for %s?"), User_Nick_render($user), $angeltype['name']), true), buttons(array( @@ -44,7 +44,7 @@ function UserAngelType_confirm_view($user_angeltype, $user, $angeltype) { } function UserAngelType_delete_view($user_angeltype, $user, $angeltype) { - return page(array( + return page_with_title(_("Remove angeltype"), array( msg(), info(sprintf(_("Do you really want to delete %s from %s?"), User_Nick_render($user), $angeltype['name']), true), buttons(array( @@ -59,7 +59,7 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id) { foreach ($users_source as $user_source) $users[$user_source['UID']] = User_Nick_render($user_source); - return page(array( + return page_with_title(_("Add user to angeltype"), array( msg(), buttons(array( button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], _("back"), 'back') @@ -73,7 +73,7 @@ function UserAngelType_add_view($angeltype, $users_source, $user_id) { } function UserAngelType_join_view($user, $angeltype) { - return page(array( + return page_with_title(sprintf(_("Become a %s"), $angeltype['name']), array( msg(), info(sprintf(_("Do you really want to add %s to %s?"), User_Nick_render($user), $angeltype['name']), true), buttons(array( diff --git a/includes/view/User_view.php b/includes/view/User_view.php index eda29d58..20a6de6e 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -1,5 +1,10 @@ <?php +function User_view($user_source) { + $user_name = htmlspecialchars($user_source['Vorname']) . " " . htmlspecialchars($user_source['Name']); + return page_with_title('<span class="icon-icon_angel"></span> ' . htmlspecialchars($user_source['Nick']) . ' <small>' . $user_name . '</small>', array()); +} + /** * Available T-Shirt sizes */ @@ -23,7 +28,7 @@ $tshirt_sizes = array( * View for password recovery step 1: E-Mail */ function User_password_recovery_view() { - return page(array( + return page_with_title(user_password_recovery_title(), array( msg(), _("We will send you an e-mail with a password recovery link. Please use the email address you used for registration."), form(array( @@ -37,7 +42,7 @@ function User_password_recovery_view() { * View for password recovery step 2: New password */ function User_password_set_view() { - return page(array( + return page_with_title(user_password_recovery_title(), array( msg(), _("Please enter a new password."), form(array( @@ -67,7 +72,7 @@ function User_Avatar_render($user) { function User_Nick_render($user_source) { global $user, $privileges; if ($user['UID'] == $user_source['UID'] || in_array('user_shifts_admin', $privileges)) - return '<a href="' . page_link_to('user_myshifts') . '&id=' . $user_source['UID'] . '">' . htmlspecialchars($user_source['Nick']) . '</a>'; + return '<a href="' . page_link_to('user_myshifts') . '&id=' . $user_source['UID'] . '"><span class="icon-icon_angel"></span> ' . htmlspecialchars($user_source['Nick']) . '</a>'; else return htmlspecialchars($user_source['Nick']); } |