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>
120 <td width="5%" class="tableHeader">{$i18n.label.edit}</td>
122 {foreach $time_records as $record}
123 <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}" {if !$record.billable} class="not_billable" {/if}>
124 <td valign="top">{$record.date}</td>
125 {if $user->isPluginEnabled('cl')}
126 <td valign="top">{$record.client|escape}</td>
128 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
129 <td valign="top">{$record.project|escape}</td>
131 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
132 <td valign="top">{$record.task|escape}</td>
134 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
135 <td nowrap align="right" valign="top">{if $record.start}{$record.start}{else} {/if}</td>
136 <td nowrap align="right" valign="top">{if $record.finish}{$record.finish}{else} {/if}</td>
138 <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>
139 <td valign="top">{if $record.comment}{$record.comment|escape}{else} {/if}</td>
140 <td valign="top" align="center">
141 {if $record.invoice_id}
144 <a href="time_edit.php?id={$record.id}">{$i18n.label.edit}</a>
145 {if ($record.duration == '0:00' && $record.start <> '')}
146 <input type="hidden" name="record_id" value="{$record.id}">
147 <input type="hidden" name="browser_date" value="">
148 <input type="hidden" name="browser_time" value="">
149 <input type="submit" id="btn_stop" name="btn_stop" onclick="browser_date.value=get_date();browser_time.value=get_time()" value="{$i18n.button.stop}">
163 <table cellpadding="3" cellspacing="1" width="720">
164 {if $user->isPluginEnabled('wvl')}
166 <td align="left">{$i18n.label.week_total}: {$week_total}</td>
170 {if $user->isPluginEnabled('mq')}
172 <td align="left">{$i18n.label.month_total}: {$month_total}</td>
174 <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
176 <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$quota_remaining}</span></td>
182 {$forms.weekTimeForm.close}