Added paid checkbox to desktop time edit page.
[timetracker.git] / WEB-INF / templates / time.tpl
1 {include file="time_script.tpl"}
2
3 <style>
4 .not_billable td {
5   color: #ff6666;
6 }
7 </style>
8
9 {$forms.timeRecordForm.open}
10 <table cellspacing="4" cellpadding="0" border="0">
11   <tr>
12     <td align="center" colspan=2">
13       <a href="time.php?date={$selected_date->toString()}">{$i18n.label.day_view}</a>&nbsp;/&nbsp;<a href="week.php?date={$selected_date->toString()}">{$i18n.label.week_view}</a>
14     </td>
15   </tr>
16   <tr>
17     <td valign="top">
18       <table>
19 {if $on_behalf_control}
20         <tr>
21           <td align="right">{$i18n.label.user}:</td>
22           <td>{$forms.timeRecordForm.onBehalfUser.control}</td>
23         </tr>
24 {/if}
25 {if $user->isPluginEnabled('cl')}
26         <tr>
27           <td align="right">{$i18n.label.client}{if $user->isPluginEnabled('cm')} (*){/if}:</td>
28           <td>{$forms.timeRecordForm.client.control}</td>
29         </tr>
30 {/if}
31 {if $user->isPluginEnabled('iv')}
32         <tr>
33           <td align="right">&nbsp;</td>
34           <td><label>{$forms.timeRecordForm.billable.control}{$i18n.form.time.billable}</label></td>
35         </tr>
36 {/if}
37 {if ($custom_fields && $custom_fields->fields[0])}
38         <tr>
39           <td align="right">{$custom_fields->fields[0]['label']|escape}{if $custom_fields->fields[0]['required']} (*){/if}:</td><td>{$forms.timeRecordForm.cf_1.control}</td>
40         </tr>
41 {/if}
42 {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
43         <tr>
44           <td align="right">{$i18n.label.project} (*):</td>
45           <td>{$forms.timeRecordForm.project.control}</td>
46         </tr>
47 {/if}
48 {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
49         <tr>
50           <td align="right">{$i18n.label.task}{if $user->task_required} (*){/if}:</td>
51           <td>{$forms.timeRecordForm.task.control}</td>
52         </tr>
53 {/if}
54 {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
55         <tr>
56           <td align="right">{$i18n.label.start}:</td>
57           <td>{$forms.timeRecordForm.start.control}&nbsp;<input onclick="setNow('start');" type="button" tabindex="-1" value="{$i18n.button.now}"></td>
58         </tr>
59         <tr>
60           <td align="right">{$i18n.label.finish}:</td>
61           <td>{$forms.timeRecordForm.finish.control}&nbsp;<input onclick="setNow('finish');" type="button" tabindex="-1" value="{$i18n.button.now}"></td>
62         </tr>
63 {/if}
64 {if (($smarty.const.TYPE_DURATION == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
65         <tr>
66           <td align="right">{$i18n.label.duration}:</td>
67           <td>{$forms.timeRecordForm.duration.control}&nbsp;{if $user->decimal_mark == ','}{str_replace('.', ',', $i18n.form.time.duration_format)}{else}{$i18n.form.time.duration_format}{/if}</td>
68         </tr>
69 {/if}
70       </table>
71     </td>
72     <td valign="top">
73       <table>
74         <tr><td>{$forms.timeRecordForm.date.control}</td></tr>
75       </table>
76     </td>
77   </tr>
78 </table>
79
80 <table>
81   <tr>
82     <td align="right">{$i18n.label.note}:</td>
83     <td align="left">{$forms.timeRecordForm.note.control}</td>
84   </tr>
85   <tr>
86     <td align="center" colspan="2">{$forms.timeRecordForm.btn_submit.control}</td>
87   </tr>
88 </table>
89
90 <table width="720">
91 <tr>
92   <td valign="top">
93 {if $time_records}
94       <table border="0" cellpadding="3" cellspacing="1" width="100%">
95       <tr>
96   {if $user->isPluginEnabled('cl')}
97         <td width="20%" class="tableHeader">{$i18n.label.client}</td>
98   {/if}
99   {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
100         <td class="tableHeader">{$i18n.label.project}</td>
101   {/if}
102   {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
103         <td class="tableHeader">{$i18n.label.task}</td>
104   {/if}
105   {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
106         <td width="5%" class="tableHeader" align="right">{$i18n.label.start}</td>
107         <td width="5%" class="tableHeader" align="right">{$i18n.label.finish}</td>
108   {/if}
109         <td width="5%" class="tableHeader">{$i18n.label.duration}</td>
110         <td class="tableHeader">{$i18n.label.note}</td>
111         <td width="5%" class="tableHeader">{$i18n.label.edit}</td>
112       </tr>
113   {foreach $time_records as $record}
114       <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}" {if !$record.billable} class="not_billable" {/if}>
115     {if $user->isPluginEnabled('cl')}
116         <td valign="top">{$record.client|escape}</td>
117     {/if}
118     {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
119         <td valign="top">{$record.project|escape}</td>
120     {/if}
121     {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
122         <td valign="top">{$record.task|escape}</td>
123     {/if}
124     {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}
125         <td nowrap align="right" valign="top">{if $record.start}{$record.start}{else}&nbsp;{/if}</td>
126         <td nowrap align="right" valign="top">{if $record.finish}{$record.finish}{else}&nbsp;{/if}</td>
127     {/if}
128         <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>
129         <td valign="top">{if $record.comment}{$record.comment|escape}{else}&nbsp;{/if}</td>
130         <td valign="top" align="center">
131     {if $record.invoice_id}
132           &nbsp;
133     {else}
134           <a href="time_edit.php?id={$record.id}">{$i18n.label.edit}</a>
135       {if ($record.duration == '0:00' && $record.start <> '')}
136           <input type="hidden" name="record_id" value="{$record.id}">
137           <input type="hidden" name="browser_date" value="">
138           <input type="hidden" name="browser_time" value="">
139           <input type="submit" id="btn_stop" name="btn_stop" onclick="browser_date.value=get_date();browser_time.value=get_time()" value="{$i18n.button.stop}">
140       {/if}
141     {/if}
142         </td>
143       </tr>
144   {/foreach}
145     </table>
146 {/if}
147   </td>
148 </tr>
149 </table>
150 {if $time_records}
151 <table cellpadding="3" cellspacing="1" width="720">
152   <tr>
153     <td align="left">{$i18n.label.week_total}: {$week_total}</td>
154     <td align="right">{$i18n.label.day_total}: {$day_total}</td>
155   </tr>
156   {if $user->isPluginEnabled('mq')}
157   <tr>
158     <td align="left">{$i18n.label.month_total}: {$month_total}</td>
159     {if $over_quota}
160     <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
161     {else}
162     <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$quota_remaining}</span></td>
163     {/if}
164   </tr>
165   {/if}
166 </table>
167 {/if}
168 {$forms.timeRecordForm.close}