From: anuko Date: Tue, 26 Dec 2017 19:36:20 +0000 (+0000) Subject: Fixed labels for week view. X-Git-Tag: timetracker_1.19-1~1433 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6578f26181e52e55c0e5451dfb1b802673289b9f;hp=7df94ddee8feb9bc19b681f2b58fc547df622c9b;p=timetracker.git Fixed labels for week view. --- diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index ff3399ca..48959562 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -852,28 +852,23 @@ class ttTimeHelper { // Note that billable property is not part of the label. Instead, we intend to // identify such records with a different color in week view. static function makeRecordLabel($record) { - // TODO: debug this function. global $user; // Start with client. if ($user->isPluginEnabled('cl')) $label = $record['client']; // Add project. - $project = $record['project'] ? $record['project'] : ''; - if (!empty($label)) $label .= ' - '; - $label .= $project; + if (!empty($label) && !empty($record['project'])) $label .= ' - '; + $label .= $record['project']; // Add task. - $task = $record['task'] ? $record['task'] : ''; - if (!empty($label)) $label .= ' - '; - $label .= $task; + if (!empty($label) && !empty($record['task'])) $label .= ' - '; + $label .= $record['task']; // Add custom field 1. if ($user->isPluginEnabled('cf')) { - if ($record['cf_1_value']) { - if (!empty($label)) $label .= ' - '; - $label .= $record['cf_1_value']; - } + if (!empty($label) && !empty($record['cf_1_value'])) $label .= ' - '; + $label .= $record['cf_1_value']; } return $label; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index aafa107b..3f894c72 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.3.3694 | Copyright © Anuko | +  Anuko Time Tracker 1.13.3.3695 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}