

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Entry List</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New Entry</g:link></span>
        </div>
        <div class="body">
            <h1>Entry 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" />
                        
                   	        <th>Task</th>
                   	    
                   	        <g:sortableColumn property="comment" title="Comment" />
                        
                   	        <g:sortableColumn property="dateDone" title="Date Done" />
                        
                   	        <g:sortableColumn property="enteredBy" title="Entered By" />

                            <th></th>

                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${entryInstanceList}" status="i" var="entryInstance">
                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/show/${entryInstance.id}"'/>

                            <td>${fieldValue(bean:entryInstance, field:'id')}</td>
                        
                            <td>${fieldValue(bean:entryInstance, field:'task')}</td>
                        
                            <td>${fieldValue(bean:entryInstance, field:'comment')}</td>
                        
                            <td>${fieldValue(bean:entryInstance, field:'dateDone')}</td>
                        
                            <td>${fieldValue(bean:entryInstance, field:'enteredBy')}</td>

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