summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-01 10:48:19 +0200
committermsquare <msquare@notrademark.de>2016-10-01 10:48:19 +0200
commitd5d2acc7d80920eef5f0ed779a3738a12d5db348 (patch)
treed2d7eb680c1ecaf72480893bba252ab2d9958804 /includes/view
parent6dfefc3bb9f054c472156801e37300059444ecc7 (diff)
improve code style
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/AngelTypes_view.php3
-rw-r--r--includes/view/User_view.php8
2 files changed, 5 insertions, 6 deletions
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php
index 7e8663a1..cdaa9f12 100644
--- a/includes/view/AngelTypes_view.php
+++ b/includes/view/AngelTypes_view.php
@@ -153,7 +153,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel
'actions' => ''
];
- if ($angeltype['requires_driver_license'] && ($coordinator || $admin_angeltypes))
+ if ($angeltype['requires_driver_license'] && ($coordinator || $admin_angeltypes)) {
$table_headers = [
'Nick' => _("Nick"),
'DECT' => _("DECT"),
@@ -166,6 +166,7 @@ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angel
'has_license_forklift' => _("Forklift"),
'actions' => ''
];
+ }
if (count($coordinators) > 0) {
$page[] = '<h3>' . _("Coordinators") . '</h3>';
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 3e365ea2..a620aa80 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -152,17 +152,15 @@ 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 %c") . '</span>';
- } else {
- return '<span class="text-warning moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Next shift %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 starts %c") . '</span>';
- } else {
- return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends %c") . '</span>';
}
+ return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends %c") . '</span>';
}
function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) {
@@ -340,7 +338,7 @@ function User_angeltypes_render($user_angeltypes) {
}
function User_groups_render($user_groups) {
- $output = array();
+ $output = [];
foreach ($user_groups as $group) {
$output[] = substr($group['Name'], 2);
}