]> wagnertech.de Git - timetracker.git/commitdiff
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 38a2d8196d5428da62e32215b6e00c3a23e883b2..684fa63c53fcaae5384a682068cf0a91df861286 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 7cbf4ddaa5aa83993a2e3f2264ed7439bf606932..222bcca4cc144023906c5cb9821d281c65c4777b 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 04908bbd648cbdc3d30b98f5e4b83bf30c9742b4..442f41bb876278ecfd13d63357b207c965b343d6 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 00ad37ffa81849e495fbc7f0d26beb492f5e80d5..fae6d804d78115e20c0085d2b52f3e7adfae90df 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 5e4d57c4d5f0a166c471b946a6e68c210031e9ed..beabbe7dd67d43d7791ca4ec681e907a1ddce1cc 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 51e83769c3c8f163edff35151941280978df8386..7a1b156b2aac48f58557d04b56dbe5862db0f1a8 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 5d892d1346936dd2184205ef177e4b1676d9e2de..bcc1cee72452ae62aa5a90993fe76ab64bbac431 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 6a273db0e1423a6c97ba36088bcc5fedb102921f..bec03cc3255453adb98a577031682bf3e830274e 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 84deaa229c81059b74e590112c009b8611af1a4e..c2b0bae9c5e956bf99ae195d85839c1c49a5c332 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 2882d92c4c5eb813725b474d4f49c9a98d1d169e..ba15a416ff10ae6aa3bf7d5f948f8984a2f809f6 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 39198b88051b8b3cd7f12f07d4760212cc399f15..953f78d5e210582b8ce5c76347c1f522c9959b45 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 f7e7f6bf5ce32cdd4eb430d9b5c569ea6578e03c..3807ef1d157b79159f0b64d23f621b4ff6d9471f 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>