
<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">
                    <g:include controller="assetDetailed" action="assetTreeCompact" id="${taskProcedureInstance.linkedTask.primaryAsset.id}" />
                </td>
            </tr>

            <g:if test="${taskProcedureInstance.id}">
                <tr class="prop">
                    <td valign="top" class="name">Revisions:</td>
                    <td valign="top" class="value">
                        <ul>
                        <g:each var="r" in="${taskProcedureInstance.revisions}">
                            <li>
                                <g:link action="show" id="${taskProcedureInstance.id}" params="['revision':r.revision]">
                                    ${r.fullRevisionString.encodeAsHTML()}
                                </g:link>
                            </li>
                        </g:each>
                        </ul>
                    </td>
                </tr>
            </g:if>

        </tbody>
    </table>

    <br />
    <g:render template="documentReferences" model="['taskProcedureInstance': taskProcedureInstance]" />

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