Added templates to group export.
authorNik Okuntseff <support@anuko.com>
Sat, 9 Mar 2019 18:15:04 +0000 (18:15 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 9 Mar 2019 18:15:04 +0000 (18:15 +0000)
WEB-INF/lib/ttGroupExportHelper.class.php
WEB-INF/templates/footer.tpl

index 7810c79..f2290fb 100644 (file)
@@ -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) {
index dcc7594..10c67ac 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.56.4853 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.56.4854 | Copyright &copy; <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>