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> |
---|
14 | <div class="nav"> |
---|
15 | <nav:renderSubItems group="nav"/> |
---|
16 | </div> |
---|
17 | <div class="body"> |
---|
18 | <g:render template="/shared/messages" /> |
---|
19 | <filterpane:currentCriteria domainBean="InventoryItem" |
---|
20 | action="search" |
---|
21 | dateFormat="EEE, dd-MMM-yyyy" |
---|
22 | removeImgDir="images" |
---|
23 | removeImgFile="bullet_delete.png" |
---|
24 | title="Search"/> |
---|
25 | |
---|
26 | <div class="paginateButtons"> |
---|
27 | <span class="searchButtons"> |
---|
28 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
---|
29 | </span> |
---|
30 | Results: ${inventoryItemInstanceList.size()} / ${inventoryItemInstanceTotal} |
---|
31 | <span class="searchButtons"> |
---|
32 | <filterpane:filterButton text="Search" appliedText="Change Search" /> |
---|
33 | </span> |
---|
34 | </div> |
---|
35 | |
---|
36 | <jsUtil:toggleControl toggleId="options" |
---|
37 | imageId="optionsImg" |
---|
38 | closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" |
---|
39 | openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" |
---|
40 | text="${g.message(code: 'default.options.text')}" |
---|
41 | /> |
---|
42 | |
---|
43 | <div id="options" style="display:none;"> |
---|
44 | <g:form method="post" > |
---|
45 | <g:hiddenField name="params" value="${filterParams}" /> |
---|
46 | <div class="dialog"> |
---|
47 | <table> |
---|
48 | <tbody> |
---|
49 | |
---|
50 | <tr class="prop"> |
---|
51 | <td valign="top" class="name"> |
---|
52 | <label for="max">Results per page:</label> |
---|
53 | </td> |
---|
54 | <td valign="top" class="value"> |
---|
55 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
---|
56 | |
---|
57 | <span class="buttons"> |
---|
58 | <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" /> |
---|
59 | </span> |
---|
60 | </td> |
---|
61 | </tr> |
---|
62 | |
---|
63 | <tr class="prop"> |
---|
64 | <td valign="top" class="name"> |
---|
65 | <label for="max">Inventory:</label> |
---|
66 | </td> |
---|
67 | <td valign="top" class="value"> |
---|
68 | <g:link action="exportInventory"> |
---|
69 | Export |
---|
70 | </g:link> |
---|
71 | / |
---|
72 | <g:link action="exportInventoryTemplate"> |
---|
73 | Template |
---|
74 | </g:link> |
---|
75 | / |
---|
76 | <g:link action="exportInventoryExample"> |
---|
77 | Example |
---|
78 | </g:link> |
---|
79 | / |
---|
80 | <g:link action="importInventory"> |
---|
81 | Import Inventory |
---|
82 | </g:link> |
---|
83 | / |
---|
84 | <g:link action="importInventoryItemPurchases"> |
---|
85 | Import Purchases |
---|
86 | </g:link> |
---|
87 | </td> |
---|
88 | </tr> |
---|
89 | |
---|
90 | </tbody> |
---|
91 | </table> |
---|
92 | </div> |
---|
93 | </g:form> |
---|
94 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
95 | </div> |
---|
96 | |
---|
97 | <br /> |
---|
98 | |
---|
99 | <g:if test="${inventoryItemInstanceList.size() > 10}"> |
---|
100 | <g:if test="${inventoryItemInstanceTotal > inventoryItemInstanceList.size()}"> |
---|
101 | <div class="paginateButtons"> |
---|
102 | <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
103 | </div> |
---|
104 | </g:if> |
---|
105 | </g:if> |
---|
106 | |
---|
107 | <g:if test="${inventoryItemInstanceList.size() > 0}"> |
---|
108 | <div class="list"> |
---|
109 | <table> |
---|
110 | <thead> |
---|
111 | <tr> |
---|
112 | |
---|
113 | <th>Picture</th> |
---|
114 | |
---|
115 | <g:sortableColumn property="name" title="Name" params="${filterParams}" /> |
---|
116 | |
---|
117 | <g:sortableColumn property="description" title="Description" params="${filterParams}" /> |
---|
118 | |
---|
119 | <g:sortableColumn property="inventoryGroup" title="Group" params="${filterParams}" /> |
---|
120 | |
---|
121 | <g:sortableColumn property="unitsInStock" title="In Stock" params="${filterParams}" /> |
---|
122 | |
---|
123 | <th>Unit</th> |
---|
124 | |
---|
125 | <th></th> |
---|
126 | |
---|
127 | </tr> |
---|
128 | </thead> |
---|
129 | <tbody> |
---|
130 | <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance"> |
---|
131 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" /> |
---|
132 | |
---|
133 | <td class='notClickable'> |
---|
134 | <g:if test="${inventoryItemInstance.picture}" > |
---|
135 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" |
---|
136 | size="${Image.Small}" |
---|
137 | lightboxSize="${Image.Large}" |
---|
138 | target="_blank" |
---|
139 | title="Show Original" /> |
---|
140 | </g:if> |
---|
141 | </td> |
---|
142 | |
---|
143 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
144 | ${fieldValue(bean:inventoryItemInstance, field:'name')} |
---|
145 | </td> |
---|
146 | |
---|
147 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
148 | ${fieldValue(bean:inventoryItemInstance, field:'description')} |
---|
149 | </td> |
---|
150 | |
---|
151 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
152 | ${fieldValue(bean:inventoryItemInstance, field:'inventoryGroup')} |
---|
153 | </td> |
---|
154 | |
---|
155 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
156 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} |
---|
157 | </td> |
---|
158 | |
---|
159 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
160 | ${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')} |
---|
161 | </td> |
---|
162 | |
---|
163 | <td class="notClickable"> |
---|
164 | <g:link action="show" id="${inventoryItemInstance.id}"> |
---|
165 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
166 | </g:link> |
---|
167 | </td> |
---|
168 | |
---|
169 | </tr> |
---|
170 | </g:each> |
---|
171 | </tbody> |
---|
172 | </table> |
---|
173 | </div> |
---|
174 | </g:if> |
---|
175 | <div class="paginateButtons"> |
---|
176 | <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
177 | </div> |
---|
178 | |
---|
179 | <filterpane:filterPane domainBean="InventoryItem" |
---|
180 | title="Search" |
---|
181 | action="search" |
---|
182 | class="overlayPane" |
---|
183 | excludeProperties="estimatedUnitPriceCurrency, |
---|
184 | averageDeliveryTime" |
---|
185 | associatedProperties="inventoryLocation.name, |
---|
186 | spareFor.name, |
---|
187 | preferredManufacturer.name, |
---|
188 | preferredSupplier.name" |
---|
189 | filterPropertyValues="${['inventoryLocation.name':[values:InventoryLocation.list()], |
---|
190 | 'spareFor.name':[values:Asset.list()], |
---|
191 | 'preferredManufacturer.name':[values:Manufacturer.findAllByIsActive(true)], |
---|
192 | 'preferredSupplier.name':[values:Supplier.findAllByIsActive(true)], |
---|
193 | ]}"/> |
---|
194 | </div> <!-- end body div --> |
---|
195 | |
---|
196 | <!-- Start Search Pane --> |
---|
197 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
198 | <h2>Quick Search</h2> |
---|
199 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
200 | <table> |
---|
201 | <tbody> |
---|
202 | |
---|
203 | <tr class="prop"> |
---|
204 | <td valign="top" class="name"> |
---|
205 | <label>Inventory:</label> |
---|
206 | </td> |
---|
207 | <td valign="top" class="value"> |
---|
208 | <g:link controller="inventoryItemDetailed" |
---|
209 | action="search" |
---|
210 | params="[quickSearch: 'all']"> |
---|
211 | <g:message code="default.all.text" /> |
---|
212 | </g:link> |
---|
213 | <br /> |
---|
214 | <g:link controller="inventoryItemDetailed" |
---|
215 | action="search" |
---|
216 | params="[quickSearch: 'inventoryBelowReorder']"> |
---|
217 | <g:message code="inventoryItem.search.text.below.reorder" /> |
---|
218 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.description" /> |
---|
219 | <br /> |
---|
220 | <g:link controller="inventoryItemDetailed" |
---|
221 | action="search" |
---|
222 | params="[quickSearch: 'inventoryBelowReorderAll']"> |
---|
223 | <g:message code="inventoryItem.search.text.below.reorder.all" /> |
---|
224 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.all.description" /> |
---|
225 | <br /> |
---|
226 | <g:link controller="inventoryItemDetailed" |
---|
227 | action="search" |
---|
228 | params="[quickSearch: 'recentlyUsed', daysBack: '14']"> |
---|
229 | <g:message code="inventoryItem.search.text.recently.used" /> |
---|
230 | </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[14]"/> |
---|
231 | <br /> |
---|
232 | <g:link controller="inventoryItemDetailed" |
---|
233 | action="search" |
---|
234 | params="[quickSearch: 'recentlyUsed', daysBack: '30']"> |
---|
235 | <g:message code="inventoryItem.search.text.recently.used" /> |
---|
236 | </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[30]"/> |
---|
237 | </td> |
---|
238 | </tr> |
---|
239 | |
---|
240 | <tr class="prop"> |
---|
241 | <td valign="top" class="name"> |
---|
242 | <label>Links:</label> |
---|
243 | </td> |
---|
244 | <td valign="top" class="value"> |
---|
245 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
246 | action="search"> |
---|
247 | Purchases |
---|
248 | </g:link> |
---|
249 | </td> |
---|
250 | </tr> |
---|
251 | |
---|
252 | </tbody> |
---|
253 | </table> |
---|
254 | <div class="buttons"> |
---|
255 | <span class="button"> |
---|
256 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
257 | </span> |
---|
258 | </div> |
---|
259 | </g:form> |
---|
260 | </div> <!-- end search pane --> |
---|
261 | |
---|
262 | </body> |
---|
263 | </html> |
---|