Changeset 137 for trunk/grails-app
- Timestamp:
- Sep 1, 2009, 10:10:43 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r136 r137 358 358 359 359 //Entry #1 360 entryInstance = new Entry(enteredBy: Person.get( 6),360 entryInstance = new Entry(enteredBy: Person.get(3), 361 361 task: Task.get(1), 362 362 entryType: EntryType.findByName("Fault"), … … 611 611 612 612 //MaintenanceAction #1 613 maintenanceActionInstance = new MaintenanceAction(description: "Check all E-stops, activ e E-stopS1-S12 and ensure machine cannot run",613 maintenanceActionInstance = new MaintenanceAction(description: "Check all E-stops, activate E-stops S1-S12 and ensure machine cannot run", 614 614 procedureStepNumber: 1, 615 615 maintenancePolicy: MaintenancePolicy.get(1), -
trunk/grails-app/controllers/TaskDetailedController.groovy
r134 r137 31 31 params.order = "desc" 32 32 params.sort = "id" 33 34 def entryWorkDoneList = Entry.withCriteria { 35 def entryType = EntryType.findByName("WorkDone") 36 eq("entryType", entryType) 37 eq("task", taskInstance) 38 } 39 40 def entryFaultList = Entry.withCriteria { 41 def entryType = EntryType.findByName("Fault") 42 eq("entryType", entryType) 43 eq("task", taskInstance) 44 } 33 45 34 46 def subTaskInstanceList = Task.findAllByParentTask(taskInstance, params) … … 53 65 } 54 66 55 return [ taskInstance : taskInstance, 67 return [ taskInstance: taskInstance, 68 entryWorkDoneList: entryWorkDoneList, 69 entryFaultList: entryFaultList, 56 70 taskProcedureInstance: taskProcedureInstance, 57 71 taskProcedureExits: taskProcedureExits, -
trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy
r136 r137 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 import org.codehaus.groovy.runtime.TimeCategory 3 import java.text.SimpleDateFormat 3 4 4 5 class TaskRecurringScheduleDetailedController extends BaseController { 5 6 7 def dateUtilService 8 6 9 def index = { redirect(action:list,params:params) } 7 10 … … 51 54 } 52 55 else { 53 return [ taskRecurringScheduleInstance : taskRecurringScheduleInstance 56 return [ taskRecurringScheduleInstance : taskRecurringScheduleInstance] 54 57 } 55 58 } 56 59 57 60 def update = { 58 def taskRecurringScheduleInstance = TaskRecurringSchedule.get( params.id ) 59 if(taskRecurringScheduleInstance) { 60 if(params.version) { 61 def version = params.version.toLong() 62 if(taskRecurringScheduleInstance.version > version) { 61 TaskRecurringSchedule.withTransaction { status -> 62 63 def taskRecurringScheduleInstance = TaskRecurringSchedule.get( params.id ) 64 if(taskRecurringScheduleInstance) { 65 66 if(params.version) { 67 def version = params.version.toLong() 68 if(taskRecurringScheduleInstance.version > version) { 69 taskRecurringScheduleInstance.errors.rejectValue("version", "taskRecurringSchedule.optimistic.locking.failure", "Another user has updated this TaskRecurringSchedule while you were editing.") 70 render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance]) 71 return 72 } 73 } 74 75 Date originalDate = taskRecurringScheduleInstance.startDate 76 taskRecurringScheduleInstance.properties = params // Domain object is now 'dirty'. 77 Date newDate = taskRecurringScheduleInstance.startDate 78 79 // If user changes startDate then ensure it is in the future, otherwise it's ok to keep the original date. 80 if(originalDate.getTime() != newDate.getTime()) 81 { 82 if(newDate < dateUtilService.getToday()) 83 { 84 status.setRollbackOnly() // Only allow the transaction to Rollback, preventing flush due to 'dirty'. 85 taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture") 86 render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance]) 87 return 88 } 89 } 90 91 taskRecurringScheduleInstance.nextTargetStartDate = taskRecurringScheduleInstance.startDate 92 taskRecurringScheduleInstance.setNextGenerationDate() 93 taskRecurringScheduleInstance.setNextTargetCompletionDate() 63 94 64 taskRecurringScheduleInstance.errors.rejectValue("version", "taskRecurringSchedule.optimistic.locking.failure", "Another user has updated this TaskRecurringSchedule while you were editing.") 65 render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance]) 66 return 67 } 68 } 69 // taskRecurringScheduleInstance.properties = params 70 setUpdateProperties() 71 72 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save()) { 73 flash.message = "TaskRecurringSchedule ${params.id} updated" 74 redirect(action:show,id:taskRecurringScheduleInstance.id) 75 } 76 else { 77 render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance]) 78 } 79 } 80 else { 81 flash.message = "TaskRecurringSchedule not found with id ${params.id}" 82 redirect(action:edit,id:params.id) 83 } 84 } 95 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save()) 96 { 97 flash.message = "TaskRecurringSchedule ${params.id} updated" 98 redirect(action:show,id:taskRecurringScheduleInstance.id) 99 } 100 else 101 { 102 render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance]) 103 } 104 } 105 else 106 { 107 flash.message = "TaskRecurringSchedule not found with id ${params.id}" 108 redirect(action:edit,id:params.id) 109 } 110 111 } // end withTransaction 112 } // end update() 85 113 86 114 def create = { … … 95 123 redirect(controller:"taskDetailed", action:"list") 96 124 } 97 } 125 } // end create() 98 126 99 127 def save = { … … 106 134 } 107 135 else { 136 137 if(taskRecurringScheduleInstance.startDate < dateUtilService.getToday()) { 138 taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture") 139 } 108 140 109 141 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save()) { … … 125 157 } 126 158 127 } 128 129 private setUpdateProperties() { 130 def originalStartDate = taskRecurringScheduleInstance.startDate 131 132 if(taskRecurringScheduleInstance.startDate == params.startDate) { 133 taskRecurringScheduleInstance.properties = params 134 } 135 else { 136 taskRecurringScheduleInstance.properties = params 137 taskRecurringScheduleInstance.nextTargetStartDate = params.startDate 138 } 139 140 } 159 } // end save() 141 160 142 /*143 private Date calculateNextDueDate(recurEvery, period, startDate) {144 def nextDue = new Date()145 146 switch (period) {147 case "Day(s)":148 use(TimeCategory) {149 nextDue = startDate + recurEvery.days150 }151 return nextDue152 case "Week(s)":153 use(TimeCategory) {154 nextDue = startDate + recurEvery.weeks155 }156 return nextDue157 case "Month(s)":158 use(TimeCategory) {159 nextDue = startDate + recurEvery.months160 }161 return nextDue162 case "Year(s)":163 use(TimeCategory) {164 nextDue = startDate + recurEvery.years165 }166 return nextDue167 default:168 return nextDue169 }170 171 }*/172 161 } -
trunk/grails-app/domain/TaskRecurringSchedule.groovy
r136 r137 23 23 24 24 static constraints = { 25 // startDate(validator: {return (it > new Date())}) 26 recurEvery(min:0, max:365) 25 recurEvery(min:1, max:365) 27 26 taskDuration(min:0, max:365) 28 27 generateAhead(min:0, max:365) … … 35 34 } 36 35 37 //As of Grails 1.1 this does not fire/pass before validation. 38 //But setting defaults above and placing this code here in the hope that this will be fixed in future versions. 36 // As of Grails 1.1.1 this does not fire/pass before validation. 37 // But setting some defaults above to pass validation and placing this code here 38 // in the hope that this will be fixed in future versions. 39 39 def beforeInsert = { 40 def now = new Date()41 42 40 nextTargetStartDate = startDate 43 44 //nextGenerationDate 41 setNextGenerationDate() 42 setNextTargetCompletionDate() 43 } 44 45 public void setNextGenerationDate() { 45 46 switch (generateAheadPeriod.period) { 46 47 case "Day(s)": … … 67 68 break 68 69 } 69 70 def now = new Date() 70 71 if( nextGenerationDate < now) {nextGenerationDate = now} 71 72 //nextTargetCompletionDate 72 } 73 74 public void setNextTargetCompletionDate() { 73 75 switch (taskDurationPeriod.period) { 74 76 case "Day(s)": … … 92 94 } 93 95 break 94 default:96 default: 95 97 break 96 98 } 97 98 99 } 99 100 100 101 } 101 102 -
trunk/grails-app/i18n/messages.properties
r106 r137 18 18 task.leadPerson=Lead Person 19 19 task.leadPerson.help=The primay contact person. 20 21 taskRecurring.startDate.NotInTheFuture=Please select a start date that is not in the past, or use original date. 22 taskRecurring.startDate=Start Date 23 taskRecurring.startDate.help=The tartget start date for the first auto generated subTask. 20 24 21 25 default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}] -
trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy
r126 r137 1 1 2 2 class TaskRecurringScheduleJob {/* 3 // def timeout = 5000 // execute job once in 5seconds4 def timeout = 600003 def timeout = 1000 // execute job once in 1 seconds 4 // def timeout = 60000 5 5 6 6 def execute() { 7 //println "TaskRecurringScheduleJob: tick"8 // println "TaskRecurringScheduleJob: tock" 7 println "TaskRecurringScheduleJob: tick" 8 println "TaskRecurringScheduleJob: tock"/* 9 9 def recurringScheduleInstanceList = RecurringSchedule.list() 10 10 def now = new Date() -
trunk/grails-app/views/entryDetailed/edit.gsp
r98 r137 62 62 63 63 <td valign="top" class="value"> 64 <input class=" duration${hasErrors(bean:entryInstance,field:'durationHour','errors')}"64 <input class="time ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" 65 65 type="text" id="durationHour" name="durationHour" 66 66 value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> 67 67 : 68 <input class=" duration${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"68 <input class="time ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" 69 69 type="text" id="durationMinute" name="durationMinute" 70 70 value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> -
trunk/grails-app/views/taskDetailed/show.gsp
r135 r137 158 158 </div> 159 159 160 161 160 <div class="buttons"> 162 161 <g:form> … … 186 185 </thead> 187 186 <tbody> 188 <g:each in="${taskInstance?.entries}" status="i" var="entry"> 189 <g:if test="${entry.entryType == EntryType.findByName('Fault')}"> 187 <g:each in="${entryFaultList}" status="i" var="entry"> 190 188 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/> 191 189 … … 202 200 203 201 </tr> 204 </g:if>205 202 </g:each> 206 203 </tbody> … … 227 224 </thead> 228 225 <tbody> 229 <g:each in="${taskInstance?.entries}" status="i" var="entry"> 230 <g:if test="${entry.entryType == EntryType.findByName('WorkDone')}"> 226 <g:each in="${entryWorkDoneList}" status="i" var="entry"> 231 227 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/> 232 228 … … 243 239 244 240 </tr> 245 </g:if>246 241 </g:each> 247 242 </tbody> … … 261 256 </richui:tabContent> 262 257 <!-- End Task tab --> 258 259 263 260 264 261 <!-- Start Task Procedure tab--> … … 398 395 <g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd MMM yyyy"/> 399 396 </td> 397 398 </tr> 399 400 <tr class="prop"> 401 <td valign="top" class="name">Task Duration:</td> 402 403 <td valign="top" class="value"> 404 ${taskRecurringScheduleInstance?.taskDuration} ${taskRecurringScheduleInstance?.taskDurationPeriod} 405 </td> 406 </tr> 407 408 <tr class="prop"> 409 <td valign="top" class="name">Generate Ahead:</td> 410 411 <td valign="top" class="value"> 412 ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod} 413 </td> 414 415 </tr> 400 416 401 417 </tr> … … 407 423 408 424 </tr> 425 426 </tbody> 427 </table> 428 429 <table> 430 <tbody> 409 431 410 432 <tr class="prop"> 411 <td></td> 412 </tr> 413 414 <tr class="prop"> 415 <td></td> 416 </tr> 417 418 <tr class="prop"> 419 <td valign="top" class="name">Next Due Date:</td> 433 <td valign="top" class="name">Next Target Start Date:</td> 420 434 421 435 <td valign="top" class="value"> 422 <g:formatDate date="${taskRecurringScheduleInstance.next DueDate}" format="EEE, dd MMM yyyy"/>436 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd MMM yyyy"/> 423 437 </td> 424 438 425 439 </tr> 440 441 <tr class="prop"> 442 <td valign="top" class="name">Next Target Completion Date:</td> 443 444 <td valign="top" class="value"> 445 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd MMM yyyy"/> 446 </td> 447 448 </tr> 449 450 <tr class="prop"> 451 <td valign="top" class="name">Next Generation Date:</td> 452 453 <td valign="top" class="value"> 454 <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd MMM yyyy"/> 455 </td> 456 </tr> 426 457 427 458 <tr class="prop"> -
trunk/grails-app/views/taskRecurringSchedule/create.gsp
r131 r137 47 47 <tr class="prop"> 48 48 <td valign="top" class="name"> 49 <label for="generateAhead">Generate Ahead:</label> 50 </td> 51 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"> 52 <input type="text" id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" /> 53 </td> 54 </tr> 55 56 <tr class="prop"> 57 <td valign="top" class="name"> 58 <label for="generateAheadPeriod">Generate Ahead Period:</label> 59 </td> 60 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAheadPeriod','errors')}"> 61 <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select> 62 </td> 63 </tr> 64 65 <tr class="prop"> 66 <td valign="top" class="name"> 49 67 <label for="isEnabled">Is Enabled:</label> 50 68 </td> … … 65 83 <tr class="prop"> 66 84 <td valign="top" class="name"> 67 <label for=" period">Period:</label>85 <label for="nextGenerationDate">Next Generation Date:</label> 68 86 </td> 69 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:' period','errors')}">70 <g: select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>87 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextGenerationDate','errors')}"> 88 <g:datePicker name="nextGenerationDate" value="${taskRecurringScheduleInstance?.nextGenerationDate}" ></g:datePicker> 71 89 </td> 72 90 </tr> … … 78 96 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}"> 79 97 <input type="text" id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" /> 98 </td> 99 </tr> 100 101 <tr class="prop"> 102 <td valign="top" class="name"> 103 <label for="recurPeriod">Recur Period:</label> 104 </td> 105 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurPeriod','errors')}"> 106 <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select> 80 107 </td> 81 108 </tr> -
trunk/grails-app/views/taskRecurringSchedule/edit.gsp
r131 r137 50 50 <tr class="prop"> 51 51 <td valign="top" class="name"> 52 <label for="generateAhead">Generate Ahead:</label> 53 </td> 54 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"> 55 <input type="text" id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" /> 56 </td> 57 </tr> 58 59 <tr class="prop"> 60 <td valign="top" class="name"> 61 <label for="generateAheadPeriod">Generate Ahead Period:</label> 62 </td> 63 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAheadPeriod','errors')}"> 64 <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select> 65 </td> 66 </tr> 67 68 <tr class="prop"> 69 <td valign="top" class="name"> 52 70 <label for="isEnabled">Is Enabled:</label> 53 71 </td> … … 68 86 <tr class="prop"> 69 87 <td valign="top" class="name"> 70 <label for=" period">Period:</label>88 <label for="nextGenerationDate">Next Generation Date:</label> 71 89 </td> 72 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:' period','errors')}">73 <g: select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>90 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextGenerationDate','errors')}"> 91 <g:datePicker name="nextGenerationDate" value="${taskRecurringScheduleInstance?.nextGenerationDate}" ></g:datePicker> 74 92 </td> 75 93 </tr> … … 81 99 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}"> 82 100 <input type="text" id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" /> 101 </td> 102 </tr> 103 104 <tr class="prop"> 105 <td valign="top" class="name"> 106 <label for="recurPeriod">Recur Period:</label> 107 </td> 108 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurPeriod','errors')}"> 109 <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select> 83 110 </td> 84 111 </tr> -
trunk/grails-app/views/taskRecurringSchedule/list.gsp
r131 r137 28 28 <th>Last Generated Sub Task</th> 29 29 30 <g:sortableColumn property="generateAhead" title="Generate Ahead" /> 31 32 <th>Generate Ahead Period</th> 33 30 34 <g:sortableColumn property="isEnabled" title="Is Enabled" /> 31 35 32 <g:sortableColumn property="nextDueDate" title="Next Due Date" />33 34 <th>Period</th>35 36 36 </tr> 37 37 </thead> … … 46 46 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}</td> 47 47 48 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}</td> 49 50 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAheadPeriod')}</td> 51 48 52 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td> 49 50 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'nextDueDate')}</td>51 52 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'period')}</td>53 53 54 54 </tr> -
trunk/grails-app/views/taskRecurringSchedule/show.gsp
r131 r137 45 45 46 46 <tr class="prop"> 47 <td valign="top" class="name">Generate Ahead:</td> 48 49 <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}</td> 50 51 </tr> 52 53 <tr class="prop"> 54 <td valign="top" class="name">Generate Ahead Period:</td> 55 56 <td valign="top" class="value"><g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}">${taskRecurringScheduleInstance?.generateAheadPeriod?.encodeAsHTML()}</g:link></td> 57 58 </tr> 59 60 <tr class="prop"> 47 61 <td valign="top" class="name">Is Enabled:</td> 48 62 … … 59 73 60 74 <tr class="prop"> 61 <td valign="top" class="name"> Period:</td>75 <td valign="top" class="name">Next Generation Date:</td> 62 76 63 <td valign="top" class="value"> <g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.period?.id}">${taskRecurringScheduleInstance?.period?.encodeAsHTML()}</g:link></td>77 <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'nextGenerationDate')}</td> 64 78 65 79 </tr> … … 69 83 70 84 <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'recurEvery')}</td> 85 86 </tr> 87 88 <tr class="prop"> 89 <td valign="top" class="name">Recur Period:</td> 90 91 <td valign="top" class="value"><g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.recurPeriod?.id}">${taskRecurringScheduleInstance?.recurPeriod?.encodeAsHTML()}</g:link></td> 71 92 72 93 </tr> -
trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp
r135 r137 53 53 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}" 54 54 id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" /> 55 <g:select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select> 55 <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select> 56 </td> 57 </tr> 58 59 <tr class="prop"> 60 <td valign="top" class="name"> 61 <label for="recurEvery">Task Duration:</label> 62 </td> 63 <td valign="top" class="value" > 64 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'taskDuration','errors')}" 65 id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" /> 66 <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select> 67 </td> 68 </tr> 69 70 <tr class="prop"> 71 <td valign="top" class="name"> 72 <label for="recurEvery">Generate Ahead:</label> 73 </td> 74 <td valign="top" class="value" > 75 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}" 76 id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" /> 77 <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select> 56 78 </td> 57 79 </tr> -
trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp
r135 r137 55 55 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}" 56 56 id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" /> 57 <g:select optionKey="id" from="${Period.list()}" name=" period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>57 <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select> 58 58 </td> 59 </tr> 59 </tr> 60 61 <tr class="prop"> 62 <td valign="top" class="name"> 63 <label for="recurEvery">Task Duration:</label> 64 </td> 65 <td valign="top" class="value" > 66 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'taskDuration','errors')}" 67 id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" /> 68 <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select> 69 </td> 70 </tr> 71 72 <tr class="prop"> 73 <td valign="top" class="name"> 74 <label for="recurEvery">Generate Ahead:</label> 75 </td> 76 <td valign="top" class="value" > 77 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}" 78 id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" /> 79 <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select> 80 </td> 81 </tr> 60 82 61 83 <tr class="prop"> … … 73 95 <div class="buttons"> 74 96 <span class="button"><g:actionSubmit class="save" value="Update" /></span> 75 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>97 <!-- <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> --> 76 98 </div> 77 99 </g:form> -
trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp
r135 r137 28 28 <g:sortableColumn property="recurEvery" title="Recur Every" /> 29 29 30 <g:sortableColumn property=" period" title="Period" />30 <g:sortableColumn property="recurPeriod" title="Recur Period" /> 31 31 32 32 <g:sortableColumn property="isEnabled" title="Is Enabled" /> … … 47 47 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'recurEvery')}</td> 48 48 49 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:' period')}</td>49 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'recurPeriod')}</td> 50 50 51 51 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td> -
trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp
r135 r137 39 39 40 40 <tr class="prop"> 41 <td valign="top" class="name">Start Date:</td> 42 43 <td valign="top" class="value"> 44 <g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd MMM yyyy"/> 45 </td> 46 </tr> 47 48 <tr class="prop"> 41 49 <td valign="top" class="name">Recur Every:</td> 42 50 43 51 <td valign="top" class="value"> 44 ${taskRecurringScheduleInstance?.recurEvery} ${taskRecurringScheduleInstance?. period}52 ${taskRecurringScheduleInstance?.recurEvery} ${taskRecurringScheduleInstance?.recurPeriod} 45 53 </td> 46 54 … … 48 56 49 57 <tr class="prop"> 50 <td valign="top" class="name"> Start Date:</td>58 <td valign="top" class="name">Task Duration:</td> 51 59 52 <td valign="top" class="value"> 53 <g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd MMM yyyy"/> 54 </td> 60 <td valign="top" class="value"> 61 ${taskRecurringScheduleInstance?.taskDuration} ${taskRecurringScheduleInstance?.taskDurationPeriod} 62 </td> 63 </tr> 64 65 <tr class="prop"> 66 <td valign="top" class="name">Generate Ahead:</td> 67 68 <td valign="top" class="value"> 69 ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod} 70 </td> 71 55 72 </tr> 56 73 … … 61 78 62 79 </tr> 80 </tbody> 81 </table> 82 83 <table> 84 <tbody> 85 <tr class="prop"> 86 <td valign="top" class="name">Next Target Start Date:</td> 87 88 <td valign="top" class="value"> 89 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd MMM yyyy"/> 90 </td> 91 92 </tr> 93 94 <tr class="prop"> 95 <td valign="top" class="name">Next Target Completion Date:</td> 96 97 <td valign="top" class="value"> 98 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd MMM yyyy"/> 99 </td> 100 101 </tr> 63 102 64 103 <tr class="prop"> 65 <td></td> 66 </tr> 67 68 <tr class="prop"> 69 <td></td> 70 </tr> 71 72 <tr class="prop"> 73 <td valign="top" class="name">Next Due Date:</td> 104 <td valign="top" class="name">Next Generation Date:</td> 74 105 75 106 <td valign="top" class="value"> 76 <g:formatDate date="${taskRecurringScheduleInstance.nextDueDate}" format="EEE, dd MMM yyyy"/> 77 </td> 78 107 <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd MMM yyyy"/> 108 </td> 79 109 </tr> 80 110 … … 105 135 <input type="hidden" name="id" value="${taskRecurringScheduleInstance?.id}" /> 106 136 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 107 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>137 <!-- <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> --> 108 138 </g:form> 109 139 </div>
Note: See TracChangeset
for help on using the changeset viewer.