Allowed null tasks in project and tasks tracking mode.
[timetracker.git] / WEB-INF / templates / time.tpl
index 089e57c..0afaa15 100644 (file)
@@ -41,7 +41,7 @@ task_names = new Array();
 empty_label_project = '{$i18n.dropdown.select|escape:'javascript'}';
 empty_label_task = '{$i18n.dropdown.select|escape:'javascript'}';
 
-// The populateDropdowns function populates the "project" and "task" dropdown controls
+// The fillDropdowns function populates the "project" and "task" dropdown controls
 // with relevant values.
 function fillDropdowns() {
   if(document.body.contains(document.timeRecordForm.client))
@@ -248,7 +248,7 @@ function get_time() {
 {/if}
 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
         <tr>
-          <td align="right">{$i18n.label.task} (*):</td>
+          <td align="right">{$i18n.label.task}:</td>
           <td>{$forms.timeRecordForm.task.control}</td>
         </tr>
 {/if}
@@ -326,14 +326,14 @@ function get_time() {
         <td nowrap align='right' valign='top'>{if $record.start}{$record.start}{else}&nbsp;{/if}</td>
         <td nowrap align='right' valign='top'>{if $record.finish}{$record.finish}{else}&nbsp;{/if}</td>
     {/if}
-        <td align='right' valign='top'>{if $record.duration <> '0:00'}{$record.duration}{else}<font color="#ff0000">{$i18n.form.time.uncompleted}</font>{/if}</td>
+        <td align='right' valign='top'>{if ($record.duration == '0:00' && $record.start <> '')}<font color="#ff0000">{$i18n.form.time.uncompleted}</font>{else}{$record.duration}{/if}</td>
         <td valign='top'>{if $record.comment}{$record.comment|escape:'html'}{else}&nbsp;{/if}</td>
         <td valign='top' align='center'>
     {if $record.invoice_id}
           &nbsp;
     {else}
           <a href='time_edit.php?id={$record.id}'>{$i18n.label.edit}</a>
-      {if $record.duration == '0:00'}
+      {if ($record.duration == '0:00' && $record.start <> '')}
           <input type='hidden' name='record_id' value='{$record.id}'>
           <input type='hidden' name='browser_date' value=''>
           <input type='hidden' name='browser_time' value=''>
@@ -354,6 +354,16 @@ function get_time() {
     <td align="left">{$i18n.label.week_total}: {$week_total}</td>
     <td align="right">{$i18n.label.day_total}: {$day_total}</td>
   </tr>
+  {if $user->isPluginEnabled('mq')}
+  <tr>
+    <td align="left">{$i18n.label.month_total}: {$month_total}</td>
+    {if $over_quota}
+    <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
+    {else}
+    <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$quota_remaining}</span></td>
+    {/if}
+  </tr>
+  {/if}
 </table>
 {/if}
 {$forms.timeRecordForm.close}