source: trunk/grails-app/views/inventoryItemDetailed/search.gsp @ 563

Last change on this file since 563 was 563, checked in by gav, 14 years ago

Small text adjustment to inventory search view.

File size: 16.5 KB
RevLine 
[139]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"/>
[182]9        <g:render template="/shared/pictureHead" />
[156]10        <filterpane:includes />
[392]11        <export:resource />
[139]12    </head>
13    <body>
14        <div class="nav">
15            <nav:renderSubItems group="nav"/>
16        </div>
17        <div class="body">
[405]18            <g:render template="/shared/messages" />
[156]19            <filterpane:currentCriteria domainBean="InventoryItem"
20                                    action="search"
[450]21                                    dateFormat="EEE, dd-MMM-yyyy"
[156]22                                    removeImgDir="images"
23                                    removeImgFile="bullet_delete.png"
[562]24                                    title="Advanced Search"/>
[156]25
26            <div class="paginateButtons">
[468]27                <span class="searchButtons">
28                    <a href='' onclick="showElement('searchPane'); return false;">Quick</a>
29                </span>
[392]30                Results: ${inventoryItemInstanceList.size()} / ${inventoryItemInstanceTotal}
[221]31                <span class="searchButtons">
[562]32                    <filterpane:filterButton text="Advanced" appliedText="Advanced" />
[221]33                </span>
[156]34            </div>
35
[392]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
[423]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">
[441]81                                            Import Inventory
[423]82                                        </g:link>
[441]83                                        /
84                                        <g:link action="importInventoryItemPurchases">
85                                            Import Purchases
86                                        </g:link>
[423]87                                    </td>
88                                </tr>
89
[392]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
[468]107            <g:if test="${inventoryItemInstanceList.size() > 0}">
108                <div class="list">
109                    <table>
110                        <thead>
111                            <tr>
[182]112
[468]113                                <th>Picture</th>
[175]114                           
[468]115                                <g:sortableColumn property="name" title="Name" params="${filterParams}" />
116                           
117                                <g:sortableColumn property="description" title="Description" params="${filterParams}" />
118                           
[507]119                                <g:sortableColumn property="inventoryGroup" title="Group" params="${filterParams}" />
120                           
121                                <g:sortableColumn property="unitsInStock" title="In Stock" params="${filterParams}" />
[468]122                               
[507]123                                <th>Unit</th>
[139]124
[468]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'}" />
[182]132
[498]133                                <td class='notClickable'>
[468]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}"' >
[507]152                                    ${fieldValue(bean:inventoryItemInstance, field:'inventoryGroup')}
153                                </td>
154                           
155                                <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
[468]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>
[139]162
[498]163                                <td class="notClickable">
[468]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>
[139]175            <div class="paginateButtons">
[156]176                <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" />
[139]177            </div>
[156]178
179            <filterpane:filterPane domainBean="InventoryItem"
[562]180                                    title="Advanced Search"
[156]181                                    action="search"
182                                    class="overlayPane"
[435]183                                    excludeProperties="estimatedUnitPriceCurrency,
184                                                                    averageDeliveryTime"
[175]185                                    associatedProperties="inventoryLocation.name,
186                                                                            spareFor.name,
[435]187                                                                            preferredManufacturer.name,
188                                                                            preferredSupplier.name"
[554]189                                    filterPropertyValues="${['inventoryLocation.name':[values: associatedPropertyValues.inventoryLocationList],
190                                                                                'spareFor.name':[values: associatedPropertyValues.assetList],
191                                                                                'preferredManufacturer.name':[values: associatedPropertyValues.manufacturerList],
192                                                                                'preferredSupplier.name':[values: associatedPropertyValues.supplierList]
[175]193                                                                                ]}"/>
[156]194        </div> <!-- end body div -->
[468]195
196        <!-- Start Search Pane -->
197        <div class="overlayPane" id="searchPane" style="display:none;">
198            <h2>Quick Search</h2>
[562]199
[468]200            <g:form method="post" id="searchForm" name="searchForm" >
[562]201                <g:hiddenField name="newTextSearch" value="true" />
202
[468]203                <table>
204                    <tbody>
205
206                        <tr class="prop">
207                            <td valign="top" class="name">
[485]208                                <label>Inventory:</label>
209                            </td>
210                            <td valign="top" class="value">
211                                <g:link controller="inventoryItemDetailed"
212                                                action="search"
213                                                params="[quickSearch: 'all']">
214                                                <g:message code="default.all.text" />
215                                </g:link>
216                                <br />
217                                <g:link controller="inventoryItemDetailed"
218                                                action="search"
219                                                params="[quickSearch: 'inventoryBelowReorder']">
220                                                <g:message code="inventoryItem.search.text.below.reorder" />
221                                </g:link> - <g:message code="inventoryItem.search.text.below.reorder.description" />
222                                <br />
223                                <g:link controller="inventoryItemDetailed"
224                                                action="search"
225                                                params="[quickSearch: 'inventoryBelowReorderAll']">
226                                                <g:message code="inventoryItem.search.text.below.reorder.all" />
227                                </g:link> - <g:message code="inventoryItem.search.text.below.reorder.all.description" />
[489]228                                <br />
229                                <g:link controller="inventoryItemDetailed"
230                                                action="search"
231                                                params="[quickSearch: 'recentlyUsed', daysBack: '14']">
232                                                <g:message code="inventoryItem.search.text.recently.used" />
233                                </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[14]"/>
234                                <br />
235                                <g:link controller="inventoryItemDetailed"
236                                                action="search"
237                                                params="[quickSearch: 'recentlyUsed', daysBack: '30']">
238                                                <g:message code="inventoryItem.search.text.recently.used" />
239                                </g:link> - <g:message code="inventoryItem.search.text.recently.used.description" args="[30]"/>
[485]240                            </td>
241                        </tr>
242
243                        <tr class="prop">
244                            <td valign="top" class="name">
[468]245                                <label>Links:</label>
246                            </td>
247                            <td valign="top" class="value">
248                                <g:link controller="inventoryItemPurchaseDetailed"
249                                                action="search">
250                                                Purchases
251                                </g:link>
252                            </td>
253                        </tr>
254
255                    </tbody>
256                </table>
[562]257
258                <table>
259                    <tbody>
260
261                        <tr class="prop">
262                            <td valign="top" class="name">
263                                <label for="searchText">Search:</label>
264                            </td>
265                            <td valign="top" class="value">
266                                <input type="text" style="width:450px" maxlength="75" id="searchText" name="searchText" value="${filterParams.searchText}"/>
267                            </td>
268                        </tr>
269
270                        <tr class="prop">
271                            <td valign="top" class="name">
272                            </td>
273                            <td valign="top" class="value">
274<!--                                 <g:checkBox name="searchName" value="${true}" ></g:checkBox> -->
275                                <label for="searchName">Name,</label>
276<!--                                 <g:checkBox name="searchDescription" value="${true}" ></g:checkBox> -->
277                                <label for="searchDescription">Description,</label>
278<!--                                 <g:checkBox name="searchComment" value="${true}" ></g:checkBox> -->
279                                <label for="searchComment">Comment,</label>
280<!--                                 <g:checkBox name="searchLocation" value="${true}" ></g:checkBox> -->
281                                <label for="searchLocation">Location and</label>
282<!--                                 <g:checkBox name="searchSpareFor" value="${true}" ></g:checkBox> -->
[563]283                                <label for="searchSpareFor">Spare For (Asset: name, description and comment).</label>
[562]284                            </td>
285                        </tr>
286
287                    </tbody>
288                </table>
289
[468]290                <div class="buttons">
291                    <span class="button">
[562]292                        <g:actionSubmit class="save" value="Update" action="search" />
293                        <g:actionSubmit class="cancel" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" />
[468]294                    </span>
295                </div>
296            </g:form>
297        </div> <!-- end search pane -->
298
[139]299    </body>
300</html>
Note: See TracBrowser for help on using the repository browser.