Added capability to see uncompleted indicators to users with view_users right.
authorNik Okuntseff <support@anuko.com>
Fri, 24 May 2019 21:41:12 +0000 (21:41 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 24 May 2019 21:41:12 +0000 (21:41 +0000)
WEB-INF/lib/ttTimeHelper.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/users.tpl

index f6d8b92..d7278c6 100644 (file)
@@ -649,8 +649,8 @@ class ttTimeHelper {
   static function getUncompleted($user_id) {
     $mdb2 = getConnection();
 
-    $sql = "select id, start from tt_log  
-      where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1";
+    $sql = "select id, start, date from tt_log".
+      where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1";
     $res = $mdb2->query($sql);
     if (!is_a($res, 'PEAR_Error')) {
       if (!$res->numRows()) {
index a51049a..49305b5 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.19.4.5011 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.19.4.5012 | 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>
index c9f6750..401751f 100644 (file)
         </tr>
   {foreach $active_users as $u}
         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
-          <td>{$u.name|escape}</td>
+          <td>
+    {if $uncompleted_indicators}
+            <span class="uncompleted-entry{if $u.has_uncompleted_entry} active{/if}"{if $u.has_uncompleted_entry} title="{$i18n.form.users.uncompleted_entry}"{/if}></span>
+    {/if}
+            {$u.name|escape}
+          </td>
           <td>{$u.login|escape}</td>
           <td>{$u.role_name|escape}</td>
         </tr>