Index: trunk/grails-app/views/entryDetailed/_list.gsp
===================================================================
--- trunk/grails-app/views/entryDetailed/_list.gsp	(revision 845)
+++ trunk/grails-app/views/entryDetailed/_list.gsp	(revision 846)
@@ -1,14 +1,14 @@
 
         <h1>
-            <g:if test="${entryList[0]?.entryType?.id == 1}">
+            <g:if test="${entryList[0].entryType.id == 1}">
                 Faults
             </g:if>
-            <g:if test="${entryList[0]?.entryType?.id == 2}">
+            <g:if test="${entryList[0].entryType.id == 2}">
                 Causes
             </g:if>
-            <g:if test="${entryList[0]?.entryType?.id == 3}">
+            <g:if test="${entryList[0].entryType.id == 3}">
                 Work Done
             </g:if>
-            <g:if test="${entryList[0]?.entryType?.id == 6}">
+            <g:if test="${entryList[0].entryType.id == 6}">
                 PM Entries
             </g:if>
@@ -18,5 +18,5 @@
                 <thead>
                     <tr>
-                        <g:if test="${entryList[0]?.entryType?.id == 6}">
+                        <g:if test="${entryList[0].entryType.id == 6}">
                             <th>
                                 <img src="${resource(dir:'images/skin',file:'award_star_silver_3.png')}"
@@ -27,5 +27,7 @@
                         <th>Comment</th>
                         <th>Date Done</th>
-                        <th>Duration</th>
+                        <g:if test="${(entryList[0].entryType.id == 3) || (entryList[0].entryType.id == 6)}">
+                            <th>Duration</th>
+                        </g:if>
                         <th>Entered By</th>
                         <th></th>
@@ -50,7 +52,9 @@
                                 </td>
 
-                                <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
-                                    ${entry.durationHour}:${entry.durationMinute}
-                                </td>
+                                <g:if test="${(entryList[0].entryType.id == 3) || (entryList[0].entryType.id == 6)}">
+                                    <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
+                                        ${entry.durationHour}:${entry.durationMinute}
+                                    </td>
+                                </g:if>
 
                                 <td onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'>
Index: trunk/grails-app/views/taskDetailed/_showTaskTab.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/_showTaskTab.gsp	(revision 845)
+++ trunk/grails-app/views/taskDetailed/_showTaskTab.gsp	(revision 846)
@@ -210,129 +210,58 @@
     <br />
 
-    <g:if test="${entryFaultList.isEmpty()}">
-        <h1>No Faults</h1>
-        <br />
-    </g:if>
-    <g:else>
-        <div class="list">
-            <h1>Faults</h1>
-            <table>
-                <thead>
-                    <tr>
-                        <th>Comment</th>
-                        <th>Date</th>
-                        <th>Production</th>
-                        <th>Down Time</th>
-                        <th>Entered By</th>
-                        <th></th>
-                    </tr>
-                </thead>
-                <tbody>
-                    <g:each in="${entryFaultList}" status="i" var="entry">
-                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
-
-                                <td style="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}"'>
-                                    <g:if test="${entry.productionReference}">
-                                        ${entry.productionReference.encodeAsHTML()}
-                                    </g:if>
-                                    <g:else>
-                                        <g:message code="default.none.text" />
-                                    </g:else>
-                                </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="1" />
-            <span class="button">
-                <g:actionSubmit value="Add Fault" action="create"  class="add"/>
-            </span>
-        </g:form>
-    </div>
-
-    <br />
-
-    <g:if test="${entryCauseList.isEmpty()}">
-        <h1>No Causes</h1>
-        <br />
-    </g:if>
-    <g:else>
-        <div class="list">
-            <h1>Causes</h1>
-            <table>
-                <thead>
-                    <tr>
-                        <th>Comment</th>
-                        <th>Date Done</th>
-                        <th>Entered By</th>
-                        <th></th>
-                    </tr>
-                </thead>
-                <tbody>
-                    <g:each in="${entryCauseList}" status="i" var="entry">
-                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
-
-                                <td style="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.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="2" />
-            <span class="button">
-                <g:actionSubmit value="Add Cause" action="create"  class="add"/>
-            </span>
-        </g:form>
+    <div id="entryFaultContainer">
+        <g:if test="${entryFaultList.isEmpty()}">
+            <h1>No Faults</h1>
+            <br />
+        </g:if>
+        <g:else>
+            <g:render template="/entryDetailed/list"
+                                model="['entryList':entryFaultList]" />
+        </g:else>
+    </div>
+
+    <br />
+
+    <div id="createEntryFaultContainer" style="display:none;"></div>
+
+    <div style="text-align:right;" id="entryFaultButton">
+        <span class="buttons">
+            <input type="button"
+                        class="add"
+                        value="Add Fault"
+                        onclick="getCreateEntryForm(jQuery('#entryFaultContainer'),
+                                                                            jQuery('#createEntryFaultContainer'),
+                                                                            jQuery('#entryFaultButton'),
+                                                                            {taskId: ${taskInstance?.id}, entryTypeId: 1})" />
+        </span>
+    </div>
+
+    <br />
+
+    <div id="entryCauseContainer">
+        <g:if test="${entryCauseList.isEmpty()}">
+            <h1>No Causes</h1>
+            <br />
+        </g:if>
+        <g:else>
+            <g:render template="/entryDetailed/list"
+                                model="['entryList':entryCauseList]" />
+        </g:else>
+    </div>
+
+    <br />
+
+    <div id="createEntryCauseContainer" style="display:none;"></div>
+
+    <div style="text-align:right;" id="entryCauseButton">
+        <span class="buttons">
+            <input type="button"
+                        class="add"
+                        value="Add Cause"
+                        onclick="getCreateEntryForm(jQuery('#entryCauseContainer'),
+                                                                            jQuery('#createEntryCauseContainer'),
+                                                                            jQuery('#entryCauseButton'),
+                                                                            {taskId: ${taskInstance?.id}, entryTypeId: 2})" />
+        </span>
     </div>
 
