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 | / |
---|
150 | <g:link action="importInventoryItemPictures"> |
---|
151 | Import Pictures |
---|
152 | </g:link> |
---|
153 | </td> |
---|
154 | </tr> |
---|
155 | |
---|
156 | </tbody> |
---|
157 | </table> |
---|
158 | </div> |
---|
159 | </g:form> |
---|
160 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
161 | </div> |
---|
162 | |
---|
163 | <br /> |
---|
164 | |
---|
165 | <g:if test="${inventoryItemInstanceList.size() > 2}"> |
---|
166 | <g:if test="${inventoryItemInstanceTotal > inventoryItemInstanceList.size()}"> |
---|
167 | <div class="paginateButtons"> |
---|
168 | <g:paginate action="search" total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
169 | </div> |
---|
170 | </g:if> |
---|
171 | </g:if> |
---|
172 | |
---|
173 | <g:if test="${inventoryItemInstanceList.size() > 0}"> |
---|
174 | <div class="list"> |
---|
175 | <table> |
---|
176 | <thead> |
---|
177 | <tr> |
---|
178 | |
---|
179 | <th>Picture</th> |
---|
180 | |
---|
181 | <g:sortableColumn property="name" title="Name" params="${filterParams}" /> |
---|
182 | |
---|
183 | <g:sortableColumn property="description" title="Description" params="${filterParams}" /> |
---|
184 | |
---|
185 | <g:sortableColumn property="inventoryGroup" title="Group" params="${filterParams}" /> |
---|
186 | |
---|
187 | <g:sortableColumn property="unitsInStock" title="In Stock" params="${filterParams}" /> |
---|
188 | |
---|
189 | <th></th> |
---|
190 | |
---|
191 | </tr> |
---|
192 | </thead> |
---|
193 | <tbody> |
---|
194 | <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance"> |
---|
195 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" /> |
---|
196 | |
---|
197 | <td class='notClickable'> |
---|
198 | <g:if test="${inventoryItemInstance.picture}" > |
---|
199 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" |
---|
200 | size="${Image.Small}" |
---|
201 | lightboxSize="${Image.Large}" |
---|
202 | target="_blank" |
---|
203 | title="Show Original" /> |
---|
204 | </g:if> |
---|
205 | </td> |
---|
206 | |
---|
207 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
208 | ${fieldValue(bean:inventoryItemInstance, field:'name')} |
---|
209 | </td> |
---|
210 | |
---|
211 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
212 | ${fieldValue(bean:inventoryItemInstance, field:'description')} |
---|
213 | <br /> |
---|
214 | <br /> |
---|
215 | Location: ${inventoryItemInstance.inventoryLocation?.encodeAsHTML()} |
---|
216 | in ${inventoryItemInstance.inventoryLocation?.inventoryStore.encodeAsHTML()}<br /> |
---|
217 | </td> |
---|
218 | |
---|
219 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
220 | ${fieldValue(bean:inventoryItemInstance, field:'inventoryGroup')} |
---|
221 | </td> |
---|
222 | |
---|
223 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
224 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} |
---|
225 | ${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')} |
---|
226 | </td> |
---|
227 | |
---|
228 | <td class="notClickable"> |
---|
229 | <g:link action="show" id="${inventoryItemInstance.id}"> |
---|
230 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
231 | </g:link> |
---|
232 | </td> |
---|
233 | |
---|
234 | </tr> |
---|
235 | </g:each> |
---|
236 | </tbody> |
---|
237 | </table> |
---|
238 | </div> |
---|
239 | </g:if> |
---|
240 | <div class="paginateButtons"> |
---|
241 | <g:paginate action="search" total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
242 | </div> |
---|
243 | |
---|
244 | <filterpane:filterPane domainBean="InventoryItem" |
---|
245 | title="Advanced Search" |
---|
246 | action="search" |
---|
247 | class="overlayPane" |
---|
248 | excludeProperties="estimatedUnitPriceCurrency, |
---|
249 | averageDeliveryTime" |
---|
250 | associatedProperties="inventoryLocation.name, |
---|
251 | spareFor.name, |
---|
252 | preferredManufacturer.name, |
---|
253 | preferredSupplier.name" |
---|
254 | filterPropertyValues="${['inventoryLocation.name':[values: associatedPropertyValues.inventoryLocationList], |
---|
255 | 'spareFor.name':[values: associatedPropertyValues.assetList], |
---|
256 | 'preferredManufacturer.name':[values: associatedPropertyValues.manufacturerList], |
---|
257 | 'preferredSupplier.name':[values: associatedPropertyValues.supplierList] |
---|
258 | ]}"/> |
---|
259 | </div> <!-- end body div --> |
---|
260 | |
---|
261 | <!-- Start Search Pane --> |
---|
262 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
263 | <h2>Quick Search</h2> |
---|
264 | |
---|
265 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
266 | <g:hiddenField name="newTextSearch" value="true" /> |
---|
267 | |
---|
268 | <table> |
---|
269 | <tbody> |
---|
270 | |
---|
271 | <tr class="prop"> |
---|
272 | <td valign="top" class="name"> |
---|
273 | <label>Inventory:</label> |
---|
274 | </td> |
---|
275 | <td valign="top" class="value"> |
---|
276 | <g:link controller="inventoryItemDetailed" |
---|
277 | action="search" |
---|
278 | params="[quickSearch: 'all']"> |
---|
279 | <g:message code="default.all.text" /> |
---|
280 | </g:link> |
---|
281 | <br /> |
---|
282 | <g:link controller="inventoryItemDetailed" |
---|
283 | action="search" |
---|
284 | params="[quickSearch: 'inventoryBelowReorder']"> |
---|
285 | <g:message code="inventoryItem.search.text.below.reorder" /> |
---|
286 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.description" /> |
---|
287 | <br /> |
---|
288 | <g:link controller="inventoryItemDetailed" |
---|
289 | action="search" |
---|
290 | params="[quickSearch: 'inventoryBelowReorderAll']"> |
---|
291 | <g:message code="inventoryItem.search.text.below.reorder.all" /> |
---|
292 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.all.description" /> |
---|
293 | <br /> |
---|
294 | <g:link controller="inventoryItemDetailed" |
---|
295 | action="search" |
---|
296 | params="[quickSearch: 'recentlyUsed', daysBack: '14']"> |
---|
297 | <g:message code="inventoryItem.search.text.recently.used" /> |
---|
298 | </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[14]"/> |
---|
299 | <br /> |
---|
300 | <g:link controller="inventoryItemDetailed" |
---|
301 | action="search" |
---|
302 | params="[quickSearch: 'recentlyUsed', daysBack: '30']"> |
---|
303 | <g:message code="inventoryItem.search.text.recently.used" /> |
---|
304 | </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[30]"/> |
---|
305 | </td> |
---|
306 | </tr> |
---|
307 | |
---|
308 | <tr class="prop"> |
---|
309 | <td valign="top" class="name"> |
---|
310 | <label>Links:</label> |
---|
311 | </td> |
---|
312 | <td valign="top" class="value"> |
---|
313 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
314 | action="search"> |
---|
315 | Purchases |
---|
316 | </g:link> |
---|
317 | <br /> |
---|
318 | <g:link controller="inventoryItemDetailed" |
---|
319 | action="reorder"> |
---|
320 | Reorder |
---|
321 | </g:link> |
---|
322 | </td> |
---|
323 | </tr> |
---|
324 | |
---|
325 | </tbody> |
---|
326 | </table> |
---|
327 | |
---|
328 | <div class="buttons"> |
---|
329 | <span class="button"> |
---|
330 | <g:actionSubmit class="cancel" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
331 | </span> |
---|
332 | </div> |
---|
333 | </g:form> |
---|
334 | </div> <!-- end search pane --> |
---|
335 | |
---|
336 | </body> |
---|
337 | </html> |
---|