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