From: Nik Okuntseff Date: Sat, 14 Apr 2018 13:34:14 +0000 (+0000) Subject: More progress on removing dependency on canManageTeam(). X-Git-Tag: timetracker_1.19-1~833 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7638ca2e290e13d2f2a4f80ef41b34ec964568eb;p=timetracker.git More progress on removing dependency on canManageTeam(). --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 16befd9a..8c6edaee 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {/foreach} @@ -30,13 +30,13 @@ {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {else} - {if $user->canManageTeam() || $user->isClient()}{/if} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} @@ -58,7 +58,7 @@ {if $cur_grouped_by != $prev_grouped_by && !$first_pass} {/if}{/if} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if}{/if} {if $bean->getAttribute('chclient')}{/if}{/if} {if $bean->getAttribute('chproject')}{/if}{/if} {if $bean->getAttribute('chtask')}{/if}{/if} @@ -67,7 +67,7 @@ {if $bean->getAttribute('chfinish')}{/if} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chnote')}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} {if $bean->getAttribute('chinvoice')}{/if} @@ -83,7 +83,7 @@ {/if} - {if $user->canManageTeam() || $user->isClient()}{/if} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} @@ -92,7 +92,7 @@ {if $bean->getAttribute('chfinish')}{/if} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chnote')}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {if $bean->getAttribute('chpaid')}{/if} @@ -108,7 +108,7 @@ {if $print_subtotals} {/if}{/if} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if}{/if} {if $bean->getAttribute('chclient')}{/if}{/if} {if $bean->getAttribute('chproject')}{/if}{/if} {if $bean->getAttribute('chtask')}{/if}{/if} @@ -117,7 +117,7 @@ {if $bean->getAttribute('chfinish')}{/if} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chnote')}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} {if $bean->getAttribute('chinvoice')}{/if} @@ -128,7 +128,7 @@ - {if $user->canManageTeam() || $user->isClient()}{/if} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} @@ -137,7 +137,7 @@ {if $bean->getAttribute('chfinish')}{/if} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chnote')}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} {if $bean->getAttribute('chinvoice')}{/if}
 Anuko Time Tracker 1.17.88.4267 | Copyright © Anuko | +  Anuko Time Tracker 1.17.88.4268 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/report.tpl b/WEB-INF/templates/report.tpl index c0f4b2c2..ddea591a 100644 --- a/WEB-INF/templates/report.tpl +++ b/WEB-INF/templates/report.tpl @@ -22,7 +22,7 @@
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}{if $user->canManageTeam() || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}
{$i18n.label.total}{$totals['time']}{$user->currency|escape} {if $user->canManageTeam() || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
{$i18n.label.date}{$i18n.label.user}{$i18n.label.user}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}
{$i18n.label.subtotal} - {if $user->canManageTeam() || $user->isClient()}{if $group_by == 'user'}{$subtotals[$prev_grouped_by]['name']|escape}{if $group_by == 'user'}{$subtotals[$prev_grouped_by]['name']|escape}{if $group_by == 'client'}{$subtotals[$prev_grouped_by]['name']|escape}{if $group_by == 'project'}{$subtotals[$prev_grouped_by]['name']|escape}{if $group_by == 'task'}{$subtotals[$prev_grouped_by]['name']|escape}{$subtotals[$prev_grouped_by]['time']}{if $user->canManageTeam() || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
{$item.date}{$item.user|escape}{$item.user|escape}{$item.client|escape}{$item.project|escape}{$item.task|escape}{$item.finish}{$item.duration}{$item.note|escape}{if $user->canManageTeam() || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{/if} {if $bean->getAttribute('chip')}{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{/if} {if $bean->getAttribute('chinvoice')}{$item.invoice|escape}
{$i18n.label.subtotal} - {if $user->canManageTeam() || $user->isClient()}{if $group_by == 'user'}{$subtotals[$cur_grouped_by]['name']|escape}{if $group_by == 'user'}{$subtotals[$cur_grouped_by]['name']|escape}{if $group_by == 'client'}{$subtotals[$cur_grouped_by]['name']|escape}{if $group_by == 'project'}{$subtotals[$cur_grouped_by]['name']|escape}{if $group_by == 'task'}{$subtotals[$cur_grouped_by]['name']|escape}{$subtotals[$cur_grouped_by]['time']}{if $user->canManageTeam() || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$user->currency|escape} {if $user->canManageTeam() || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}