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">
28 <td align="center" colspan=2">
29 <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>
36 {if $on_behalf_control}
38 <td align="right">{$i18n.label.user}:</td>
39 <td>{$forms.weekTimeForm.onBehalfUser.control}</td>
44 <td align="right">{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:</td>
45 <td>{$forms.weekTimeForm.client.control}</td>
48 {if $user->isPluginEnabled('iv')}
50 <td align="right"> </td>
51 <td><label>{$forms.weekTimeForm.billable.control}{$i18n.form.time.billable}</label></td>
54 {if ($custom_fields && $custom_fields->fields[0])}
56 <td align="right">{$custom_fields->fields[0]['label']|escape}{if $custom_fields->fields[0]['required']} (*){/if}:</td><td>{$forms.weekTimeForm.cf_1.control}</td>
61 <td align="right">{$i18n.label.project} (*):</td>
62 <td>{$forms.weekTimeForm.project.control}</td>
67 <td align="right">{$i18n.label.task}:</td>
68 <td>{$forms.weekTimeForm.task.control}</td>
73 <td align="right">{$i18n.label.week_note}:</td>
74 <td>{$forms.weekTimeForm.note.control}</td>
81 <tr><td>{$forms.weekTimeForm.date.control}</td></tr>
88 <td>{$forms.weekTimeForm.week_durations.control}</td>
94 <td align="center" colspan="2">{$forms.weekTimeForm.btn_submit.control}</td>
96 <tr><td> </td></tr>
104 <table border="0" cellpadding="3" cellspacing="1" width="100%">
106 <td width="5%" class="tableHeader">{$i18n.label.date}</td>
107 {if $user->isPluginEnabled('cl')}
108 <td width="20%" class="tableHeader">{$i18n.label.client}</td>
110 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
111 <td class="tableHeader">{$i18n.label.project}</td>
113 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
114 <td class="tableHeader">{$i18n.label.task}</td>
116 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
117 <td width="5%" class="tableHeader" align="right">{$i18n.label.start}</td>
118 <td width="5%" class="tableHeader" align="right">{$i18n.label.finish}</td>
120 <td width="5%" class="tableHeader">{$i18n.label.duration}</td>
121 <td class="tableHeader">{$i18n.label.note}</td>
128 {foreach $time_records as $record}
129 <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}" {if !$record.billable} class="not_billable" {/if}>
130 <td valign="top">{$record.date}</td>
131 {if $user->isPluginEnabled('cl')}
132 <td valign="top">{$record.client|escape}</td>
134 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
135 <td valign="top">{$record.project|escape}</td>
137 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
138 <td valign="top">{$record.task|escape}</td>
140 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
141 <td nowrap align="right" valign="top">{if $record.start}{$record.start}{else} {/if}</td>
142 <td nowrap align="right" valign="top">{if $record.finish}{$record.finish}{else} {/if}</td>
144 <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>
145 <td valign="top">{if $record.comment}{$record.comment|escape}{else} {/if}</td>
147 {if $record.has_files}
148 <td valign="top" align="center"><a href="time_files.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_files.png"></a></td>
150 <td valign="top" align="center"><a href="time_files.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.files}" src="images/icon_file.png"></a></td>
153 <td valign="top" align="center">
154 {if $record.approved || $record.timesheet_id || $record.invoice_id}
157 <a href="time_edit.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="images/icon_edit.png"></a>
158 {if ($record.duration == '0:00' && $record.start <> '')}
159 <input type="hidden" name="record_id" value="{$record.id}">
160 <input type="hidden" name="browser_date" value="">
161 <input type="hidden" name="browser_time" value="">
162 <input type="submit" id="btn_stop" name="btn_stop" onclick="browser_date.value=get_date();browser_time.value=get_time()" value="{$i18n.button.stop}">
166 <td valign="top" align="center">
167 {if $record.approved || $record.timesheet_id || $record.invoice_id}
170 <a href="time_delete.php?id={$record.id}"><img class="table_icon" alt="{$i18n.label.delete}" src="images/icon_delete.png"></a>
183 <table cellpadding="3" cellspacing="1" width="720">
186 <td align="left">{$i18n.label.week_total}: {$week_total}</td>
190 {if $user->isPluginEnabled('mq')}
192 <td align="left">{$i18n.label.month_total}: {$month_total}</td>
194 <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
196 <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$quota_remaining}</span></td>
202 {$forms.weekTimeForm.close}