empty_label_project = '{$i18n.dropdown.select|escape:'javascript'}';
// 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");
empty_label_project = '{$i18n.dropdown.select|escape:'javascript'}';
// 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");
// 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)
<table width="720">
<tr>
<td valign="top">
- {if $expense_items}
+{if $expense_items}
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
-{if in_array('cl', explode(',', $user->plugins))}
+ {if in_array('cl', explode(',', $user->plugins))}
<td width="20%" class="tableHeader">{$i18n.label.client}</td>
-{/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)}
<td class="tableHeader">{$i18n.label.project}</td>
-{/if}
+ {/if}
<td class="tableHeader">{$i18n.label.item}</td>
<td width="5%" class="tableHeaderCentered">{$i18n.label.cost}</td>
<td width="5%" class="tableHeader">{$i18n.label.edit}</td>
</tr>
- {foreach $expense_items as $item}
+ {foreach $expense_items as $item}
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}">
-{if in_array('cl', explode(',', $user->plugins))}
+ {if in_array('cl', explode(',', $user->plugins))}
<td valign='top'>{$item.client|escape:'html'}</td>
-{/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)}
<td valign='top'>{$item.project|escape:'html'}</td>
-{/if}
+ {/if}
<td valign='top'>{$item.item|escape:'html'}</td>
<td valign='top' align='right'>{$item.cost}</td>
- <td valign='top' align='center'>
- {if $item.invoice_id}
-
- {else}
- <a href='expense_edit.php?id={$item.id}'>{$i18n.label.edit}</a>
- {/if}
- </td>
+ <td valign='top' align='center'>{if $item.invoice_id} {else}<a href='expense_edit.php?id={$item.id}'>{$i18n.label.edit}</a>{/if}</td>
</tr>
- {/foreach}
- </table>
- {if $expense_items}
- <table border="0" cellpadding="3" cellspacing="1" width="100%">
- <tr>
- <td nowrap align="right">{$i18n.label.day_total}: {$user->currency|escape:'html'} {$day_total}</td>
- </tr>
- </table>
- {/if}
-
- {/if}
+ {/foreach}
+ </table>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td nowrap align="right">{$i18n.label.day_total}: {$user->currency|escape:'html'} {$day_total}</td>
+ </tr>
+ </table>
+{/if}
</td>
</tr>
</table>
{$forms.expensesForm.close}
-
-
</tr>
</table>
<!-- End of top image -->
-
+
{if $authenticated}
{if $user->isAdmin()}
<!-- Top menu for admin -->
</tr>
</table>
{/if}
- <!-- End of output messages -->
\ No newline at end of file
+ <!-- End of output messages -->
<td align="right">{$i18n.label.client} (*):</td>
<td>{$forms.invoiceForm.client.control}</td>
</tr>
-{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<tr>
<td align="right">{$i18n.label.project}:</td>
<td>{$forms.invoiceForm.project.control}</td>
</tr>
-{/if}
+{/if}
<tr>
<td align="right">{$i18n.label.start_date} (*):</td>
<td>{$forms.invoiceForm.start.control}</td>
var today = new Date();
dateField.value = today.strftime("{$user->date_format}");
}
-</script>
\ No newline at end of file
+</script>
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<td valign='top'>{$invoice_item.project_name|escape:'html'}</td>
{/if}
- {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+ {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<td valign='top'>{$invoice_item.task_name|escape:'html'}</td>
{/if}
<td valign='top'>{$invoice_item.note|escape:'html'}</td>
<td align="right" colspan="{$colspan}"><b>{$i18n.label.total}:</b></td>
<td align="right"><nobr>{$total|escape:'html'}</nobr></td>
</tr>
-
- </table>
+ </table>
{/if}
</td>
</tr>
<input type="button" onclick="chLocation('invoice_send.php?id={$invoice_id}');" value="{$i18n.button.send_by_email}">
</form></td></tr>
</table>
-
-
-
</tr>
{/foreach}
</table>
-
+
{if !$user->isClient()}
<table width="100%">
<tr><td align="center"><br><form><input type="button" onclick="chLocation('invoice_add.php');" value="{$i18n.button.add_invoice}"></form></td></tr>
</td>
</tr>
</table>
-{$forms.mailForm.close}
\ No newline at end of file
+{$forms.mailForm.close}
</tr>
</table>
{/if}
- <!-- End of output messages -->
\ No newline at end of file
+ <!-- End of output messages -->
<tr><td>{$i18n.label.password}:</td></tr>
<tr><td>{$forms.loginForm.password.control}</td></tr>
<tr><td align="center" height="50">{$forms.loginForm.btn_login.control}</td></tr>
-</table>
\ No newline at end of file
+</table>
<tr><td>{$i18n.label.password}:</td></tr>
<tr><td>{$forms.loginForm.password.control}</td></tr>
<tr><td align="center" height="50">{$forms.loginForm.btn_login.control}</td></tr>
-</table>
\ No newline at end of file
+</table>
{$forms.loginForm.close}
</td>
</tr>
-</table>
\ No newline at end of file
+</table>
}
// 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];
// 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) {
}
// 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;
}
// 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;
}
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");
<style>
.not_billable td {
- color: #ff6666;
+ color: #ff6666;
}
</style>
<td align='center'>{if $record.invoice_id} {else}<a href='time_edit.php?id={$record.id}'>{$i18n.label.edit}</a>{/if}</td>
</tr>
{/foreach}
- </table>
- <table border='0'>
+ </table>
+ <table border='0'>
<tr>
<td align='right'>{$i18n.label.day_total}:</td>
<td>{$day_total}</td>
</tr>
- </table>
+ </table>
{/if}
</td>
</tr>
<td>
<table width = "100%">
<tr>
- <td valign="top">
+ <td valign="top">
<table border="0">
{if in_array('cl', explode(',', $user->plugins))}
<tr><td>{$i18n.label.client}:</td></tr>
</td>
</tr>
</table>
-{$forms.timeRecordForm.close}
\ No newline at end of file
+{$forms.timeRecordForm.close}
<td class="tableHeader" align="center">{$i18n.label.project}</td>
{/if}
<td class="tableHeader" align="center">{$i18n.label.duration}</td>
- <td class="tableHeader" align="center">{$i18n.label.note}</td>
+ <td class="tableHeader" align="center">{$i18n.label.note}</td>
</tr>
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}">
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
</td>
</tr>
</table>
-{$forms.timeRecordForm.close}
\ No newline at end of file
+{$forms.timeRecordForm.close}
// 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) {
var dropdown = document.getElementById("task");
if (dropdown == null) return; // Nothing to do.
-
+
// Determine previously selected item.
var selected_item = dropdown.options[dropdown.selectedIndex].value;
}
// 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;
}
if ((formFieldValue == "") && (formFieldName == "duration")) {
- var x = eval("document.timeRecordForm.start");
- x.disabled = false;
- x.style.background = "white";
- var x = eval("document.timeRecordForm.finish");
- x.disabled = false;
- x.style.background = "white";
+ var x = eval("document.timeRecordForm.start");
+ x.disabled = false;
+ x.style.background = "white";
+ var x = eval("document.timeRecordForm.finish");
+ x.disabled = false;
+ x.style.background = "white";
}
}
</td>
</tr>
</table>
-{$forms.timeRecordForm.close}
\ No newline at end of file
+{$forms.timeRecordForm.close}
}
// 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];
// 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) {
}
// 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;
}
// 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;
}
</script>
-<style>
-.not_billable td {
- color: #ff6666;
-}
-</style>
-
<p><span id="hour">00</span><span id="separator">:</span><span id="min">00</span>
if (startDate == null) startDate = new Date();
endDate = new Date();
delta = new Date(endDate - startDate);
-
+
var hours = delta.getUTCHours();
if (hours < 10) hours = '0'+hours;
document.getElementById('hour').innerHTML = hours;
function startTimer() {
if (timerID) return;
-
+
updateTimer();
timerID = setInterval('updateTimer()', 1000);
}
startDate.setSeconds(0);
updateTimer();
startTimer();
-</script>
-{/if}
-
-<!--
-<table cellspacing="3" cellpadding="0" border="0" width="100%">
-<tr>
- <td align="center">
- {if $time_records}
- <table border='0' cellpadding='4' cellspacing='1' width="100%">
- {foreach $time_records as $record}
- <tr bgcolor="{cycle values="#ccccce,#f5f5f5"}" {if !$record.billable} class="not_billable" {/if}>
-{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
- <td valign='top'>{$record.project|escape:'html'}</td>
+</script>
{/if}
- <td align='right' valign='top'>{if $record.duration == '0:00'}<font color="#ff0000">{/if}{$record.duration}{if $record.duration == '0:00'}</font>{/if}
- <td align='center'>{if $record.invoice_id} {else}<a href='time_edit.php?id={$record.id}'>{$i18n.label.edit}</a>{/if}</td>
- </tr>
- {/foreach}
- </table>
- <table border='0'>
- <tr>
- <td align='right'>{$i18n.label.day_total}:</td>
- <td>{$day_total}</td>
- </tr>
- </table>
- {/if}
- </td>
-</tr>
-</table>
--->
{$forms.timerRecordForm.open}
<table cellspacing="4" cellpadding="7" border="0">
<td>
<table width = "100%">
<tr>
- <td valign="top">
+ <td valign="top">
<table border="0">
{if in_array('cl', explode(',', $user->plugins))}
<tr><td>{$i18n.label.client}:</td></tr>
{/if}
</td>
</tr>
-</table>
\ No newline at end of file
+</table>
</tr>
<tr>
<td align="right">{$i18n.label.cron_schedule} (*):</td>
- <td>{$forms.notificationForm.cron_spec.control} <a href="https://www.anuko.com/lp/tt_6.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
- </tr>
- <tr>
- <td align="right">{$i18n.label.email} (*):</td>
- <td>{$forms.notificationForm.email.control}</td>
- </tr>
+ <td>{$forms.notificationForm.cron_spec.control} <a href="https://www.anuko.com/lp/tt_6.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
+ </tr>
+ <tr>
+ <td align="right">{$i18n.label.email} (*):</td>
+ <td>{$forms.notificationForm.email.control}</td>
+ </tr>
<tr>
<td height="40"></td>
<td>{$i18n.label.required_fields}</td>
</tr>
<tr>
<td align="right">{$i18n.label.cron_schedule} (*):</td>
- <td>{$forms.notificationForm.cron_spec.control} <a href="https://www.anuko.com/lp/tt_6.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
- </tr>
- <tr>
- <td align="right">{$i18n.label.email} (*):</td>
- <td>{$forms.notificationForm.email.control}</td>
- </tr>
+ <td>{$forms.notificationForm.cron_spec.control} <a href="https://www.anuko.com/lp/tt_6.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
+ </tr>
+ <tr>
+ <td align="right">{$i18n.label.email} (*):</td>
+ <td>{$forms.notificationForm.email.control}</td>
+ </tr>
<tr>
<td height="40"></td>
<td>{$i18n.label.required_fields}</td>
</td>
</tr>
</table>
-{$forms.notificationForm.close}
\ No newline at end of file
+{$forms.notificationForm.close}
<table cellspacing="0" cellpadding="7" border="0" width="720">
<tr>
<td valign="top">
- {if $user->canManageTeam()}
- <table cellspacing="1" cellpadding="3" border="0" width="100%">
+{if $user->canManageTeam()}
+ <table cellspacing="1" cellpadding="3" border="0" width="100%">
<tr>
<td class="tableHeader">{$i18n.label.thing_name}</td>
<td class="tableHeader">{$i18n.label.cron_schedule}</td>
<td class="tableHeader">{$i18n.label.edit}</td>
<td class="tableHeader">{$i18n.label.delete}</td>
</tr>
- {if $notifications}
- {foreach $notifications as $notification}
+ {if $notifications}
+ {foreach $notifications as $notification}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
<td>{$notification['name']|escape:'html'}</td>
<td>{$notification['cron_spec']|escape:'html'}</td>
<td><a href="notification_edit.php?id={$notification['id']}">{$i18n.label.edit}</a></td>
<td><a href="notification_delete.php?id={$notification['id']}">{$i18n.label.delete}</a></td>
</tr>
- {/foreach}
- {/if}
+ {/foreach}
+ {/if}
</table>
-
+
<table width="100%">
<tr><td align="center"><br>{$forms.notificationsForm.btn_add.control}</td></tr>
- </table>
- {/if}
+ </table>
+{/if}
</td>
</tr>
</table>
<table cellspacing="4" cellpadding="7" border="0">
<tr>
<td>
- {if $result_message}
+{if $result_message}
<table cellspacing="4" cellpadding="7" border="0" width="100%">
<tr><td align="center"><font color="red"><b>{$result_message}</b></font></td></tr>
</table>
- {else}
+{else}
<table>
<tr>
<td colspan="4" height="40">{$i18n.form.change_password.tip}</td>
<td colspan="3" align="center">{$forms.newPasswordForm.btn_save.control}</td>
</tr>
</table>
- {/if}
+{/if}
</td>
</tr>
</table>
-{$forms.newPasswordForm.close}
\ No newline at end of file
+{$forms.newPasswordForm.close}
<table cellspacing="4" cellpadding="7" border="0">
<tr>
<td>
- {if $result_message}
+{if $result_message}
<table cellspacing="4" cellpadding="7" border="0" width="100%">
<tr><td align="center"><font color="red"><b>{$result_message}</b></font></td></tr>
</table>
- {else}
+{else}
<table>
<tr>
<td align="right">{$i18n.label.login}:</td>
<td colspan="3" align="center">{$forms.resetPasswordForm.btn_submit.control}</td>
</tr>
</table>
- {/if}
+{/if}
</td>
</tr>
</table>
var requiredLabel = document.getElementById("required_label");
if (clientsCheckbox.checked) {
requiredCheckbox.style.visibility = "visible";
- requiredLabel.style.visibility = "visible";
- invoicesCheckbox.disabled = false;
+ requiredLabel.style.visibility = "visible";
+ invoicesCheckbox.disabled = false;
} else {
- requiredCheckbox.checked = false;
- requiredCheckbox.style.visibility = "hidden";
- requiredLabel.style.visibility = "hidden";
- invoicesCheckbox.checked = false;
+ requiredCheckbox.checked = false;
+ requiredCheckbox.style.visibility = "hidden";
+ requiredLabel.style.visibility = "hidden";
+ invoicesCheckbox.checked = false;
invoicesCheckbox.disabled = true;
- }
+ }
var expensesCheckbox = document.getElementById("expenses");
var taxCheckbox = document.getElementById("tax_expenses");
taxCheckbox.style.visibility = "visible";
taxLabel.style.visibility = "visible";
} else {
- taxCheckbox.checked = false;
+ taxCheckbox.checked = false;
taxCheckbox.style.visibility = "hidden";
taxLabel.style.visibility = "hidden";
}
<td align="right" nowrap>{$i18n.label.login} (*):</td>
<td>{$forms.profileForm.login.control}</td>
</tr>
-
{if !$auth_external}
<tr>
<td align="right" nowrap>{$i18n.label.password} (*):</td>
<td>{$forms.profileForm.password2.control}</td>
</tr>
{/if}
-
<tr>
<td align="right" nowrap>{$i18n.label.email}:</td>
<td>{$forms.profileForm.email.control}</td>
<td align="right" nowrap>{$i18n.label.team_name}:</td>
<td>{$forms.profileForm.team_name.control}</td>
</tr>
- <!-- <tr>
- <td align="right">{$i18n.label.address}:</td>
- <td>{$forms.profileForm.address.control}</td>
- </tr> -->
<tr>
<td align="right">{$i18n.label.currency}:</td>
<td>{$forms.profileForm.currency.control}</td>
<script>
MakeFormatPreview("date_format_preview", document.getElementById("format_date"));
MakeFormatPreview("time_format_preview", document.getElementById("format_time"));
-
+
function adjustDecimalPreview()
{
var mark = document.getElementById("decimal_mark").value;
</td>
</tr>
</table>
-{$forms.profileForm.close}
\ No newline at end of file
+{$forms.profileForm.close}
{/if}
</td>
</tr>
-</table>
\ No newline at end of file
+</table>
<tr>
<td align="right">{$i18n.label.currency}:</td>
<td>{$forms.profileForm.currency.control}</td>
- </tr>
+ </tr>
<tr><td> </td></tr>
<tr>
<td align="right" nowrap>{$i18n.label.manager_name} (*):</td>
</td>
</tr>
</table>
-{$forms.profileForm.close}
\ No newline at end of file
+{$forms.profileForm.close}
{if $bean->getAttribute('chcost')}<td nowrap class="cellRightAlignedSubtotal">{$user->currency|escape:'html'} {if $user->canManageTeam() || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}</td>{/if}
</tr>
{else}
-<!-- normal report -->
+<!-- normal report -->
<tr>
<td class="tableHeader">{$i18n.label.date}</td>
{if $user->canManageTeam() || $user->isClient()}<td class="tableHeader">{$i18n.label.user}</td>{/if}
{if $bean->getAttribute('chduration')}<td class="tableHeaderCentered" width="5%">{$i18n.label.duration}</td>{/if}
{if $bean->getAttribute('chnote')}<td class="tableHeader">{$i18n.label.note}</td>{/if}
{if $bean->getAttribute('chcost')}<td class="tableHeaderCentered" width="5%">{$i18n.label.cost}</td>{/if}
- {if $bean->getAttribute('chinvoice')}<td class="tableHeader">{$i18n.label.invoice}</td>{/if}
+ {if $bean->getAttribute('chinvoice')}<td class="tableHeader">{$i18n.label.invoice}</td>{/if}
</tr>
{foreach $report_items as $item}
<!-- print subtotal for a block of grouped values -->
- {$cur_date = $item.date}
+ {$cur_date = $item.date}
{if $print_subtotals}
{$cur_grouped_by = $item.grouped_by}
{if $cur_grouped_by != $prev_grouped_by && !$first_pass}
</tr>
<tr><td> </td></tr>
{/if}
- {$first_pass = false}
+ {$first_pass = false}
{/if}
<!-- print regular row -->
{if $cur_date != $prev_date}
{if $print_subtotals} {$prev_grouped_by = $item.grouped_by} {/if}
{/foreach}
<!-- print a terminating subtotal -->
- {if $print_subtotals}
+ {if $print_subtotals}
<tr class="rowReportSubtotal">
<td class="cellLeftAlignedSubtotal">{$i18n.label.subtotal}
{if $user->canManageTeam() || $user->isClient()}<td class="cellLeftAlignedSubtotal">{if $group_by == 'user'}{$subtotals[$cur_grouped_by]['name']|escape:'html'}</td>{/if}{/if}
</table>
</td>
</tr>
-</table>
\ No newline at end of file
+</table>
idx++;
{/foreach}
-
+
// empty_label is the mandatory top option in the tasks dropdown.
empty_label = '{$i18n.dropdown.all|escape:'javascript'}';
function inArray(needle, haystack) {
var length = haystack.length;
for(var i = 0; i < length; i++) {
- if(haystack[i] == needle) return true;
+ if(haystack[i] == needle) return true;
}
return false;
}
-
+
// The fillTaskDropdown function populates the task combo box with
-// tasks associated with a selected project_id.
+// tasks associated with a selected project_id.
function fillTaskDropdown(project_id) {
var str_task_ids;
// Get a string of comma-separated task ids.
var task_ids = new Array(); // Array of task ids.
task_ids = str_task_ids.split(",");
}
-
+
var dropdown = document.getElementById("task");
// Determine previously selected item.
var selected_item = dropdown.options[dropdown.selectedIndex].value;
-
+
// Remove existing content.
dropdown.length = 0;
// Add mandatory top option.
dropdown.options[dropdown_idx+1] = new Option(task_names[i][1], task_names[i][0]);
dropdown_idx++;
}
- }
+ }
}
// If a previously selected item is still in dropdown - select it.
{if $assigned_projects}
{foreach $assigned_projects as $user_id => $projects}
assigned_projects[{$user_id}] = new Array();
- {if $projects}
- {foreach $projects as $idx => $project_id}
- assigned_projects[{$user_id}][{$idx}] = {$project_id};
- {/foreach}
+ {if $projects}
+ {foreach $projects as $idx => $project_id}
+ assigned_projects[{$user_id}][{$idx}] = {$project_id};
+ {/foreach}
{/if}
{/foreach}
{/if}
-
+
// selectAssignedUsers is called when a project is changed in project dropdown.
// It selects users on the form who are assigned to this project.
function selectAssignedUsers(project_id) {
function handleCheckboxes() {
var totalsOnlyCheckbox = document.getElementById("chtotalsonly");
if ("no_grouping" == document.getElementById("group_by").value) {
- // Unmark and disable the "Totals only" checkbox.
+ // Unmark and disable the "Totals only" checkbox.
totalsOnlyCheckbox.checked = false;
totalsOnlyCheckbox.disabled = true;
} else
- totalsOnlyCheckbox.disabled = false;
+ totalsOnlyCheckbox.disabled = false;
}
</script>
<tr>
<td valign="top" colspan="2" align="center">
<table border="0" cellpadding="3">
-{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)) || ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN))}
<tr>
{if in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)}<td><b>{$i18n.label.client}</b></td>{else}<td> </td>{/if}
<td> </td>
<td>{$forms.reportForm.option.control}</td>
</tr>
{/if}
-{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<tr>
<td><b>{$i18n.label.project}</b></td>
<td> </td>
{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<td><b>{$i18n.label.task}</b></td>
- {/if}
+ {/if}
</tr>
{/if}
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
{/if}
</tr>
{/if}
-{if in_array('iv', explode(',', $user->plugins))}
+{if in_array('iv', explode(',', $user->plugins))}
<tr>
<td><b>{$i18n.form.time.billable}</b></td>
<td> </td>
<tr>
<td colspan="3">
<table border="0" width="100%">
-{if in_array('cl', explode(',', $user->plugins)) || in_array('iv', explode(',', $user->plugins))}
+{if in_array('cl', explode(',', $user->plugins)) || in_array('iv', explode(',', $user->plugins))}
<tr>
{if in_array('cl', explode(',', $user->plugins))}
<td width="25%"><label>{$forms.reportForm.chclient.control} {$i18n.label.client}</label></td>
<td width="25%"><label>{$forms.reportForm.chinvoice.control} {$i18n.label.invoice}</label></td>
{/if}
</tr>
-{/if}
+{/if}
<tr>
<td width="25%">{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}<label>{$forms.reportForm.chproject.control} {$i18n.label.project}</label>{/if}</td>
<td width="25%">{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}<label>{$forms.reportForm.chstart.control} {$i18n.label.start}</label>{/if}</td>
{/if}
</tr>
<tr>
- <td>{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}<label>{$forms.reportForm.chtask.control} {$i18n.label.task}</label>{/if}</td>
- <td>{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}<label>{$forms.reportForm.chfinish.control} {$i18n.label.finish}</label>{/if}</td>
+ <td>{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}<label>{$forms.reportForm.chtask.control} {$i18n.label.task}</label>{/if}</td>
+ <td>{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}<label>{$forms.reportForm.chfinish.control} {$i18n.label.finish}</label>{/if}</td>
<td><label>{$forms.reportForm.chnote.control} {$i18n.label.note}</label></td>
{if ($custom_fields && $custom_fields->fields[0])}
<td><label>{$forms.reportForm.chcf_1.control} {$custom_fields->fields[0]['label']|escape:'html'}</label></td>
<td>{$forms.reportForm.group_by.control} <label>{$forms.reportForm.chtotalsonly.control} {$i18n.form.reports.totals_only}</label></td>
</tr>
</table>
-
+
<div style="padding: 10 0 10 0;">
<table border="0" bgcolor="#efefef" width="720">
<tr>
</td>
</tr>
</table>
-{$forms.reportForm.close}
\ No newline at end of file
+{$forms.reportForm.close}
</td>
</tr>
</table>
-{$forms.taskForm.close}
\ No newline at end of file
+{$forms.taskForm.close}
</td>
</tr>
</table>
-{$forms.taskDeleteForm.close}
\ No newline at end of file
+{$forms.taskDeleteForm.close}
</td>
</tr>
</table>
-{$forms.taskForm.close}
\ No newline at end of file
+{$forms.taskForm.close}
{/if}
</td>
</tr>
-</table>
\ No newline at end of file
+</table>
}
// 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");
// 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) {
}
// 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.
}
// 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;
}
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");
<table width="720">
<tr>
<td valign="top">
- {if $time_records}
+{if $time_records}
<table border='0' cellpadding='3' cellspacing='1' width="100%">
<tr>
-{if in_array('cl', explode(',', $user->plugins))}
+ {if in_array('cl', explode(',', $user->plugins))}
<td width="20%" class="tableHeader">{$i18n.label.client}</td>
-{/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)}
<td class="tableHeader">{$i18n.label.project}</td>
-{/if}
-{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+ {/if}
+ {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<td class="tableHeader">{$i18n.label.task}</td>
-{/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))}
<td width="5%" class="tableHeader" align='right'>{$i18n.label.start}</td>
<td width="5%" class="tableHeader" align='right'>{$i18n.label.finish}</td>
-{/if}
+ {/if}
<td width="5%" class="tableHeader">{$i18n.label.duration}</td>
<td class="tableHeader">{$i18n.label.note}</td>
<td width="5%" class="tableHeader">{$i18n.label.edit}</td>
</tr>
- {foreach $time_records as $record}
+ {foreach $time_records as $record}
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}" {if !$record.billable} class="not_billable" {/if}>
-{if in_array('cl', explode(',', $user->plugins))}
+ {if in_array('cl', explode(',', $user->plugins))}
<td valign='top'>{$record.client|escape:'html'}</td>
-{/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)}
<td valign='top'>{$record.project|escape:'html'}</td>
-{/if}
-{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+ {/if}
+ {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<td valign='top'>{$record.task|escape:'html'}</td>
-{/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))}
<td nowrap align='right' valign='top'>{if $record.start}{$record.start}{else} {/if}</td>
<td nowrap align='right' valign='top'>{if $record.finish}{$record.finish}{else} {/if}</td>
-{/if}
+ {/if}
<td align='right' valign='top'>{if $record.duration <> '0:00'}{$record.duration}{else}<font color="#ff0000">{$i18n.form.time.uncompleted}</font>{/if}</td>
<td valign='top'>{if $record.comment}{$record.comment|escape:'html'}{else} {/if}</td>
<td valign='top' align='center'>
- {if $record.invoice_id}
+ {if $record.invoice_id}
- {else}
+ {else}
<a href='time_edit.php?id={$record.id}'>{$i18n.label.edit}</a>
- {if $record.duration == '0:00'}
+ {if $record.duration == '0:00'}
<input type='hidden' name='record_id' value='{$record.id}'>
<input type='hidden' name='browser_date' value=''>
<input type='hidden' name='browser_time' value=''>
<input type='submit' id='btn_stop' name='btn_stop' onclick='browser_date.value=get_date();browser_time.value=get_time()' value='{$i18n.button.stop}'>
- {/if}
- {/if}
+ {/if}
+ {/if}
</td>
</tr>
- {/foreach}
- </table>
- {/if}
+ {/foreach}
+ </table>
+{/if}
</td>
</tr>
</table>
</table>
{/if}
{$forms.timeRecordForm.close}
-
-
{if (($smarty.const.TYPE_DURATION == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
<td class="tableHeader" align="center">{$i18n.label.duration}</td>
{/if}
- <td class="tableHeader" align="center">{$i18n.label.note}</td>
+ <td class="tableHeader" align="center">{$i18n.label.note}</td>
</tr>
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}">
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
</td>
</tr>
</table>
-{$forms.timeRecordForm.close}
\ No newline at end of file
+{$forms.timeRecordForm.close}
fillTaskDropdown(document.timeRecordForm.project.value);
}
-
+
// The fillProjectDropdown function populates the project combo box with
// projects associated with a selected clientt (client id is passed here as id).
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) {
var dropdown = document.getElementById("task");
if (dropdown == null) return; // Nothing to do.
-
+
// Determine previously selected item.
var selected_item = dropdown.options[dropdown.selectedIndex].value;
}
if ((formFieldValue == "") && (formFieldName == "duration")) {
- var x = eval("document.timeRecordForm.start");
- x.disabled = false;
- x.style.background = "white";
- var x = eval("document.timeRecordForm.finish");
- x.disabled = false;
- x.style.background = "white";
+ var x = eval("document.timeRecordForm.start");
+ x.disabled = false;
+ x.style.background = "white";
+ var x = eval("document.timeRecordForm.finish");
+ x.disabled = false;
+ x.style.background = "white";
}
}
<td>
<table width = "100%">
<tr>
- <td valign="top">
+ <td valign="top">
<table border="0">
{if in_array('cl', explode(',', $user->plugins))}
<tr>
</td>
</tr>
</table>
-{$forms.timeRecordForm.close}
\ No newline at end of file
+{$forms.timeRecordForm.close}
</tr>
</table>
</table>
-{$forms.userForm.close}
\ No newline at end of file
+{$forms.userForm.close}
</td>
</tr>
</table>
-{$forms.userDeleteForm.close}
\ No newline at end of file
+{$forms.userDeleteForm.close}
function getRate(project_id) {
var length = project_rates.length;
for(var i = 0; i < length; i++) {
- if(project_rates[i][0] == project_id) {
- return project_rates[i][1];
- }
+ if(project_rates[i][0] == project_id) {
+ return project_rates[i][1];
+ }
}
var default_rate = document.userForm.rate.value;
return default_rate;
for (var i = 0; i < userForm.elements.length; i++) {
if ((userForm.elements[i].type == 'text') && (userForm.elements[i].name == ('rate_'+element.value))) {
if (element.checked) {
- userForm.elements[i].value = getRate(element.value);
+ userForm.elements[i].value = getRate(element.value);
} else {
userForm.elements[i].value = '';
}
function handleClientControl() {
var clientControl = document.getElementById("client");
if ("16" == document.getElementById("role").value)
- clientControl.style.visibility = "visible";
+ clientControl.style.visibility = "visible";
else
- clientControl.style.visibility = "hidden";
+ clientControl.style.visibility = "hidden";
}
</script>
</tr>
</table>
</table>
-{$forms.userForm.close}
\ No newline at end of file
+{$forms.userForm.close}
{/foreach}
{/if}
</table>
-
+
<table width="100%">
<tr>
<td align="center"><br>
{/foreach}
</table>
-
+
<table width="100%">
<tr>
<td align="center" height="50">
{/if}
</td>
</tr>
-</table>
\ No newline at end of file
+</table>