]> wagnertech.de Git - timetracker.git/commitdiff
A bit more work in progress on timesheets.
authorNik Okuntseff <support@anuko.com>
Fri, 15 Feb 2019 16:26:23 +0000 (16:26 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 15 Feb 2019 16:26:23 +0000 (16:26 +0000)
34 files changed:
WEB-INF/lib/ttUser.class.php
WEB-INF/resources/ca.lang.php
WEB-INF/resources/cs.lang.php
WEB-INF/resources/da.lang.php
WEB-INF/resources/de.lang.php
WEB-INF/resources/en.lang.php
WEB-INF/resources/es.lang.php
WEB-INF/resources/et.lang.php
WEB-INF/resources/fa.lang.php
WEB-INF/resources/fi.lang.php
WEB-INF/resources/fr.lang.php
WEB-INF/resources/gr.lang.php
WEB-INF/resources/he.lang.php
WEB-INF/resources/hu.lang.php
WEB-INF/resources/it.lang.php
WEB-INF/resources/ja.lang.php
WEB-INF/resources/ko.lang.php
WEB-INF/resources/nl.lang.php
WEB-INF/resources/no.lang.php
WEB-INF/resources/pl.lang.php
WEB-INF/resources/pt-br.lang.php
WEB-INF/resources/pt.lang.php
WEB-INF/resources/ro.lang.php
WEB-INF/resources/ru.lang.php
WEB-INF/resources/sk.lang.php
WEB-INF/resources/sl.lang.php
WEB-INF/resources/sr.lang.php
WEB-INF/resources/sv.lang.php
WEB-INF/resources/tr.lang.php
WEB-INF/resources/zh-cn.lang.php
WEB-INF/resources/zh-tw.lang.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/timesheets.tpl [new file with mode: 0644]
timesheets.php

index 36f9163f1639ace56d80e9afbf4e6ed18bc8f92a..5309dd8ad255a5b328650d887955520e115be5be 100644 (file)
@@ -886,4 +886,9 @@ class ttUser {
 
     return false;
   }
+
+  // getTimesheets obtains timesheets for user.
+  function getTimesheets() {
+    return null; // Not implemented.
+  }
 }
