
<div class="dialog">
    <table>
        <tbody>

            <g:if test="${taskProcedureInstance.id}">
                <tr class="prop">
                    <td valign="top" class="name">Procedure Id:</td>
                    <td valign="top" class="value">
                        ${fieldValue(bean:taskProcedureInstance, field:'id')}
                    </td>
                </tr>
            </g:if>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="taskInstance">Linked Task:</label>
                </td>
                <td valign="top" name="taskInstance" class="value">
                    <g:link controller="taskDetailed" action="show" id="${taskProcedureInstance.linkedTask.id}">
                        ${taskProcedureInstance.linkedTask.encodeAsHTML()}
                    </g:link>
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">Linked Asset:</td>
                <td valign="top" class="value">
                    ${fieldValue(bean:taskProcedureInstance, field:'linkedTask.primaryAsset')}
                </td>
            </tr>

            <g:if test="${taskProcedureInstance.version}">
                <tr class="prop">
                    <td valign="top" class="name">Version:</td>
                    <td valign="top" class="value">
                            ${fieldValue(bean:taskProcedureInstance, field:'version')}
                    </td>
                </tr>

                <tr class="prop">
                    <td valign="top" class="name">Created By:</td>
                    <td valign="top" class="value">
                            ${fieldValue(bean:taskProcedureInstance, field:'createdBy')}
                            on
                            <g:formatDate date="${taskProcedureInstance.dateCreated}" format="EEE, dd-MMM-yyyy @ HH:mm"/>
                    </td>
                </tr>

                <tr class="prop">
                    <td valign="top" class="name">Last Updated By:</td>
                    <td valign="top" class="value">
                            ${fieldValue(bean:taskProcedureInstance, field:'lastUpdatedBy')}
                            on
                            <g:formatDate date="${taskProcedureInstance.lastUpdated}" format="EEE, dd-MMM-yyyy @ HH:mm"/>
                    </td>
                </tr>
            </g:if>

        </tbody>
    </table>

    <br />
    <g:render template="maintenanceActions" model="['taskProcedureInstance': taskProcedureInstance,
                                                                                        'assemblies': assemblies]" />
    <br />
</div>