X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Freports.tpl;h=feb5800feabb68c4886fa4894ba4b837ebdda175;hb=5f56885676a5004de82919add3d309575514be1b;hp=88511512f9ca3b6e600a415ae74ff95d35f1d956;hpb=e29c21af272eaff37daaa820b487898445ffe652;p=timetracker.git diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 88511512..feb5800f 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -133,17 +133,20 @@ function selectAssignedUsers(project_id) { } } -// handleCheckboxes - unmarks and disables the "Totals only" checkbox when +// handleCheckboxes - unmarks and hides the "Totals only" checkbox when // "no grouping" is selected in the associated dropdown. -// In future we need to improve this function and hide not relevant elements completely. function handleCheckboxes() { var totalsOnlyCheckbox = document.getElementById("chtotalsonly"); - if ("no_grouping" == document.getElementById("group_by").value) { + var totalsOnlyLabel = document.getElementById("totals_only_label"); + if ("no_grouping" == document.getElementById("group_by1").value) { // Unmark and disable the "Totals only" checkbox. totalsOnlyCheckbox.checked = false; - totalsOnlyCheckbox.disabled = true; - } else - totalsOnlyCheckbox.disabled = false; + totalsOnlyCheckbox.style.visibility = "hidden"; + totalsOnlyLabel.style.visibility = "hidden"; + } else { + totalsOnlyCheckbox.style.visibility = "visible"; + totalsOnlyLabel.style.visibility = "visible"; + } } @@ -201,15 +204,19 @@ function handleCheckboxes() { {$i18n.form.time.billable}   + {if $user->can('manage_invoices')} {$i18n.label.invoice} + {/if} {$forms.reportForm.include_records.control}   + {if $user->can('manage_invoices')} {$forms.reportForm.invoice.control} + {/if} {/if} -{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))} +{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))} {$i18n.label.paid_status} @@ -217,7 +224,7 @@ function handleCheckboxes() { {$forms.reportForm.paid_status.control} {/if} -{if $user->canManageTeam() || $user->isClient()} +{if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()} {$i18n.label.users} @@ -244,16 +251,19 @@ function handleCheckboxes() { -{if $user->isPluginEnabled('cl') || $user->isPluginEnabled('iv') || $user->isPluginEnabled('ps')} +{if $user->can('view_reports') || $user->can('view_all_reports') || $user->isPluginEnabled('cl') || $user->isPluginEnabled('iv') || $user->isPluginEnabled('ps')} {if $user->isPluginEnabled('cl')} {/if} - {if ($user->canManageTeam() || $user->isClient()) && $user->isPluginEnabled('iv')} + {if ($user->can('manage_invoices') || $user->isClient()) && $user->isPluginEnabled('iv')} {/if} - {if ($user->canManageTeam() && $user->isPluginEnabled('ps'))} + {if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))} + {/if} + {if $user->can('view_reports') || $user->can('view_all_reports')} + {/if} {/if} @@ -261,7 +271,7 @@ function handleCheckboxes() { -{if ((($user->canManageTeam() || $user->isClient()) || $user->isPluginEnabled('ex')) && defined('COST_ON_REPORTS') && isTrue($smarty.const.COST_ON_REPORTS))} +{if ($user->can('manage_invoices') || $user->isClient()) || $user->isPluginEnabled('ex')} {else} @@ -277,14 +287,27 @@ function handleCheckboxes() { {/if} +{if $user->isPluginEnabled('wu')} + + + + + + +{/if}
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}{/if} {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}{/if}
- {$i18n.form.reports.group_by} + {$i18n.form.reports.group_by} - {$forms.reportForm.group_by.control} + {$forms.reportForm.group_by1.control} + {$forms.reportForm.group_by2.control} + {$forms.reportForm.group_by3.control} + + +