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