- Timestamp:
- Nov 5, 2009, 4:01:35 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r180 r181 11 11 def exportService 12 12 13 // the delete, save and update actions only accept POST requests14 static allowedMethods = [ delete:'POST', save:'POST', update:'POST']13 // these actions only accept POST requests 14 static allowedMethods = [save:'POST', update:'POST', restore:'POST', trash:'POST', approve:'POST', renegeApproval:'POST', complete:'POST', reopen:'POST'] 15 15 16 16 def index = { redirect(action:search,params:params) } … … 223 223 } 224 224 225 def delete = { 226 def taskInstance = Task.get( params.id ) 227 if(taskInstance) { 228 try { 229 taskInstance.isActive = false 230 flash.message = "Task ${params.id} has been set to inactive." 231 redirect(action:search) 232 } 233 catch(org.springframework.dao.DataIntegrityViolationException e) { 234 flash.message = "Task ${params.id} could not be deleted" 235 redirect(action:show,id:params.id) 236 } 237 } 238 else { 225 def restore = { 226 227 if(!Task.exists(params.id)) { 239 228 flash.message = "Task not found with id ${params.id}" 240 redirect(action:search) 241 } 229 redirect(action:'search') 230 } 231 232 def result = taskService.restore(params) 233 234 if(!result.error) { 235 flash.message = "Task ${params.id} has been restored." 236 redirect(action:show,id:result.taskInstance.id) 237 } 238 else { 239 if(result.taskInstance) { 240 render(view:'edit',model:[taskInstance:result.taskInstance]) 241 } 242 else { 243 flash.message = "Task could not be updated." 244 redirect(action:'search') 245 } 246 } 247 248 } 249 250 def trash = { 251 252 if(!Task.exists(params.id)) { 253 flash.message = "Task not found with id ${params.id}." 254 redirect(action:'search') 255 } 256 257 def result = taskService.trash(params) 258 259 if(!result.error) { 260 flash.message = "Task ${params.id} has been moved to trash." 261 redirect(action:'search') 262 } 263 else { 264 if(result.taskInstance) { 265 render(view:'edit',model:[taskInstance:result.taskInstance]) 266 } 267 else { 268 flash.message = "Task could not be updated." 269 redirect(action:'search') 270 } 271 } 272 273 } 274 275 def approve = { 276 277 if(!Task.exists(params.id)) { 278 flash.message = "Task not found with id ${params.id}." 279 redirect(action:'search') 280 } 281 282 def result = taskService.approve(params) 283 284 if(!result.error) { 285 flash.message = "Task ${params.id} has been approved." 286 redirect(action:show,id:result.taskInstance.id) 287 } 288 else { 289 if(result.taskInstance) { 290 render(view:'edit',model:[taskInstance:result.taskInstance]) 291 } 292 else { 293 flash.message = "Task could not be updated." 294 redirect(action:'search') 295 } 296 } 297 298 } 299 300 def renegeApproval = { 301 302 if(!Task.exists(params.id)) { 303 flash.message = "Task not found with id ${params.id}." 304 redirect(action:'search') 305 } 306 307 def result = taskService.renegeApproval(params) 308 309 if(!result.error) { 310 flash.message = "Task ${params.id} has had approval removed." 311 redirect(action:show,id:result.taskInstance.id) 312 } 313 else { 314 if(result.taskInstance) { 315 render(view:'edit',model:[taskInstance:result.taskInstance]) 316 } 317 else { 318 flash.message = "Task could not be updated." 319 redirect(action:'search') 320 } 321 } 322 323 } 324 325 def complete = { 326 327 if(!Task.exists(params.id)) { 328 flash.message = "Task not found with id ${params.id}." 329 redirect(action:'search') 330 } 331 332 def result = taskService.complete(params) 333 334 if(!result.error) { 335 flash.message = "Task ${params.id} has been completed." 336 redirect(action:show,id:result.taskInstance.id) 337 } 338 else { 339 if(result.taskInstance) { 340 render(view:'edit',model:[taskInstance:result.taskInstance]) 341 } 342 else { 343 flash.message = "Task could not be updated." 344 redirect(action:'search') 345 } 346 } 347 348 } 349 350 def reopen = { 351 352 if(!Task.exists(params.id)) { 353 flash.message = "Task not found with id ${params.id}." 354 redirect(action:'search') 355 } 356 357 def result = taskService.reopen(params) 358 359 if(!result.error) { 360 flash.message = "Task ${params.id} has been reopened." 361 redirect(action:show,id:result.taskInstance.id) 362 } 363 else { 364 if(result.taskInstance) { 365 render(view:'edit',model:[taskInstance:result.taskInstance]) 366 } 367 else { 368 flash.message = "Task could not be updated." 369 redirect(action:'search') 370 } 371 } 372 242 373 } 243 374 … … 255 386 } 256 387 else { 388 if(taskInstance.trash) { 389 flash.message = "You may not edit items in the trash." 390 redirect(action:show,id:taskInstance.id) 391 } 257 392 def criteria = taskInstance.createCriteria() 258 393 def possibleParentList = criteria { … … 320 455 def create = { 321 456 def taskInstance = new Task() 457 // Default leadPerson to current user. 458 taskInstance.leadPerson = Person.get(authenticateService.userDomain().id) 322 459 taskInstance.properties = params 323 460 return ['taskInstance':taskInstance] -
trunk/grails-app/domain/Task.groovy
r168 r181 15 15 Date targetStartDate = new Date() 16 16 Date targetCompletionDate = new Date() 17 boolean isScheduled = false18 boolean isApproved = false19 boolean isActive = true17 boolean scheduled = false 18 boolean approved = false 19 boolean trash = false 20 20 21 21 static hasMany = [entries: Entry, -
trunk/grails-app/i18n/messages.properties
r180 r181 114 114 fp.property.text.associatedAssets.name=Associated Asset 115 115 fp.property.text.primaryAsset.name=Primary Asset 116 fp.property.text. isActive=Active117 fp.property.text. isScheduled=Scheduled118 fp.property.text. isApproved=Approved116 fp.property.text.trash=Trash 117 fp.property.text.scheduled=Scheduled 118 fp.property.text.approved=Approved 119 119 fp.property.text.isObsolete=Obsolete 120 120 fp.property.text.taskGroup.name=Group -
trunk/grails-app/services/CreateDataService.groovy
r180 r181 410 410 def taskStatusInstance 411 411 412 taskStatusInstance = new TaskStatus(name:"Not Started") 412 taskStatusInstance = new TaskStatus(name:"Not Started") // #1 413 413 saveAndTest(taskStatusInstance) 414 414 415 taskStatusInstance = new TaskStatus(name:"In Progress") 415 taskStatusInstance = new TaskStatus(name:"In Progress") // #2 416 416 saveAndTest(taskStatusInstance) 417 417 418 taskStatusInstance = new TaskStatus(name:"Completed") 418 taskStatusInstance = new TaskStatus(name:"Completed") // #3 419 419 saveAndTest(taskStatusInstance) 420 420 } -
trunk/grails-app/services/TaskSearchService.groovy
r180 r181 19 19 ge("targetStartDate", dateUtilService.getToday()) 20 20 lt("targetStartDate", dateUtilService.getTomorrow()) 21 eq(" isActive", true)21 eq("trash", false) 22 22 } 23 23 } … … 37 37 ge("targetStartDate", dateUtilService.getToday()) 38 38 lt("targetStartDate", dateUtilService.getTomorrow()) 39 eq(" isActive", true)39 eq("trash", false) 40 40 } 41 41 } … … 54 54 ge("targetStartDate", dateUtilService.getToday()-7) 55 55 lt("targetStartDate", dateUtilService.getTomorrow()) 56 eq(" isActive", true)56 eq("trash", false) 57 57 } 58 58 } … … 72 72 ge("targetStartDate", dateUtilService.getToday()-7) 73 73 lt("targetStartDate", dateUtilService.getTomorrow()) 74 eq(" isActive", true)74 eq("trash", false) 75 75 } 76 76 } … … 90 90 ge("targetStartDate", dateUtilService.getToday()-7) 91 91 lt("targetStartDate", dateUtilService.getTomorrow()) 92 eq(" isActive", true)92 eq("trash", false) 93 93 } 94 94 } … … 108 108 ge("targetStartDate", dateUtilService.getToday()-7) 109 109 lt("targetStartDate", dateUtilService.getTomorrow()) 110 eq(" isActive", true)110 eq("trash", false) 111 111 } 112 112 } -
trunk/grails-app/services/TaskService.groovy
r180 r181 9 9 Task.withTransaction { status -> 10 10 def result = [:] 11 // Default status to "not started" if not supplied. 12 params.taskStatus = params.taskStatus ?: TaskStatus.get(1) 11 13 def taskInstance = new Task(params) 12 14 result.taskInstance = taskInstance … … 59 61 } 60 62 61 62 63 result.taskInstance.properties = params 63 64 … … 86 87 } // end update() 87 88 88 def complete() { 89 //TaskModificationType.get(4) 89 def complete(params) { 90 Task.withTransaction { status -> 91 def result = [:] 92 result.taskInstance = Task.get(params.id) 93 if(result.taskInstance) { 94 95 // Optimistic locking check. 96 if(params.version) { 97 def version = params.version.toLong() 98 if(result.taskInstance.version > version) { 99 status.setRollbackOnly() 100 result.taskInstance.errors.rejectValue("version", "task.optimistic.locking.failure", "Another user has updated this Task while you were editing.") 101 result.error = true 102 return result 103 } 104 } 105 106 result.taskInstance.taskStatus = TaskStatus.get(3) 107 108 if(result.taskInstance.save()) { 109 def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id), 110 taskModificationType: TaskModificationType.get(4), 111 task: result.taskInstance) 112 if(taskModification.save()) { 113 // All went well. 114 return result 115 } 116 else { 117 status.setRollbackOnly() 118 result.taskInstance.errors.rejectValue("taskModifications", "task.modifications.failedToSave") 119 result.error = true 120 return result 121 } 122 } 123 } 124 // Something failed. 125 status.setRollbackOnly() 126 result.error = true 127 return result 128 129 } //end withTransaction 90 130 } // end complete() 91 131 92 def reopen() { 93 //TaskModificationType.get(5) 132 def reopen(params) { 133 Task.withTransaction { status -> 134 def result = [:] 135 result.taskInstance = Task.get(params.id) 136 if(result.taskInstance) { 137 138 // Optimistic locking check. 139 if(params.version) { 140 def version = params.version.toLong() 141 if(result.taskInstance.version > version) { 142 status.setRollbackOnly() 143 result.taskInstance.errors.rejectValue("version", "task.optimistic.locking.failure", "Another user has updated this Task while you were editing.") 144 result.error = true 145 return result 146 } 147 } 148 149 result.taskInstance.taskStatus = TaskStatus.get(2) 150 151 if(result.taskInstance.save()) { 152 def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id), 153 taskModificationType: TaskModificationType.get(5), 154 task: result.taskInstance) 155 if(taskModification.save()) { 156 // All went well. 157 return result 158 } 159 else { 160 status.setRollbackOnly() 161 result.taskInstance.errors.rejectValue("taskModifications", "task.modifications.failedToSave") 162 result.error = true 163 return result 164 } 165 } 166 } 167 // Something failed. 168 status.setRollbackOnly() 169 result.error = true 170 return result 171 172 } //end withTransaction 94 173 } // end reopen() 95 174 96 def trash() { 97 //TaskModificationType.get(6) 175 def trash(params) { 176 Task.withTransaction { status -> 177 def result = [:] 178 result.taskInstance = Task.get(params.id) 179 if(result.taskInstance) { 180 181 // Optimistic locking check. 182 if(params.version) { 183 def version = params.version.toLong() 184 if(result.taskInstance.version > version) { 185 status.setRollbackOnly() 186 result.taskInstance.errors.rejectValue("version", "task.optimistic.locking.failure", "Another user has updated this Task while you were editing.") 187 result.error = true 188 return result 189 } 190 } 191 192 result.taskInstance.trash = true 193 194 if(result.taskInstance.save()) { 195 def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id), 196 taskModificationType: TaskModificationType.get(6), 197 task: result.taskInstance) 198 if(taskModification.save()) { 199 // All went well. 200 return result 201 } 202 else { 203 status.setRollbackOnly() 204 result.taskInstance.errors.rejectValue("taskModifications", "task.modifications.failedToSave") 205 result.error = true 206 return result 207 } 208 } 209 } 210 // Something failed. 211 status.setRollbackOnly() 212 result.error = true 213 return result 214 215 } //end withTransaction 98 216 } // end trash() 99 217 100 def restore() { 101 //TaskModificationType.get(7) 218 def restore(params) { 219 Task.withTransaction { status -> 220 def result = [:] 221 result.taskInstance = Task.get(params.id) 222 if(result.taskInstance) { 223 224 // Optimistic locking check. 225 if(params.version) { 226 def version = params.version.toLong() 227 if(result.taskInstance.version > version) { 228 status.setRollbackOnly() 229 result.taskInstance.errors.rejectValue("version", "task.optimistic.locking.failure", "Another user has updated this Task while you were editing.") 230 result.error = true 231 return result 232 } 233 } 234 235 result.taskInstance.trash = false 236 237 if(result.taskInstance.save()) { 238 def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id), 239 taskModificationType: TaskModificationType.get(7), 240 task: result.taskInstance) 241 if(taskModification.save()) { 242 // All went well. 243 return result 244 } 245 else { 246 status.setRollbackOnly() 247 result.taskInstance.errors.rejectValue("taskModifications", "task.modifications.failedToSave") 248 result.error = true 249 return result 250 } 251 } 252 } 253 // Something failed. 254 status.setRollbackOnly() 255 result.error = true 256 return result 257 258 } //end withTransaction 102 259 } // end restore() 103 260 104 def approve() { 105 //TaskModificationType.get(8) 261 def approve(params) { 262 Task.withTransaction { status -> 263 def result = [:] 264 result.taskInstance = Task.get(params.id) 265 if(result.taskInstance) { 266 267 // Optimistic locking check. 268 if(params.version) { 269 def version = params.version.toLong() 270 if(result.taskInstance.version > version) { 271 status.setRollbackOnly() 272 result.taskInstance.errors.rejectValue("version", "task.optimistic.locking.failure", "Another user has updated this Task while you were editing.") 273 result.error = true 274 return result 275 } 276 } 277 278 result.taskInstance.approved = true 279 280 if(result.taskInstance.save()) { 281 def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id), 282 taskModificationType: TaskModificationType.get(8), 283 task: result.taskInstance) 284 if(taskModification.save()) { 285 // All went well. 286 return result 287 } 288 else { 289 status.setRollbackOnly() 290 result.taskInstance.errors.rejectValue("taskModifications", "task.modifications.failedToSave") 291 result.error = true 292 return result 293 } 294 } 295 } 296 // Something failed. 297 status.setRollbackOnly() 298 result.error = true 299 return result 300 301 } //end withTransaction 106 302 } // end approve() 107 303 108 def renegeApproval() { 109 //TaskModificationType.get(9) 304 def renegeApproval(params) { 305 Task.withTransaction { status -> 306 def result = [:] 307 result.taskInstance = Task.get(params.id) 308 if(result.taskInstance) { 309 310 // Optimistic locking check. 311 if(params.version) { 312 def version = params.version.toLong() 313 if(result.taskInstance.version > version) { 314 status.setRollbackOnly() 315 result.taskInstance.errors.rejectValue("version", "task.optimistic.locking.failure", "Another user has updated this Task while you were editing.") 316 result.error = true 317 return result 318 } 319 } 320 321 result.taskInstance.approved = false 322 323 if(result.taskInstance.save()) { 324 def taskModification = new TaskModification(person:Person.get(authenticateService.userDomain().id), 325 taskModificationType: TaskModificationType.get(9), 326 task: result.taskInstance) 327 if(taskModification.save()) { 328 // All went well. 329 return result 330 } 331 else { 332 status.setRollbackOnly() 333 result.taskInstance.errors.rejectValue("taskModifications", "task.modifications.failedToSave") 334 result.error = true 335 return result 336 } 337 } 338 } 339 // Something failed. 340 status.setRollbackOnly() 341 result.error = true 342 return result 343 344 } //end withTransaction 110 345 } // end renegeApproval() 111 346 -
trunk/grails-app/views/_about.gsp
r152 r181 63 63 <tbody> 64 64 <tr class="prop"> 65 <td valign="top" class="name">Silk icon set acknowledgement.</td> 66 <td></td> 65 <td valign="top" class="name"> 66 Silk icon set acknowledgement.<br /> 67 Many thanks for the fabulous silk icon set. 68 </td> 69 67 70 68 71 </tr> -
trunk/grails-app/views/task/create.gsp
r178 r181 127 127 <tr class="prop"> 128 128 <td valign="top" class="name"> 129 <label for=" isActive">Is Active:</label>129 <label for="approved">Approved:</label> 130 130 </td> 131 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:' isActive','errors')}">132 <g:checkBox name=" isActive" value="${taskInstance?.isActive}" ></g:checkBox>131 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'approved','errors')}"> 132 <g:checkBox name="approved" value="${taskInstance?.approved}" ></g:checkBox> 133 133 </td> 134 134 </tr> … … 136 136 <tr class="prop"> 137 137 <td valign="top" class="name"> 138 <label for=" isApproved">Is Approved:</label>138 <label for="scheduled">Scheduled:</label> 139 139 </td> 140 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isApproved','errors')}"> 141 <g:checkBox name="isApproved" value="${taskInstance?.isApproved}" ></g:checkBox> 142 </td> 143 </tr> 144 145 <tr class="prop"> 146 <td valign="top" class="name"> 147 <label for="isScheduled">Is Scheduled:</label> 148 </td> 149 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> 150 <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> 140 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}"> 141 <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox> 151 142 </td> 152 143 </tr> … … 170 161 </tr> 171 162 163 <tr class="prop"> 164 <td valign="top" class="name"> 165 <label for="trash">Trash:</label> 166 </td> 167 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'trash','errors')}"> 168 <g:checkBox name="trash" value="${taskInstance?.trash}" ></g:checkBox> 169 </td> 170 </tr> 171 172 172 </tbody> 173 173 </table> -
trunk/grails-app/views/task/edit.gsp
r178 r181 130 130 <tr class="prop"> 131 131 <td valign="top" class="name"> 132 <label for="approved">Approved:</label> 133 </td> 134 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'approved','errors')}"> 135 <g:checkBox name="approved" value="${taskInstance?.approved}" ></g:checkBox> 136 </td> 137 </tr> 138 139 <tr class="prop"> 140 <td valign="top" class="name"> 132 141 <label for="assignedPersons">Assigned Persons:</label> 133 142 </td> … … 191 200 <tr class="prop"> 192 201 <td valign="top" class="name"> 193 <label for="isActive">Is Active:</label> 194 </td> 195 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isActive','errors')}"> 196 <g:checkBox name="isActive" value="${taskInstance?.isActive}" ></g:checkBox> 197 </td> 198 </tr> 199 200 <tr class="prop"> 201 <td valign="top" class="name"> 202 <label for="isApproved">Is Approved:</label> 203 </td> 204 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isApproved','errors')}"> 205 <g:checkBox name="isApproved" value="${taskInstance?.isApproved}" ></g:checkBox> 206 </td> 207 </tr> 208 209 <tr class="prop"> 210 <td valign="top" class="name"> 211 <label for="isScheduled">Is Scheduled:</label> 212 </td> 213 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> 214 <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> 202 <label for="scheduled">Scheduled:</label> 203 </td> 204 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}"> 205 <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox> 215 206 </td> 216 207 </tr> … … 263 254 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}"> 264 255 <g:select optionKey="id" from="${TaskType.list()}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select> 256 </td> 257 </tr> 258 259 <tr class="prop"> 260 <td valign="top" class="name"> 261 <label for="trash">Trash:</label> 262 </td> 263 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'trash','errors')}"> 264 <g:checkBox name="trash" value="${taskInstance?.trash}" ></g:checkBox> 265 265 </td> 266 266 </tr> -
trunk/grails-app/views/task/show.gsp
r178 r181 107 107 108 108 <tr class="prop"> 109 <td valign="top" class="name">Approved:</td> 110 111 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'approved')}</td> 112 113 </tr> 114 115 <tr class="prop"> 109 116 <td valign="top" class="name">Assigned Persons:</td> 110 117 … … 159 166 160 167 <tr class="prop"> 161 <td valign="top" class="name">Is Active:</td> 162 163 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'isActive')}</td> 164 165 </tr> 166 167 <tr class="prop"> 168 <td valign="top" class="name">Is Approved:</td> 169 170 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'isApproved')}</td> 171 172 </tr> 173 174 <tr class="prop"> 175 <td valign="top" class="name">Is Scheduled:</td> 176 177 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'isScheduled')}</td> 168 <td valign="top" class="name">Scheduled:</td> 169 170 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'scheduled')}</td> 178 171 179 172 </tr> … … 216 209 217 210 <td valign="top" class="value"><g:link controller="taskType" action="show" id="${taskInstance?.taskType?.id}">${taskInstance?.taskType?.encodeAsHTML()}</g:link></td> 211 212 </tr> 213 214 <tr class="prop"> 215 <td valign="top" class="name">Trash:</td> 216 217 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'trash')}</td> 218 218 219 219 </tr> -
trunk/grails-app/views/taskDetailed/create.gsp
r180 r181 106 106 <g:select optionKey="id" from="${TaskPriority.list()}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select> 107 107 </td> 108 </tr> 108 </tr> 109 109 110 110 <tr class="prop"> 111 111 <td valign="top" class="name"> 112 <label for=" taskStatus">Task Status:</label>112 <label for="scheduled">Scheduled:</label> 113 113 </td> 114 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskStatus','errors')}"> 115 <g:select optionKey="id" from="${TaskStatus.list()}" name="taskStatus.id" value="${taskInstance?.taskStatus?.id}" ></g:select> 116 </td> 117 </tr> 118 119 <tr class="prop"> 120 <td valign="top" class="name"> 121 <label for="isActive">Is Active:</label> 122 </td> 123 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isActive','errors')}"> 124 <g:checkBox name="isActive" value="${taskInstance?.isActive}" ></g:checkBox> 125 </td> 126 </tr> 127 128 <tr class="prop"> 129 <td valign="top" class="name"> 130 <label for="isApproved">Is Approved:</label> 131 </td> 132 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isApproved','errors')}"> 133 <g:checkBox name="isApproved" value="${taskInstance?.isApproved}" ></g:checkBox> 134 </td> 135 </tr> 136 137 <tr class="prop"> 138 <td valign="top" class="name"> 139 <label for="isScheduled">Is Scheduled:</label> 140 </td> 141 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> 142 <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> 114 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}"> 115 <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox> 143 116 </td> 144 117 </tr> -
trunk/grails-app/views/taskDetailed/edit.gsp
r168 r181 114 114 <tr class="prop"> 115 115 <td valign="top" class="name"> 116 <label for=" taskStatus">Task Status:</label>116 <label for="scheduled">Scheduled:</label> 117 117 </td> 118 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskStatus','errors')}"> 119 <g:select optionKey="id" from="${TaskStatus.list()}" name="taskStatus.id" value="${taskInstance?.taskStatus?.id}" ></g:select> 120 </td> 121 </tr> 122 123 <tr class="prop"> 124 <td valign="top" class="name"> 125 <label for="isActive">Is Active:</label> 126 </td> 127 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isActive','errors')}"> 128 <g:checkBox name="isActive" value="${taskInstance?.isActive}" ></g:checkBox> 129 </td> 130 </tr> 131 132 <tr class="prop"> 133 <td valign="top" class="name"> 134 <label for="isApproved">Is Approved:</label> 135 </td> 136 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isApproved','errors')}"> 137 <g:checkBox name="isApproved" value="${taskInstance?.isApproved}" ></g:checkBox> 138 </td> 139 </tr> 140 141 <tr class="prop"> 142 <td valign="top" class="name"> 143 <label for="isScheduled">Is Scheduled:</label> 144 </td> 145 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> 146 <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> 118 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduled','errors')}"> 119 <g:checkBox name="scheduled" value="${taskInstance?.scheduled}" ></g:checkBox> 147 120 </td> 148 121 </tr> … … 181 154 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'assignedPersons','errors')}"> 182 155 183 <ul> 184 <g:each var="a" in="${taskInstance?.assignedPersons?}"> 185 <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 186 </g:each> 187 </ul> 188 <g:link controller="assignedPersonDetailed" params="['task.id':taskInstance?.id]" action="create">Add AssignedPerson</g:link> 156 <ul> 157 <g:each var="a" in="${taskInstance?.assignedPersons?}"> 158 <li><g:link controller="assignedPersonDetailed" action="edit" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 159 </g:each> 160 </ul> 189 161 190 162 </td> 191 </tr> 163 </tr> 192 164 193 194 195 165 </tbody> 196 166 </table> … … 198 168 <div class="buttons"> 199 169 <span class="button"><g:actionSubmit class="save" value="Update" /></span> 200 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 170 <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="show"/></span> 171 <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> 201 172 </div> 202 173 </g:form> -
trunk/grails-app/views/taskDetailed/searchCalendar.gsp
r155 r181 44 44 class="overlayPane" 45 45 additionalProperties="id" 46 excludeProperties=" isActive, comment, targetCompletionDate"46 excludeProperties="trash, comment, targetCompletionDate" 47 47 associatedProperties="leadPerson.lastName, taskPriority.name" 48 48 filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()], -
trunk/grails-app/views/taskDetailed/show.gsp
r180 r181 16 16 <div class="message">${flash.message}</div> 17 17 </g:if> 18 <g:if test="${taskInstance.trash}" > 19 <div class="errors"> 20 This task is in the trash bin, but can be restored if required. 21 </div> 22 </g:if> 18 23 <g:hasErrors bean="${taskInstance}"> 19 24 <div class="errors"> … … 75 80 showElement('modControlOpened'); 76 81 hideElement('modControlClosed'); return false;"> 77 Modifications <img src="${resource(dir:'images/skin',file:' sorted_asc.gif')}" alt="Show" />82 Modifications <img src="${resource(dir:'images/skin',file:'bullet_toggle_plus.png')}" alt="Show" /> 78 83 </a> 79 84 </div> … … 83 88 showElement('modControlClosed'); 84 89 return false;"> 85 Modifications <img src="${resource(dir:'images/skin',file:' sorted_desc.gif')}" alt="Show" />90 Modifications <img src="${resource(dir:'images/skin',file:'bullet_toggle_minus.png')}" alt="Show" /> 86 91 </a> 87 92 </div> … … 142 147 143 148 <tr class="prop"> 144 <td valign="top" class="name">Active:</td>145 146 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'isActive')}</td>147 148 </tr>149 150 <tr class="prop">151 149 <td valign="top" class="name">Approved:</td> 152 150 153 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:' isApproved')}</td>151 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'approved')}</td> 154 152 155 153 </tr> … … 158 156 <td valign="top" class="name">Scheduled:</td> 159 157 160 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:' isScheduled')}</td>158 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'scheduled')}</td> 161 159 162 160 </tr> … … 204 202 <g:form> 205 203 <input type="hidden" name="id" value="${taskInstance?.id}" /> 206 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 207 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> 204 205 <g:if test="${taskInstance.trash}" > 206 <span class="button"><g:actionSubmit class="restore" onclick="return confirm('Are you sure?');" value="Restore" /></span> 207 </g:if> 208 <g:else> 209 210 <g:if test="${taskInstance.taskStatus.id != 3}" > 211 <span class="button"><g:actionSubmit class="complete" value="Complete" /></span> 212 213 <g:if test="${taskInstance.approved}" > 214 <span class="button"><g:actionSubmit class="renegeApproval" value="Renege Approval" action="renegeApproval" /></span> 215 </g:if> 216 <g:else> 217 <span class="button"><g:actionSubmit class="approve" value="Approve" /></span> 218 </g:else> 219 220 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 221 <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> 222 223 </g:if> 224 <g:else> 225 <span class="button"><g:actionSubmit class="reopen" value="Reopen" /></span> 226 </g:else> 227 228 </g:else> 208 229 </g:form> 209 230 </div> … … 252 273 <th>Entered By</th> 253 274 <th></th> 254 255 <!-- <g:sortableColumn property="commentW" title="Comment" />256 257 <g:sortableColumn property="dateDoneW" title="Date Done" />258 259 <g:sortableColumn property="enteredByW" title="Entered By" />-->260 275 </tr> 261 276 </thead> -
trunk/web-app/css/main.css
r155 r181 344 344 .buttons input.delete { 345 345 background: transparent url(../images/skin/database_delete.png) 5px 50% no-repeat; 346 padding-left: 28px; 347 } 348 .buttons input.trash { 349 background: transparent url(../images/skin/bin_closed.png) 5px 50% no-repeat; 350 padding-left: 28px; 351 } 352 .buttons input.restore { 353 background: transparent url(../images/skin/bin_empty.png) 5px 50% no-repeat; 354 padding-left: 28px; 355 } 356 .buttons input.cancel { 357 background: transparent url(../images/skin/cross.png) 5px 50% no-repeat; 358 padding-left: 28px; 359 } 360 .buttons input.complete { 361 background: transparent url(../images/skin/tick.png) 5px 50% no-repeat; 362 padding-left: 28px; 363 } 364 .buttons input.reopen { 365 background: transparent url(../images/skin/door_open.png) 5px 50% no-repeat; 366 padding-left: 28px; 367 } 368 .buttons input.approve { 369 background: transparent url(../images/skin/database_gear.png) 5px 50% no-repeat; 370 padding-left: 28px; 371 } 372 .buttons input.renegeApproval { 373 background: transparent url(../images/skin/cog_delete.png) 5px 50% no-repeat; 346 374 padding-left: 28px; 347 375 }
Note: See TracChangeset
for help on using the changeset viewer.