diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-08-24 16:22:43 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-08-24 16:22:43 +0200 |
commit | 3da1748e841a24e4e462f5a8212362270d74cf0b (patch) | |
tree | f1355b13ee875c555d96bb4713af5122ceaa1fba /includes/view | |
parent | abb6d8bfd8380032d1e8d1c8d3b03ce02293c730 (diff) |
correct shift state strings
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"), |