1 | |
---|
2 | |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
6 | <meta name="layout" content="main" /> |
---|
7 | <title>InventoryItem Search</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <g:render template="/shared/pictureHead" /> |
---|
10 | <filterpane:includes /> |
---|
11 | <export:resource /> |
---|
12 | </head> |
---|
13 | <body onload="if(document.textSearchForm) {document.textSearchForm.searchText.focus();}"> |
---|
14 | <div class="nav"> |
---|
15 | <nav:renderSubItems group="nav"/> |
---|
16 | </div> |
---|
17 | <div class="body"> |
---|
18 | <g:render template="/shared/messages" /> |
---|
19 | |
---|
20 | <div class="textSearchWrapper"> |
---|
21 | <div class="textSearchInput"> |
---|
22 | |
---|
23 | <filterpane:isFiltered > |
---|
24 | <filterpane:currentCriteria domainBean="InventoryItem" |
---|
25 | action="search" |
---|
26 | dateFormat="EEE, dd-MMM-yyyy" |
---|
27 | removeImgDir="images" |
---|
28 | removeImgFile="bullet_delete.png" |
---|
29 | title="Advanced Search"/> |
---|
30 | <div class="paginateButtons"> |
---|
31 | Results: ${inventoryItemInstanceList.size()} / ${inventoryItemInstanceTotal} |
---|
32 | </div> |
---|
33 | </filterpane:isFiltered > |
---|
34 | |
---|
35 | <filterpane:isNotFiltered > |
---|
36 | <g:form method="post" id="textSearchForm" name="textSearchForm" > |
---|
37 | <g:hiddenField name="newTextSearch" value="true" /> |
---|
38 | |
---|
39 | <span> <!--Prevent IE inheriting margin--> |
---|
40 | <g:textField style="width:450px;" maxlength="75" id="searchText" name="searchText" value="${filterParams.searchText}" /> |
---|
41 | <g:helpBalloon code="inventoryItem.search.searchText" /> |
---|
42 | |
---|
43 | <g:if test="${params.searchName || params.searchDescription || params.searchComment || params.searchLocation || params.searchGroup || params.searchSpareFor}" > |
---|
44 | <div id="limitSearch" class="textSearchSelect"> |
---|
45 | </g:if> |
---|
46 | <g:else> |
---|
47 | <div id="limitSearch" class="textSearchSelect" style="display:none;"> |
---|
48 | </g:else> |
---|
49 | Limit Search: |
---|
50 | <br /> |
---|
51 | <g:checkBox name="searchName" value="${params.searchName}" ></g:checkBox> |
---|
52 | <label for="searchName">Name</label> |
---|
53 | <g:checkBox name="searchDescription" value="${params.searchDescription}" ></g:checkBox> |
---|
54 | <label for="searchDescription">Description</label> |
---|
55 | <g:checkBox name="searchComment" value="${params.searchComment}" ></g:checkBox> |
---|
56 | <label for="searchComment">Comment</label> |
---|
57 | <g:checkBox name="searchLocation" value="${params.searchLocation}" ></g:checkBox> |
---|
58 | <label for="searchLocation">Location</label> |
---|
59 | <g:checkBox name="searchGroup" value="${params.searchGroup}" ></g:checkBox> |
---|
60 | <label for="searchGroup">Group</label> |
---|
61 | <br /> |
---|
62 | <g:checkBox name="searchSpareFor" value="${params.searchSpareFor}" ></g:checkBox> |
---|
63 | <label for="searchSpareFor">Spare For (Asset: Name, Description and Comment).</label> |
---|
64 | </div> |
---|
65 | |
---|
66 | <div class="paginateButtons"> |
---|
67 | <span class="buttons"> |
---|
68 | <g:actionSubmit class="search" value="Search" action="search" /> |
---|
69 | </span> |
---|
70 | <span class="buttons" style="margin-left: 5px;"> |
---|
71 | <g:actionSubmit class="complete" value="Select" action="search" onclick="toggleWithEffectUtil('limitSearch'); return false;"/> |
---|
72 | </span> |
---|
73 | <div class="paginateButtons"> |
---|
74 | Results: ${inventoryItemInstanceList.size()} / ${inventoryItemInstanceTotal} |
---|
75 | </div> |
---|
76 | </div><!--paginateButtons--> |
---|
77 | </span> <!--Prevent IE inheriting margin--> |
---|
78 | |
---|
79 | </g:form> |
---|
80 | </filterpane:isNotFiltered > |
---|
81 | |
---|
82 | </div><!--textSearchInput--> |
---|
83 | |
---|
84 | <div class="textSearchRightFloat"> |
---|
85 | <div class="paginateButtons"> |
---|
86 | <span class="searchButtons"> |
---|
87 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
---|
88 | </span> |
---|
89 | <br /> |
---|
90 | <br /> |
---|
91 | <span class="searchButtons"> |
---|
92 | <filterpane:filterButton text="Advanced" appliedText="Advanced" /> |
---|
93 | </span> |
---|
94 | </div> |
---|
95 | |
---|
96 | <jsUtil:toggleControl toggleId="options" |
---|
97 | imageId="optionsImg" |
---|
98 | closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" |
---|
99 | openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" |
---|
100 | text="${g.message(code: 'default.options.text')}" |
---|
101 | /> |
---|
102 | </div><!--textSearchRightFloat--> |
---|
103 | </div><!--textSearchWrapper--> |
---|
104 | |
---|
105 | <div id="options" style="display:none; clear:both;"> |
---|
106 | <g:form method="post" action="setSearchParamsMax" > |
---|
107 | <g:hiddenField name="params" value="${filterParams}" /> |
---|
108 | <div class="dialog"> |
---|
109 | <table> |
---|
110 | <tbody> |
---|
111 | |
---|
112 | <tr class="prop"> |
---|
113 | <td valign="top" class="name"> |
---|
114 | <label for="max">Results per page:</label> |
---|
115 | </td> |
---|
116 | <td valign="top" class="value"> |
---|
117 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
---|
118 | |
---|
119 | <span class="buttons"> |
---|
120 | <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" /> |
---|
121 | </span> |
---|
122 | </td> |
---|
123 | </tr> |
---|
124 | |
---|
125 | <tr class="prop"> |
---|
126 | <td valign="top" class="name"> |
---|
127 | <label for="max">Inventory:</label> |
---|
128 | </td> |
---|
129 | <td valign="top" class="value"> |
---|
130 | <g:link action="exportInventory"> |
---|
131 | Export |
---|
132 | </g:link> |
---|
133 | / |
---|
134 | <g:link action="exportInventoryTemplate"> |
---|
135 | Template |
---|
136 | </g:link> |
---|
137 | / |
---|
138 | <g:link action="exportInventoryExample"> |
---|
139 | Example |
---|
140 | </g:link> |
---|
141 | / |
---|
142 | <g:link action="importInventory"> |
---|
143 | Import Inventory |
---|
144 | </g:link> |
---|
145 | / |
---|
146 | <g:link action="importInventoryItemPurchases"> |
---|
147 | Import Purchases |
---|
148 | </g:link> |
---|
149 | </td> |
---|
150 | </tr> |
---|
151 | |
---|
152 | </tbody> |
---|
153 | </table> |
---|
154 | </div> |
---|
155 | </g:form> |
---|
156 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
157 | </div> |
---|
158 | |
---|
159 | <br /> |
---|
160 | |
---|
161 | <g:if test="${inventoryItemInstanceList.size() > 2}"> |
---|
162 | <g:if test="${inventoryItemInstanceTotal > inventoryItemInstanceList.size()}"> |
---|
163 | <div class="paginateButtons"> |
---|
164 | <g:paginate action="search" total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
165 | </div> |
---|
166 | </g:if> |
---|
167 | </g:if> |
---|
168 | |
---|
169 | <g:if test="${inventoryItemInstanceList.size() > 0}"> |
---|
170 | <div class="list"> |
---|
171 | <table> |
---|
172 | <thead> |
---|
173 | <tr> |
---|
174 | |
---|
175 | <th>Picture</th> |
---|
176 | |
---|
177 | <g:sortableColumn property="name" title="Name" params="${filterParams}" /> |
---|
178 | |
---|
179 | <g:sortableColumn property="description" title="Description" params="${filterParams}" /> |
---|
180 | |
---|
181 | <g:sortableColumn property="inventoryGroup" title="Group" params="${filterParams}" /> |
---|
182 | |
---|
183 | <g:sortableColumn property="unitsInStock" title="In Stock" params="${filterParams}" /> |
---|
184 | |
---|
185 | <th>Unit</th> |
---|
186 | |
---|
187 | <th></th> |
---|
188 | |
---|
189 | </tr> |
---|
190 | </thead> |
---|
191 | <tbody> |
---|
192 | <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance"> |
---|
193 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" /> |
---|
194 | |
---|
195 | <td class='notClickable'> |
---|
196 | <g:if test="${inventoryItemInstance.picture}" > |
---|
197 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" |
---|
198 | size="${Image.Small}" |
---|
199 | lightboxSize="${Image.Large}" |
---|
200 | target="_blank" |
---|
201 | title="Show Original" /> |
---|
202 | </g:if> |
---|
203 | </td> |
---|
204 | |
---|
205 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
206 | ${fieldValue(bean:inventoryItemInstance, field:'name')} |
---|
207 | </td> |
---|
208 | |
---|
209 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
210 | ${fieldValue(bean:inventoryItemInstance, field:'description')} |
---|
211 | </td> |
---|
212 | |
---|
213 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
214 | ${fieldValue(bean:inventoryItemInstance, field:'inventoryGroup')} |
---|
215 | </td> |
---|
216 | |
---|
217 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
218 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} |
---|
219 | </td> |
---|
220 | |
---|
221 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
222 | ${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')} |
---|
223 | </td> |
---|
224 | |
---|
225 | <td class="notClickable"> |
---|
226 | <g:link action="show" id="${inventoryItemInstance.id}"> |
---|
227 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
228 | </g:link> |
---|
229 | </td> |
---|
230 | |
---|
231 | </tr> |
---|
232 | </g:each> |
---|
233 | </tbody> |
---|
234 | </table> |
---|
235 | </div> |
---|
236 | </g:if> |
---|
237 | <div class="paginateButtons"> |
---|
238 | <g:paginate action="search" total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
239 | </div> |
---|
240 | |
---|
241 | <filterpane:filterPane domainBean="InventoryItem" |
---|
242 | title="Advanced Search" |
---|
243 | action="search" |
---|
244 | class="overlayPane" |
---|
245 | excludeProperties="estimatedUnitPriceCurrency, |
---|
246 | averageDeliveryTime" |
---|
247 | associatedProperties="inventoryLocation.name, |
---|
248 | spareFor.name, |
---|
249 | preferredManufacturer.name, |
---|
250 | preferredSupplier.name" |
---|
251 | filterPropertyValues="${['inventoryLocation.name':[values: associatedPropertyValues.inventoryLocationList], |
---|
252 | 'spareFor.name':[values: associatedPropertyValues.assetList], |
---|
253 | 'preferredManufacturer.name':[values: associatedPropertyValues.manufacturerList], |
---|
254 | 'preferredSupplier.name':[values: associatedPropertyValues.supplierList] |
---|
255 | ]}"/> |
---|
256 | </div> <!-- end body div --> |
---|
257 | |
---|
258 | <!-- Start Search Pane --> |
---|
259 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
260 | <h2>Quick Search</h2> |
---|
261 | |
---|
262 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
263 | <g:hiddenField name="newTextSearch" value="true" /> |
---|
264 | |
---|
265 | <table> |
---|
266 | <tbody> |
---|
267 | |
---|
268 | <tr class="prop"> |
---|
269 | <td valign="top" class="name"> |
---|
270 | <label>Inventory:</label> |
---|
271 | </td> |
---|
272 | <td valign="top" class="value"> |
---|
273 | <g:link controller="inventoryItemDetailed" |
---|
274 | action="search" |
---|
275 | params="[quickSearch: 'all']"> |
---|
276 | <g:message code="default.all.text" /> |
---|
277 | </g:link> |
---|
278 | <br /> |
---|
279 | <g:link controller="inventoryItemDetailed" |
---|
280 | action="search" |
---|
281 | params="[quickSearch: 'inventoryBelowReorder']"> |
---|
282 | <g:message code="inventoryItem.search.text.below.reorder" /> |
---|
283 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.description" /> |
---|
284 | <br /> |
---|
285 | <g:link controller="inventoryItemDetailed" |
---|
286 | action="search" |
---|
287 | params="[quickSearch: 'inventoryBelowReorderAll']"> |
---|
288 | <g:message code="inventoryItem.search.text.below.reorder.all" /> |
---|
289 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.all.description" /> |
---|
290 | <br /> |
---|
291 | <g:link controller="inventoryItemDetailed" |
---|
292 | action="search" |
---|
293 | params="[quickSearch: 'recentlyUsed', daysBack: '14']"> |
---|
294 | <g:message code="inventoryItem.search.text.recently.used" /> |
---|
295 | </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[14]"/> |
---|
296 | <br /> |
---|
297 | <g:link controller="inventoryItemDetailed" |
---|
298 | action="search" |
---|
299 | params="[quickSearch: 'recentlyUsed', daysBack: '30']"> |
---|
300 | <g:message code="inventoryItem.search.text.recently.used" /> |
---|
301 | </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[30]"/> |
---|
302 | </td> |
---|
303 | </tr> |
---|
304 | |
---|
305 | <tr class="prop"> |
---|
306 | <td valign="top" class="name"> |
---|
307 | <label>Links:</label> |
---|
308 | </td> |
---|
309 | <td valign="top" class="value"> |
---|
310 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
311 | action="search"> |
---|
312 | Purchases |
---|
313 | </g:link> |
---|
314 | </td> |
---|
315 | </tr> |
---|
316 | |
---|
317 | </tbody> |
---|
318 | </table> |
---|
319 | |
---|
320 | <div class="buttons"> |
---|
321 | <span class="button"> |
---|
322 | <g:actionSubmit class="cancel" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
323 | </span> |
---|
324 | </div> |
---|
325 | </g:form> |
---|
326 | </div> <!-- end search pane --> |
---|
327 | |
---|
328 | </body> |
---|
329 | </html> |
---|