Index: trunk/grails-app/views/taskDetailed/_showTaskTab.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/_showTaskTab.gsp	(revision 823)
+++ trunk/grails-app/views/taskDetailed/_showTaskTab.gsp	(revision 833)
@@ -230,5 +230,5 @@
                 <tbody>
                     <g:each in="${entryFaultList}" status="i" var="entry">
-                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
+                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
 
                                 <td style="width:65%" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
@@ -300,5 +300,5 @@
                 <tbody>
                     <g:each in="${entryCauseList}" status="i" var="entry">
-                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
+                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
 
                                 <td style="width:65%" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
@@ -339,61 +339,28 @@
     <br />
 
-    <g:if test="${entryWorkDoneList.isEmpty()}">
-        <h1>No Work Done</h1>
-        <br />
-    </g:if>
-    <g:else>
-        <div class="list">
-            <h1>Work Done</h1>
-            <table>
-                <thead>
-                    <tr>
-                        <th>Comment</th>
-                        <th>Date Done</th>
-                        <th>Duration</th>
-                        <th>Entered By</th>
-                        <th></th>
-                    </tr>
-                </thead>
-                <tbody>
-                    <g:each in="${entryWorkDoneList}" status="i" var="entry">
-                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
-
-                                <td width="65%" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
-                                    ${entry.comment.encodeAsHTML()}
-                                </td>
-
-                                <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
-                                    <g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/>
-                                </td>
-
-                                <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
-                                    ${entry.durationHour}:${entry.durationMinute}
-                                </td>
-
-                                <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
-                                    ${entry.enteredBy.encodeAsHTML()}
-                                </td>
-
-                                <td class="notClickable">
-                                    <g:link controller="entryDetailed" action="edit" id="${entry.id}">
-                                        <img  src="${resource(dir:'images/skin',file:'database_edit.png')}" alt="Edit" title="Edit" />
-                                    </g:link>
-                                </td>
-
-                            </tr>
-                    </g:each>
-                </tbody>
-            </table>
-        </div>
-    </g:else>
-
-    <div class="buttons">
-        <g:form controller="entryDetailed">
-            <g:hiddenField name="taskInstance.id" value="${taskInstance?.id}" />
-            <g:hiddenField name="entryType.id" value="3" />
-            <span class="button">
-                <g:actionSubmit value="Add Work Done" action="create"  class="add"/>
-            </span>
-        </g:form>
-    </div>
+    <div id="workDoneContainer">
+        <g:if test="${entryWorkDoneList.isEmpty()}">
+            <h1>No Work Done</h1>
+            <br />
+        </g:if>
+        <g:else>
+            <g:render template="/entryDetailed/list"
+                                model="['entryList':entryWorkDoneList]" />
+        </g:else>
+    </div>
+
+    <br />
+
+    <div id="createWorkDoneContainer" style="display:none;"></div>
+
+    <div style="text-align:right;" id="workDoneButton">
+        <span class="buttons">
+            <input type="button"
+                        class="add"
+                        value="Add Work Done"
+                        onclick="getCreateEntryForm(jQuery('#workDoneContainer'),
+                                                                            jQuery('#createWorkDoneContainer'),
+                                                                            jQuery('#workDoneButton'),
+                                                                            {taskId: ${taskInstance?.id}, entryTypeId: 3})" />
+        </span>
+    </div>
