- Timestamp:
- Jan 26, 2011, 5:35:35 AM (14 years ago)
- Location:
- branches/features/taskProcedureRework/grails-app
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/taskProcedureRework/grails-app/controllers/TaskProcedureDetailedController.groovy
r758 r760 98 98 } 99 99 taskProcedureInstance.properties = params 100 101 def toBeDeleted = taskProcedureInstance.maintenanceActions.findAll {it._deleted} 102 if(toBeDeleted) { 103 taskProcedureInstance.maintenanceActions.removeAll(toBeDeleted) 104 } 105 100 106 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save(flush: true)) { 101 107 flash.message = "TaskProcedure ${params.id} updated" -
branches/features/taskProcedureRework/grails-app/domain/MaintenanceAction.groovy
r756 r760 10 10 String reasoning = "" 11 11 Integer procedureStepNumber 12 13 boolean deleted 14 static transients = [ 'deleted' ] 12 15 13 16 // static hasMany = [] -
branches/features/taskProcedureRework/grails-app/domain/TaskProcedure.groovy
r758 r760 1 import org.apache.commons.collections.list.LazyList; 2 import org.apache.commons.collections.FactoryUtils; 3 1 4 class TaskProcedure { 2 5 3 6 Task parentTask 4 7 List maintenanceActions = new ArrayList() 5 8 static hasMany = [tasks: Task, maintenanceActions: MaintenanceAction] 6 9 7 10 static mappedBy = [tasks:"taskProcedure"] 11 12 static mapping = { 13 maintenanceActions cascade:"all,delete-orphan" 14 } 8 15 9 16 // static belongsTo = [] … … 15 22 "${this.id}" 16 23 } 24 25 def getExpandableMaintenanceActionList() { 26 return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class)) 27 } 17 28 } -
branches/features/taskProcedureRework/grails-app/services/CreateDataService.groovy
r758 r760 140 140 createDemoAssignedPersons() 141 141 createDemoTaskProcedure() 142 createDemoMaintenanceActions()142 //createDemoMaintenanceActions() 143 143 createDemoTaskRecurringSchedules() 144 144 -
branches/features/taskProcedureRework/grails-app/views/taskDetailed/show.gsp
r755 r760 518 518 </tr> 519 519 520 <tr class="prop"> 521 <td valign="top" class="name">Parent Task:</td> 522 <td valign="top" class="value"> 523 <g:link controller="taskDetailed" action="show" id="${taskProcedureInstance.parentTask.id}"> 524 ${taskProcedureInstance.parentTask.encodeAsHTML()} 525 </g:link> 526 </td> 527 </tr> 528 520 529 </tbody> 521 530 </table> -
branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/create.gsp
r758 r760 6 6 <meta name="layout" content="main" /> 7 7 <title>Create TaskProcedure</title> 8 <g:javascript library="jquery" plugin="jquery"/> 8 9 <nav:resources override="true"/> 9 10 </head> … … 21 22 </div> 22 23 </g:hasErrors> 24 23 25 <g:form action="save" method="post" > 24 26 <input type="hidden" name="parentTask.id" value="${taskInstance.id}" /> … … 39 41 </tr> 40 42 43 <tr class="prop"> 44 <td valign="top" class="name"> 45 <label for="maintenanceActions">Maintenance Actions:</label> 46 </td> 47 <td valign="top" class="value ${hasErrors(bean:taskProcedureInstance,field:'maintenanceActions','errors')}"> 48 <g:render template="maintenanceActions" model="['taskProcedureInstance': taskProcedureInstance]" /> 49 </td> 50 </tr> 51 41 52 </tbody> 42 53 </table> -
branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/show.gsp
r758 r760 26 26 27 27 <tr class="prop"> 28 <td valign="top" class="name"> 29 <label for="taskInstance">Parent Task:</label> 30 </td> 31 <td valign="top" name="taskInstance" class="value"> 28 <td valign="top" class="name">Parent Task:</td> 29 <td valign="top" class="value"> 32 30 <g:link controller="taskDetailed" action="show" id="${taskProcedureInstance.parentTask.id}"> 33 31 ${taskProcedureInstance.parentTask.encodeAsHTML()}
Note: See TracChangeset
for help on using the changeset viewer.