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

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

Add CostCode and InventoryItemPurchase domain classes with import features.
Includes some fixes to inventory imports, where manufacturer and supplier were crossed.

File size: 9.7 KB
Line 
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                Results: ${inventoryItemInstanceList.size()} / ${inventoryItemInstanceTotal}
28                <span class="searchButtons">
29                    <filterpane:filterButton text="Search" appliedText="Change Search" />
30                </span>
31            </div>
32
33            <jsUtil:toggleControl toggleId="options"
34                                                    imageId="optionsImg"
35                                                    closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}"
36                                                    openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}"
37                                                    text="${g.message(code: 'default.options.text')}"
38                                                    />
39
40            <div id="options" style="display:none;">
41                <g:form method="post" >
42                    <g:hiddenField name="params" value="${filterParams}" />
43                    <div class="dialog">
44                        <table>
45                            <tbody>
46
47                                <tr class="prop">
48                                    <td valign="top" class="name">
49                                        <label for="max">Results per page:</label>
50                                    </td>
51                                    <td valign="top" class="value">
52                                        <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/>
53
54                                        <span class="buttons">
55                                            <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" />
56                                        </span>
57                                    </td>
58                                </tr>
59
60                                <tr class="prop">
61                                    <td valign="top" class="name">
62                                        <label for="max">Inventory:</label>
63                                    </td>
64                                    <td valign="top" class="value">
65                                        <g:link action="exportInventory">
66                                            Export
67                                        </g:link>
68                                        /
69                                        <g:link action="exportInventoryTemplate">
70                                            Template
71                                        </g:link>
72                                        /
73                                        <g:link action="exportInventoryExample">
74                                            Example
75                                        </g:link>
76                                        /
77                                        <g:link action="importInventory">
78                                            Import Inventory
79                                        </g:link>
80                                        /
81                                        <g:link action="importInventoryItemPurchases">
82                                            Import Purchases
83                                        </g:link>
84                                    </td>
85                                </tr>
86
87                            </tbody>
88                        </table>
89                    </div>
90                </g:form>
91                <export:formats  params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/>
92            </div>
93
94            <br />
95
96            <g:if test="${inventoryItemInstanceList.size() > 10}">
97                <g:if test="${inventoryItemInstanceTotal > inventoryItemInstanceList.size()}">
98                    <div class="paginateButtons">
99                        <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" />
100                    </div>
101                </g:if>
102            </g:if>
103
104            <div class="list">
105                <table>
106                    <thead>
107                        <tr>
108
109                            <th>Picture</th>
110                       
111                                <g:sortableColumn property="name" title="Name" params="${filterParams}" />
112                       
113                                <g:sortableColumn property="description" title="Description" params="${filterParams}" />
114                       
115                            <g:sortableColumn property="unitsInStock" title="Units In Stock" params="${filterParams}" />
116                           
117                            <th>Unit Of Measure</th>
118
119                            <th></th>
120                       
121                        </tr>
122                    </thead>
123                    <tbody>
124                    <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance">
125                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" />
126
127                            <td class='gallery'>
128                                <g:if test="${inventoryItemInstance.picture}" >
129                                    <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}"
130                                                                                        size="${Image.Small}"
131                                                                                        lightboxSize="${Image.Large}"
132                                                                                        target="_blank"
133                                                                                        title="Show Original" />
134                                </g:if>
135                            </td>
136                       
137                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
138                                ${fieldValue(bean:inventoryItemInstance, field:'name')}
139                            </td>
140                       
141                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
142                                ${fieldValue(bean:inventoryItemInstance, field:'description')}
143                            </td>
144                       
145                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
146                                ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')}
147                            </td>
148                       
149                            <td onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"' >
150                                ${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')}
151                            </td>
152
153                            <td>
154                                <g:link action="show" id="${inventoryItemInstance.id}">
155                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
156                                </g:link>
157                            </td>
158                       
159                        </tr>
160                    </g:each>
161                    </tbody>
162                </table>
163            </div>
164            <div class="paginateButtons">
165                <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" />
166            </div>
167
168            <filterpane:filterPane domainBean="InventoryItem"
169                                    title="Search"
170                                    action="search"
171                                    class="overlayPane"
172                                    excludeProperties="estimatedUnitPriceCurrency,
173                                                                    averageDeliveryTime"
174                                    associatedProperties="inventoryLocation.name,
175                                                                            spareFor.name,
176                                                                            preferredManufacturer.name,
177                                                                            preferredSupplier.name"
178                                    filterPropertyValues="${['inventoryLocation.name':[values:InventoryLocation.list()],
179                                                                                'spareFor.name':[values:Asset.list()],
180                                                                                'preferredManufacturer.name':[values:Manufacturer.findAllByIsActive(true)],
181                                                                                'preferredSupplier.name':[values:Supplier.findAllByIsActive(true)],
182                                                                                ]}"/>
183        </div> <!-- end body div -->
184    </body>
185</html>
Note: See TracBrowser for help on using the repository browser.