1 {include file="time_script.tpl"}
4 // This is here because fillDropdowns() in time_script.tpl uses a different form name.
5 // Perhaps a better fix would be to provide form name as paramater to fillDropdowns()?
6 // TODO: try to fix it properly.
8 // The fillDropdowns function populates the "project" and "task" dropdown controls
9 // with relevant values.
10 function fillDropdowns() {
11 if(document.body.contains(document.weekTimeForm.client))
12 fillProjectDropdown(document.weekTimeForm.client.value);
14 fillTaskDropdown(document.weekTimeForm.project.value);
24 {$forms.weekTimeForm.open}
25 <table cellspacing="4" cellpadding="0" border="0">
27 <td align="center" colspan=2">
28 <a href="time.php?date={$selected_date->toString()}">{$i18n.label.day_view}</a> / <a href="week.php?date={$selected_date->toString()}">{$i18n.label.week_view}</a>
34 {if $on_behalf_control}
36 <td align="right">{$i18n.label.user}:</td>
37 <td>{$forms.weekTimeForm.onBehalfUser.control}</td>
40 {if $user->isPluginEnabled('cl')}
42 <td align="right">{$i18n.label.client}{if $user->isPluginEnabled('cm')} (*){/if}:</td>
43 <td>{$forms.weekTimeForm.client.control}</td>
46 {if $user->isPluginEnabled('iv')}
48 <td align="right"> </td>
49 <td><label>{$forms.weekTimeForm.billable.control}{$i18n.form.time.billable}</label></td>
52 {if ($custom_fields && $custom_fields->fields[0])}
54 <td align="right">{$custom_fields->fields[0]['label']|escape}{if $custom_fields->fields[0]['required']} (*){/if}:</td><td>{$forms.weekTimeForm.cf_1.control}</td>
57 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
59 <td align="right">{$i18n.label.project} (*):</td>
60 <td>{$forms.weekTimeForm.project.control}</td>
63 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
65 <td align="right">{$i18n.label.task}:</td>
66 <td>{$forms.weekTimeForm.task.control}</td>
69 {if $user->isPluginEnabled('wvn')}
71 <td align="right">{$i18n.label.week_note}:</td>
72 <td>{$forms.weekTimeForm.note.control}</td>
79 <tr><td>{$forms.weekTimeForm.date.control}</td></tr>
86 <td>{$forms.weekTimeForm.week_durations.control}</td>
92 <td align="center" colspan="2">{$forms.weekTimeForm.btn_submit.control}</td>
94 <tr><td> </td></tr>
97 {if $user->isPluginEnabled('wvl')}
102 <table border="0" cellpadding="3" cellspacing="1" width="100%">
104 <td width="5%" class="tableHeader">{$i18n.label.date}</td>
105 {if $user->isPluginEnabled('cl')}
106 <td width="20%" class="tableHeader">{$i18n.label.client}</td>
108 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
109 <td class="tableHeader">{$i18n.label.project}</td>
111 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
112 <td class="tableHeader">{$i18n.label.task}</td>
114 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
115 <td width="5%" class="tableHeader" align="right">{$i18n.label.start}</td>
116 <td width="5%" class="tableHeader" align="right">{$i18n.label.finish}</td>
118 <td width="5%" class="tableHeader">{$i18n.label.duration}</td>
119 <td class="tableHeader">{$i18n.label.note}</td>
123 {foreach $time_records as $record}
124 <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}" {if !$record.billable} class="not_billable" {/if}>
125 <td valign="top">{$record.date}</td>
126 {if $user->isPluginEnabled('cl')}
127 <td valign="top">{$record.client|escape}</td>
129 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
130 <td valign="top">{$record.project|escape}</td>
132 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
133 <td valign="top">{$record.task|escape}</td>
135 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
136 <td nowrap align="right" valign="top">{if $record.start}{$record.start}{else} {/if}</td>
137 <td nowrap align="right" valign="top">{if $record.finish}{$record.finish}{else} {/if}</td>
139 <td align="right" valign="top">{if ($record.duration == '0:00' && $record.start <> '')}<font color="#ff0000">{$i18n.form.time.uncompleted}</font>{else}{$record.duration}{/if}</td>
140 <td valign="top">{if $record.comment}{$record.comment|escape}{else} {/if}</td>
141 <td valign="top" align="center">
142 {if $record.approved || $record.timesheet_id || $record.invoice_id}
145 <a href="time_edit.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a>
146 {if ($record.duration == '0:00' && $record.start <> '')}
147 <input type="hidden" name="record_id" value="{$record.id}">
148 <input type="hidden" name="browser_date" value="">
149 <input type="hidden" name="browser_time" value="">
150 <input type="submit" id="btn_stop" name="btn_stop" onclick="browser_date.value=get_date();browser_time.value=get_time()" value="{$i18n.button.stop}">
154 <td valign="top" align="center">
155 {if $record.approved || $record.timesheet_id || $record.invoice_id}
158 <a href="time_delete.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a>
171 <table cellpadding="3" cellspacing="1" width="720">
172 {if $user->isPluginEnabled('wvl')}
174 <td align="left">{$i18n.label.week_total}: {$week_total}</td>
178 {if $user->isPluginEnabled('mq')}
180 <td align="left">{$i18n.label.month_total}: {$month_total}</td>
182 <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
184 <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$quota_remaining}</span></td>
190 {$forms.weekTimeForm.close}