summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages/TimeTracker/TimeEntryList.tpl
blob: ace8a95b2d3bf1268c90b5053aaced75734836a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<com:TDataList ID="entries"
	RepeatLayout="Raw"
	DataKeyField="ID"
	OnEditCommand="editEntryItem"
	OnCancelCommand="refreshEntryList"
	OnUpdateCommand="updateEntryItem"
	OnDeleteCommand="deleteEntryItem"
	OnItemCreated="EntryItemCreated" >
	<prop:EmptyTemplate>
	There are no time entries for this user.
	</prop:EmptyTemplate>
	<prop:HeaderTemplate>
	  <table class="time-entries">
	  	<tr>
	  		<th>Category Name</th>
	  		<th>Description</th>
	  		<th>Duration</th>
	  		<th>Reported Date</th>
	  		<th>Edit/Delete</th>
	  	</tr>
	</prop:HeaderTemplate>

	<prop:FooterTemplate>
	  </table>
	</prop:FooterTemplate>
	<prop:ItemTemplate>
	  <tr>
	  	<td class="categoryName"><%# $this->DataItem->Category->Name %></td>
	  	<td class="description"><%# $this->DataItem->Description %></td>
	  	<td class="duration"><%# $this->DataItem->Duration %></td>
	  	<td class="date">
	  		<com:System.I18N.TDateFormat 
	  			Pattern="dd/MM/yyyy"
	  			Value=<%# $this->DataItem->ReportDate %> />
	  	</td>
	  	<td class="edit">
	  		<com:TButton Text="Edit" CommandName="edit"/>	  			
	  		<com:TButton Text="Delete" CommandName="delete"
	  			Attributes.onclick="if(!confirm('Are you sure?')) return false;" />
	  	</td>
	  </tr>
	</prop:ItemTemplate>
	
	<prop:EditItemTemplate>
	  <tr>
	  	<td class="categoryName">
	  		<com:TDropDownList ID="category" />
	  	</td>
	  	<td class="description">
	  		<com:TTextBox ID="description" Text=<%# $this->DataItem->Description %> />
	  	</td>
	  	<td class="duration">
	  		<com:TTextBox ID="hours" Text=<%# $this->DataItem->Duration %> />
	  	</td>
	  	<td class="date">
	  		<com:TDatePicker InputMode="DropDownList" ID="day" 
	  			TimeStamp=<%# $this->DataItem->ReportDate %> />
	  	</td>
	  	<td class="edit">
	  		<com:TButton Text="Save" CommandName="update" ValidationGroup="entry-update"/>
	  		<com:TButton Text="Cancel" CommandName="cancel" />
	  	</td>
	  </tr>
	</prop:EditItemTemplate>	
		
</com:TDataList>