

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Department List</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><g:link class="create" action="create">New Department</g:link></span>
        </div>
        <div class="body">
            <h1>Department List</h1>
            <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="description" title="Description" />
                        
                   	        <g:sortableColumn property="isActive" title="Is Active" />
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${departmentInstanceList}" status="i" var="departmentInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${departmentInstance.id}">${fieldValue(bean:departmentInstance, field:'id')}</g:link></td>
                        
                            <td>${fieldValue(bean:departmentInstance, field:'name')}</td>
                        
                            <td>${fieldValue(bean:departmentInstance, field:'description')}</td>
                        
                            <td>${fieldValue(bean:departmentInstance, field:'isActive')}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${departmentInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
