A bit of refactoring.
authorNik Okuntseff <support@anuko.com>
Fri, 13 Apr 2018 23:24:06 +0000 (23:24 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 13 Apr 2018 23:24:06 +0000 (23:24 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/reports.tpl
time_edit.php

index c961260..dbacaa7 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.17.88.4260 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.88.4261 | 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 2ee48b0..640a55c 100644 (file)
@@ -209,7 +209,7 @@ function handleCheckboxes() {
           <td>{$forms.reportForm.invoice.control}</td>
         </tr>
 {/if}
-{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))}
+{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))}
         <tr>
           <td><b>{$i18n.label.paid_status}</b></td>
         </tr>
@@ -264,7 +264,7 @@ function handleCheckboxes() {
                 <td width="25%">{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}<label>{$forms.reportForm.chproject.control}&nbsp;{$i18n.label.project}</label>{/if}</td>
                 <td width="25%">{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}<label>{$forms.reportForm.chstart.control}&nbsp;{$i18n.label.start}</label>{/if}</td>
                 <td width="25%"><label>{$forms.reportForm.chduration.control}&nbsp;{$i18n.label.duration}</label></td>
-{if (($user->canManageTeam() || $user->isClient()) || $user->isPluginEnabled('ex'))}
+{if ($user->can('manage_invoices') || $user->isClient()) || $user->isPluginEnabled('ex')}
                   <td width="25%"><label>{$forms.reportForm.chcost.control}&nbsp;{$i18n.label.cost}</label></td>
 {else}
                   <td></td>
index 8125943..fd1851d 100644 (file)
@@ -206,7 +206,7 @@ if ($custom_fields && $custom_fields->fields[0]) {
 $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
 if ($user->isPluginEnabled('iv'))
   $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable));
-if ($user->canManageTeam() && $user->isPluginEnabled('ps'))
+if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))
   $form->addInput(array('type'=>'checkbox','name'=>'paid','value'=>$cl_paid));
 $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_save or btn_copy click.
 $form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.save')));