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