Changeset 93
- Timestamp:
- Mar 29, 2009, 11:56:11 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 14 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grails-app/conf/BootStrap.groovy
r91 r93 304 304 305 305 //ModificationType 306 def modificationTypeInstance307 modificationTypeInstance = newModificationType(name:"Created").save()308 modificationTypeInstance = newModificationType(name:"Completed").save()309 modificationTypeInstance = newModificationType(name:"Closed").save()310 modificationTypeInstance = newModificationType(name:"Altered").save()311 modificationTypeInstance = newModificationType(name:"TargetDateModified").save()312 modificationTypeInstance = newModificationType(name:"ScheduledDateModified").save()313 modificationTypeInstance = newModificationType(name:"DescriptionModified").save()314 modificationTypeInstance = newModificationType(name:"AssignedToModified").save()315 modificationTypeInstance = newModificationType(name:"NameModified").save()306 def taskModificationTypeInstance 307 taskModificationTypeInstance = new TaskModificationType(name:"Created").save() 308 taskModificationTypeInstance = new TaskModificationType(name:"Completed").save() 309 taskModificationTypeInstance = new TaskModificationType(name:"Closed").save() 310 taskModificationTypeInstance = new TaskModificationType(name:"Altered").save() 311 taskModificationTypeInstance = new TaskModificationType(name:"TargetDateModified").save() 312 taskModificationTypeInstance = new TaskModificationType(name:"ScheduledDateModified").save() 313 taskModificationTypeInstance = new TaskModificationType(name:"DescriptionModified").save() 314 taskModificationTypeInstance = new TaskModificationType(name:"AssignedToModified").save() 315 taskModificationTypeInstance = new TaskModificationType(name:"NameModified").save() 316 316 317 317 if(BootStrapDemoDataSuccessful) { -
trunk/src/grails-app/controllers/TaskModificationController.groovy
r92 r93 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class ModificationController extends BaseController {3 class TaskModificationController extends BaseController { 4 4 5 5 def index = { redirect(action:list,params:params) } … … 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ modificationInstanceList: Modification.list( params) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ taskModificationInstanceList: TaskModification.list( params ), taskModificationInstanceTotal: TaskModification.count() ] 13 13 } 14 14 15 15 def show = { 16 def modificationInstance =Modification.get( params.id )16 def taskModificationInstance = TaskModification.get( params.id ) 17 17 18 if(! modificationInstance) {19 flash.message = " Modification not found with id ${params.id}"18 if(!taskModificationInstance) { 19 flash.message = "TaskModification not found with id ${params.id}" 20 20 redirect(action:list) 21 21 } 22 else { return [ modificationInstance : modificationInstance ] }22 else { return [ taskModificationInstance : taskModificationInstance ] } 23 23 } 24 24 25 25 def delete = { 26 def modificationInstance = Modification.get( params.id ) 27 if(modificationInstance) { 28 modificationInstance.delete() 29 flash.message = "Modification ${params.id} deleted" 30 redirect(action:list) 26 def taskModificationInstance = TaskModification.get( params.id ) 27 if(taskModificationInstance) { 28 try { 29 taskModificationInstance.delete() 30 flash.message = "TaskModification ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "TaskModification ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { 33 flash.message = " Modification not found with id ${params.id}"39 flash.message = "TaskModification not found with id ${params.id}" 34 40 redirect(action:list) 35 41 } … … 37 43 38 44 def edit = { 39 def modificationInstance =Modification.get( params.id )45 def taskModificationInstance = TaskModification.get( params.id ) 40 46 41 if(! modificationInstance) {42 flash.message = " Modification not found with id ${params.id}"47 if(!taskModificationInstance) { 48 flash.message = "TaskModification not found with id ${params.id}" 43 49 redirect(action:list) 44 50 } 45 51 else { 46 return [ modificationInstance : modificationInstance ]52 return [ taskModificationInstance : taskModificationInstance ] 47 53 } 48 54 } 49 55 50 56 def update = { 51 def modificationInstance = Modification.get( params.id ) 52 if(modificationInstance) { 53 modificationInstance.properties = params 54 if(!modificationInstance.hasErrors() && modificationInstance.save()) { 55 flash.message = "Modification ${params.id} updated" 56 redirect(action:show,id:modificationInstance.id) 57 def taskModificationInstance = TaskModification.get( params.id ) 58 if(taskModificationInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(taskModificationInstance.version > version) { 62 63 taskModificationInstance.errors.rejectValue("version", "taskModification.optimistic.locking.failure", "Another user has updated this TaskModification while you were editing.") 64 render(view:'edit',model:[taskModificationInstance:taskModificationInstance]) 65 return 66 } 67 } 68 taskModificationInstance.properties = params 69 if(!taskModificationInstance.hasErrors() && taskModificationInstance.save()) { 70 flash.message = "TaskModification ${params.id} updated" 71 redirect(action:show,id:taskModificationInstance.id) 57 72 } 58 73 else { 59 render(view:'edit',model:[ modificationInstance:modificationInstance])74 render(view:'edit',model:[taskModificationInstance:taskModificationInstance]) 60 75 } 61 76 } 62 77 else { 63 flash.message = " Modification not found with id ${params.id}"78 flash.message = "TaskModification not found with id ${params.id}" 64 79 redirect(action:edit,id:params.id) 65 80 } … … 67 82 68 83 def create = { 69 def modificationInstance = newModification()70 modificationInstance.properties = params71 return [' modificationInstance':modificationInstance]84 def taskModificationInstance = new TaskModification() 85 taskModificationInstance.properties = params 86 return ['taskModificationInstance':taskModificationInstance] 72 87 } 73 88 74 89 def save = { 75 def modificationInstance = newModification(params)76 if(! modificationInstance.hasErrors() && modificationInstance.save()) {77 flash.message = " Modification ${modificationInstance.id} created"78 redirect(action:show,id: modificationInstance.id)90 def taskModificationInstance = new TaskModification(params) 91 if(!taskModificationInstance.hasErrors() && taskModificationInstance.save()) { 92 flash.message = "TaskModification ${taskModificationInstance.id} created" 93 redirect(action:show,id:taskModificationInstance.id) 79 94 } 80 95 else { 81 render(view:'create',model:[ modificationInstance:modificationInstance])96 render(view:'create',model:[taskModificationInstance:taskModificationInstance]) 82 97 } 83 98 } -
trunk/src/grails-app/controllers/TaskModificationTypeController.groovy
r92 r93 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class ModificationTypeController extends BaseController {3 class TaskModificationTypeController extends BaseController { 4 4 5 5 def index = { redirect(action:list,params:params) } … … 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ modificationTypeInstanceList: ModificationType.list( params) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ taskModificationTypeInstanceList: TaskModificationType.list( params ), taskModificationTypeInstanceTotal: TaskModificationType.count() ] 13 13 } 14 14 15 15 def show = { 16 def modificationTypeInstance =ModificationType.get( params.id )16 def taskModificationTypeInstance = TaskModificationType.get( params.id ) 17 17 18 if(! modificationTypeInstance) {19 flash.message = " ModificationType not found with id ${params.id}"18 if(!taskModificationTypeInstance) { 19 flash.message = "TaskModificationType not found with id ${params.id}" 20 20 redirect(action:list) 21 21 } 22 else { return [ modificationTypeInstance : modificationTypeInstance ] }22 else { return [ taskModificationTypeInstance : taskModificationTypeInstance ] } 23 23 } 24 24 25 25 def delete = { 26 def modificationTypeInstance = ModificationType.get( params.id ) 27 if(modificationTypeInstance) { 28 modificationTypeInstance.delete() 29 flash.message = "ModificationType ${params.id} deleted" 30 redirect(action:list) 26 def taskModificationTypeInstance = TaskModificationType.get( params.id ) 27 if(taskModificationTypeInstance) { 28 try { 29 taskModificationTypeInstance.delete() 30 flash.message = "TaskModificationType ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "TaskModificationType ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { 33 flash.message = " ModificationType not found with id ${params.id}"39 flash.message = "TaskModificationType not found with id ${params.id}" 34 40 redirect(action:list) 35 41 } … … 37 43 38 44 def edit = { 39 def modificationTypeInstance =ModificationType.get( params.id )45 def taskModificationTypeInstance = TaskModificationType.get( params.id ) 40 46 41 if(! modificationTypeInstance) {42 flash.message = " ModificationType not found with id ${params.id}"47 if(!taskModificationTypeInstance) { 48 flash.message = "TaskModificationType not found with id ${params.id}" 43 49 redirect(action:list) 44 50 } 45 51 else { 46 return [ modificationTypeInstance : modificationTypeInstance ]52 return [ taskModificationTypeInstance : taskModificationTypeInstance ] 47 53 } 48 54 } 49 55 50 56 def update = { 51 def modificationTypeInstance = ModificationType.get( params.id ) 52 if(modificationTypeInstance) { 53 modificationTypeInstance.properties = params 54 if(!modificationTypeInstance.hasErrors() && modificationTypeInstance.save()) { 55 flash.message = "ModificationType ${params.id} updated" 56 redirect(action:show,id:modificationTypeInstance.id) 57 def taskModificationTypeInstance = TaskModificationType.get( params.id ) 58 if(taskModificationTypeInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(taskModificationTypeInstance.version > version) { 62 63 taskModificationTypeInstance.errors.rejectValue("version", "taskModificationType.optimistic.locking.failure", "Another user has updated this TaskModificationType while you were editing.") 64 render(view:'edit',model:[taskModificationTypeInstance:taskModificationTypeInstance]) 65 return 66 } 67 } 68 taskModificationTypeInstance.properties = params 69 if(!taskModificationTypeInstance.hasErrors() && taskModificationTypeInstance.save()) { 70 flash.message = "TaskModificationType ${params.id} updated" 71 redirect(action:show,id:taskModificationTypeInstance.id) 57 72 } 58 73 else { 59 render(view:'edit',model:[ modificationTypeInstance:modificationTypeInstance])74 render(view:'edit',model:[taskModificationTypeInstance:taskModificationTypeInstance]) 60 75 } 61 76 } 62 77 else { 63 flash.message = " ModificationType not found with id ${params.id}"78 flash.message = "TaskModificationType not found with id ${params.id}" 64 79 redirect(action:edit,id:params.id) 65 80 } … … 67 82 68 83 def create = { 69 def modificationTypeInstance = newModificationType()70 modificationTypeInstance.properties = params71 return [' modificationTypeInstance':modificationTypeInstance]84 def taskModificationTypeInstance = new TaskModificationType() 85 taskModificationTypeInstance.properties = params 86 return ['taskModificationTypeInstance':taskModificationTypeInstance] 72 87 } 73 88 74 89 def save = { 75 def modificationTypeInstance = newModificationType(params)76 if(! modificationTypeInstance.hasErrors() && modificationTypeInstance.save()) {77 flash.message = " ModificationType ${modificationTypeInstance.id} created"78 redirect(action:show,id: modificationTypeInstance.id)90 def taskModificationTypeInstance = new TaskModificationType(params) 91 if(!taskModificationTypeInstance.hasErrors() && taskModificationTypeInstance.save()) { 92 flash.message = "TaskModificationType ${taskModificationTypeInstance.id} created" 93 redirect(action:show,id:taskModificationTypeInstance.id) 79 94 } 80 95 else { 81 render(view:'create',model:[ modificationTypeInstance:modificationTypeInstance])96 render(view:'create',model:[taskModificationTypeInstance:taskModificationTypeInstance]) 82 97 } 83 98 } -
trunk/src/grails-app/domain/Person.groovy
r73 r93 3 3 static hasMany = [authorities: Authority, 4 4 personGroups: PersonGroup, 5 modifications:Modification,5 taskModifications: TaskModification, 6 6 entries: Entry, 7 7 tasks: Task] -
trunk/src/grails-app/domain/Task.groovy
r91 r93 15 15 16 16 static hasMany = [entries: Entry, 17 modifications:Modification,17 taskModifications: TaskModification, 18 18 assignedPersons: Person, 19 19 subTasks: Task] -
trunk/src/grails-app/domain/TaskModification.groovy
r92 r93 1 class Modification {1 class TaskModification { 2 2 Person person 3 ModificationType modificationType3 TaskModificationType taskModificationType 4 4 Task task 5 5 Date date = new Date() 6 6 String comment 7 7 8 static belongsTo = [Person, ModificationType, Task]8 static belongsTo = [Person, TaskModificationType, Task] 9 9 10 10 static constraints = { 11 11 person() 12 modificationType()12 taskModificationType() 13 13 task() 14 14 date() -
trunk/src/grails-app/domain/TaskModificationType.groovy
r92 r93 1 class ModificationType {1 class TaskModificationType { 2 2 String name 3 3 String description = "" 4 4 boolean isActive = true 5 5 6 static hasMany = [ modifications :Modification]6 static hasMany = [taskModifications : TaskModification] 7 7 8 8 static constraints = { -
trunk/src/grails-app/views/task/edit.gsp
r70 r93 153 153 <tr class="prop"> 154 154 <td valign="top" class="name"> 155 <label for=" modifications">Modifications:</label>156 </td> 157 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:' modifications','errors')}">158 159 <ul> 160 <g:each var="m" in="${taskInstance?. modifications?}">161 <li><g:link controller=" modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>162 </g:each> 163 </ul> 164 <g:link controller=" modification" params="['task.id':taskInstance?.id]" action="create">Add Modification</g:link>155 <label for="taskModifications">Modifications:</label> 156 </td> 157 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskModifications','errors')}"> 158 159 <ul> 160 <g:each var="m" in="${taskInstance?.taskModifications?}"> 161 <li><g:link controller="taskModification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 162 </g:each> 163 </ul> 164 <g:link controller="taskModification" params="['task.id':taskInstance?.id]" action="create">Add Modification</g:link> 165 165 166 166 </td> -
trunk/src/grails-app/views/task/show.gsp
r70 r93 125 125 <td valign="top" style="text-align:left;" class="value"> 126 126 <ul> 127 <g:each var="m" in="${taskInstance. modifications}">128 <li><g:link controller=" modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>127 <g:each var="m" in="${taskInstance.taskModifications}"> 128 <li><g:link controller="taskModification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 129 129 </g:each> 130 130 </ul> -
trunk/src/grails-app/views/taskModification/create.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Create Modification</title>7 <title>Create TaskModification</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="list" action="list"> Modification List</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">TaskModification List</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1>Create Modification</h1>15 <h1>Create TaskModification</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> 18 18 </g:if> 19 <g:hasErrors bean="${ modificationInstance}">19 <g:hasErrors bean="${taskModificationInstance}"> 20 20 <div class="errors"> 21 <g:renderErrors bean="${ modificationInstance}" as="list" />21 <g:renderErrors bean="${taskModificationInstance}" as="list" /> 22 22 </div> 23 23 </g:hasErrors> … … 31 31 <label for="person">Person:</label> 32 32 </td> 33 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'person','errors')}">34 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${ modificationInstance?.person?.id}" ></g:select>33 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'person','errors')}"> 34 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${taskModificationInstance?.person?.id}" ></g:select> 35 35 </td> 36 36 </tr> … … 38 38 <tr class="prop"> 39 39 <td valign="top" class="name"> 40 <label for=" modificationType">Modification Type:</label>40 <label for="taskModificationType">Task Modification Type:</label> 41 41 </td> 42 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'modificationType','errors')}">43 <g:select optionKey="id" from="${ ModificationType.list()}" name="modificationType.id" value="${modificationInstance?.modificationType?.id}" ></g:select>42 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'taskModificationType','errors')}"> 43 <g:select optionKey="id" from="${TaskModificationType.list()}" name="taskModificationType.id" value="${taskModificationInstance?.taskModificationType?.id}" ></g:select> 44 44 </td> 45 45 </tr> … … 49 49 <label for="task">Task:</label> 50 50 </td> 51 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'task','errors')}">52 <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${ modificationInstance?.task?.id}" ></g:select>51 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'task','errors')}"> 52 <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${taskModificationInstance?.task?.id}" ></g:select> 53 53 </td> 54 54 </tr> … … 58 58 <label for="date">Date:</label> 59 59 </td> 60 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'date','errors')}">61 <g:datePicker name="date" value="${ modificationInstance?.date}" ></g:datePicker>60 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'date','errors')}"> 61 <g:datePicker name="date" value="${taskModificationInstance?.date}" ></g:datePicker> 62 62 </td> 63 63 </tr> … … 67 67 <label for="comment">Comment:</label> 68 68 </td> 69 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'comment','errors')}">70 <input type="text" id="comment" name="comment" value="${fieldValue(bean: modificationInstance,field:'comment')}"/>69 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'comment','errors')}"> 70 <input type="text" id="comment" name="comment" value="${fieldValue(bean:taskModificationInstance,field:'comment')}"/> 71 71 </td> 72 72 </tr> -
trunk/src/grails-app/views/taskModification/edit.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Edit Modification</title>7 <title>Edit TaskModification</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="list" action="list"> Modification List</g:link></span>13 <span class="menuButton"><g:link class="create" action="create">New Modification</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">TaskModification List</g:link></span> 13 <span class="menuButton"><g:link class="create" action="create">New TaskModification</g:link></span> 14 14 </div> 15 15 <div class="body"> 16 <h1>Edit Modification</h1>16 <h1>Edit TaskModification</h1> 17 17 <g:if test="${flash.message}"> 18 18 <div class="message">${flash.message}</div> 19 19 </g:if> 20 <g:hasErrors bean="${ modificationInstance}">20 <g:hasErrors bean="${taskModificationInstance}"> 21 21 <div class="errors"> 22 <g:renderErrors bean="${ modificationInstance}" as="list" />22 <g:renderErrors bean="${taskModificationInstance}" as="list" /> 23 23 </div> 24 24 </g:hasErrors> 25 25 <g:form method="post" > 26 <input type="hidden" name="id" value="${modificationInstance?.id}" /> 26 <input type="hidden" name="id" value="${taskModificationInstance?.id}" /> 27 <input type="hidden" name="version" value="${taskModificationInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> … … 33 34 <label for="person">Person:</label> 34 35 </td> 35 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'person','errors')}">36 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${ modificationInstance?.person?.id}" ></g:select>36 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'person','errors')}"> 37 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${taskModificationInstance?.person?.id}" ></g:select> 37 38 </td> 38 39 </tr> … … 40 41 <tr class="prop"> 41 42 <td valign="top" class="name"> 42 <label for=" modificationType">Modification Type:</label>43 <label for="taskModificationType">Task Modification Type:</label> 43 44 </td> 44 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'modificationType','errors')}">45 <g:select optionKey="id" from="${ ModificationType.list()}" name="modificationType.id" value="${modificationInstance?.modificationType?.id}" ></g:select>45 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'taskModificationType','errors')}"> 46 <g:select optionKey="id" from="${TaskModificationType.list()}" name="taskModificationType.id" value="${taskModificationInstance?.taskModificationType?.id}" ></g:select> 46 47 </td> 47 48 </tr> … … 51 52 <label for="task">Task:</label> 52 53 </td> 53 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'task','errors')}">54 <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${ modificationInstance?.task?.id}" ></g:select>54 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'task','errors')}"> 55 <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${taskModificationInstance?.task?.id}" ></g:select> 55 56 </td> 56 57 </tr> … … 60 61 <label for="date">Date:</label> 61 62 </td> 62 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'date','errors')}">63 <g:datePicker name="date" value="${ modificationInstance?.date}" ></g:datePicker>63 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'date','errors')}"> 64 <g:datePicker name="date" value="${taskModificationInstance?.date}" ></g:datePicker> 64 65 </td> 65 66 </tr> … … 69 70 <label for="comment">Comment:</label> 70 71 </td> 71 <td valign="top" class="value ${hasErrors(bean: modificationInstance,field:'comment','errors')}">72 <input type="text" id="comment" name="comment" value="${fieldValue(bean: modificationInstance,field:'comment')}"/>72 <td valign="top" class="value ${hasErrors(bean:taskModificationInstance,field:'comment','errors')}"> 73 <input type="text" id="comment" name="comment" value="${fieldValue(bean:taskModificationInstance,field:'comment')}"/> 73 74 </td> 74 75 </tr> -
trunk/src/grails-app/views/taskModification/list.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title> Modification List</title>7 <title>TaskModification List</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="create" action="create">New Modification</g:link></span>12 <span class="menuButton"><g:link class="create" action="create">New TaskModification</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1> Modification List</h1>15 <h1>TaskModification List</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> … … 26 26 <th>Person</th> 27 27 28 <th> Modification Type</th>28 <th>Task Modification Type</th> 29 29 30 30 <th>Task</th> … … 37 37 </thead> 38 38 <tbody> 39 <g:each in="${ modificationInstanceList}" status="i" var="modificationInstance">39 <g:each in="${taskModificationInstanceList}" status="i" var="taskModificationInstance"> 40 40 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 41 41 42 <td><g:link action="show" id="${ modificationInstance.id}">${fieldValue(bean:modificationInstance, field:'id')}</g:link></td>42 <td><g:link action="show" id="${taskModificationInstance.id}">${fieldValue(bean:taskModificationInstance, field:'id')}</g:link></td> 43 43 44 <td>${fieldValue(bean: modificationInstance, field:'person')}</td>44 <td>${fieldValue(bean:taskModificationInstance, field:'person')}</td> 45 45 46 <td>${fieldValue(bean: modificationInstance, field:'modificationType')}</td>46 <td>${fieldValue(bean:taskModificationInstance, field:'taskModificationType')}</td> 47 47 48 <td>${fieldValue(bean: modificationInstance, field:'task')}</td>48 <td>${fieldValue(bean:taskModificationInstance, field:'task')}</td> 49 49 50 <td>${fieldValue(bean: modificationInstance, field:'date')}</td>50 <td>${fieldValue(bean:taskModificationInstance, field:'date')}</td> 51 51 52 <td>${fieldValue(bean: modificationInstance, field:'comment')}</td>52 <td>${fieldValue(bean:taskModificationInstance, field:'comment')}</td> 53 53 54 54 </tr> … … 58 58 </div> 59 59 <div class="paginateButtons"> 60 <g:paginate total="${ Modification.count()}" />60 <g:paginate total="${taskModificationInstanceTotal}" /> 61 61 </div> 62 62 </div> -
trunk/src/grails-app/views/taskModification/show.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Show Modification</title>7 <title>Show TaskModification</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="list" action="list"> Modification List</g:link></span>13 <span class="menuButton"><g:link class="create" action="create">New Modification</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">TaskModification List</g:link></span> 13 <span class="menuButton"><g:link class="create" action="create">New TaskModification</g:link></span> 14 14 </div> 15 15 <div class="body"> 16 <h1>Show Modification</h1>16 <h1>Show TaskModification</h1> 17 17 <g:if test="${flash.message}"> 18 18 <div class="message">${flash.message}</div> … … 26 26 <td valign="top" class="name">Id:</td> 27 27 28 <td valign="top" class="value">${fieldValue(bean: modificationInstance, field:'id')}</td>28 <td valign="top" class="value">${fieldValue(bean:taskModificationInstance, field:'id')}</td> 29 29 30 30 </tr> … … 33 33 <td valign="top" class="name">Person:</td> 34 34 35 <td valign="top" class="value"><g:link controller="person" action="show" id="${ modificationInstance?.person?.id}">${modificationInstance?.person?.encodeAsHTML()}</g:link></td>35 <td valign="top" class="value"><g:link controller="person" action="show" id="${taskModificationInstance?.person?.id}">${taskModificationInstance?.person?.encodeAsHTML()}</g:link></td> 36 36 37 37 </tr> 38 38 39 39 <tr class="prop"> 40 <td valign="top" class="name"> Modification Type:</td>40 <td valign="top" class="name">Task Modification Type:</td> 41 41 42 <td valign="top" class="value"><g:link controller=" modificationType" action="show" id="${modificationInstance?.modificationType?.id}">${modificationInstance?.modificationType?.encodeAsHTML()}</g:link></td>42 <td valign="top" class="value"><g:link controller="taskModificationType" action="show" id="${taskModificationInstance?.taskModificationType?.id}">${taskModificationInstance?.taskModificationType?.encodeAsHTML()}</g:link></td> 43 43 44 44 </tr> … … 47 47 <td valign="top" class="name">Task:</td> 48 48 49 <td valign="top" class="value"><g:link controller="task" action="show" id="${ modificationInstance?.task?.id}">${modificationInstance?.task?.encodeAsHTML()}</g:link></td>49 <td valign="top" class="value"><g:link controller="task" action="show" id="${taskModificationInstance?.task?.id}">${taskModificationInstance?.task?.encodeAsHTML()}</g:link></td> 50 50 51 51 </tr> … … 54 54 <td valign="top" class="name">Date:</td> 55 55 56 <td valign="top" class="value">${fieldValue(bean: modificationInstance, field:'date')}</td>56 <td valign="top" class="value">${fieldValue(bean:taskModificationInstance, field:'date')}</td> 57 57 58 58 </tr> … … 61 61 <td valign="top" class="name">Comment:</td> 62 62 63 <td valign="top" class="value">${fieldValue(bean: modificationInstance, field:'comment')}</td>63 <td valign="top" class="value">${fieldValue(bean:taskModificationInstance, field:'comment')}</td> 64 64 65 65 </tr> … … 70 70 <div class="buttons"> 71 71 <g:form> 72 <input type="hidden" name="id" value="${ modificationInstance?.id}" />72 <input type="hidden" name="id" value="${taskModificationInstance?.id}" /> 73 73 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 74 74 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> -
trunk/src/grails-app/views/taskModificationType/create.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Create ModificationType</title>7 <title>Create TaskModificationType</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="list" action="list"> ModificationType List</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">TaskModificationType List</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1>Create ModificationType</h1>15 <h1>Create TaskModificationType</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> 18 18 </g:if> 19 <g:hasErrors bean="${ modificationTypeInstance}">19 <g:hasErrors bean="${taskModificationTypeInstance}"> 20 20 <div class="errors"> 21 <g:renderErrors bean="${ modificationTypeInstance}" as="list" />21 <g:renderErrors bean="${taskModificationTypeInstance}" as="list" /> 22 22 </div> 23 23 </g:hasErrors> … … 31 31 <label for="description">Description:</label> 32 32 </td> 33 <td valign="top" class="value ${hasErrors(bean: modificationTypeInstance,field:'description','errors')}">34 <input type="text" id="description" name="description" value="${fieldValue(bean: modificationTypeInstance,field:'description')}"/>33 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'description','errors')}"> 34 <input type="text" id="description" name="description" value="${fieldValue(bean:taskModificationTypeInstance,field:'description')}"/> 35 35 </td> 36 36 </tr> … … 40 40 <label for="isActive">Is Active:</label> 41 41 </td> 42 <td valign="top" class="value ${hasErrors(bean: modificationTypeInstance,field:'isActive','errors')}">43 <g:checkBox name="isActive" value="${ modificationTypeInstance?.isActive}" ></g:checkBox>42 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'isActive','errors')}"> 43 <g:checkBox name="isActive" value="${taskModificationTypeInstance?.isActive}" ></g:checkBox> 44 44 </td> 45 45 </tr> … … 49 49 <label for="name">Name:</label> 50 50 </td> 51 <td valign="top" class="value ${hasErrors(bean: modificationTypeInstance,field:'name','errors')}">52 <input type="text" id="name" name="name" value="${fieldValue(bean: modificationTypeInstance,field:'name')}"/>51 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'name','errors')}"> 52 <input type="text" id="name" name="name" value="${fieldValue(bean:taskModificationTypeInstance,field:'name')}"/> 53 53 </td> 54 54 </tr> -
trunk/src/grails-app/views/taskModificationType/edit.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Edit ModificationType</title>7 <title>Edit TaskModificationType</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="list" action="list"> ModificationType List</g:link></span>13 <span class="menuButton"><g:link class="create" action="create">New ModificationType</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">TaskModificationType List</g:link></span> 13 <span class="menuButton"><g:link class="create" action="create">New TaskModificationType</g:link></span> 14 14 </div> 15 15 <div class="body"> 16 <h1>Edit ModificationType</h1>16 <h1>Edit TaskModificationType</h1> 17 17 <g:if test="${flash.message}"> 18 18 <div class="message">${flash.message}</div> 19 19 </g:if> 20 <g:hasErrors bean="${ modificationTypeInstance}">20 <g:hasErrors bean="${taskModificationTypeInstance}"> 21 21 <div class="errors"> 22 <g:renderErrors bean="${ modificationTypeInstance}" as="list" />22 <g:renderErrors bean="${taskModificationTypeInstance}" as="list" /> 23 23 </div> 24 24 </g:hasErrors> 25 25 <g:form method="post" > 26 <input type="hidden" name="id" value="${modificationTypeInstance?.id}" /> 26 <input type="hidden" name="id" value="${taskModificationTypeInstance?.id}" /> 27 <input type="hidden" name="version" value="${taskModificationTypeInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> … … 33 34 <label for="description">Description:</label> 34 35 </td> 35 <td valign="top" class="value ${hasErrors(bean: modificationTypeInstance,field:'description','errors')}">36 <input type="text" id="description" name="description" value="${fieldValue(bean: modificationTypeInstance,field:'description')}"/>36 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'description','errors')}"> 37 <input type="text" id="description" name="description" value="${fieldValue(bean:taskModificationTypeInstance,field:'description')}"/> 37 38 </td> 38 39 </tr> … … 42 43 <label for="isActive">Is Active:</label> 43 44 </td> 44 <td valign="top" class="value ${hasErrors(bean:modificationTypeInstance,field:'isActive','errors')}"> 45 <g:checkBox name="isActive" value="${modificationTypeInstance?.isActive}" ></g:checkBox> 46 </td> 47 </tr> 48 49 <tr class="prop"> 50 <td valign="top" class="name"> 51 <label for="modifications">Modifications:</label> 52 </td> 53 <td valign="top" class="value ${hasErrors(bean:modificationTypeInstance,field:'modifications','errors')}"> 54 55 <ul> 56 <g:each var="m" in="${modificationTypeInstance?.modifications?}"> 57 <li><g:link controller="modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 58 </g:each> 59 </ul> 60 <g:link controller="modification" params="['modificationType.id':modificationTypeInstance?.id]" action="create">Add Modification</g:link> 61 45 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'isActive','errors')}"> 46 <g:checkBox name="isActive" value="${taskModificationTypeInstance?.isActive}" ></g:checkBox> 62 47 </td> 63 48 </tr> … … 67 52 <label for="name">Name:</label> 68 53 </td> 69 <td valign="top" class="value ${hasErrors(bean:modificationTypeInstance,field:'name','errors')}"> 70 <input type="text" id="name" name="name" value="${fieldValue(bean:modificationTypeInstance,field:'name')}"/> 54 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'name','errors')}"> 55 <input type="text" id="name" name="name" value="${fieldValue(bean:taskModificationTypeInstance,field:'name')}"/> 56 </td> 57 </tr> 58 59 <tr class="prop"> 60 <td valign="top" class="name"> 61 <label for="taskModifications">Task Modifications:</label> 62 </td> 63 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'taskModifications','errors')}"> 64 65 <ul> 66 <g:each var="t" in="${taskModificationTypeInstance?.taskModifications?}"> 67 <li><g:link controller="taskModification" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li> 68 </g:each> 69 </ul> 70 <g:link controller="taskModification" params="['taskModificationType.id':taskModificationTypeInstance?.id]" action="create">Add TaskModification</g:link> 71 71 72 </td> 72 73 </tr> -
trunk/src/grails-app/views/taskModificationType/list.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title> ModificationType List</title>7 <title>TaskModificationType List</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="create" action="create">New ModificationType</g:link></span>12 <span class="menuButton"><g:link class="create" action="create">New TaskModificationType</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1> ModificationType List</h1>15 <h1>TaskModificationType List</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> … … 33 33 </thead> 34 34 <tbody> 35 <g:each in="${ modificationTypeInstanceList}" status="i" var="modificationTypeInstance">35 <g:each in="${taskModificationTypeInstanceList}" status="i" var="taskModificationTypeInstance"> 36 36 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 37 37 38 <td><g:link action="show" id="${ modificationTypeInstance.id}">${fieldValue(bean:modificationTypeInstance, field:'id')}</g:link></td>38 <td><g:link action="show" id="${taskModificationTypeInstance.id}">${fieldValue(bean:taskModificationTypeInstance, field:'id')}</g:link></td> 39 39 40 <td>${fieldValue(bean: modificationTypeInstance, field:'description')}</td>40 <td>${fieldValue(bean:taskModificationTypeInstance, field:'description')}</td> 41 41 42 <td>${fieldValue(bean: modificationTypeInstance, field:'isActive')}</td>42 <td>${fieldValue(bean:taskModificationTypeInstance, field:'isActive')}</td> 43 43 44 <td>${fieldValue(bean: modificationTypeInstance, field:'name')}</td>44 <td>${fieldValue(bean:taskModificationTypeInstance, field:'name')}</td> 45 45 46 46 </tr> … … 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ ModificationType.count()}" />52 <g:paginate total="${taskModificationTypeInstanceTotal}" /> 53 53 </div> 54 54 </div> -
trunk/src/grails-app/views/taskModificationType/show.gsp
r66 r93 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Show ModificationType</title>7 <title>Show TaskModificationType</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 11 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> 12 <span class="menuButton"><g:link class="list" action="list"> ModificationType List</g:link></span>13 <span class="menuButton"><g:link class="create" action="create">New ModificationType</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">TaskModificationType List</g:link></span> 13 <span class="menuButton"><g:link class="create" action="create">New TaskModificationType</g:link></span> 14 14 </div> 15 15 <div class="body"> 16 <h1>Show ModificationType</h1>16 <h1>Show TaskModificationType</h1> 17 17 <g:if test="${flash.message}"> 18 18 <div class="message">${flash.message}</div> … … 26 26 <td valign="top" class="name">Id:</td> 27 27 28 <td valign="top" class="value">${fieldValue(bean: modificationTypeInstance, field:'id')}</td>28 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'id')}</td> 29 29 30 30 </tr> … … 33 33 <td valign="top" class="name">Description:</td> 34 34 35 <td valign="top" class="value">${fieldValue(bean: modificationTypeInstance, field:'description')}</td>35 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'description')}</td> 36 36 37 37 </tr> … … 40 40 <td valign="top" class="name">Is Active:</td> 41 41 42 <td valign="top" class="value">${fieldValue(bean:modificationTypeInstance, field:'isActive')}</td> 43 44 </tr> 45 46 <tr class="prop"> 47 <td valign="top" class="name">Modifications:</td> 48 49 <td valign="top" style="text-align:left;" class="value"> 50 <ul> 51 <g:each var="m" in="${modificationTypeInstance.modifications}"> 52 <li><g:link controller="modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 53 </g:each> 54 </ul> 55 </td> 42 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'isActive')}</td> 56 43 57 44 </tr> … … 60 47 <td valign="top" class="name">Name:</td> 61 48 62 <td valign="top" class="value">${fieldValue(bean:modificationTypeInstance, field:'name')}</td> 49 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'name')}</td> 50 51 </tr> 52 53 <tr class="prop"> 54 <td valign="top" class="name">Task Modifications:</td> 55 56 <td valign="top" style="text-align:left;" class="value"> 57 <ul> 58 <g:each var="t" in="${taskModificationTypeInstance.taskModifications}"> 59 <li><g:link controller="taskModification" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li> 60 </g:each> 61 </ul> 62 </td> 63 63 64 64 </tr> … … 69 69 <div class="buttons"> 70 70 <g:form> 71 <input type="hidden" name="id" value="${ modificationTypeInstance?.id}" />71 <input type="hidden" name="id" value="${taskModificationTypeInstance?.id}" /> 72 72 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 73 73 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
Note: See TracChangeset
for help on using the changeset viewer.