<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Task List</title>
        <nav:resources override="true"/>
    </head>
    <body>
        <div class="nav">
            <nav:renderSubItems group="nav"/>
        </div>
        <div class="body">

            <h1>Sub Tasks for:
                <g:link action="show" id="${parentTaskInstance.id}" params="[showTab:'showSubTasksTab']">
                    Task #${parentTaskInstance.id}
                </g:link>
            </h1>
            <g:if test="${parentTaskInstance.primaryAsset}">
                ${fieldValue(bean:parentTaskInstance, field:'primaryAsset')}:
            </g:if>
            ${parentTaskInstance.description}

            <g:if test="${flash.message}">
                <div class="message">${flash.message}</div>
            </g:if>

            <div class="paginateButtons">
                Results: ${taskInstanceList.size()} / ${taskInstanceTotal}
            </div>
            <div class="paginateButtons">
                <g:paginate action="listSubTasks" id="${parentTaskInstance?.id}" total="${taskInstanceTotal}" />
            </div>

            <g:render template="list" />

            <div class="paginateButtons">
                <g:paginate action="listSubTasks" id="${parentTaskInstance?.id}" total="${taskInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
