From a99eed64c692add1b423ea89d0972f6698e4e6fa Mon Sep 17 00:00:00 2001 From: Nik Okuntseff <support@anuko.com> Date: Sat, 9 Mar 2019 18:15:04 +0000 Subject: [PATCH] Added templates to group export. --- WEB-INF/lib/ttGroupExportHelper.class.php | 17 +++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index 7810c79e..f2290fba 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -488,6 +488,23 @@ class ttGroupExportHelper { unset($predefined_expense_part); } + // Write templates. + $templates = $this->getRecordsFromTable('tt_templates'); + if (count($templates) > 0) { + fwrite($this->file, $this->indentation." <templates>\n"); + foreach ($templates as $template) { + $template_part = $this->indentation.' '."<template name=\"".htmlspecialchars($template['name'])."\""; + $template_part .= " description=\"".htmlspecialchars($template['description'])."\""; + $template_part .= " content=\"".htmlspecialchars($template['content'])."\""; + $template_part .= " status=\"".$template['status']."\""; + $template_part .= "></template>\n"; + fwrite($this->file, $template_part); + } + fwrite($this->file, $this->indentation." </templates>\n"); + unset($templates); + unset($template_part); + } + // Write monthly quotas. $quotas = ttTeamHelper::getMonthlyQuotas($this->group_id); if (count($quotas) > 0) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index dcc75949..10c67acd 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@ <br> <table cellspacing="0" cellpadding="4" width="100%" border="0"> <tr> - <td align="center"> Anuko Time Tracker 1.18.56.4853 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> | + <td align="center"> Anuko Time Tracker 1.18.56.4854 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> | <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> | <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> | <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a> -- 2.20.1