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="unitsInStock" title="Units In Stock" params="${filterParams}" /> |
---|
120 | |
---|
121 | <th>Unit Of Measure</th> |
---|
122 | |
---|
123 | <th></th> |
---|
124 | |
---|
125 | </tr> |
---|
126 | </thead> |
---|
127 | <tbody> |
---|
128 | <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance"> |
---|
129 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" /> |
---|
130 | |
---|
131 | <td class='gallery'> |
---|
132 | <g:if test="${inventoryItemInstance.picture}" > |
---|
133 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" |
---|
134 | size="${Image.Small}" |
---|
135 | lightboxSize="${Image.Large}" |
---|
136 | target="_blank" |
---|
137 | title="Show Original" /> |
---|
138 | </g:if> |
---|
139 | </td> |
---|
140 | |
---|
141 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
142 | ${fieldValue(bean:inventoryItemInstance, field:'name')} |
---|
143 | </td> |
---|
144 | |
---|
145 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
146 | ${fieldValue(bean:inventoryItemInstance, field:'description')} |
---|
147 | </td> |
---|
148 | |
---|
149 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
150 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} |
---|
151 | </td> |
---|
152 | |
---|
153 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' > |
---|
154 | ${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')} |
---|
155 | </td> |
---|
156 | |
---|
157 | <td> |
---|
158 | <g:link action="show" id="${inventoryItemInstance.id}"> |
---|
159 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
160 | </g:link> |
---|
161 | </td> |
---|
162 | |
---|
163 | </tr> |
---|
164 | </g:each> |
---|
165 | </tbody> |
---|
166 | </table> |
---|
167 | </div> |
---|
168 | </g:if> |
---|
169 | <div class="paginateButtons"> |
---|
170 | <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" /> |
---|
171 | </div> |
---|
172 | |
---|
173 | <filterpane:filterPane domainBean="InventoryItem" |
---|
174 | title="Search" |
---|
175 | action="search" |
---|
176 | class="overlayPane" |
---|
177 | excludeProperties="estimatedUnitPriceCurrency, |
---|
178 | averageDeliveryTime" |
---|
179 | associatedProperties="inventoryLocation.name, |
---|
180 | spareFor.name, |
---|
181 | preferredManufacturer.name, |
---|
182 | preferredSupplier.name" |
---|
183 | filterPropertyValues="${['inventoryLocation.name':[values:InventoryLocation.list()], |
---|
184 | 'spareFor.name':[values:Asset.list()], |
---|
185 | 'preferredManufacturer.name':[values:Manufacturer.findAllByIsActive(true)], |
---|
186 | 'preferredSupplier.name':[values:Supplier.findAllByIsActive(true)], |
---|
187 | ]}"/> |
---|
188 | </div> <!-- end body div --> |
---|
189 | |
---|
190 | <!-- Start Search Pane --> |
---|
191 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
192 | <h2>Quick Search</h2> |
---|
193 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
194 | <table> |
---|
195 | <tbody> |
---|
196 | |
---|
197 | <tr class="prop"> |
---|
198 | <td valign="top" class="name"> |
---|
199 | <label>Inventory:</label> |
---|
200 | </td> |
---|
201 | <td valign="top" class="value"> |
---|
202 | <g:link controller="inventoryItemDetailed" |
---|
203 | action="search" |
---|
204 | params="[quickSearch: 'all']"> |
---|
205 | <g:message code="default.all.text" /> |
---|
206 | </g:link> |
---|
207 | <br /> |
---|
208 | <g:link controller="inventoryItemDetailed" |
---|
209 | action="search" |
---|
210 | params="[quickSearch: 'inventoryBelowReorder']"> |
---|
211 | <g:message code="inventoryItem.search.text.below.reorder" /> |
---|
212 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.description" /> |
---|
213 | <br /> |
---|
214 | <g:link controller="inventoryItemDetailed" |
---|
215 | action="search" |
---|
216 | params="[quickSearch: 'inventoryBelowReorderAll']"> |
---|
217 | <g:message code="inventoryItem.search.text.below.reorder.all" /> |
---|
218 | </g:link> - <g:message code="inventoryItem.search.text.below.reorder.all.description" /> |
---|
219 | </td> |
---|
220 | </tr> |
---|
221 | |
---|
222 | <tr class="prop"> |
---|
223 | <td valign="top" class="name"> |
---|
224 | <label>Links:</label> |
---|
225 | </td> |
---|
226 | <td valign="top" class="value"> |
---|
227 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
228 | action="search"> |
---|
229 | Purchases |
---|
230 | </g:link> |
---|
231 | </td> |
---|
232 | </tr> |
---|
233 | |
---|
234 | </tbody> |
---|
235 | </table> |
---|
236 | <div class="buttons"> |
---|
237 | <span class="button"> |
---|
238 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
239 | </span> |
---|
240 | </div> |
---|
241 | </g:form> |
---|
242 | </div> <!-- end search pane --> |
---|
243 | |
---|
244 | </body> |
---|
245 | </html> |
---|