index 2ae15aa5bddc033b485df94aa1fb27670587d2a2..1e4b299e268895802a4e4db37999509760301406 100644 (file)
@@ -448,6 +448,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Número de factura',
index 8a698dbe613e626712f66a9aa90a15cfbf6274c9..08480f525b99a725b09cb69f5ee8406ff1313c32 100644 (file)
@@ -458,6 +458,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Faktura číslo',
index 37a33e909819fcd1b8f89b3b9f8dac1f9db5d5e8..560126347f27574e4c833dc60ebdc93cc02b5925 100644 (file)
@@ -418,6 +418,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Fakturanummer',
index fd73ad7e3a96c362ec3ebd923e990b12f7ec8b78..8c6318477ac1b4950919db9682a4163b24558f76 100644 (file)
@@ -396,6 +396,10 @@ $i18n_key_words = array(
 'form.report.export' => 'Exportiere',
 'form.report.assign_to_invoice' => 'Zu Rechnung hinzufügen',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Rechnungsnummer',
index 7b2ee39508737911d017b60b11418b7a14d3447b..ce580485efdcd6746be334c99ddff477a25a1af6 100644 (file)
@@ -397,6 +397,9 @@ $i18n_key_words = array(
 'form.report.export' => 'Export',
 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+ // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+'form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Invoice number',
index 6f6c82fca91df5ddc13eae998e08034f1755fb90..53b42913166a690abf4dc893e39c9b9ca614e9cb 100644 (file)
@@ -461,6 +461,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Número de factura',
index 3aeaef4d4cd9f0a7d1770b6ee22874f75336f139..70d6d441c775e576d6d4031d1e6d49f0f91c0787 100644 (file)
@@ -422,6 +422,10 @@ $i18n_key_words = array(
 'form.report.export' => 'Eksport',
 'form.report.assign_to_invoice' => 'Lisa arvele',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Arve number',
index ef0f326b8fa8126b16d953b902221da59245a9e0..75db180116d57955b874ac52cb950556f346bf7b 100644 (file)
@@ -438,6 +438,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'شماره فاکتور',
index 06e618959788526b6b2e0addc46f55d9ce493450..9aee3a2605c50613c8246f202a14445f6e5c339d 100644 (file)
@@ -425,6 +425,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Laskun numero',
index 53dbd941aeba809dce82d22c9eb98524481d2d26..17d43b0913521f64b169765bfe44206eb5892021 100644 (file)
@@ -415,6 +415,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Numéro de facture',
index 167bbda8fefac9347a3d840332430c139fe71a1d..4e82d825e6052e6072717f1e48399c881c01d9c7 100644 (file)
@@ -405,6 +405,10 @@ $i18n_key_words = array(
 'form.report.export' => 'Εξαγωγή',
 'form.report.assign_to_invoice' => 'Ανάθεση στο τιμολόγιο',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Αριθμός τιμολογίου',
index eb3402727a13174fc7fa1b3ab27f7639745488e7..2c4cbc066185a15d86842c9b796f4b8ad3a95b56 100644 (file)
@@ -448,6 +448,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'מספר חשבונית',
index ff1e21113d3f086610e992fc22b77005aa2ae282..5dafe96d7f92642fda46e4a97dd1f6b458881fd3 100644 (file)
@@ -451,6 +451,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Számla azonosító száma',
index 236044c0da294eb96e08bba1ebbb899661284fa6..32e3b84a0b978bbc2fc04b19438c7c362c867ae7 100644 (file)
@@ -418,6 +418,10 @@ $i18n_key_words = array(
 'form.report.export' => 'Esporta',
 'form.report.assign_to_invoice' => 'Assegna alla fattura',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Numero fattura',
index 35fb7859e1efaf16c168715ec7e46d462340cbb3..2574d315480688aac5c013d4890468ade2984117 100644 (file)
@@ -457,6 +457,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => '送り状の番号',
index c74aec9275d010ebc9881fb582a615b5d3ecfc2e..4403f9f1720d384b2c90754691ac8fca34d53206 100644 (file)
@@ -455,6 +455,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => '송장 번호',
index a461192b83641c30c656edba383bb248978f6eb4..9c88ca063da0779a649cd8db598bad9e63d8717b 100644 (file)
@@ -392,6 +392,10 @@ $i18n_key_words = array(
 'form.report.export' => 'Exporteer',
 'form.report.assign_to_invoice' => 'Voeg toe aan factuur',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Factuur nummer',
index 45156f8e6d58ced94fad7487274bba67da90469f..a08aeffe0ff6182d0d5b29bebd5da9503730a24b 100644 (file)
@@ -453,6 +453,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Fakturanummer',
index 55176d19cc40ee4eda79e36096c3e262c1966a91..a1f4bfa76e21e2328d69cd71fd5581b72401d8e9 100644 (file)
@@ -427,6 +427,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Numer faktury',
index e6b569786a6adbb38744735c0a47a569e9cd522e..639092d83c05354b1cc90227e2221586ef992c28 100644 (file)
@@ -422,6 +422,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Número da fatura',
index 7a794ce2a741e71f51a7f275be685ea7b9540b12..fcd31a4471c904e7607123c044b32d7dec9968d3 100644 (file)
@@ -433,6 +433,10 @@ $i18n_key_words = array(
 // 'form.report.export' => 'Export',
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 // TODO: translate the following.
index cf4556595cd4b348d2d2ede48f8fc0c938fda56e..1747b81f40339ae7d596887354e6d712557f8b09 100644 (file)
@@ -456,6 +456,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Numar factura',
index 0202eb20373023ae18eda06abed2d4be6c5b224d..42dfc9c9f7cda3c0b9f618f0df09d04d83ff8c5e 100644 (file)
@@ -389,6 +389,9 @@ $i18n_key_words = array(
 'form.report.export' => 'Экспортировать',
 'form.report.assign_to_invoice' => 'Включить в счёт',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+'form.timesheets.hint' => 'Используйте отчёты для добавления новых табелей.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Номер счёта',
index 66695484b3ba14fa161d18b35ad946df3f672400..587575f37194bf29cc43f60909d0e67b4020428b 100644 (file)
@@ -439,6 +439,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Číslo faktúry',
index deba2e6672c2b6da4ede258110f1cac18a6f2031..b0b23677d3f746a3bdf512441cb90655cbbb858f 100644 (file)
@@ -430,6 +430,10 @@ $i18n_key_words = array(
 // 'form.report.export' => 'Export',
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 // TODO: translate the following.
index 4c40077cc947bcca3d0e5fc2fa49e71bb7d1fbc9..d5c4fff7010f4d1c45f5ab15fb49103570d917c4 100644 (file)
@@ -425,6 +425,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Forma izveštaja. Pogledajte primer na https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Broj računa',
index ed6a0ac8050b8d235bed9b46a8f5f62a89ef142b..b3fc0929df7df925a0668eb8adf3d5ba1490b9e4 100644 (file)
@@ -422,6 +422,10 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Fakturanummer',
index df6f464ae12b38806e0228cf1bbda127df4c253c..b8577374438b34308ecfe814493b52ac8df6bd25 100644 (file)
@@ -468,6 +468,10 @@ $i18n_key_words = array(
 // 'form.report.export' => 'Export',
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Fatura numarası',
index 72d0ed58a4f590d6168bdf589a2cd1c5d759a3ac..5820ab3a2867cbf87bfe8a45a1e3f6da70ed7df4 100644 (file)
@@ -440,6 +440,10 @@ $i18n_key_words = array(
 // 'form.report.export' => 'Export',
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => '发票号码',
index 2be5446f78966b8a8bcf658a1f7377f7ec0ffbc0..59ce3716ec48da4e99aa58b2e3d49b4f5d5a8814 100644 (file)
@@ -448,6 +448,10 @@ $i18n_key_words = array(
 // 'form.report.export' => 'Export',
 // 'form.report.assign_to_invoice' => 'Assign to invoice',
 
+// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php
+// TODO: translate the following.
+// form.timesheets.hint' => 'Use reports to add new timesheets.',
+
 // Invoice form. See example at https://timetracker.anuko.com/invoice.php
 // (you can get to this form after generating a report).
 'form.invoice.number' => '發票號碼',
index 5ac739bfc0fd0f57044947f067917f772ea041e8..0594b17b40d04e6105dd9b3b670310a2c76db4a9 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.37.4724 | 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.37.4725 | 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>
diff --git a/WEB-INF/templates/timesheets.tpl b/WEB-INF/templates/timesheets.tpl
new file mode 100644 (file)
index 0000000..2b7990a
--- /dev/null
@@ -0,0 +1,47 @@
+<script>
+  function chLocation(newLocation) { document.location = newLocation; }
+</script>
+
+<table cellspacing="0" cellpadding="7" border="0" width="720">
+  <tr>
+    <td valign="top">
+{if $user->can('manage_invoices') || $user->can('view_own_invoices')}
+      <table cellspacing="1" cellpadding="3" border="0" width="100%">
+        <tr><td colspan="2">{$i18n.form.timesheets.hint}<br></td></tr>
+        <tr>
+          <td class="tableHeader">{$i18n.label.invoice}</td>
+          <td class="tableHeader">{$i18n.label.client}</td>
+          <td class="tableHeader">{$i18n.label.date}</td>
+  {if $user->isPluginEnabled('ps')}
+          <td class="tableHeader">{$i18n.label.paid}</td>
+  {/if}
+          <td class="tableHeader">{$i18n.label.view}</td>
+  {if !$user->isClient()}
+          <td class="tableHeader">{$i18n.label.delete}</td>
+  {/if}
+        </tr>
+        {foreach $invoices as $invoice}
+        <tr valign="top" bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+          <td>{$invoice.name|escape}</td>
+          <td>{$invoice.client_name|escape}</td>
+          <td>{$invoice.date}</td>
+  {if $user->isPluginEnabled('ps')}
+          <td>{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
+  {/if}
+          <td><a href="invoice_view.php?id={$invoice.id}">{$i18n.label.view}</a></td>
+  {if !$user->isClient()}
+          <td><a href="invoice_delete.php?id={$invoice.id}">{$i18n.label.delete}</a></td>
+  {/if}
+        </tr>
+        {/foreach}
+      </table>
+
+  {if !$user->isClient()}
+      <table width="100%">
+        <tr><td align="center"><br><form><input type="button" onclick="chLocation('invoice_add.php');" value="{$i18n.button.add}"></form></td></tr>
+      </table>
+  {/if}
+{/if}
+    </td>
+  </tr>
+</table>
index fb513bee8933cfa86f3c0757e4ce34ae6d926966..b2c64e636a0c9c57da6fde58c572a8a6b5a8f93b 100644 (file)
@@ -40,15 +40,15 @@ if (!(ttAccessAllowed('view_own_timesheets') ||
   exit();
 }
 
-if (!$user->isPluginEnabled('ts_NEVER_ENABLED')) { // Work in progress...
+if (!$user->isPluginEnabled('ts')) {
   header('Location: feature_disabled.php');
   exit();
 }
 // End of access checks.
 
-//$invoices = ttGroupHelper::getActiveInvoices();
+$timesheets = $user->getTimesheets();
 
-//$smarty->assign('invoices', $invoices);
+$smarty->assign('timesheets', $timesheets);
 $smarty->assign('title', $i18n->get('title.timesheets'));
-$smarty->assign('content_page_name', 'invoices.tpl'); // TODO: fix this, too.
+$smarty->assign('content_page_name', 'timesheets.tpl');
 $smarty->display('index.tpl');