Some more refactoring.
authorNik Okuntseff <support@anuko.com>
Wed, 14 Mar 2018 16:07:50 +0000 (16:07 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 14 Mar 2018 16:07:50 +0000 (16:07 +0000)
12 files changed:
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/lib/ttTimeHelper.class.php
WEB-INF/templates/cf_custom_field_add.tpl
WEB-INF/templates/cf_custom_field_delete.tpl
WEB-INF/templates/cf_custom_field_edit.tpl
WEB-INF/templates/cf_custom_fields.tpl
WEB-INF/templates/cf_dropdown_option_add.tpl
WEB-INF/templates/cf_dropdown_option_delete.tpl
WEB-INF/templates/cf_dropdown_option_edit.tpl
WEB-INF/templates/cf_dropdown_options.tpl
WEB-INF/templates/expense_edit.tpl
WEB-INF/templates/footer.tpl

index 38a2d81..684fa63 100644 (file)
@@ -1054,7 +1054,7 @@ class ttTeamHelper {
   static function enablePlugin($plugin, $enable = true)
   {
     global $user;
-    if (!$user->canManageTeam())
+    if (!$user->can('manage_features'))
       return false;
 
     $plugin_array = explode(',', $user->plugins);
index 7cbf4dd..222bcca 100644 (file)
@@ -474,7 +474,7 @@ class ttTimeHelper {
       $billable_part = $fields['billable'] ? ', billable = 1' : ', billable = 0';
     }
     $paid_part = '';
-    if ($user->canManageTeam() && $user->isPluginEnabled('ps')) {
+    if ($user->can('manage_invoices') && $user->isPluginEnabled('ps')) {
       $paid_part = $fields['paid'] ? ', paid = 1' : ', paid = 0';
     }
 
index 04908bb..442f41b 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
           <td align="right">{$i18n.label.thing_name} (*):</td>
index 00ad37f..fae6d80 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="0" cellpadding="0" border="0">
         <tr>
           <td colspan="2" align="center"><b>{$field|escape}</b></td>
index 5e4d57c..beabbe7 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
           <td align="right">{$i18n.label.thing_name} (*):</td>
index 51e8376..7a1b156 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="0" cellpadding="7" border="0" width="720">
   <tr>
     <td valign="top">
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="1" cellpadding="3" border="0" width="100%">
         <tr>
           <td width="50%" class="tableHeader">{$i18n.label.thing_name}</td>
index 5d892d1..bcc1cee 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
           <td align="right">{$i18n.label.thing_name} (*):</td>
index 6a273db..bec03cc 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="0" cellpadding="0" border="0">
         <tr>
           <td colspan="2" align="center"><b>{$option|escape}</b></td>
index 84deaa2..c2b0bae 100644 (file)
@@ -2,7 +2,7 @@
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
     <td>
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
           <td align="right">{$i18n.label.thing_name} (*):</td>
index 2882d92..ba15a41 100644 (file)
@@ -6,7 +6,7 @@
 <table cellspacing="0" cellpadding="7" border="0" width="720">
   <tr>
     <td valign="top">
-{if $user->canManageTeam()}
+{if $user->can('manage_custom_fields')}
       <table cellspacing="1" cellpadding="3" border="0" width="100%">
         <tr>
           <td width="70%" class="tableHeader">{$i18n.label.thing_name}</td>
index 39198b8..953f78d 100644 (file)
@@ -150,7 +150,7 @@ function recalculateCost() {
       <td align="right">{$i18n.label.cost}:</td>
       <td>{$forms.expenseItemForm.cost.control} {$user->currency|escape}</td>
     </tr>
-{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))}
+{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))}
     <tr>
       <td align="right">&nbsp;</td>
       <td><label>{$forms.expenseItemForm.paid.control}{$i18n.label.paid}</label></td>
index f7e7f6b..3807ef1 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.43.4075 | 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.43.4076 | 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>