

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Asset Search</title>
        <nav:resources override="true"/>
    </head>
    <body>
        <div class="nav">
            <nav:renderSubItems group="nav"/>
        </div>
        <div class="body">
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                   	        <g:sortableColumn property="id" title="Id" />

                             <g:sortableColumn property="name" title="Name" />

                             <g:sortableColumn property="assetType" title="Asset Type" />
                        
                   	        <g:sortableColumn property="systemSection" title="System Section" />

                            <g:sortableColumn property="isActive" title="Is Active" />

                            <th></th>
                   	    
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${assetInstanceList}" status="i" var="assetInstance">
                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/assetDetailed/show/${assetInstance.id}"'/>
                        
                            <td>${fieldValue(bean:assetInstance, field:'id')}</td>

                            <td>${fieldValue(bean:assetInstance, field:'name')}</td>                        

                            <td>${fieldValue(bean:assetInstance, field:'assetType')}</td>

                            <td>${fieldValue(bean:assetInstance, field:'systemSection')}</td>

                            <td>${fieldValue(bean:assetInstance, field:'isActive')}</td>

                            <td>
                                <g:link action="show" id="${assetInstance.id}">
                                    <img  src="${createLinkTo(dir:'images/skin',file:'database_table.png')}" alt="Show" />
                                </g:link>
                            </td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${assetInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
