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 | <resource:dateChooser /> |
---|
10 | <g:javascript src="taskQuickSearchPane.js" /> |
---|
11 | </head> |
---|
12 | <body> |
---|
13 | <div class="nav"> |
---|
14 | <nav:renderSubItems group="nav"/> |
---|
15 | </div> |
---|
16 | |
---|
17 | <div class="body"> |
---|
18 | <g:render template="/shared/messages" /> |
---|
19 | <g:hasErrors bean="${appCore}"> |
---|
20 | <div class="errors"> |
---|
21 | <g:renderErrors bean="${appCore}" as="list" /> |
---|
22 | </div> |
---|
23 | </g:hasErrors> |
---|
24 | <filterpane:currentCriteria domainBean="Task" |
---|
25 | action="search" |
---|
26 | dateFormat="EEE, dd-MMM-yyyy" |
---|
27 | removeImgDir="images" |
---|
28 | removeImgFile="bullet_delete.png" |
---|
29 | title="Advanced Search"/> |
---|
30 | |
---|
31 | <div class="paginateButtons"> |
---|
32 | <span class="searchButtons"> |
---|
33 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
---|
34 | </span> |
---|
35 | Results: ${taskInstanceList.size()} / ${taskInstanceTotal} |
---|
36 | <span class="searchButtons"> |
---|
37 | <filterpane:filterButton text="Advanced" appliedText="Advanced" /> |
---|
38 | </span> |
---|
39 | </div> |
---|
40 | |
---|
41 | <jsUtil:toggleControl toggleId="options" |
---|
42 | imageId="optionsImg" |
---|
43 | closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" |
---|
44 | openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" |
---|
45 | text="${g.message(code: 'default.options.text')}" |
---|
46 | /> |
---|
47 | |
---|
48 | <div id="options" style="display:none;"> |
---|
49 | <g:form method="post" action="setSearchParamsMax" > |
---|
50 | <g:hiddenField name="params" value="${filterParams}" /> |
---|
51 | <div class="dialog"> |
---|
52 | <table> |
---|
53 | <tbody> |
---|
54 | |
---|
55 | <tr class="prop"> |
---|
56 | <td valign="top" class="name"> |
---|
57 | <label for="max">Results per page:</label> |
---|
58 | </td> |
---|
59 | <td valign="top" class="value"> |
---|
60 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
---|
61 | |
---|
62 | <span class="buttons"> |
---|
63 | <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" /> |
---|
64 | </span> |
---|
65 | </td> |
---|
66 | </tr> |
---|
67 | |
---|
68 | </tbody> |
---|
69 | </table> |
---|
70 | </div> |
---|
71 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
72 | </g:form> |
---|
73 | </div> |
---|
74 | |
---|
75 | <br /> |
---|
76 | |
---|
77 | <g:if test="${taskInstanceTotal > taskInstanceList.size()}"> |
---|
78 | <div class="paginateButtons"> |
---|
79 | <g:paginate action="search" total="${taskInstanceTotal}" params="${filterParams}" /> |
---|
80 | </div> |
---|
81 | </g:if> |
---|
82 | |
---|
83 | <g:if test="${taskInstanceList.size() > 0}"> |
---|
84 | <div class="list"> |
---|
85 | <table> |
---|
86 | <thead> |
---|
87 | <tr> |
---|
88 | |
---|
89 | <custom:sortableColumnWithImg property="attentionFlag" |
---|
90 | imgSrc="${resource(dir:'images/skin',file:'flag_red.png')}" |
---|
91 | imgAlt="Flag" |
---|
92 | imgTitle="Attention Flag" |
---|
93 | 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="taskGroup" title="Group" params="${filterParams}" /> |
---|
100 | |
---|
101 | <g:sortableColumn property="taskType" title="Type" params="${filterParams}" /> |
---|
102 | |
---|
103 | <custom:sortableColumnWithImg property="taskStatus" |
---|
104 | imgSrc="${resource(dir:'images/skin',file:'status.png')}" |
---|
105 | imgAlt="Status" |
---|
106 | imgTitle="Status" |
---|
107 | params="${filterParams}" /> |
---|
108 | |
---|
109 | <g:sortableColumn property="taskPriority" title="Priority" params="${filterParams}" /> |
---|
110 | |
---|
111 | <custom:sortableColumnWithImg property="defaultSort" |
---|
112 | imgSrc="${resource(dir:'images/skin',file:'table_sort.png')}" |
---|
113 | imgAlt="Sort" |
---|
114 | imgTitle="Default Sort" |
---|
115 | params="${filterParams}" /> |
---|
116 | |
---|
117 | </tr> |
---|
118 | </thead> |
---|
119 | </tbody> |
---|
120 | <tbody> |
---|
121 | <g:each in="${taskInstanceList}" status="i" var="taskInstance"> |
---|
122 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
123 | |
---|
124 | <td class="idColumn" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
125 | <g:if test="${taskInstance.attentionFlag}"> |
---|
126 | <img src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Flag" title="Attention Flag"/> |
---|
127 | </g:if> |
---|
128 | </td> |
---|
129 | |
---|
130 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
131 | <g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/> |
---|
132 | </td> |
---|
133 | |
---|
134 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
135 | <b> |
---|
136 | Task #${fieldValue(bean:taskInstance, field:'id')} |
---|
137 | </b> |
---|
138 | <g:if test="${taskInstance.approved}" > |
---|
139 | <img src="${resource(dir:'images/skin',file:'cog.png')}" alt="Approved" title="Approved" /> |
---|
140 | </g:if> |
---|
141 | <g:if test="${taskInstance.taskRecurringSchedule?.enabled}" > |
---|
142 | <img src="${resource(dir:'images/skin',file:'arrow_refresh.png')}" alt="Recurrence Enabled" title="Recurrence Enabled" /> |
---|
143 | </g:if> |
---|
144 | <br /> |
---|
145 | |
---|
146 | <b> |
---|
147 | <g:if test="${taskInstance.primaryAsset}"> |
---|
148 | ${fieldValue(bean:taskInstance, field:'primaryAsset')}: |
---|
149 | </g:if> |
---|
150 | ${fieldValue(bean:taskInstance, field:'description')} |
---|
151 | </b> |
---|
152 | <g:if test="${taskInstance.taskProcedureRevision?.maintenanceActions}" > |
---|
153 | <br /> |
---|
154 | <custom:taskProcedureMachines taskProcedureRevision="${taskInstance.taskProcedureRevision}" /> |
---|
155 | </g:if> |
---|
156 | <g:if test="${taskInstance.safetyRequirement}" > |
---|
157 | <br /> |
---|
158 | <img src="${resource(dir:'images/skin',file:'lightning.png')}" alt="Safety Requirement" title="Safety Requirement" /> |
---|
159 | Safety |
---|
160 | </g:if> |
---|
161 | <g:if test="${taskInstance.regulatoryRequirement}" > |
---|
162 | <br /> |
---|
163 | <img src="${resource(dir:'images/skin',file:'script_lightning.png')}" alt="Regulatory Requirement" title="Regulatory Requirement" /> |
---|
164 | Regulatory |
---|
165 | </g:if> |
---|
166 | <g:if test="${taskInstance.mandatoryRequirement}" > |
---|
167 | <br /> |
---|
168 | <img src="${resource(dir:'images/skin',file:'script.png')}" alt="Mandatory Requirement" title="Mandatory Requirement" /> |
---|
169 | Mandatory |
---|
170 | </g:if> |
---|
171 | <br /> |
---|
172 | <br /> |
---|
173 | <g:each in="${taskInstance.assignedGroups}" status="j" var="assignedGroup"> |
---|
174 | ${assignedGroup.encodeAsHTML()}<br /> |
---|
175 | </g:each> |
---|
176 | <g:each in="${taskInstance.assignedPersons}" status="k" var="assignedPerson"> |
---|
177 | ${assignedPerson.encodeAsHTML()}<br /> |
---|
178 | </g:each> |
---|
179 | <g:each in="${taskInstance.entries}" status="m" var="entry"> |
---|
180 | <g:if test="${entry.entryType.id == 3}"> |
---|
181 | <em>${'WD: ' +entry.toShortString().encodeAsHTML()}</em><br /> |
---|
182 | </g:if> |
---|
183 | </g:each> |
---|
184 | <g:if test="${taskInstance.subTasks}"> |
---|
185 | Sub Tasks: ${taskInstance.subTasks.size()}<br /> |
---|
186 | </g:if> |
---|
187 | </td> |
---|
188 | |
---|
189 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
190 | ${fieldValue(bean:taskInstance, field:'taskGroup')} |
---|
191 | </td> |
---|
192 | |
---|
193 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
194 | ${fieldValue(bean:taskInstance, field:'taskType')} |
---|
195 | </td> |
---|
196 | |
---|
197 | <td class="idColumn" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
198 | <g:if test="${taskInstance.taskStatus.id == 1}" > |
---|
199 | <img src="${resource(dir:'images/skin',file:'not_started.png')}" alt="Not Started" title="Not Started" /> |
---|
200 | </g:if> |
---|
201 | <g:if test="${taskInstance.taskStatus.id == 2}" > |
---|
202 | <img src="${resource(dir:'images/skin',file:'arrow_right.png')}" alt="In Progress" title="In Progress" /> |
---|
203 | </g:if> |
---|
204 | <g:if test="${taskInstance.taskStatus.id == 3}" > |
---|
205 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Complete" title="Complete" /> |
---|
206 | </g:if> |
---|
207 | </td> |
---|
208 | |
---|
209 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
210 | ${fieldValue(bean:taskInstance, field:'taskPriority')} |
---|
211 | </td> |
---|
212 | |
---|
213 | <td class="notClickable"> |
---|
214 | <g:link action="show" id="${taskInstance.id}"> |
---|
215 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
216 | </g:link> |
---|
217 | </td> |
---|
218 | |
---|
219 | </tr> |
---|
220 | </g:each> |
---|
221 | </tbody> |
---|
222 | </table> |
---|
223 | </div> |
---|
224 | </g:if> |
---|
225 | <div class="paginateButtons"> |
---|
226 | <g:paginate action="search" total="${taskInstanceTotal}" params="${filterParams}" /> |
---|
227 | </div> |
---|
228 | |
---|
229 | <filterpane:filterPane domainBean="Task" |
---|
230 | title="Advanced Search" |
---|
231 | action="search" |
---|
232 | class="overlayPane" |
---|
233 | additionalProperties="id" |
---|
234 | excludeProperties="targetCompletionDate" |
---|
235 | associatedProperties="taskPriority.name, |
---|
236 | leadPerson.lastName, |
---|
237 | leadPerson.firstName, |
---|
238 | taskGroup.name, |
---|
239 | associatedAssets.name, |
---|
240 | primaryAsset.name, |
---|
241 | taskStatus.name, |
---|
242 | taskType.name" |
---|
243 | filterPropertyValues="${['taskPriority.name':[values: associatedPropertyValues.taskPriorityList], |
---|
244 | 'leadPerson.lastName':[values: associatedPropertyValues.lastNameList], |
---|
245 | 'leadPerson.firstName':[values: associatedPropertyValues.firstNameList], |
---|
246 | 'taskGroup.name':[values: associatedPropertyValues.taskGroupList], |
---|
247 | 'associatedAssets.name':[values: associatedPropertyValues.assetList], |
---|
248 | 'primaryAsset.name':[values: associatedPropertyValues.assetList], |
---|
249 | 'taskStatus.name':[values: associatedPropertyValues.taskStatusList], |
---|
250 | 'taskType.name':[values: associatedPropertyValues.taskTypeList], |
---|
251 | targetCompletionDate:[years: associatedPropertyValues.yearRange,precision:'day'], |
---|
252 | targetStartDate:[years: associatedPropertyValues.yearRange,precision:'day'] |
---|
253 | ]}"/> |
---|
254 | |
---|
255 | <g:render template="quickSearchPane" /> |
---|
256 | |
---|
257 | </div> <!-- end body --> |
---|
258 | </body> |
---|
259 | </html> |
---|