- Timestamp:
- Dec 3, 2009, 11:44:05 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy
r208 r213 77 77 def create = { 78 78 if(!params.task?.id || !Task.exists(params.task?.id)) { 79 flash.message = "Please select a task, then Create a Recurring Schedule for it."79 flash.message = "Please select a task, then create a recurring schedule for it." 80 80 redirect(controller:"taskDetailed", action:"search") 81 81 return 82 82 } 83 def taskRecurringScheduleInstance = new TaskRecurringSchedule() 84 taskRecurringScheduleInstance.properties = params 83 def taskRecurringScheduleInstance = new TaskRecurringSchedule(params) 85 84 return [taskRecurringScheduleInstance: taskRecurringScheduleInstance] 86 } // end create()85 } 87 86 88 87 def save = { … … 96 95 render(view:'create',model:[taskRecurringScheduleInstance: result.taskRecurringScheduleInstance]) 97 96 } 98 } // end save()97 } 99 98 100 99 } -
trunk/grails-app/i18n/messages.properties
r207 r213 47 47 task.leadPerson.help=The primay contact person. 48 48 49 taskRecurring.nextTargetStartDate.NotInTheFuture=Please select a start date that is not in the past, or use original date. 50 taskRecurring.nextTargetStartDate=Next Target Start Date 51 taskRecurring.nextTargetStartDate.help=The target start date for the next auto generated subTask. 49 taskRecurringSchedule.nextTargetStartDate.mayNotBePast=Please select a start date that is not in the past. 50 taskRecurringSchedule.nextTargetStartDate=Next Target Start Date 51 taskRecurringSchedule.nextTargetStartDate.help=The target start date for the next auto generated sub task. 52 taskRecurringSchedule.recurEvery=Recur Every 53 taskRecurringSchedule.recurEvery.help=How often this task should recur. Determines the period between sub task target start dates. 54 taskRecurringSchedule.taskDuration=Task Duration 55 taskRecurringSchedule.taskDuration.help=How long to allow for the task. Determines the target completion date of the sub tasks. 56 taskRecurringSchedule.generateAhead=Generate Ahead 57 taskRecurringSchedule.generateAhead.help=How far ahead of the next target start date to generate sub tasks. \ 58 This allows work packs to be built and work load to be seen and planned. \ 59 Only generate ahead as far as short term planning is done, since all generated sub task values will be set and therefore \ 60 time consuming to change. 61 taskRecurringSchedule.enabled=Enabled 62 taskRecurringSchedule.enabled.help=On to enable automatic sub task generation. Off to stop automatic sub task generation. 52 63 53 64 task.primaryAsset=Primary Asset … … 78 89 default.paginate.prev=Previous 79 90 default.paginate.next=Next 80 default.optimistic.locking.failure=Another user has updated this item while you were editing .91 default.optimistic.locking.failure=Another user has updated this item while you were editing, please check the updated values. 81 92 82 93 # Rich UI plugin - Calendar -
trunk/grails-app/services/TaskRecurringScheduleService.groovy
r207 r213 74 74 75 75 if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday()) 76 return fail("nextTargetStartDate", "taskRecurring .nextTargetStartDate.NotInTheFuture")76 return fail("nextTargetStartDate", "taskRecurringSchedule.nextTargetStartDate.mayNotBePast") 77 77 78 78 taskInstance.taskRecurringSchedule = result.taskRecurringScheduleInstance … … 115 115 } 116 116 117 result.taskRecurringScheduleInstance. validate()117 result.taskRecurringScheduleInstance.properties = params 118 118 119 Date originalDate = result.taskRecurringScheduleInstance.nextTargetStartDate 120 result.taskRecurringScheduleInstance.properties = params 121 Date newDate = result.taskRecurringScheduleInstance.nextTargetStartDate 122 123 // If user changes nextTargetStartDate then ensure it is in the future, otherwise it's ok to keep the original date. 124 if(originalDate.getTime() != newDate.getTime()) 125 { 126 if(newDate < dateUtilService.getToday()) 127 return fail("nextTargetStartDate", "taskRecurring.nextTargetStartDate.NotInTheFuture") 128 } 119 if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday()) 120 return fail("nextTargetStartDate", "taskRecurringSchedule.nextTargetStartDate.mayNotBePast") 129 121 130 122 result.taskRecurringScheduleInstance.setNextGenerationDate() -
trunk/grails-app/views/taskDetailed/edit.gsp
r204 r213 169 169 <div class="buttons"> 170 170 <span class="button"><g:actionSubmit class="save" value="Update" /></span> 171 <span class="button"><g:actionSubmit class="cancel" value="Cancel" action=" show"/></span>171 <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> 172 172 <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> 173 173 </div> -
trunk/grails-app/views/taskDetailed/show.gsp
r203 r213 648 648 </g:else> 649 649 <span class="button"><g:actionSubmit action="listSubTasks" class="table" value="List" /></span> 650 <span class="button"><g:actionSubmit action="createSubTask" class="add" value=" Add" /></span>650 <span class="button"><g:actionSubmit action="createSubTask" class="add" value="Create" /></span> 651 651 </g:form> 652 652 </div> … … 662 662 <g:form> 663 663 <g:hiddenField name="id" value="${taskInstance?.id}" /> 664 <span class="button"><g:actionSubmit action="createSubTask" class="add" value=" Add" /></span>664 <span class="button"><g:actionSubmit action="createSubTask" class="add" value="Create" /></span> 665 665 </g:form> 666 666 </div> -
trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp
r211 r213 42 42 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextTargetStartDate','errors')}"> 43 43 <richui:dateChooser name="nextTargetStartDate" format="dd-MM-yyyy" value="${taskRecurringScheduleInstance?.nextTargetStartDate}" /> 44 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.nextTargetStartDate" /> 44 45 </td> 45 46 </tr> … … 53 54 id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" /> 54 55 <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select> 56 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.recurEvery" /> 55 57 </td> 56 58 </tr> … … 58 60 <tr class="prop"> 59 61 <td valign="top" class="name"> 60 <label for=" recurEvery">Task Duration:</label>62 <label for="taskDuration">Task Duration:</label> 61 63 </td> 62 64 <td valign="top" class="value" > … … 64 66 id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" /> 65 67 <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select> 68 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.taskDuration" /> 66 69 </td> 67 70 </tr> … … 69 72 <tr class="prop"> 70 73 <td valign="top" class="name"> 71 <label for=" recurEvery">Generate Ahead:</label>74 <label for="generateAhead">Generate Ahead:</label> 72 75 </td> 73 76 <td valign="top" class="value" > … … 75 78 id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" /> 76 79 ${Period.get(1).encodeAsHTML()} 80 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.generateAhead" /> 77 81 </td> 78 82 </tr> … … 84 88 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'enabled','errors')}"> 85 89 <g:checkBox name="enabled" value="${taskRecurringScheduleInstance?.enabled}" ></g:checkBox> 90 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.enabled" /> 86 91 </td> 87 92 </tr> -
trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp
r212 r213 43 43 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextTargetStartDate','errors')}"> 44 44 <richui:dateChooser name="nextTargetStartDate" format="dd-MM-yyyy" value="${taskRecurringScheduleInstance?.nextTargetStartDate}" /> 45 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.nextTargetStartDate" /> 45 46 </td> 46 47 </tr> … … 54 55 id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" /> 55 56 <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select> 57 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.recurEvery" /> 56 58 </td> 57 59 </tr> … … 59 61 <tr class="prop"> 60 62 <td valign="top" class="name"> 61 <label for=" recurEvery">Task Duration:</label>63 <label for="taskDuration">Task Duration:</label> 62 64 </td> 63 65 <td valign="top" class="value" > … … 65 67 id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" /> 66 68 <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select> 69 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.taskDuration" /> 67 70 </td> 68 71 </tr> … … 70 73 <tr class="prop"> 71 74 <td valign="top" class="name"> 72 <label for=" recurEvery">Generate Ahead:</label>75 <label for="generateAhead">Generate Ahead:</label> 73 76 </td> 74 77 <td valign="top" class="value" > … … 76 79 id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" /> 77 80 ${Period.get(1).encodeAsHTML()} 81 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.generateAhead" /> 78 82 </td> 79 83 </tr> … … 85 89 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'enabled','errors')}"> 86 90 <g:checkBox name="enabled" value="${taskRecurringScheduleInstance?.enabled}" ></g:checkBox> 91 <g:helpBalloon class="helpballoon" code="taskRecurringSchedule.enabled" /> 87 92 </td> 88 93 </tr>
Note: See TracChangeset
for help on using the changeset viewer.