diff options
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/User_view.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 734e266e..8077d0af 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -29,16 +29,16 @@ function User_shift_state_render($user) { if ($upcoming_shifts[0]['start'] > time()) if ($upcoming_shifts[0]['start'] - time() > 3600) - return '<span class="text-success moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift in %c") . '</span>'; + return '<span class="text-success moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift %c") . '</span>'; else - return '<span class="text-warning moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift in %c") . '</span>'; + return '<span class="text-warning moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift %c") . '</span>'; $halfway = ($upcoming_shifts[0]['start'] + $upcoming_shifts[0]['end']) / 2; if (time() < $halfway) - return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift startet %c ago") . '</span>'; + return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift start %c") . '</span>'; else - return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends in %c") . '</span>'; + return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift end %c") . '</span>'; } function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) { @@ -131,10 +131,12 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel User_groups_render($user_groups) )) )), - $admin_user_privilege ? buttons(array( - button(page_link_to('admin_user') . '&id=' . $user_source['UID'], '<span class="glyphicon glyphicon-edit"></span> ' . _("edit")), - ! $user_source['Gekommen'] ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '' - )) : '', + buttons(array( + $admin_user_privilege ? button(page_link_to('admin_user') . '&id=' . $user_source['UID'], '<span class="glyphicon glyphicon-edit"></span> ' . _("edit")) : '', + ! $user_source['Gekommen'] ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '', + button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")), + button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export")) + )), ($its_me || $admin_user_privilege) ? '<h2>' . _("Shifts") . '</h2>' : '', ($its_me || $admin_user_privilege) ? table(array( 'date' => _("Day"), |