1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
4 | <meta name="layout" content="main" /> |
---|
5 | <title>Task Search</title> |
---|
6 | <filterpane:includes /> |
---|
7 | <g:javascript src="overlayPane.js" /> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <export:resource /> |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div class="nav"> |
---|
13 | <nav:renderSubItems group="nav"/> |
---|
14 | </div> |
---|
15 | |
---|
16 | <div class="body"> |
---|
17 | <g:if test="${flash.message}"> |
---|
18 | <div class="message">${flash.message}</div> |
---|
19 | </g:if> |
---|
20 | <g:if test="${params.message}"> |
---|
21 | <div class="message">${params.message}</div> |
---|
22 | </g:if> |
---|
23 | <g:hasErrors bean="${appCore}"> |
---|
24 | <div class="errors"> |
---|
25 | <g:renderErrors bean="${appCore}" as="list" /> |
---|
26 | </div> |
---|
27 | </g:hasErrors> |
---|
28 | <filterpane:currentCriteria domainBean="Task" |
---|
29 | action="search" |
---|
30 | dateFormat="${'EEE, dd-MMM-yyyy'}" |
---|
31 | removeImgDir="images" |
---|
32 | removeImgFile="bullet_delete.png" |
---|
33 | title="Advanced Search"/> |
---|
34 | |
---|
35 | <div class="paginateButtons"> |
---|
36 | <span class="searchButtons"> |
---|
37 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
---|
38 | </span> |
---|
39 | Results: ${taskInstanceList.size()} / ${taskInstanceTotal} |
---|
40 | <span class="searchButtons"> |
---|
41 | <filterpane:filterButton text="Advanced" appliedText="Advanced" /> |
---|
42 | </span> |
---|
43 | </div> |
---|
44 | |
---|
45 | <div id="resultsControlClosed"> |
---|
46 | <a href='' onclick="showElement('results'); |
---|
47 | Element.hide('resultsControlClosed'); |
---|
48 | Element.show('resultsControlOpened'); |
---|
49 | return false"> |
---|
50 | Options <img src="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" alt="Show" /> |
---|
51 | </a> |
---|
52 | </div> |
---|
53 | |
---|
54 | <div id="resultsControlOpened" style="display:none;"> |
---|
55 | <a href='' onclick="hideElement('results'); |
---|
56 | Element.hide('resultsControlOpened'); |
---|
57 | Element.show('resultsControlClosed'); |
---|
58 | return false"> |
---|
59 | Options <img src="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" alt="Show" /> |
---|
60 | </a> |
---|
61 | </div> |
---|
62 | |
---|
63 | |
---|
64 | <div id="results" style="display:none;"> |
---|
65 | <g:form method="post" > |
---|
66 | <g:hiddenField name="params" value="${filterParams}" /> |
---|
67 | <div class="dialog"> |
---|
68 | <table> |
---|
69 | <tbody> |
---|
70 | |
---|
71 | <tr class="prop"> |
---|
72 | <td valign="top" class="name"> |
---|
73 | <label for="max">Results per page:</label> |
---|
74 | </td> |
---|
75 | <td valign="top" class="value"> |
---|
76 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
---|
77 | |
---|
78 | <span class="buttons"> |
---|
79 | <g:actionSubmit action="setTaskSearchParamsMax" class="go" value="Update" /> |
---|
80 | </span> |
---|
81 | </td> |
---|
82 | </tr> |
---|
83 | |
---|
84 | </tbody> |
---|
85 | </table> |
---|
86 | </div> |
---|
87 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
88 | </g:form> |
---|
89 | </div> |
---|
90 | |
---|
91 | <br /> |
---|
92 | |
---|
93 | <g:if test="${taskInstanceList.size() > 10}"> |
---|
94 | <div class="paginateButtons"> |
---|
95 | <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> |
---|
96 | </div> |
---|
97 | </g:if> |
---|
98 | |
---|
99 | <div class="list"> |
---|
100 | <table> |
---|
101 | <thead> |
---|
102 | <tr> |
---|
103 | |
---|
104 | <g:sortableColumn property="id" title="Id" params="${filterParams}" /> |
---|
105 | |
---|
106 | <g:sortableColumn property="targetStartDate" title="Target Start Date" params="${filterParams}" /> |
---|
107 | |
---|
108 | <g:sortableColumn property="description" title="Description" params="${filterParams}" /> |
---|
109 | |
---|
110 | <g:sortableColumn property="leadPerson" title="Lead Person" params="${filterParams}" /> |
---|
111 | |
---|
112 | <g:sortableColumn property="taskPriority" title="Task Priority" params="${filterParams}" /> |
---|
113 | |
---|
114 | <g:sortableColumn property="taskStatus" title="Task Status" params="${filterParams}" /> |
---|
115 | |
---|
116 | <th></th> |
---|
117 | |
---|
118 | </tr> |
---|
119 | </thead> |
---|
120 | <tbody> |
---|
121 | <g:each in="${taskInstanceList}" status="i" var="taskInstance"> |
---|
122 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'/> |
---|
123 | |
---|
124 | <td>${fieldValue(bean:taskInstance, field:'id')}</td> |
---|
125 | |
---|
126 | <td><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td> |
---|
127 | |
---|
128 | <td>${fieldValue(bean:taskInstance, field:'description')}</td> |
---|
129 | |
---|
130 | <td>${fieldValue(bean:taskInstance, field:'leadPerson')}</td> |
---|
131 | |
---|
132 | <td>${fieldValue(bean:taskInstance, field:'taskPriority')}</td> |
---|
133 | |
---|
134 | <td>${fieldValue(bean:taskInstance, field:'taskStatus')}</td> |
---|
135 | |
---|
136 | <td> |
---|
137 | <g:link action="show" id="${taskInstance.id}"> |
---|
138 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
139 | </g:link> |
---|
140 | </td> |
---|
141 | |
---|
142 | </tr> |
---|
143 | </g:each> |
---|
144 | </tbody> |
---|
145 | </table> |
---|
146 | </div> |
---|
147 | <div class="paginateButtons"> |
---|
148 | <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> |
---|
149 | </div> |
---|
150 | |
---|
151 | <filterpane:filterPane domainBean="Task" |
---|
152 | title="Advanced Search" |
---|
153 | action="search" |
---|
154 | class="overlayPane" |
---|
155 | additionalProperties="id" |
---|
156 | associatedProperties="taskPriority.name, |
---|
157 | leadPerson.lastName, |
---|
158 | leadPerson.firstName, |
---|
159 | taskGroup.name, |
---|
160 | associatedAssets.name, |
---|
161 | primaryAsset.name, |
---|
162 | taskStatus.name, |
---|
163 | taskType.name" |
---|
164 | filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()], |
---|
165 | 'leadPerson.lastName':[values:Person.executeQuery('select distinct t.lastName from Person t')], |
---|
166 | 'leadPerson.firstName':[values:Person.executeQuery('select distinct t.firstName from Person t')], |
---|
167 | 'taskGroup.name':[values:TaskGroup.list()], |
---|
168 | 'associatedAssets.name':[values:Asset.list()], |
---|
169 | 'primaryAsset.name':[values:Asset.list()], |
---|
170 | 'taskStatus.name':[values:TaskStatus.list()], |
---|
171 | 'taskType.name':[values:TaskType.list()], |
---|
172 | targetCompletionDate:[years:2020..2000,precision:'day'], |
---|
173 | targetStartDate:[years:2020..2000,precision:'day'] |
---|
174 | ]}"/> |
---|
175 | </div> <!-- end body --> |
---|
176 | |
---|
177 | <!-- Start Search Pane --> |
---|
178 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
179 | <h2>Quick Search</h2> |
---|
180 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
181 | <table> |
---|
182 | <tbody> |
---|
183 | |
---|
184 | <tr class="prop"> |
---|
185 | <td valign="top" class="name"> |
---|
186 | <label>My Tasks:</label> |
---|
187 | </td> |
---|
188 | <td valign="top" class="value"> |
---|
189 | <g:link controller="taskDetailed" |
---|
190 | action="search" |
---|
191 | params="[quickSearch: 'searchMyTodays']"> |
---|
192 | Today's |
---|
193 | </g:link> |
---|
194 | <br /> |
---|
195 | <g:link controller="taskDetailed" |
---|
196 | action="search" |
---|
197 | params="[quickSearch: 'searchMyInTheLastWeek']"> |
---|
198 | In the last week |
---|
199 | </g:link> |
---|
200 | </td> |
---|
201 | </tr> |
---|
202 | |
---|
203 | <tr class="prop"> |
---|
204 | <td valign="top" class="name"> |
---|
205 | <label>Tasks:</label> |
---|
206 | </td> |
---|
207 | <td valign="top" class="value"> |
---|
208 | <g:link controller="taskDetailed" |
---|
209 | action="search" |
---|
210 | params="[quickSearch: 'searchTodays']"> |
---|
211 | Today's |
---|
212 | </g:link> |
---|
213 | <br /> |
---|
214 | <g:link controller="taskDetailed" |
---|
215 | action="search" |
---|
216 | params="[quickSearch: 'searchInTheLastWeek']"> |
---|
217 | In the last week |
---|
218 | </g:link> |
---|
219 | </td> |
---|
220 | </tr> |
---|
221 | |
---|
222 | </tbody> |
---|
223 | </table> |
---|
224 | <div class="buttons"> |
---|
225 | <span class="button"> |
---|
226 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
227 | </span> |
---|
228 | <!-- <span class="button"> |
---|
229 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.clear.text', default:'Clear')}" onclick="return clearFilterPane('searchForm');" /> |
---|
230 | </span> |
---|
231 | <span class="button"> |
---|
232 | <g:actionSubmit class="search" value="Search" /> |
---|
233 | </span>--> |
---|
234 | </div> |
---|
235 | </g:form> |
---|
236 | </div> <!-- end search pane --> |
---|
237 | |
---|
238 | </body> |
---|
239 | </html> |
---|