X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Freports.tpl;h=07c3983468f82fb7dbe825590a46f01c5efe86ec;hb=c71ac60a3c6913ad64b22f367b994983ff77ca22;hp=2f75835d1180b565125333d80552d27fd617b05c;hpb=a781da5661a1932521e0d1feb4be340b97edce9a;p=timetracker.git diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 2f75835d..07c39834 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -133,23 +133,36 @@ function selectAssignedUsers(project_id) { } } -// handleCheckboxes - unmarks and disables 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. +// handleCheckboxes - unmarks and hides the "Totals only" checkbox when +// "no grouping" is selected in the associated group by dropdowns. function handleCheckboxes() { var totalsOnlyCheckbox = document.getElementById("chtotalsonly"); - if ("no_grouping" == document.getElementById("group_by").value) { - // Unmark and disable the "Totals only" checkbox. + var totalsOnlyLabel = document.getElementById("totals_only_label"); + var groupBy1 = document.getElementById("group_by1"); + var groupBy2 = document.getElementById("group_by2"); + var groupBy3 = document.getElementById("group_by3"); + var grouping = false; + if ((groupBy1 != null && "no_grouping" != groupBy1.value) || + (groupBy2 != null && "no_grouping" != groupBy2.value) || + (groupBy3 != null && "no_grouping" != groupBy3.value)) { + grouping = true; + } + if (grouping) { + // Show the "Totals only" checkbox. + totalsOnlyCheckbox.style.visibility = "visible"; + totalsOnlyLabel.style.visibility = "visible"; + } else { + // Unmark and hide the "Totals only" checkbox. totalsOnlyCheckbox.checked = false; - totalsOnlyCheckbox.disabled = true; - } else - totalsOnlyCheckbox.disabled = false; + totalsOnlyCheckbox.style.visibility = "hidden"; + totalsOnlyLabel.style.visibility = "hidden"; + } } {$forms.reportForm.open}
- +
@@ -167,49 +180,50 @@ function handleCheckboxes() {
-{if ((in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)) || ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN))} - - {if in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)}{else}{/if} - - {if ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN)}{else}{/if} - - - - - + + + + +{if $show_users} @@ -236,49 +250,77 @@ function handleCheckboxes() { - - - + + - + + + + + +
{$i18n.label.client}  {$i18n.label.option} 
{$forms.reportForm.client.control} {$forms.reportForm.option.control}
+ +{if $show_client} + + {/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - - - {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - {/if} - +{if $show_project} + + {/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - - - {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - {/if} - +{if $show_billable} + + {/if} -{if in_array('iv', explode(',', $user->plugins))} - - - - - - - - - - +{if $show_paid_status} + + +{/if} +
{$i18n.label.client}
{$forms.reportForm.client.control}
{$i18n.label.project} {$i18n.label.task}
{$i18n.label.project}
{$forms.reportForm.project.control}
{$forms.reportForm.project.control} {$forms.reportForm.task.control}
{$i18n.form.time.billable}
{$forms.reportForm.include_records.control}
{$i18n.form.time.billable} {$i18n.label.invoice}
{$forms.reportForm.include_records.control} {$forms.reportForm.invoice.control}
{$i18n.label.paid_status}
{$forms.reportForm.paid_status.control}
+
+ +{if $show_cf_1_dropdown} + + {/if} -{if $user->canManageTeam() || $user->isClient()} +{if $show_task} + + +{/if} +{if $show_invoice_dropdown} + + +{/if} +{if $show_timesheet_dropdown} + + +{/if} +
{$i18n.label.option}
{$forms.reportForm.option.control}
{$i18n.label.task}
{$forms.reportForm.task.control}
{$i18n.label.invoice}
{$forms.reportForm.invoice.control}
{$i18n.label.timesheet}
{$forms.reportForm.timesheet.control}
+
{$i18n.label.users}
-{if in_array('cl', explode(',', $user->plugins)) || in_array('iv', explode(',', $user->plugins))} - {if in_array('cl', explode(',', $user->plugins))} - - {/if} - {if ($user->canManageTeam() || $user->isClient()) && in_array('iv', explode(',', $user->plugins))} - - {/if} - + + + +
+ +{if $show_client} + {/if} - - - - -{if ((($user->canManageTeam() || $user->isClient()) || in_array('ex', explode(',', $user->plugins))) && defined('COST_ON_REPORTS') && isTrue($smarty.const.COST_ON_REPORTS))} - -{else} - +{if $show_project} + {/if} - - - - - -{if ($custom_fields && $custom_fields->fields[0])} - -{else} - +{if $show_timesheet_checkbox} + +{/if} +{if $show_cf_1_checkbox} + +{/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}
{if ($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}
+
+ +{if $show_start} + {/if} +{if $show_task} + +{/if} +{if $show_ip} + +{/if} +{if $show_work_units} + +{/if} +
+
+ +{if $show_finish} + +{/if} + +{if $show_invoice_checkbox} + +{/if} +
+
+ + + +{if $show_paid_status} + +{/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}
- +