Index: trunk/grails-app/views/taskDetailed/search.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/search.gsp	(revision 466)
+++ trunk/grails-app/views/taskDetailed/search.gsp	(revision 467)
@@ -84,58 +84,61 @@
             </g:if>
 
-            <div class="list">
-                <table>
-                    <thead>
-                        <tr>
-
-                            <custom:sortableColumnWithImg property="attentionFlag"
-                                                                                            imgSrc="${resource(dir:'images/skin',file:'flag_red.png')}"
-                                                                                            imgAlt="Flag" params="${filterParams}" />
-
-                            <g:sortableColumn property="id" title="Id" params="${filterParams}" />
-
-                            <g:sortableColumn property="targetStartDate" title="Target Start Date" params="${filterParams}" />
-
-                            <g:sortableColumn property="description" title="Description" params="${filterParams}" />
-
-                            <g:sortableColumn  property="taskPriority" title="Task Priority" params="${filterParams}" />
-
-                            <g:sortableColumn  property="taskStatus" title="Task Status" params="${filterParams}" />
-
-                            <th></th>
-
-                        </tr>
-                    </thead>
-                    <tbody>
-                    <g:each in="${taskInstanceList}" status="i" var="taskInstance">
-                    <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'/>
-
-                            <td class="idColumn">
-                                <g:if test="${taskInstance.attentionFlag}">
-                                    <img  src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Flag" />
-                                </g:if>
-                            </td>
-
-                            <td class="idColumn">${fieldValue(bean:taskInstance, field:'id')}</td>
-
-                            <td><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td>
-
-                            <td>${fieldValue(bean:taskInstance, field:'description')}</td>
-
-                            <td>${fieldValue(bean:taskInstance, field:'taskPriority')}</td>
-
-                            <td>${fieldValue(bean:taskInstance, field:'taskStatus')}</td>
-
-                            <td>
-                                <g:link action="show" id="${taskInstance.id}">
-                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
-                                </g:link>
-                            </td>
-
-                        </tr>
-                    </g:each>
-                    </tbody>
-                </table>
-            </div>
+            <g:if test="${taskInstanceList.size() > 0}">
+                <div class="list">
+                    <table>
+                        <thead>
+                            <tr>
+
+                                <custom:sortableColumnWithImg property="attentionFlag"
+                                                                                                imgSrc="${resource(dir:'images/skin',file:'flag_red.png')}"
+                                                                                                imgAlt="Flag" params="${filterParams}" />
+
+                                <g:sortableColumn property="id" title="Id" params="${filterParams}" />
+
+                                <g:sortableColumn property="targetStartDate" title="Target Start Date" params="${filterParams}" />
+
+                                <g:sortableColumn property="description" title="Description" params="${filterParams}" />
+
+                                <g:sortableColumn  property="taskPriority" title="Task Priority" params="${filterParams}" />
+
+                                <g:sortableColumn  property="taskStatus" title="Task Status" params="${filterParams}" />
+
+                                <th></th>
+
+                            </tr>
+                        </thead>
+                        </tbody>
+                        <tbody>
+                        <g:each in="${taskInstanceList}" status="i" var="taskInstance">
+                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'/>
+
+                                <td class="idColumn">
+                                    <g:if test="${taskInstance.attentionFlag}">
+                                        <img  src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Flag" />
+                                    </g:if>
+                                </td>
+
+                                <td class="idColumn">${fieldValue(bean:taskInstance, field:'id')}</td>
+
+                                <td><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td>
+
+                                <td>${fieldValue(bean:taskInstance, field:'description')}</td>
+
+                                <td>${fieldValue(bean:taskInstance, field:'taskPriority')}</td>
+
+                                <td>${fieldValue(bean:taskInstance, field:'taskStatus')}</td>
+
+                                <td>
+                                    <g:link action="show" id="${taskInstance.id}">
+                                        <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
+                                    </g:link>
+                                </td>
+
+                            </tr>
+                        </g:each>
+                        </tbody>
+                    </table>
+                </div>
+            </g:if>
             <div class="paginateButtons">
                 <g:paginate total="${taskInstanceTotal}" params="${filterParams}" />
