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