X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Ftime.tpl;h=0afaa15bb1d03732f08ac2740627d2332ada0966;hb=b0e8ffd3af439b5dc6dd5044a46a906d9833932b;hp=9367065679e873e3d58aa0f93bd6018f4aa30431;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index 93670656..0afaa15b 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -41,7 +41,7 @@ task_names = new Array(); empty_label_project = '{$i18n.dropdown.select|escape:'javascript'}'; empty_label_task = '{$i18n.dropdown.select|escape:'javascript'}'; -// The populateDropdowns function populates the "project" and "task" dropdown controls +// The fillDropdowns function populates the "project" and "task" dropdown controls // with relevant values. function fillDropdowns() { if(document.body.contains(document.timeRecordForm.client)) @@ -51,7 +51,7 @@ function fillDropdowns() { } // The fillProjectDropdown function populates the project combo box with -// projects associated with a selected client (client id is passed here as id). +// projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) { var str_ids = project_ids[id]; var dropdown = document.getElementById("project"); @@ -67,7 +67,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) { @@ -99,16 +99,16 @@ function fillProjectDropdown(id) { } // The fillTaskDropdown function populates the task combo box with -// tasks associated with a selected project (project id is passed here as id). +// tasks associated with a selected project (project id is passed here as id). function fillTaskDropdown(id) { var str_ids = task_ids[id]; var dropdown = document.getElementById("task"); if (dropdown == null) return; // Nothing to do. - + // Determine previously selected item. var selected_item = dropdown.options[dropdown.selectedIndex].value; - + // Remove existing content. dropdown.length = 0; // Add mandatory top option. @@ -130,7 +130,7 @@ function fillTaskDropdown(id) { } // If a previously selected item is still in dropdown - select it. - if (dropdown.options.length > 0) { + if (dropdown.options.length > 0) { for (var i = 0; i < dropdown.options.length; i++) { if (dropdown.options[i].value == selected_item) { dropdown.options[i].selected = true; @@ -160,18 +160,18 @@ function formDisable(formField) { } if ((formFieldValue != "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); - x.value = ""; - x.disabled = true; - x.style.background = "#e9e9e9"; - var x = eval("document.timeRecordForm.finish"); - x.value = ""; - x.disabled = true; - x.style.background = "#e9e9e9"; + var x = eval("document.timeRecordForm.start"); + x.value = ""; + x.disabled = true; + x.style.background = "#e9e9e9"; + var x = eval("document.timeRecordForm.finish"); + x.value = ""; + x.disabled = true; + x.style.background = "#e9e9e9"; } if ((formFieldValue == "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); + var x = eval("document.timeRecordForm.start"); x.disabled = false; x.style.background = "white"; var x = eval("document.timeRecordForm.finish"); @@ -223,13 +223,13 @@ function get_time() { {$forms.timeRecordForm.onBehalfUser.control} {/if} -{if in_array('cl', explode(',', $user->plugins))} +{if $user->isPluginEnabled('cl')} - {$i18n.label.client}{if in_array('cm', explode(',', $user->plugins))} (*){/if}: + {$i18n.label.client}{if $user->isPluginEnabled('cm')} (*){/if}: {$forms.timeRecordForm.client.control} {/if} -{if in_array('iv', explode(',', $user->plugins))} +{if $user->isPluginEnabled('iv')}   @@ -248,7 +248,7 @@ function get_time() { {/if} {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - {$i18n.label.task} (*): + {$i18n.label.task}: {$forms.timeRecordForm.task.control} {/if} @@ -291,60 +291,60 @@ function get_time() {
- {if $time_records} +{if $time_records} -{if in_array('cl', explode(',', $user->plugins))} + {if $user->isPluginEnabled('cl')} -{/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} -{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/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 (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} -{/if} + {/if} - {foreach $time_records as $record} + {foreach $time_records as $record} -{if in_array('cl', explode(',', $user->plugins))} + {if $user->isPluginEnabled('cl')} -{/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} -{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/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 (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} -{/if} - + {/if} + - {/foreach} -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{$i18n.label.start} {$i18n.label.finish}{$i18n.label.duration} {$i18n.label.note} {$i18n.label.edit}
{$record.client|escape:'html'}{$record.project|escape:'html'}{$record.task|escape:'html'}{if $record.start}{$record.start}{else} {/if} {if $record.finish}{$record.finish}{else} {/if}{if $record.duration <> '0:00'}{$record.duration}{else}{$i18n.form.time.uncompleted}{/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if} {if $record.comment}{$record.comment|escape:'html'}{else} {/if} - {if $record.invoice_id} + {if $record.invoice_id}   - {else} + {else} {$i18n.label.edit} - {if $record.duration == '0:00'} + {if ($record.duration == '0:00' && $record.start <> '')} - {/if} - {/if} + {/if} + {/if}
- {/if} + {/foreach} +
+{/if} @@ -354,8 +354,16 @@ function get_time() { {$i18n.label.week_total}: {$week_total} {$i18n.label.day_total}: {$day_total} + {if $user->isPluginEnabled('mq')} + + {$i18n.label.month_total}: {$month_total} + {if $over_quota} + {$i18n.form.time.over_quota}: {$quota_remaining} + {else} + {$i18n.form.time.remaining_quota}: {$quota_remaining} + {/if} + + {/if} {/if} {$forms.timeRecordForm.close} - -