From 6578f26181e52e55c0e5451dfb1b802673289b9f Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 19:36:20 +0000 Subject: [PATCH] Fixed labels for week view. --- WEB-INF/lib/ttTimeHelper.class.php | 17 ++++++----------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) 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} -- 2.20.1