Changeset 249 for trunk/grails-app/views


Ignore:
Timestamp:
Dec 27, 2009, 9:56:42 PM (15 years ago)
Author:
gav
Message:

Refactor AssignedPerson to use a serviced controller.

Location:
trunk/grails-app/views
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/assignedPersonDetailed/create.gsp

    r242 r249  
    2121            </g:hasErrors>
    2222            <g:form action="save" method="post" >
    23                 <input type="hidden" name="task.id" value="${assignedPersonInstance?.task?.id}" />
     23                <g:hiddenField name="task.id" value="${assignedPersonInstance?.task?.id}" />
    2424                <div class="dialog">
    2525                    <table>
  • trunk/grails-app/views/assignedPersonDetailed/edit.gsp

    r242 r249  
    2121            </g:hasErrors>
    2222            <g:form method="post" >
    23                 <input type="hidden" name="id" value="${assignedPersonInstance?.id}" />
    24                 <input type="hidden" name="version" value="${assignedPersonInstance?.version}" />
     23                <g:hiddenField name="id" value="${assignedPersonInstance?.id}" />
     24                <g:hiddenField name="task.id" value="${assignedPersonInstance?.task?.id}" />
     25                <g:hiddenField name="version" value="${assignedPersonInstance?.version}" />
    2526                <div class="dialog">
    2627                    <table>
  • trunk/grails-app/views/assignedPersonDetailed/show.gsp

    r147 r249  
    5151            <div class="buttons">
    5252                <g:form>
    53                     <input type="hidden" name="id" value="${assignedPersonInstance?.id}" />
     53                    <g:hiddenField name="id" value="${assignedPersonInstance?.id}" />
     54                    <g:hiddenField name="task.id" value="${assignedPersonInstance?.task?.id}" />
    5455                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
    5556                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
  • trunk/grails-app/views/taskDetailed/show.gsp

    r247 r249  
    204204                                            <ul>
    205205                                            <g:each var="a" in="${taskInstance.assignedPersons}">
    206                                                 <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
     206                                                <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}" params="['task.id':taskInstance.id]">${a?.encodeAsHTML()}</g:link></li>
    207207                                            </g:each>
    208208                                            </ul>
    209                                             <g:link controller="assignedPersonDetailed" params="['task.id':taskInstance?.id]" action="create">Add Assigned Person</g:link>
     209                                            <g:link controller="assignedPersonDetailed" action="create" params="['task.id':taskInstance?.id]">Add Assigned Person</g:link>
    210210                                        </td>
    211211
Note: See TracChangeset for help on using the changeset viewer.