
    <g:if test="${!taskProcedureExits}">
        <br />
        No Procedure linked.
        <br />
        <br />
        <g:form controller="taskProcedureDetailed" >
            <g:hiddenField name="taskInstance.id" value="${taskInstance?.id}" />

            <div class="buttons">
                <span class="button">
                    <g:actionSubmit value="New" action="create" class="add"/>
                </span>
                <span class="button">
                    <g:actionSubmit value="Search" action="search" class="search"/>
                </span>
            </div>

        </g:form>

    </g:if>
    <g:else>
        <g:render template="/taskProcedureDetailed/taskProcedureRevision"
                            model="['taskProcedureRevision':taskProcedureRevision]" />
        <br />

        <div id="pmEntryContainer">
            <g:if test="${entryPMList.isEmpty()}">
                <h1>No PM Entries</h1>
                <br />
            </g:if>
            <g:else>
                <g:render template="/entryDetailed/list"
                                    model="['entryList':entryPMList]" />
            </g:else>
        </div>

        <br />

        <div id="createPMEntryContainer" style="display:none;"></div>

        <div style="text-align:right;" id="pmEntryButton">
            <span class="buttons">
                <input type="button"
                            class="add"
                            value="Add PM Entry"
                            onclick="getCreateEntryForm(jQuery('#pmEntryContainer'),
                                                                                jQuery('#pmEntryButton'),
                                                                                {target: '#createPMEntryContainer',
                                                                                taskId: ${taskInstance?.id},
                                                                                entryTypeId: 6})" />
            </span>
        </div>

    </g:else>
