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

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

Resolve ticket #12 again.
Turn query cache on again since this did not resolve the problem.
Implement fix as per http://jira.codehaus.org/browse/GRAILS-5111, add flush:true to save.
Adjust templates to include above and remove home url.
Re-generate all non detailed views and controllers.
Manually add flush:true and remove home url to detailed views and controllers.

File size: 4.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        <filterpane:includes />
10    </head>
11    <body>
12        <div class="nav">
13            <nav:renderSubItems group="nav"/>
14        </div>
15        <div class="body">
16            <g:if test="${flash.message}">
17            <div class="message">${flash.message}</div>
18            </g:if>
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                <filterpane:filterButton text="Search" appliedText="Change Search" />
28                Results:${inventoryItemInstanceTotal}
29            </div>
30
31            <div class="list">
32                <table>
33                    <thead>
34                        <tr>
35                       
36                                <g:sortableColumn property="id" title="Id" params="${filterParams}" />
37                       
38                                <g:sortableColumn property="name" title="Name" params="${filterParams}" />
39                       
40                                <g:sortableColumn property="description" title="Description" params="${filterParams}" />
41                       
42                            <g:sortableColumn property="unitsInStock" title="Units In Stock" params="${filterParams}" />
43                           
44                            <th>Unit Of Measure</th>
45
46                            <th></th>
47                       
48                        </tr>
49                    </thead>
50                    <tbody>
51                    <g:each in="${inventoryItemInstanceList}" status="i" var="inventoryItemInstance">
52                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryItemDetailed/show/${inventoryItemInstance.id}"'/>
53                       
54                            <td>${fieldValue(bean:inventoryItemInstance, field:'id')}</td>
55                       
56                            <td>${fieldValue(bean:inventoryItemInstance, field:'name')}</td>
57                       
58                            <td>${fieldValue(bean:inventoryItemInstance, field:'description')}</td>
59                       
60                            <td>${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')}</td>
61                       
62                            <td>${fieldValue(bean:inventoryItemInstance, field:'unitOfMeasure')}</td>
63
64                            <td>
65                                <g:link action="show" id="${inventoryItemInstance.id}">
66                                    <img  src="${resource(dir:'images/skin',file:'database_table.png')}" alt="Show" />
67                                </g:link>
68                            </td>
69                       
70                        </tr>
71                    </g:each>
72                    </tbody>
73                </table>
74            </div>
75            <div class="paginateButtons">
76                <g:paginate total="${inventoryItemInstanceTotal}" params="${filterParams}" />
77            </div>
78
79            <filterpane:filterPane domainBean="InventoryItem"
80                                    title="Search"
81                                    action="search"
82                                    class="overlayPane"
83                                    excludeProperties=""
84                                    associatedProperties="inventoryLocation.name,
85                                                                            spareFor.name,
86                                                                            manufacturers.name,
87                                                                            suppliers.name"
88                                    filterPropertyValues="${['inventoryLocation.name':[values:InventoryLocation.list()],
89                                                                                'spareFor.name':[values:Asset.list()],
90                                                                                'manufacturers.name':[values:Manufacturer.list()],
91                                                                                'suppliers.name':[values:Supplier.list()],
92                                                                                ]}"/>
93        </div> <!-- end body div -->
94    </body>
95</html>
Note: See TracBrowser for help on using the repository browser.