Skip to content

Commit 1e82577

Browse files
committed
A fix for column span for user reports.
1 parent c1dab04 commit 1e82577

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

WEB-INF/lib/ttReportHelper.class.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,24 @@ static function prepareReportBody($options, $comment = null)
738738
$cellLeftAlignedSubtotal = 'font-weight: bold; text-align: left; vertical-align: top;';
739739
$cellRightAlignedSubtotal = 'font-weight: bold; text-align: right; vertical-align: top;';
740740

741+
// Determine column span for note field.
742+
$colspan = 1;
743+
if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $colspan++;
744+
if ($options['show_client']) $colspan++;
745+
if ($options['show_project']) $colspan++;
746+
if ($options['show_task']) $colspan++;
747+
if ($options['show_custom_field_1']) $colspan++;
748+
if ($options['show_start']) $colspan++;
749+
if ($options['show_end']) $colspan++;
750+
if ($options['show_duration']) $colspan++;
751+
if ($options['show_work_units']) $colspan++;
752+
if ($options['show_cost']) $colspan++;
753+
if ($options['show_approved']) $colspan++;
754+
if ($options['show_paid']) $colspan++;
755+
if ($options['show_ip']) $colspan++;
756+
if ($options['show_invoice']) $colspan++;
757+
if ($options['show_timesheet']) $colspan++;
758+
741759
// Start creating email body.
742760
$body = '<html>';
743761
$body .= '<head><meta http-equiv="content-type" content="text/html; charset='.CHARSET.'"></head>';

WEB-INF/templates/footer.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<br>
1313
<table cellspacing="0" cellpadding="4" width="100%" border="0">
1414
<tr>
15-
<td align="center">&nbsp;Anuko Time Tracker 1.18.57.4857 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
15+
<td align="center">&nbsp;Anuko Time Tracker 1.18.57.4858 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
1616
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
1717
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
1818
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>

report.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284

285285
// Determine column span for note field.
286286
$colspan = 1;
287-
if ($bean->getAttribute('chuser')) $colspan++;
287+
if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $colspan++;
288288
if ($bean->getAttribute('chclient')) $colspan++;
289289
if ($bean->getAttribute('chproject')) $colspan++;
290290
if ($bean->getAttribute('chtask')) $colspan++;

0 commit comments

Comments
 (0)