summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages/TimeTracker/ReportResource.page
blob: b9404f4add7a249973eb23c384c8393a17f51a22 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<com:TContent ID="Main">
<h1>Resource Report</h1>

<fieldset class="resource-report">
	<legend>Resource Report</legend>
	<com:TMultiView ID="views" ActiveViewIndex="0">
	<com:TView>
		<div class="step1">
		<h2>STEP 1 - Select project(s)</h2>
		<com:TLabel ForControl="projectList" 
			Text="Select a project. Use ctrl+click to select multiple projects at once: "/>
		<span class="required">*</span><br />
		<com:TListBox ID="projectList" CssClass="projects" SelectionMode="Multiple" />
		<com:TRequiredFieldValidator
			ControlToValidate="projectList"
			ErrorMessage="Please select at least one project."
			ControlCssClass="required-input"
			Display="None" />
		</div>
		<div class="step2">
		<h2>STEP 2 - Select resource(s)</h2>
		<com:TLabel ForControl="resourceList" 
			Text="Select a resource. Use ctrl+click to select multiple resources at once: "/>
		<span class="required">*</span><br />
		<com:TListBox ID="resourceList" CssClass="resource" SelectionMode="Multiple" />
		<com:TRequiredFieldValidator
			ControlToValidate="resourceList"
			ErrorMessage="Please select at least one member."
			ControlCssClass="required-input"
			Display="None" />
		</div>
		<div class="step1">
		<h2>STEP 3 - Select a date range</h2>
		<div class="date-from">
		<com:TLabel ForControl="dateFrom" Text="Dates from:"/>
		<span class="required">*</span><br />
		<com:TDatePicker id="dateFrom" 
			DateFormat="dd/MM/yyyy"
			TimeStamp=<%= strtotime("-1 year") %>
			InputMode="DropDownList" />
		</div>
		<div class="date-to">
		<com:TLabel ForControl="dateTo" Text="Date to:"/>
		<span class="required">*</span><br />
		<com:TDatePicker id="dateTo" DateFormat="dd/MM/yyyy" InputMode="DropDownList"/>
		<com:TCompareValidator
			ControlToValidate="dateTo"
			ControlToCompare="dateFrom"
			DataType="Date"
			Display="None"
			ControlCssClass="required-input"
			DateFormat="dd/MM/yyyy"
			Operator="GreaterThanEqual"
			ErrorMessage="The end date must be greater or equal to the start date." />
		</div>
		</div>
		<div class="actions">&nbsp;
		<div class="summary">
		<com:TValidationSummary
			AutoUpdate="false" />
		</div>
		<div class="buttons">
			<com:TButton Text="Generate Report" Onclick="generateReport_Clicked"/>
		</div>	
		</div>
	</com:TView>
	
	<com:TView>
		<div class="date-range">
		 <h3 class="begin">Beginning Date:</h3>
		 <h4 class="begin"><%= h($this->dateFrom->Date) %></h4> 	 
		 <h3 class="end">Ending Date:</h3>
		 <h4 class="end"><%= h($this->dateTo->Date) %></h4>
		</div> 
		 <com:TRepeater ID="resource_report" OnItemCreated="resource_report_itemCreated" EnableViewState="false">
		 	<prop:ItemTemplate>
		 	<div class="resource">
		 	<strong class="name">Consultant:</strong> 
		 	<span class="name"><%# h($this->DataItem->Username) %></span>
		 	<strong class="hours">Total Hours:</strong>
		 	<span class="hours"><%# h($this->DataItem->TotalHours) %></span>
		 	
		 	<com:TRepeater ID="time_entries">
			 	<prop:HeaderTemplate>
			 		<table class="project">
			 			<tr>
			 				<th class="date">Reported Date</th>
			 				<th class="project">Project Name</th>
			 				<th class="category">Category Name</th>
			 				<th class="hours">Duration</th>
			 				<th class="description">Description</th>
			 			</tr>
			 	</prop:HeaderTemplate>
			 	<prop:FooterTemplate>
			 		</table>
			 	</prop:FooterTemplate>
			 	<prop:ItemTemplate>
			 	<tr>
			 		<td class="date"><com:System.I18N.TDateFormat 
								Pattern="dd/MM/yyyy"
								Value=<%# $this->DataItem->ReportDate %> />
					</td>
			 		<td class="project"><%# h($this->DataItem->ProjectName) %></td>
			 		<td class="category"><%# h($this->DataItem->CategoryName) %></td>
			 		<td class="hours"><%# h($this->DataItem->Duration) %></td>
			 		<td class="description"><%# h($this->DataItem->Description) %></td>
			 	</tr>
			 	</prop:ItemTemplate>
			 	</com:TRepeater>
			</div> 
		 	</prop:ItemTemplate>
		 </com:TRepeater>
		 
	</com:TView>
	
	</com:TMultiView>
</fieldset>
</com:TContent>