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:hasErrors bean="${appCore}"> |
---|
18 | <div class="errors"> |
---|
19 | <g:renderErrors bean="${appCore}" as="list" /> |
---|
20 | </div> |
---|
21 | </g:hasErrors> |
---|
22 | <filterpane:currentCriteria domainBean="Task" |
---|
23 | action="search" |
---|
24 | dateFormat="EEE, dd-MMM-yyyy" |
---|
25 | removeImgDir="images" |
---|
26 | removeImgFile="bullet_delete.png" |
---|
27 | title="Advanced Search"/> |
---|
28 | |
---|
29 | <div class="paginateButtons"> |
---|
30 | <span class="searchButtons"> |
---|
31 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
---|
32 | </span> |
---|
33 | Results: ${taskInstanceList.size()} / ${taskInstanceTotal} |
---|
34 | <span class="searchButtons"> |
---|
35 | <filterpane:filterButton text="Advanced" appliedText="Advanced" /> |
---|
36 | </span> |
---|
37 | </div> |
---|
38 | |
---|
39 | <jsUtil:toggleControl toggleId="options" |
---|
40 | imageId="optionsImg" |
---|
41 | closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" |
---|
42 | openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" |
---|
43 | text="${g.message(code: 'default.options.text')}" |
---|
44 | /> |
---|
45 | |
---|
46 | <div id="options" style="display:none;"> |
---|
47 | <g:form method="post" > |
---|
48 | <g:hiddenField name="params" value="${filterParams}" /> |
---|
49 | <div class="dialog"> |
---|
50 | <table> |
---|
51 | <tbody> |
---|
52 | |
---|
53 | <tr class="prop"> |
---|
54 | <td valign="top" class="name"> |
---|
55 | <label for="max">Results per page:</label> |
---|
56 | </td> |
---|
57 | <td valign="top" class="value"> |
---|
58 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
---|
59 | |
---|
60 | <span class="buttons"> |
---|
61 | <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" /> |
---|
62 | </span> |
---|
63 | </td> |
---|
64 | </tr> |
---|
65 | |
---|
66 | </tbody> |
---|
67 | </table> |
---|
68 | </div> |
---|
69 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
70 | </g:form> |
---|
71 | </div> |
---|
72 | |
---|
73 | <br /> |
---|
74 | |
---|
75 | <g:if test="${taskInstanceList.size() > 10}"> |
---|
76 | <g:if test="${taskInstanceTotal > taskInstanceList.size()}"> |
---|
77 | <div class="paginateButtons"> |
---|
78 | <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> |
---|
79 | </div> |
---|
80 | </g:if> |
---|
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" params="${filterParams}" /> |
---|
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="taskPriority" title="Priority" params="${filterParams}" /> |
---|
100 | |
---|
101 | <g:sortableColumn property="taskStatus" title="Type" params="${filterParams}" /> |
---|
102 | |
---|
103 | <g:sortableColumn property="taskStatus" title="Status" params="${filterParams}" /> |
---|
104 | |
---|
105 | <th></th> |
---|
106 | |
---|
107 | </tr> |
---|
108 | </thead> |
---|
109 | </tbody> |
---|
110 | <tbody> |
---|
111 | <g:each in="${taskInstanceList}" status="i" var="taskInstance"> |
---|
112 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
113 | |
---|
114 | <td class="idColumn" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
115 | <g:if test="${taskInstance.attentionFlag}"> |
---|
116 | <img src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Flag" /> |
---|
117 | </g:if> |
---|
118 | </td> |
---|
119 | |
---|
120 | <td class="idColumn" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
121 | ${fieldValue(bean:taskInstance, field:'id')} |
---|
122 | </td> |
---|
123 | |
---|
124 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
125 | <g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/> |
---|
126 | </td> |
---|
127 | |
---|
128 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
129 | ${fieldValue(bean:taskInstance, field:'description')} |
---|
130 | </td> |
---|
131 | |
---|
132 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
133 | ${fieldValue(bean:taskInstance, field:'taskPriority')} |
---|
134 | </td> |
---|
135 | |
---|
136 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
137 | ${fieldValue(bean:taskInstance, field:'taskType')} |
---|
138 | </td> |
---|
139 | |
---|
140 | <td onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'> |
---|
141 | ${fieldValue(bean:taskInstance, field:'taskStatus')} |
---|
142 | </td> |
---|
143 | |
---|
144 | <td class="notClickable"> |
---|
145 | <g:link action="show" id="${taskInstance.id}"> |
---|
146 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
147 | </g:link> |
---|
148 | </td> |
---|
149 | |
---|
150 | </tr> |
---|
151 | </g:each> |
---|
152 | </tbody> |
---|
153 | </table> |
---|
154 | </div> |
---|
155 | </g:if> |
---|
156 | <div class="paginateButtons"> |
---|
157 | <g:paginate action="search" total="${taskInstanceTotal}" params="${filterParams}" /> |
---|
158 | </div> |
---|
159 | |
---|
160 | <filterpane:filterPane domainBean="Task" |
---|
161 | title="Advanced Search" |
---|
162 | action="search" |
---|
163 | class="overlayPane" |
---|
164 | additionalProperties="id" |
---|
165 | associatedProperties="taskPriority.name, |
---|
166 | leadPerson.lastName, |
---|
167 | leadPerson.firstName, |
---|
168 | taskGroup.name, |
---|
169 | associatedAssets.name, |
---|
170 | primaryAsset.name, |
---|
171 | taskStatus.name, |
---|
172 | taskType.name" |
---|
173 | filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()], |
---|
174 | 'leadPerson.lastName':[values:Person.executeQuery('select distinct t.lastName from Person t')], |
---|
175 | 'leadPerson.firstName':[values:Person.executeQuery('select distinct t.firstName from Person t')], |
---|
176 | 'taskGroup.name':[values:TaskGroup.list()], |
---|
177 | 'associatedAssets.name':[values:Asset.list()], |
---|
178 | 'primaryAsset.name':[values:Asset.list()], |
---|
179 | 'taskStatus.name':[values:TaskStatus.list()], |
---|
180 | 'taskType.name':[values:TaskType.list()], |
---|
181 | targetCompletionDate:[years:2020..2000,precision:'day'], |
---|
182 | targetStartDate:[years:2020..2000,precision:'day'] |
---|
183 | ]}"/> |
---|
184 | |
---|
185 | <g:render template="quickSearchPane" /> |
---|
186 | |
---|
187 | </div> <!-- end body --> |
---|
188 | </body> |
---|
189 | </html> |
---|