Changeset 958 for trunk/grails-app/views


Ignore:
Timestamp:
Jul 1, 2011, 6:13:37 AM (13 years ago)
Author:
gav
Message:

Add filterpane search to InventoryLocation? list view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/inventoryLocationDetailed/list.gsp

    r836 r958  
    66        <meta name="layout" content="main" />
    77        <title>InventoryLocation List</title>
     8        <filterpane:includes />
    89        <nav:resources override="true"/>
    910    </head>
     
    1314        </div>
    1415        <div class="body">
    15             <g:if test="${flash.message}">
    16             <div class="message">${flash.message}</div>
    17             </g:if>
    18             <div class="list">
    19                 <table>
    20                     <thead>
     16            <g:render template="/shared/messages" />
     17
     18            <filterpane:currentCriteria domainBean="InventoryLocation"
     19                                        action="list"
     20                                        dateFormat="EEE, dd-MMM-yyyy"
     21                                        removeImgDir="images"
     22                                        removeImgFile="bullet_delete.png"
     23                                        title="Search"/>
     24
     25            <div class="paginateButtons">
     26                Results: ${inventoryLocationInstanceList.size()} / ${inventoryLocationInstanceTotal}
     27                <span class="searchButtons">
     28                    <filterpane:filterButton text="Search" appliedText="Change Search" />
     29                </span>
     30            </div>
     31
     32            <br />
     33
     34            <g:if test="${inventoryLocationInstanceList.size() > 0}">
     35                <div class="list">
     36                    <table>
     37                        <thead>
    2138                        <tr>
    22                        
    23                             <g:sortableColumn property="id" title="Id" />
    2439
    25                             <g:sortableColumn property="name" title="Name" />
     40                            <g:sortableColumn property="id" title="Id" params="${filterParams}" />
    2641
    27                             <th>Inventory Store</th>
     42                            <g:sortableColumn property="name" title="Name" params="${filterParams}" />
    2843
    29                             <g:sortableColumn property="isActive" title="Is Active" />
     44                            <g:sortableColumn property="inventoryStore" title="Inventory Store" params="${filterParams}" />
     45
     46                            <g:sortableColumn property="isActive" title="Is Active" params="${filterParams}" />
    3047
    3148                            <th></th>
    32                        
     49
    3350                        </tr>
    34                     </thead>
    35                     <tbody>
    36                     <g:each in="${inventoryLocationInstanceList}" status="i" var="inventoryLocationInstance">
    37                         <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
     51                        </thead>
     52                        <tbody>
     53                        <g:each in="${inventoryLocationInstanceList}" status="i" var="inventoryLocationInstance">
     54                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
    3855
    39                        
    40                             <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
    41                                 ${fieldValue(bean:inventoryLocationInstance, field:'id')}
    42                             </td>
    43                        
    44                             <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
    45                                 ${fieldValue(bean:inventoryLocationInstance, field:'name')}
    46                             </td>
    47                        
    48                             <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
    49                                 ${fieldValue(bean:inventoryLocationInstance, field:'inventoryStore')}
    50                             </td>
    51                        
    52                             <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
    53                                 ${fieldValue(bean:inventoryLocationInstance, field:'isActive')}
    54                             </td>
    5556
    56                             <td class="notClickable">
    57                                 <g:link action="show" id="${inventoryLocationInstance.id}">
    58                                     <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
    59                                 </g:link>
    60                             </td>
    61                        
    62                         </tr>
    63                     </g:each>
    64                     </tbody>
    65                 </table>
     57                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
     58                                    ${fieldValue(bean:inventoryLocationInstance, field:'id')}
     59                                </td>
     60
     61                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
     62                                    ${fieldValue(bean:inventoryLocationInstance, field:'name')}
     63                                </td>
     64
     65                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
     66                                    ${fieldValue(bean:inventoryLocationInstance, field:'inventoryStore')}
     67                                </td>
     68
     69                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
     70                                    ${fieldValue(bean:inventoryLocationInstance, field:'isActive')}
     71                                </td>
     72
     73                                <td class="notClickable">
     74                                    <g:link action="show" id="${inventoryLocationInstance.id}">
     75                                        <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
     76                                    </g:link>
     77                                </td>
     78
     79                            </tr>
     80                        </g:each>
     81                        </tbody>
     82                    </table>
     83                </div>
     84            </g:if>
     85
     86            <div class="paginateButtons">
     87                <g:paginate total="${inventoryLocationInstanceTotal}" params="${filterParams}" />
    6688            </div>
    67             <div class="paginateButtons">
    68                 <g:paginate total="${inventoryLocationInstanceTotal}" />
    69             </div>
     89
     90            <filterpane:filterPane domainBean="InventoryLocation"
     91                                   title="Search"
     92                                   action="list"
     93                                   class="overlayPane"
     94                                   associatedProperties="inventoryStore.name"
     95                                   filterPropertyValues="${['inventoryStore.name':[values: associatedPropertyValues.inventoryStoreList]]}" />
    7096        </div>
    7197    </body>
Note: See TracChangeset for help on using the changeset viewer.