- Timestamp:
- Apr 13, 2010, 1:11:10 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r486 r487 598 598 // Default leadPerson to current user, unless supplied in params. 599 599 taskInstance.leadPerson = authService.currentUser 600 601 // Apply params, overiding anything above. 600 602 taskInstance.properties = params 601 603 602 604 def scheduledTaskTypes = taskService.scheduledTaskTypes 603 605 def scheduledTaskPriorities = taskService.scheduledTaskPriorities 606 taskInstance.scheduled = true 604 607 taskInstance.taskPriority = scheduledTaskPriorities.default 605 608 return ['taskInstance': taskInstance, -
trunk/grails-app/views/taskDetailed/create.gsp
r482 r487 69 69 </td> 70 70 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> 71 <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select> 71 <g:select optionKey="id" 72 from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}" 73 name="leadPerson.id" 74 value="${taskInstance?.leadPerson?.id}" > 75 </g:select> 72 76 <g:helpBalloon code="task.leadPerson" /> 73 77 </td> … … 79 83 </td> 80 84 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 81 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select> 85 <g:select optionKey="id" 86 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 87 name="primaryAsset.id" 88 value="${taskInstance?.primaryAsset?.id}" 89 noSelection="['null':'--None--']" > 90 </g:select> 82 91 <g:helpBalloon code="task.primaryAsset" /> 83 92 </td> … … 90 99 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> 91 100 <g:select id="associatedAssets" name="associatedAssets" 92 from="${Asset. list()}"101 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 93 102 size="5" multiple="yes" optionKey="id" 94 value="${taskInstance?.associatedAssets?.id}" noSelection="['':'--None--']"/> 103 value="${taskInstance?.associatedAssets?.id}" noSelection="['':'--None--']" > 104 </g:select> 95 105 <g:helpBalloon code="task.associatedAssets" /> 96 106 </td> … … 102 112 </td> 103 113 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> 104 <g:select optionKey="id" from="${scheduledTaskPriorities}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> 114 <g:select optionKey="id" 115 from="${scheduledTaskPriorities}" 116 name="taskPriority.id" 117 value="${taskInstance?.taskPriority?.id}" > 118 </g:select> 105 119 </td> 106 120 </tr> … … 114 128 </td> 115 129 </tr> 116 117 <!-- <tr class="prop">118 <td valign="top" class="name">119 <label for="parentTask">Parent Task:</label>120 </td>121 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}">122 <g:select optionKey="id" from="${Task.findAllByTrash(false)}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'--None--']"></g:select>123 </td>124 </tr> -->125 130 126 131 <tr class="prop"> … … 129 134 </td> 130 135 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> 131 <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> 136 <g:select optionKey="id" 137 from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 138 name="taskGroup.id" 139 value="${taskInstance?.taskGroup?.id}" > 140 </g:select> 132 141 </td> 133 142 </tr> … … 138 147 </td> 139 148 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> 140 <g:select optionKey="id" from="${scheduledTaskTypes}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> 149 <g:select optionKey="id" 150 from="${scheduledTaskTypes}" 151 name="taskType.id" 152 value="${taskInstance?.taskType?.id}" > 153 </g:select> 141 154 </td> 142 155 </tr> -
trunk/grails-app/views/taskDetailed/createImmediateCallout.gsp
r431 r487 63 63 </td> 64 64 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 65 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select> 65 <g:select optionKey="id" 66 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 67 name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" 68 noSelection="['null':'--None--']"> 69 </g:select> 66 70 <g:helpBalloon code="task.primaryAsset" /> 67 71 </td> … … 74 78 <td valign="top" class="value ${hasErrors(bean:entryFaultInstance,field:'productionReference','errors')}"> 75 79 <g:select optionKey="id" 76 from="${ProductionReference.findAllByIsActive(true) }"80 from="${ProductionReference.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 77 81 name="entryFault.productionReference.id" 78 82 value="${entryFaultInstance?.productionReference?.id}" -
trunk/grails-app/views/taskDetailed/createUnscheduled.gsp
r433 r487 71 71 </td> 72 72 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> 73 <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select> 73 <g:select optionKey="id" 74 from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}" 75 name="leadPerson.id" 76 value="${taskInstance?.leadPerson?.id}" > 77 </g:select> 74 78 <g:helpBalloon code="task.leadPerson" /> 75 79 </td> … … 81 85 </td> 82 86 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 83 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select> 87 <g:select optionKey="id" 88 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 89 name="primaryAsset.id" 90 value="${taskInstance?.primaryAsset?.id}" 91 noSelection="['null':'--None--']"></g:select> 84 92 <g:helpBalloon code="task.primaryAsset" /> 85 93 </td> 86 94 </tr> 87 88 <!-- <tr class="prop">89 <td valign="top" class="name">90 <label for="associatedAssets">Associated Assets:</label>91 </td>92 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}">93 <g:select id="associatedAssets" name="associatedAssets"94 from="${Asset.list()}"95 size="5" multiple="yes" optionKey="id"96 value="${taskInstance?.associatedAssets?.id}" noSelection="['':'--None--']"/>97 <g:helpBalloon code="task.associatedAssets" />98 </td>99 </tr>-->100 95 101 96 <tr class="prop"> … … 104 99 </td> 105 100 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> 106 <g:select optionKey="id" from="${unscheduledTaskPriorities}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> 101 <g:select optionKey="id" 102 from="${unscheduledTaskPriorities}" 103 name="taskPriority.id" 104 value="${taskInstance?.taskPriority?.id}" > 105 </g:select> 107 106 </td> 108 107 </tr> 109 110 <!-- <tr class="prop">111 <td valign="top" class="name">112 <label for="scheduled">Scheduled:</label>113 </td>114 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}">115 <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox>116 </td>117 </tr>-->118 119 <!-- <tr class="prop">120 <td valign="top" class="name">121 <label for="parentTask">Parent Task:</label>122 </td>123 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}">124 <g:select optionKey="id" from="${Task.findAllByTrash(false)}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'--None--']"></g:select>125 </td>126 </tr> -->127 108 128 109 <tr class="prop"> … … 131 112 </td> 132 113 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> 133 <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> 114 <g:select optionKey="id" 115 from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 116 name="taskGroup.id" 117 value="${taskInstance?.taskGroup?.id}" > 118 </g:select> 134 119 </td> 135 120 </tr> -
trunk/grails-app/views/taskDetailed/edit.gsp
r252 r487 45 45 </g:if> 46 46 47 <!-- <tr class="prop">48 <td valign="top" class="name">49 <label for="parentTask">Parent Task:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}">52 <g:select optionKey="id" from="${possibleParentList}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'--None--']"></g:select>53 </td>54 </tr>-->55 56 47 <tr class="prop"> 57 48 <td valign="top" class="name"> … … 95 86 </td> 96 87 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}"> 97 <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select> 88 <g:select optionKey="id" 89 from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}" 90 name="leadPerson.id" 91 value="${taskInstance?.leadPerson?.id}" > 92 </g:select> 98 93 </td> 99 94 </tr> … … 104 99 </td> 105 100 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 106 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select> 101 <g:select optionKey="id" 102 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 103 name="primaryAsset.id" 104 value="${taskInstance?.primaryAsset?.id}" 105 noSelection="['null':'--None--']"> 106 </g:select> 107 107 <g:helpBalloon code="task.primaryAsset" /> 108 108 </td> … … 114 114 </td> 115 115 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> 116 <g:select id="associatedAssets" name="associatedAssets" 117 from="${Asset.list()}" 116 <g:select id="associatedAssets" 117 name="associatedAssets" 118 from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 118 119 optionKey="id" size="5" multiple="yes" 119 value="${taskInstance?.associatedAssets.id}" noSelection="['':'--None--']"/> 120 value="${taskInstance?.associatedAssets.id}" 121 noSelection="['':'--None--']" > 122 </g:select> 120 123 <g:helpBalloon class="helpballoon" code="task.associatedAssets" /> 121 124 </td> … … 127 130 </td> 128 131 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}"> 129 <g:select optionKey="id" from="${TaskPriority.list()}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> 132 <g:select optionKey="id" 133 from="${TaskPriority.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 134 name="taskPriority.id" 135 value="${taskInstance?.taskPriority?.id}" > 136 </g:select> 130 137 </td> 131 138 </tr> … … 136 143 </td> 137 144 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskBudgetStatus','errors')}"> 138 <g:select optionKey="id" from="${TaskBudgetStatus.list()}" name="taskBudgetStatus.id" value="${taskInstance?.taskBudgetStatus?.id}" ></g:select> 139 </td> 140 </tr> 145 <g:select optionKey="id" 146 from="${TaskBudgetStatus.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 147 name="taskBudgetStatus.id" 148 value="${taskInstance?.taskBudgetStatus?.id}" > 149 </g:select> 150 </td> 151 </tr> 141 152 142 153 <tr class="prop"> … … 154 165 </td> 155 166 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> 156 <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> 157 </td> 158 </tr> 167 <g:select optionKey="id" 168 from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 169 name="taskGroup.id" 170 value="${taskInstance?.taskGroup?.id}" > 171 </g:select> 172 </td> 173 </tr> 159 174 160 175 <tr class="prop"> … … 163 178 </td> 164 179 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> 165 <g:select optionKey="id" from="${TaskType.list()}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> 180 <g:select optionKey="id" 181 from="${TaskType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 182 name="taskType.id" 183 value="${taskInstance?.taskType?.id}" > 184 </g:select> 166 185 </td> 167 186 </tr>
Note: See TracChangeset
for help on using the changeset viewer.