projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some more refactoring.
[timetracker.git]
/
WEB-INF
/
templates
/
expenses.tpl
diff --git
a/WEB-INF/templates/expenses.tpl
b/WEB-INF/templates/expenses.tpl
index
ed98bb5
..
45a8ef2
100644
(file)
--- a/
WEB-INF/templates/expenses.tpl
+++ b/
WEB-INF/templates/expenses.tpl
@@
-86,7
+86,7
@@
function recalculateCost() {
var comment_control = document.getElementById("item_name");
var cost_control = document.getElementById("cost");
var comment_control = document.getElementById("item_name");
var cost_control = document.getElementById("cost");
- var replaceDecimalMark = ("." != "{$user->
decimal_mark
}");
+ var replaceDecimalMark = ("." != "{$user->
getDecimalMark()
}");
// Calculate cost.
var dropdown = document.getElementById("predefined_expense");
// Calculate cost.
var dropdown = document.getElementById("predefined_expense");
@@
-102,10
+102,10
@@
function recalculateCost() {
else {
var expenseCost = defined_expenses[dropdown.selectedIndex - 1][2];
if (replaceDecimalMark)
else {
var expenseCost = defined_expenses[dropdown.selectedIndex - 1][2];
if (replaceDecimalMark)
- expenseCost = expenseCost.replace("{$user->
decimal_mark
}", ".");
+ expenseCost = expenseCost.replace("{$user->
getDecimalMark()
}", ".");
var newCost = (quantity_control.value * expenseCost).toFixed(2);
if (replaceDecimalMark)
var newCost = (quantity_control.value * expenseCost).toFixed(2);
if (replaceDecimalMark)
- newCost = newCost.replace(".", "{$user->
decimal_mark
}");
+ newCost = newCost.replace(".", "{$user->
getDecimalMark()
}");
cost_control.value = newCost;
}
}
cost_control.value = newCost;
}
}
@@
-117,10
+117,10
@@
function recalculateCost() {
<tr>
<td valign="top">
<table>
<tr>
<td valign="top">
<table>
-{if $
on_behalf_control
}
+{if $
user_dropdown
}
<tr>
<td align="right">{$i18n.label.user}:</td>
<tr>
<td align="right">{$i18n.label.user}:</td>
- <td>{$forms.expensesForm.
onBehalfU
ser.control}</td>
+ <td>{$forms.expensesForm.
u
ser.control}</td>
</tr>
{/if}
{if $user->isPluginEnabled('cl')}
</tr>
{/if}
{if $user->isPluginEnabled('cl')}
@@
-129,7
+129,7
@@
function recalculateCost() {
<td>{$forms.expensesForm.client.control}</td>
</tr>
{/if}
<td>{$forms.expensesForm.client.control}</td>
</tr>
{/if}
-{if
($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)
}
+{if
$show_project
}
<tr>
<td align="right">{$i18n.label.project} (*):</td>
<td>{$forms.expensesForm.project.control}</td>
<tr>
<td align="right">{$i18n.label.project} (*):</td>
<td>{$forms.expensesForm.project.control}</td>
@@
-151,7
+151,7
@@
function recalculateCost() {
</tr>
<tr>
<td align="right">{$i18n.label.cost} (*):</td>
</tr>
<tr>
<td align="right">{$i18n.label.cost} (*):</td>
- <td>{$forms.expensesForm.cost.control} {$user->
currency
|escape}</td>
+ <td>{$forms.expensesForm.cost.control} {$user->
getCurrency()
|escape}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
@@
-178,7
+178,7
@@
function recalculateCost() {
{if $user->isPluginEnabled('cl')}
<td width="20%" class="tableHeader">{$i18n.label.client}</td>
{/if}
{if $user->isPluginEnabled('cl')}
<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
$show_project
}
<td class="tableHeader">{$i18n.label.project}</td>
{/if}
<td class="tableHeader">{$i18n.label.item}</td>
<td class="tableHeader">{$i18n.label.project}</td>
{/if}
<td class="tableHeader">{$i18n.label.item}</td>
@@
-190,7
+190,7
@@
function recalculateCost() {
{if $user->isPluginEnabled('cl')}
<td valign="top">{$item.client|escape}</td>
{/if}
{if $user->isPluginEnabled('cl')}
<td valign="top">{$item.client|escape}</td>
{/if}
- {if
($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)
}
+ {if
$show_project
}
<td valign="top">{$item.project|escape}</td>
{/if}
<td valign="top">{$item.item|escape}</td>
<td valign="top">{$item.project|escape}</td>
{/if}
<td valign="top">{$item.item|escape}</td>
@@
-201,7
+201,7
@@
function recalculateCost() {
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
- <td nowrap align="right">{$i18n.label.day_total}: {$user->
currency
|escape} {$day_total}</td>
+ <td nowrap align="right">{$i18n.label.day_total}: {$user->
getCurrency()
|escape} {$day_total}</td>
</tr>
</table>
{/if}
</tr>
</table>
{/if}