- Timestamp:
- May 1, 2009, 3:27:41 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 39 added
- 2 deleted
- 78 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r120 r122 33 33 println "BootStrapping demo data..." 34 34 35 /******************* 36 START OF TASK 37 38 *******************/ 35 /*********************** 36 START OF UTILITIES 37 ***********************/ 38 39 //Site 40 def siteInstance 41 42 siteInstance = new Site(name: "Creek Mill") 43 BootStrapSaveAndTest(siteInstance) 44 45 siteInstance = new Site(name: "Jasper Street Depot") 46 BootStrapSaveAndTest(siteInstance) 47 48 //UnitOfMeasure 49 def unitOfMeasureInstance 50 51 //UnitOfMeasure #1 52 unitOfMeasureInstance = new UnitOfMeasure(name: "each") 53 BootStrapSaveAndTest(unitOfMeasureInstance) 54 55 //UnitOfMeasure #2 56 unitOfMeasureInstance = new UnitOfMeasure(name: "meter(s)") 57 BootStrapSaveAndTest(unitOfMeasureInstance) 58 59 //UnitOfMeasure #3 60 unitOfMeasureInstance = new UnitOfMeasure(name: "box(es)") 61 BootStrapSaveAndTest(unitOfMeasureInstance) 62 63 //UnitOfMeasure #4 64 unitOfMeasureInstance = new UnitOfMeasure(name: "litre(s)") 65 BootStrapSaveAndTest(unitOfMeasureInstance) 66 67 //UnitOfMeasure #5 68 unitOfMeasureInstance = new UnitOfMeasure(name: "kilogram(s)") 69 BootStrapSaveAndTest(unitOfMeasureInstance) 70 71 //Period 72 def periodInstance 73 74 //Period #1 75 periodInstance = new Period(period: "Day(s)") 76 BootStrapSaveAndTest(periodInstance) 77 78 //Period #2 79 periodInstance = new Period(period: "Week(s)") 80 BootStrapSaveAndTest(periodInstance) 81 82 //Period #3 83 periodInstance = new Period(period: "Month(s)") 84 BootStrapSaveAndTest(periodInstance) 85 86 //Period #4 87 periodInstance = new Period(period: "Year(s)") 88 BootStrapSaveAndTest(periodInstance) 89 90 /********************* 91 START OF PERSON 92 *********************/ 39 93 40 94 //TypeOfPersonGroup … … 154 208 personInstance.addToPersonGroups(PersonGroup.findByName("Production")) 155 209 210 /********************* 211 START OF TASK 212 *********************/ 213 156 214 //TaskGroup 157 215 def taskGroupInstance … … 351 409 BootStrapSaveAndTest(assignedPersonInstance) 352 410 353 /******************* 411 //RecurringSchedule 412 def recurringScheduleInstance 413 414 //RecurringSchedule #1 415 recurringScheduleInstance = new RecurringSchedule(recurEvery: 1, 416 period: Period.get(1), 417 task: Task.get(1)) 418 BootStrapSaveAndTest(recurringScheduleInstance) 419 420 /************************* 354 421 START OF INVENTORY 355 356 *******************/ 357 358 //Site 359 def siteInstance 360 361 siteInstance = new Site(name: "Creek Mill") 362 BootStrapSaveAndTest(siteInstance) 363 364 siteInstance = new Site(name: "Jasper Street Depot") 365 BootStrapSaveAndTest(siteInstance) 422 **************************/ 366 423 367 424 //InventoryStore … … 382 439 storeLocation = new StoreLocation(inventoryStore: InventoryStore.get(1), bin: "C55") 383 440 BootStrapSaveAndTest(storeLocation) 384 385 //UnitOfMeasure386 def unitOfMeasureInstance387 388 //UnitOfMeasure #1389 unitOfMeasureInstance = new UnitOfMeasure(name: "each")390 BootStrapSaveAndTest(unitOfMeasureInstance)391 392 //UnitOfMeasure #2393 unitOfMeasureInstance = new UnitOfMeasure(name: "meter(s)")394 BootStrapSaveAndTest(unitOfMeasureInstance)395 396 //UnitOfMeasure #3397 unitOfMeasureInstance = new UnitOfMeasure(name: "box(es)")398 BootStrapSaveAndTest(unitOfMeasureInstance)399 400 //UnitOfMeasure #4401 unitOfMeasureInstance = new UnitOfMeasure(name: "litre(s)")402 BootStrapSaveAndTest(unitOfMeasureInstance)403 404 //UnitOfMeasure #5405 unitOfMeasureInstance = new UnitOfMeasure(name: "kilogram(s)")406 BootStrapSaveAndTest(unitOfMeasureInstance)407 441 408 442 //InventoryGroup … … 518 552 /******************* 519 553 START OF ASSET 520 521 554 *******************/ 522 523 //Frequency524 def frequencyInstance525 526 //Frequency #1527 frequencyInstance = new Frequency(frequency: "Day(s)")528 BootStrapSaveAndTest(frequencyInstance)529 530 //Frequency #2531 frequencyInstance = new Frequency(frequency: "Week(s)")532 BootStrapSaveAndTest(frequencyInstance)533 534 //Frequency #3535 frequencyInstance = new Frequency(frequency: "Month(s)")536 BootStrapSaveAndTest(frequencyInstance)537 538 //Frequency #4539 frequencyInstance = new Frequency(frequency: "Year(s)")540 BootStrapSaveAndTest(frequencyInstance)541 555 542 556 //LifePlan 543 557 def lifeplanInstance 544 558 545 lifeplanInstance = new LifePlan(name: "Initial Plan", 546 timeInHours: 1, 547 maintenanceAction: "Visual inspection") 559 lifeplanInstance = new LifePlan(name: "Initial Plan") 548 560 BootStrapSaveAndTest(lifeplanInstance) 549 561 550 //Form 551 def formInstance 552 553 formInstance = new Form(name: "Form 1") 554 BootStrapSaveAndTest(formInstance) 555 562 //MaintenancePolicy 563 def maintenancePolicyInstance 564 565 //MaintenancePolicy #1 566 maintenancePolicyInstance = new MaintenancePolicy(name: "Fixed Time") 567 BootStrapSaveAndTest(maintenancePolicyInstance) 568 569 //PlannedMaintenance 570 def plannedMaintenanceInstance 571 572 //PM #1 573 plannedMaintenanceInstance = new PlannedMaintenance(name: "PM1", 574 recurringSchedule: RecurringSchedule.get(1)) 575 BootStrapSaveAndTest(plannedMaintenanceInstance) 576 577 //MaintenanceAction 578 def maintenanceActionInstance 579 580 maintenanceActionInstance = new MaintenanceAction(description: "Do this", 581 maintenancePolicy: MaintenancePolicy.get(1), 582 plannedMaintenance: PlannedMaintenance.get(1)) 583 BootStrapSaveAndTest(maintenanceActionInstance) 584 556 585 //SystemSection 557 586 def systemSectionInstance 558 587 559 588 systemSectionInstance = new SystemSection(name: "Press Section", 560 lifeplan: LifePlan.get(1))589 site: Site.get(1)) 561 590 BootStrapSaveAndTest(systemSectionInstance) 562 591 563 592 //AssetType 564 593 def assetTypeInstance 565 assetTypeInstance = new AssetType(name: "Folder", 566 lifeplan: LifePlan.get(1),567 systemSection: SystemSection.get(1))594 595 //AssetType #1 596 assetTypeInstance = new AssetType(name: "Folder") 568 597 BootStrapSaveAndTest(assetTypeInstance) 569 598 570 assetTypeInstance = new AssetType(name: "Print Unit", 571 lifeplan: LifePlan.get(1), 572 systemSection: SystemSection.get(1)) 599 //AssetType #2 600 assetTypeInstance = new AssetType(name: "Print Unit") 573 601 BootStrapSaveAndTest(assetTypeInstance) 602 603 //AssetExtendedAttributeType 604 def assetExtendedAttributeInstanceType 605 606 assetExtendedAttributeInstanceType = new AssetExtendedAttributeType(name: "Model Number") 607 BootStrapSaveAndTest(assetExtendedAttributeInstanceType) 608 609 //AssetExtendedAttribute 610 def assetExtendedAttributeInstance 611 612 //AssetExtendedAttribute #1 613 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "mark 2", 614 assetType: AssetType.get(1), 615 assetExtendedAttributeType: AssetExtendedAttributeType.get(1)) 616 BootStrapSaveAndTest(assetExtendedAttributeInstance) 574 617 575 618 //Assembly 576 619 def assemblyInstance 577 assemblyInstance = new Assembly(name: "Delivery Belts", 578 lifeplan: LifePlan.get(1)) 620 621 //Assembly #1 622 assemblyInstance = new Assembly(name: "Delivery Belts") 579 623 BootStrapSaveAndTest(assemblyInstance) 580 624 // assemblyInstance.addToMaintenanceActions(MaintenanceAction.get(1)) 625 626 //Assembly #2 581 627 assemblyInstance = new Assembly(name: "Print Couple", 582 628 lifeplan: LifePlan.get(1)) … … 585 631 //SubAssembly 586 632 def subAssemblyInstance 587 subAssemblyInstance = new SubAssembly(name: "Centre Belt", 588 lifeplan: LifePlan.get(1)) 633 634 //SubAssembly #1 635 subAssemblyInstance = new SubAssembly(name: "Centre Belt") 589 636 BootStrapSaveAndTest(subAssemblyInstance) 637 638 //SubAssembly #2 639 subAssemblyInstance = new SubAssembly(name: "Form Roller") 640 BootStrapSaveAndTest(subAssemblyInstance) 641 642 //ComponentItem 643 def componentItemInstance 590 644 591 subAssemblyInstance = new SubAssembly(name: "Form Roller", 592 lifeplan: LifePlan.get(1)) 593 BootStrapSaveAndTest(subAssemblyInstance) 594 595 //ComponentItem 596 def componentItemInstance 597 componentItemInstance = new ComponentItem(name: "Centre Pulley", 598 fmeaNumber: 1, 599 lifeplan: LifePlan.get(1)) 600 BootStrapSaveAndTest(componentItemInstance) 601 602 componentItemInstance = new ComponentItem(name: "Bearing", 603 fmeaNumber: 1, 604 lifeplan: LifePlan.get(1)) 605 BootStrapSaveAndTest(componentItemInstance) 645 //ComponentItem #1 646 componentItemInstance = new ComponentItem(name: "Centre Pulley") 647 BootStrapSaveAndTest(componentItemInstance) 648 649 //ComponentItem #2 650 componentItemInstance = new ComponentItem(name: "Bearing") 651 BootStrapSaveAndTest(componentItemInstance) 606 652 607 653 … … 611 657 //Asset #1 612 658 assetInstance = new Asset(name: "Print Unit 23", 613 lifeplan: LifePlan.get(1),614 659 assetType: AssetType.get(1), 615 riskPriorityNumber: 1)660 systemSection: SystemSection.get(1)) 616 661 BootStrapSaveAndTest(assetInstance) 617 662 -
trunk/grails-app/controllers/EntryController.groovy
r116 r122 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ entryInstanceList: Entry.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ entryInstanceList: Entry.list( params ), entryInstanceTotal: Entry.count() ] 13 13 } 14 14 … … 26 26 def entryInstance = Entry.get( params.id ) 27 27 if(entryInstance) { 28 entryInstance.delete() 29 flash.message = "Entry ${params.id} deleted" 30 redirect(action:list) 28 try { 29 entryInstance.delete() 30 flash.message = "Entry ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "Entry ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def entryInstance = Entry.get( params.id ) 52 58 if(entryInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(entryInstance.version > version) { 62 63 entryInstance.errors.rejectValue("version", "entry.optimistic.locking.failure", "Another user has updated this Entry while you were editing.") 64 render(view:'edit',model:[entryInstance:entryInstance]) 65 return 66 } 67 } 53 68 entryInstance.properties = params 54 69 if(!entryInstance.hasErrors() && entryInstance.save()) { -
trunk/grails-app/controllers/EntryTypeController.groovy
r116 r122 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ entryTypeInstanceList: EntryType.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ entryTypeInstanceList: EntryType.list( params ), entryTypeInstanceTotal: EntryType.count() ] 13 13 } 14 14 … … 26 26 def entryTypeInstance = EntryType.get( params.id ) 27 27 if(entryTypeInstance) { 28 entryTypeInstance.delete() 29 flash.message = "EntryType ${params.id} deleted" 30 redirect(action:list) 28 try { 29 entryTypeInstance.delete() 30 flash.message = "EntryType ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "EntryType ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def entryTypeInstance = EntryType.get( params.id ) 52 58 if(entryTypeInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(entryTypeInstance.version > version) { 62 63 entryTypeInstance.errors.rejectValue("version", "entryType.optimistic.locking.failure", "Another user has updated this EntryType while you were editing.") 64 render(view:'edit',model:[entryTypeInstance:entryTypeInstance]) 65 return 66 } 67 } 53 68 entryTypeInstance.properties = params 54 69 if(!entryTypeInstance.hasErrors() && entryTypeInstance.save()) { -
trunk/grails-app/controllers/PeriodController.groovy
r120 r122 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class FrequencyController extends BaseAppAdminController {3 class PeriodController extends BaseAppAdminController { 4 4 5 5 def index = { redirect(action:list,params:params) } … … 10 10 def list = { 11 11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ frequencyInstanceList: Frequency.list( params ), frequencyInstanceTotal: Frequency.count() ]12 [ periodInstanceList: Period.list( params ), periodInstanceTotal: Period.count() ] 13 13 } 14 14 15 15 def show = { 16 def frequencyInstance = Frequency.get( params.id )16 def periodInstance = Period.get( params.id ) 17 17 18 if(! frequencyInstance) {19 flash.message = " Frequencynot found with id ${params.id}"18 if(!periodInstance) { 19 flash.message = "Period not found with id ${params.id}" 20 20 redirect(action:list) 21 21 } 22 else { return [ frequencyInstance : frequencyInstance ] }22 else { return [ periodInstance : periodInstance ] } 23 23 } 24 24 25 25 def delete = { 26 def frequencyInstance = Frequency.get( params.id )27 if( frequencyInstance) {26 def periodInstance = Period.get( params.id ) 27 if(periodInstance) { 28 28 try { 29 frequencyInstance.delete()30 flash.message = " Frequency${params.id} deleted"29 periodInstance.delete() 30 flash.message = "Period ${params.id} deleted" 31 31 redirect(action:list) 32 32 } 33 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = " Frequency${params.id} could not be deleted"34 flash.message = "Period ${params.id} could not be deleted" 35 35 redirect(action:show,id:params.id) 36 36 } 37 37 } 38 38 else { 39 flash.message = " Frequencynot found with id ${params.id}"39 flash.message = "Period not found with id ${params.id}" 40 40 redirect(action:list) 41 41 } … … 43 43 44 44 def edit = { 45 def frequencyInstance = Frequency.get( params.id )45 def periodInstance = Period.get( params.id ) 46 46 47 if(! frequencyInstance) {48 flash.message = " Frequencynot found with id ${params.id}"47 if(!periodInstance) { 48 flash.message = "Period not found with id ${params.id}" 49 49 redirect(action:list) 50 50 } 51 51 else { 52 return [ frequencyInstance : frequencyInstance ]52 return [ periodInstance : periodInstance ] 53 53 } 54 54 } 55 55 56 56 def update = { 57 def frequencyInstance = Frequency.get( params.id )58 if( frequencyInstance) {57 def periodInstance = Period.get( params.id ) 58 if(periodInstance) { 59 59 if(params.version) { 60 60 def version = params.version.toLong() 61 if( frequencyInstance.version > version) {61 if(periodInstance.version > version) { 62 62 63 frequencyInstance.errors.rejectValue("version", "frequency.optimistic.locking.failure", "Another user has updated this Frequencywhile you were editing.")64 render(view:'edit',model:[ frequencyInstance:frequencyInstance])63 periodInstance.errors.rejectValue("version", "period.optimistic.locking.failure", "Another user has updated this Period while you were editing.") 64 render(view:'edit',model:[periodInstance:periodInstance]) 65 65 return 66 66 } 67 67 } 68 frequencyInstance.properties = params69 if(! frequencyInstance.hasErrors() && frequencyInstance.save()) {70 flash.message = " Frequency${params.id} updated"71 redirect(action:show,id: frequencyInstance.id)68 periodInstance.properties = params 69 if(!periodInstance.hasErrors() && periodInstance.save()) { 70 flash.message = "Period ${params.id} updated" 71 redirect(action:show,id:periodInstance.id) 72 72 } 73 73 else { 74 render(view:'edit',model:[ frequencyInstance:frequencyInstance])74 render(view:'edit',model:[periodInstance:periodInstance]) 75 75 } 76 76 } 77 77 else { 78 flash.message = " Frequencynot found with id ${params.id}"78 flash.message = "Period not found with id ${params.id}" 79 79 redirect(action:edit,id:params.id) 80 80 } … … 82 82 83 83 def create = { 84 def frequencyInstance = new Frequency()85 frequencyInstance.properties = params86 return [' frequencyInstance':frequencyInstance]84 def periodInstance = new Period() 85 periodInstance.properties = params 86 return ['periodInstance':periodInstance] 87 87 } 88 88 89 89 def save = { 90 def frequencyInstance = new Frequency(params)91 if(! frequencyInstance.hasErrors() && frequencyInstance.save()) {92 flash.message = " Frequency ${frequencyInstance.id} created"93 redirect(action:show,id: frequencyInstance.id)90 def periodInstance = new Period(params) 91 if(!periodInstance.hasErrors() && periodInstance.save()) { 92 flash.message = "Period ${periodInstance.id} created" 93 redirect(action:show,id:periodInstance.id) 94 94 } 95 95 else { 96 render(view:'create',model:[ frequencyInstance:frequencyInstance])96 render(view:'create',model:[periodInstance:periodInstance]) 97 97 } 98 98 } -
trunk/grails-app/controllers/PersonGroupController.groovy
r116 r122 2 2 3 3 class PersonGroupController extends BaseAppAdminController { 4 4 5 5 def index = { redirect(action:list,params:params) } 6 6 … … 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ personGroupInstanceList: PersonGroup.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ personGroupInstanceList: PersonGroup.list( params ), personGroupInstanceTotal: PersonGroup.count() ] 13 13 } 14 14 … … 26 26 def personGroupInstance = PersonGroup.get( params.id ) 27 27 if(personGroupInstance) { 28 personGroupInstance.delete() 29 flash.message = "PersonGroup ${params.id} deleted" 30 redirect(action:list) 28 try { 29 personGroupInstance.delete() 30 flash.message = "PersonGroup ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "PersonGroup ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def personGroupInstance = PersonGroup.get( params.id ) 52 58 if(personGroupInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(personGroupInstance.version > version) { 62 63 personGroupInstance.errors.rejectValue("version", "personGroup.optimistic.locking.failure", "Another user has updated this PersonGroup while you were editing.") 64 render(view:'edit',model:[personGroupInstance:personGroupInstance]) 65 return 66 } 67 } 53 68 personGroupInstance.properties = params 54 69 if(!personGroupInstance.hasErrors() && personGroupInstance.save()) { -
trunk/grails-app/controllers/PersonGroupTypeController.groovy
r116 r122 2 2 3 3 class PersonGroupTypeController extends BaseAppAdminController { 4 4 5 5 def index = { redirect(action:list,params:params) } 6 6 … … 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ personGroupTypeInstanceList: PersonGroupType.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ personGroupTypeInstanceList: PersonGroupType.list( params ), personGroupTypeInstanceTotal: PersonGroupType.count() ] 13 13 } 14 14 … … 26 26 def personGroupTypeInstance = PersonGroupType.get( params.id ) 27 27 if(personGroupTypeInstance) { 28 personGroupTypeInstance.delete() 29 flash.message = "PersonGroupType ${params.id} deleted" 30 redirect(action:list) 28 try { 29 personGroupTypeInstance.delete() 30 flash.message = "PersonGroupType ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "PersonGroupType ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def personGroupTypeInstance = PersonGroupType.get( params.id ) 52 58 if(personGroupTypeInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(personGroupTypeInstance.version > version) { 62 63 personGroupTypeInstance.errors.rejectValue("version", "personGroupType.optimistic.locking.failure", "Another user has updated this PersonGroupType while you were editing.") 64 render(view:'edit',model:[personGroupTypeInstance:personGroupTypeInstance]) 65 return 66 } 67 } 53 68 personGroupTypeInstance.properties = params 54 69 if(!personGroupTypeInstance.hasErrors() && personGroupTypeInstance.save()) { -
trunk/grails-app/controllers/StoredItemController.groovy
r116 r122 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class StoredItemController extends BaseAppAdminController 3 class StoredItemController extends BaseAppAdminController { 4 4 5 5 def index = { redirect(action:list,params:params) } -
trunk/grails-app/controllers/TaskGroupController.groovy
r116 r122 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ taskGroupInstanceList: TaskGroup.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ taskGroupInstanceList: TaskGroup.list( params ), taskGroupInstanceTotal: TaskGroup.count() ] 13 13 } 14 14 … … 26 26 def taskGroupInstance = TaskGroup.get( params.id ) 27 27 if(taskGroupInstance) { 28 taskGroupInstance.delete() 29 flash.message = "TaskGroup ${params.id} deleted" 30 redirect(action:list) 28 try { 29 taskGroupInstance.delete() 30 flash.message = "TaskGroup ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "TaskGroup ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def taskGroupInstance = TaskGroup.get( params.id ) 52 58 if(taskGroupInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(taskGroupInstance.version > version) { 62 63 taskGroupInstance.errors.rejectValue("version", "taskGroup.optimistic.locking.failure", "Another user has updated this TaskGroup while you were editing.") 64 render(view:'edit',model:[taskGroupInstance:taskGroupInstance]) 65 return 66 } 67 } 53 68 taskGroupInstance.properties = params 54 69 if(!taskGroupInstance.hasErrors() && taskGroupInstance.save()) { -
trunk/grails-app/controllers/TaskModificationTypeController.groovy
r116 r122 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 class TaskModificationTypeController extends BaseAppAdminController {3 class TaskModificationTypeController extends BaseAppAdminController { 4 4 5 5 def index = { redirect(action:list,params:params) } -
trunk/grails-app/controllers/TaskPriorityController.groovy
r116 r122 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ taskPriorityInstanceList: TaskPriority.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ taskPriorityInstanceList: TaskPriority.list( params ), taskPriorityInstanceTotal: TaskPriority.count() ] 13 13 } 14 14 … … 26 26 def taskPriorityInstance = TaskPriority.get( params.id ) 27 27 if(taskPriorityInstance) { 28 taskPriorityInstance.delete() 29 flash.message = "TaskPriority ${params.id} deleted" 30 redirect(action:list) 28 try { 29 taskPriorityInstance.delete() 30 flash.message = "TaskPriority ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "TaskPriority ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def taskPriorityInstance = TaskPriority.get( params.id ) 52 58 if(taskPriorityInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(taskPriorityInstance.version > version) { 62 63 taskPriorityInstance.errors.rejectValue("version", "taskPriority.optimistic.locking.failure", "Another user has updated this TaskPriority while you were editing.") 64 render(view:'edit',model:[taskPriorityInstance:taskPriorityInstance]) 65 return 66 } 67 } 53 68 taskPriorityInstance.properties = params 54 69 if(!taskPriorityInstance.hasErrors() && taskPriorityInstance.save()) { -
trunk/grails-app/controllers/TaskStatusController.groovy
r116 r122 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ taskStatusInstanceList: TaskStatus.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ taskStatusInstanceList: TaskStatus.list( params ), taskStatusInstanceTotal: TaskStatus.count() ] 13 13 } 14 14 … … 26 26 def taskStatusInstance = TaskStatus.get( params.id ) 27 27 if(taskStatusInstance) { 28 taskStatusInstance.delete() 29 flash.message = "TaskStatus ${params.id} deleted" 30 redirect(action:list) 28 try { 29 taskStatusInstance.delete() 30 flash.message = "TaskStatus ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "TaskStatus ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def taskStatusInstance = TaskStatus.get( params.id ) 52 58 if(taskStatusInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(taskStatusInstance.version > version) { 62 63 taskStatusInstance.errors.rejectValue("version", "taskStatus.optimistic.locking.failure", "Another user has updated this TaskStatus while you were editing.") 64 render(view:'edit',model:[taskStatusInstance:taskStatusInstance]) 65 return 66 } 67 } 53 68 taskStatusInstance.properties = params 54 69 if(!taskStatusInstance.hasErrors() && taskStatusInstance.save()) { -
trunk/grails-app/controllers/TaskTypeController.groovy
r116 r122 9 9 10 10 def list = { 11 if(!params.max) params.max = 1012 [ taskTypeInstanceList: TaskType.list( params ) ]11 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 12 [ taskTypeInstanceList: TaskType.list( params ), taskTypeInstanceTotal: TaskType.count() ] 13 13 } 14 14 … … 26 26 def taskTypeInstance = TaskType.get( params.id ) 27 27 if(taskTypeInstance) { 28 taskTypeInstance.delete() 29 flash.message = "TaskType ${params.id} deleted" 30 redirect(action:list) 28 try { 29 taskTypeInstance.delete() 30 flash.message = "TaskType ${params.id} deleted" 31 redirect(action:list) 32 } 33 catch(org.springframework.dao.DataIntegrityViolationException e) { 34 flash.message = "TaskType ${params.id} could not be deleted" 35 redirect(action:show,id:params.id) 36 } 31 37 } 32 38 else { … … 51 57 def taskTypeInstance = TaskType.get( params.id ) 52 58 if(taskTypeInstance) { 59 if(params.version) { 60 def version = params.version.toLong() 61 if(taskTypeInstance.version > version) { 62 63 taskTypeInstance.errors.rejectValue("version", "taskType.optimistic.locking.failure", "Another user has updated this TaskType while you were editing.") 64 render(view:'edit',model:[taskTypeInstance:taskTypeInstance]) 65 return 66 } 67 } 53 68 taskTypeInstance.properties = params 54 69 if(!taskTypeInstance.hasErrors() && taskTypeInstance.save()) { -
trunk/grails-app/domain/Asset.groovy
r121 r122 1 1 class Asset { 2 2 3 SystemSection systemSection 3 4 AssetType assetType 5 4 6 String name 5 7 String description = "" … … 8 10 static hasMany = [maintenanceActions: MaintenanceAction] 9 11 10 static belongsTo = [SystemSection ]12 static belongsTo = [SystemSection, AssetType] 11 13 12 14 // static constraints = { -
trunk/grails-app/domain/AssetExtendedAttribute.groovy
r121 r122 2 2 3 3 AssetType assetType 4 AssetExtendedAttributeType assetExtendedAttributeType 4 5 5 String name6 String description = ""7 6 String value 8 7 boolean isActive = true … … 17 16 18 17 String toString() { 19 "${this. name}"18 "${this.value}" 20 19 } 21 20 } -
trunk/grails-app/domain/AssetType.groovy
r121 r122 5 5 boolean isActive = true 6 6 7 static hasMany = [assets: Asset, assemblies: Assembly, assetExtendedAttributes: AssetExtendedAttribute, maintenanceActions: MaintenanceAction] 7 static hasMany = [assets: Asset, 8 assemblies: Assembly, 9 assetExtendedAttributes: AssetExtendedAttribute, 10 maintenanceActions: MaintenanceAction] 8 11 9 12 // static belongsTo = [] -
trunk/grails-app/domain/ComponentItem.groovy
r121 r122 1 1 class ComponentItem { 2 2 3 String name 3 4 String description = "" -
trunk/grails-app/domain/MaintenanceAction.groovy
r121 r122 2 2 MaintenancePolicy maintenancePolicy 3 3 PlannedMaintenance plannedMaintenance 4 SystemSection 4 SystemSection systemSection 5 5 Asset asset 6 6 AssetType assetType … … 16 16 static belongsTo = [PlannedMaintenance] 17 17 18 // static constraints = { 19 // 20 // } 18 static constraints = { 19 systemSection(blank:true, nullable:true) 20 asset(blank:true, nullable:true) 21 assetType(blank:true, nullable:true) 22 assembly(blank:true, nullable:true) 23 subAssembly(blank:true, nullable:true) 24 componentItem(blank:true, nullable:true) 25 } 21 26 22 27 String toString() { -
trunk/grails-app/domain/MaintenancePolicy.groovy
r121 r122 12 12 // } 13 13 14 //String toString() {15 //"${this.name}"16 //}14 String toString() { 15 "${this.name}" 16 } 17 17 } 18 18 -
trunk/grails-app/domain/Period.groovy
r120 r122 1 class Frequency{2 String frequency1 class Period { 2 String period 3 3 boolean isActive = true 4 4 5 static hasMany = [ lifePlans: LifePlan]5 static hasMany = [recurringSchedules: RecurringSchedule] 6 6 // 7 7 // static belongsTo = [] … … 12 12 13 13 String toString() { 14 "${this. frequency}"14 "${this.period}" 15 15 } 16 16 } -
trunk/grails-app/domain/RecurringSchedule.groovy
r121 r122 1 1 class RecurringSchedule { 2 2 3 Task task 4 Period period 3 5 PlannedMaintenance plannedMaintenance 4 Period period5 Task task6 6 7 7 Integer recurEvery … … 13 13 static belongsTo = [Task] 14 14 15 // static constraints = { 16 // } 15 static constraints = { 16 plannedMaintenance(blank:true, nullable:true) 17 } 17 18 18 19 // String toString() { -
trunk/grails-app/domain/Task.groovy
r121 r122 36 36 comment() 37 37 primaryAsset(blank: true, nullable:true) 38 recurringSchedule(blank: true, nullable:true) 38 39 39 40 } -
trunk/grails-app/views/assembly/create.gsp
r118 r122 47 47 <tr class="prop"> 48 48 <td valign="top" class="name"> 49 <label for="lifeplan">Lifeplan:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'lifeplan','errors')}">52 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assemblyInstance?.lifeplan?.id}" ></g:select>53 </td>54 </tr>55 56 <tr class="prop">57 <td valign="top" class="name">58 49 <label for="name">Name:</label> 59 50 </td> -
trunk/grails-app/views/assembly/edit.gsp
r118 r122 59 59 <tr class="prop"> 60 60 <td valign="top" class="name"> 61 <label for=" lifeplan">Lifeplan:</label>61 <label for="maintenanceActions">Maintenance Actions:</label> 62 62 </td> 63 <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'lifeplan','errors')}"> 64 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assemblyInstance?.lifeplan?.id}" ></g:select> 63 <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'maintenanceActions','errors')}"> 64 65 <ul> 66 <g:each var="m" in="${assemblyInstance?.maintenanceActions?}"> 67 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 68 </g:each> 69 </ul> 70 <g:link controller="maintenanceAction" params="['assembly.id':assemblyInstance?.id]" action="create">Add MaintenanceAction</g:link> 71 65 72 </td> 66 73 </tr> -
trunk/grails-app/views/assembly/list.gsp
r118 r122 28 28 <g:sortableColumn property="isActive" title="Is Active" /> 29 29 30 <th>Lifeplan</th>31 32 30 <g:sortableColumn property="name" title="Name" /> 33 31 … … 44 42 <td>${fieldValue(bean:assemblyInstance, field:'isActive')}</td> 45 43 46 <td>${fieldValue(bean:assemblyInstance, field:'lifeplan')}</td>47 48 44 <td>${fieldValue(bean:assemblyInstance, field:'name')}</td> 49 45 -
trunk/grails-app/views/assembly/show.gsp
r118 r122 58 58 59 59 <tr class="prop"> 60 <td valign="top" class="name"> Lifeplan:</td>60 <td valign="top" class="name">Maintenance Actions:</td> 61 61 62 <td valign="top" class="value"><g:link controller="lifePlan" action="show" id="${assemblyInstance?.lifeplan?.id}">${assemblyInstance?.lifeplan?.encodeAsHTML()}</g:link></td> 62 <td valign="top" style="text-align:left;" class="value"> 63 <ul> 64 <g:each var="m" in="${assemblyInstance.maintenanceActions}"> 65 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 66 </g:each> 67 </ul> 68 </td> 63 69 64 70 </tr> -
trunk/grails-app/views/asset/create.gsp
r118 r122 56 56 <tr class="prop"> 57 57 <td valign="top" class="name"> 58 <label for="lifeplan">Lifeplan:</label>59 </td>60 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'lifeplan','errors')}">61 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assetInstance?.lifeplan?.id}" ></g:select>62 </td>63 </tr>64 65 <tr class="prop">66 <td valign="top" class="name">67 <label for="locationLongText">Location Long Text:</label>68 </td>69 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'locationLongText','errors')}">70 <input type="text" id="locationLongText" name="locationLongText" value="${fieldValue(bean:assetInstance,field:'locationLongText')}"/>71 </td>72 </tr>73 74 <tr class="prop">75 <td valign="top" class="name">76 <label for="manufacturedDate">Manufactured Date:</label>77 </td>78 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'manufacturedDate','errors')}">79 <g:datePicker name="manufacturedDate" value="${assetInstance?.manufacturedDate}" ></g:datePicker>80 </td>81 </tr>82 83 <tr class="prop">84 <td valign="top" class="name">85 <label for="modelNumber">Model Number:</label>86 </td>87 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'modelNumber','errors')}">88 <input type="text" id="modelNumber" name="modelNumber" value="${fieldValue(bean:assetInstance,field:'modelNumber')}"/>89 </td>90 </tr>91 92 <tr class="prop">93 <td valign="top" class="name">94 58 <label for="name">Name:</label> 95 59 </td> … … 101 65 <tr class="prop"> 102 66 <td valign="top" class="name"> 103 <label for=" purchaseCost">Purchase Cost:</label>67 <label for="systemSection">System Section:</label> 104 68 </td> 105 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'purchaseCost','errors')}"> 106 <input type="text" id="purchaseCost" name="purchaseCost" value="${fieldValue(bean:assetInstance,field:'purchaseCost')}" /> 107 </td> 108 </tr> 109 110 <tr class="prop"> 111 <td valign="top" class="name"> 112 <label for="riskPriorityNumber">Risk Priority Number:</label> 113 </td> 114 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'riskPriorityNumber','errors')}"> 115 <input type="text" id="riskPriorityNumber" name="riskPriorityNumber" value="${fieldValue(bean:assetInstance,field:'riskPriorityNumber')}" /> 116 </td> 117 </tr> 118 119 <tr class="prop"> 120 <td valign="top" class="name"> 121 <label for="serialNumber">Serial Number:</label> 122 </td> 123 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'serialNumber','errors')}"> 124 <input type="text" id="serialNumber" name="serialNumber" value="${fieldValue(bean:assetInstance,field:'serialNumber')}"/> 69 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> 70 <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> 125 71 </td> 126 72 </tr> -
trunk/grails-app/views/asset/edit.gsp
r118 r122 59 59 <tr class="prop"> 60 60 <td valign="top" class="name"> 61 <label for=" lifeplan">Lifeplan:</label>61 <label for="maintenanceActions">Maintenance Actions:</label> 62 62 </td> 63 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'lifeplan','errors')}"> 64 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assetInstance?.lifeplan?.id}" ></g:select> 65 </td> 66 </tr> 67 68 <tr class="prop"> 69 <td valign="top" class="name"> 70 <label for="locationLongText">Location Long Text:</label> 71 </td> 72 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'locationLongText','errors')}"> 73 <input type="text" id="locationLongText" name="locationLongText" value="${fieldValue(bean:assetInstance,field:'locationLongText')}"/> 74 </td> 75 </tr> 76 77 <tr class="prop"> 78 <td valign="top" class="name"> 79 <label for="manufacturedDate">Manufactured Date:</label> 80 </td> 81 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'manufacturedDate','errors')}"> 82 <g:datePicker name="manufacturedDate" value="${assetInstance?.manufacturedDate}" ></g:datePicker> 83 </td> 84 </tr> 85 86 <tr class="prop"> 87 <td valign="top" class="name"> 88 <label for="modelNumber">Model Number:</label> 89 </td> 90 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'modelNumber','errors')}"> 91 <input type="text" id="modelNumber" name="modelNumber" value="${fieldValue(bean:assetInstance,field:'modelNumber')}"/> 63 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> 64 65 <ul> 66 <g:each var="m" in="${assetInstance?.maintenanceActions?}"> 67 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 68 </g:each> 69 </ul> 70 <g:link controller="maintenanceAction" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> 71 92 72 </td> 93 73 </tr> … … 104 84 <tr class="prop"> 105 85 <td valign="top" class="name"> 106 <label for=" purchaseCost">Purchase Cost:</label>86 <label for="systemSection">System Section:</label> 107 87 </td> 108 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'purchaseCost','errors')}"> 109 <input type="text" id="purchaseCost" name="purchaseCost" value="${fieldValue(bean:assetInstance,field:'purchaseCost')}" /> 110 </td> 111 </tr> 112 113 <tr class="prop"> 114 <td valign="top" class="name"> 115 <label for="riskPriorityNumber">Risk Priority Number:</label> 116 </td> 117 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'riskPriorityNumber','errors')}"> 118 <input type="text" id="riskPriorityNumber" name="riskPriorityNumber" value="${fieldValue(bean:assetInstance,field:'riskPriorityNumber')}" /> 119 </td> 120 </tr> 121 122 <tr class="prop"> 123 <td valign="top" class="name"> 124 <label for="serialNumber">Serial Number:</label> 125 </td> 126 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'serialNumber','errors')}"> 127 <input type="text" id="serialNumber" name="serialNumber" value="${fieldValue(bean:assetInstance,field:'serialNumber')}"/> 88 <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> 89 <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> 128 90 </td> 129 91 </tr> -
trunk/grails-app/views/asset/list.gsp
r118 r122 30 30 <g:sortableColumn property="isActive" title="Is Active" /> 31 31 32 <th>Lifeplan</th> 32 <g:sortableColumn property="name" title="Name" /> 33 34 <th>System Section</th> 33 35 34 <g:sortableColumn property="locationLongText" title="Location Long Text" />35 36 36 </tr> 37 37 </thead> … … 48 48 <td>${fieldValue(bean:assetInstance, field:'isActive')}</td> 49 49 50 <td>${fieldValue(bean:assetInstance, field:' lifeplan')}</td>50 <td>${fieldValue(bean:assetInstance, field:'name')}</td> 51 51 52 <td>${fieldValue(bean:assetInstance, field:' locationLongText')}</td>52 <td>${fieldValue(bean:assetInstance, field:'systemSection')}</td> 53 53 54 54 </tr> -
trunk/grails-app/views/asset/show.gsp
r118 r122 52 52 53 53 <tr class="prop"> 54 <td valign="top" class="name"> Lifeplan:</td>54 <td valign="top" class="name">Maintenance Actions:</td> 55 55 56 <td valign="top" class="value"><g:link controller="lifePlan" action="show" id="${assetInstance?.lifeplan?.id}">${assetInstance?.lifeplan?.encodeAsHTML()}</g:link></td> 57 58 </tr> 59 60 <tr class="prop"> 61 <td valign="top" class="name">Location Long Text:</td> 62 63 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'locationLongText')}</td> 64 65 </tr> 66 67 <tr class="prop"> 68 <td valign="top" class="name">Manufactured Date:</td> 69 70 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'manufacturedDate')}</td> 71 72 </tr> 73 74 <tr class="prop"> 75 <td valign="top" class="name">Model Number:</td> 76 77 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'modelNumber')}</td> 56 <td valign="top" style="text-align:left;" class="value"> 57 <ul> 58 <g:each var="m" in="${assetInstance.maintenanceActions}"> 59 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 60 </g:each> 61 </ul> 62 </td> 78 63 79 64 </tr> … … 87 72 88 73 <tr class="prop"> 89 <td valign="top" class="name"> Purchase Cost:</td>74 <td valign="top" class="name">System Section:</td> 90 75 91 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'purchaseCost')}</td> 92 93 </tr> 94 95 <tr class="prop"> 96 <td valign="top" class="name">Risk Priority Number:</td> 97 98 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'riskPriorityNumber')}</td> 99 100 </tr> 101 102 <tr class="prop"> 103 <td valign="top" class="name">Serial Number:</td> 104 105 <td valign="top" class="value">${fieldValue(bean:assetInstance, field:'serialNumber')}</td> 76 <td valign="top" class="value"><g:link controller="systemSection" action="show" id="${assetInstance?.systemSection?.id}">${assetInstance?.systemSection?.encodeAsHTML()}</g:link></td> 106 77 107 78 </tr> -
trunk/grails-app/views/assetType/create.gsp
r118 r122 47 47 <tr class="prop"> 48 48 <td valign="top" class="name"> 49 <label for="lifeplan">Lifeplan:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'lifeplan','errors')}">52 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assetTypeInstance?.lifeplan?.id}" ></g:select>53 </td>54 </tr>55 56 <tr class="prop">57 <td valign="top" class="name">58 49 <label for="name">Name:</label> 59 50 </td> 60 51 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'name','errors')}"> 61 52 <input type="text" id="name" name="name" value="${fieldValue(bean:assetTypeInstance,field:'name')}"/> 62 </td>63 </tr>64 65 <tr class="prop">66 <td valign="top" class="name">67 <label for="systemSection">System Section:</label>68 </td>69 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'systemSection','errors')}">70 <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetTypeInstance?.systemSection?.id}" ></g:select>71 53 </td> 72 54 </tr> -
trunk/grails-app/views/assetType/edit.gsp
r118 r122 45 45 <tr class="prop"> 46 46 <td valign="top" class="name"> 47 <label for="assetExtendedAttributes">Asset Extended Attributes:</label> 48 </td> 49 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'assetExtendedAttributes','errors')}"> 50 51 <ul> 52 <g:each var="a" in="${assetTypeInstance?.assetExtendedAttributes?}"> 53 <li><g:link controller="assetExtendedAttribute" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 54 </g:each> 55 </ul> 56 <g:link controller="assetExtendedAttribute" params="['assetType.id':assetTypeInstance?.id]" action="create">Add AssetExtendedAttribute</g:link> 57 58 </td> 59 </tr> 60 61 <tr class="prop"> 62 <td valign="top" class="name"> 47 63 <label for="assets">Assets:</label> 48 64 </td> … … 79 95 <tr class="prop"> 80 96 <td valign="top" class="name"> 81 <label for=" lifeplan">Lifeplan:</label>97 <label for="maintenanceActions">Maintenance Actions:</label> 82 98 </td> 83 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'lifeplan','errors')}"> 84 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${assetTypeInstance?.lifeplan?.id}" ></g:select> 99 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'maintenanceActions','errors')}"> 100 101 <ul> 102 <g:each var="m" in="${assetTypeInstance?.maintenanceActions?}"> 103 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 104 </g:each> 105 </ul> 106 <g:link controller="maintenanceAction" params="['assetType.id':assetTypeInstance?.id]" action="create">Add MaintenanceAction</g:link> 107 85 108 </td> 86 109 </tr> … … 92 115 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'name','errors')}"> 93 116 <input type="text" id="name" name="name" value="${fieldValue(bean:assetTypeInstance,field:'name')}"/> 94 </td>95 </tr>96 97 <tr class="prop">98 <td valign="top" class="name">99 <label for="systemSection">System Section:</label>100 </td>101 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'systemSection','errors')}">102 <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetTypeInstance?.systemSection?.id}" ></g:select>103 117 </td> 104 118 </tr> -
trunk/grails-app/views/assetType/list.gsp
r118 r122 28 28 <g:sortableColumn property="isActive" title="Is Active" /> 29 29 30 <th>Lifeplan</th>31 32 30 <g:sortableColumn property="name" title="Name" /> 33 31 34 <th>System Section</th>35 36 32 </tr> 37 33 </thead> … … 46 42 <td>${fieldValue(bean:assetTypeInstance, field:'isActive')}</td> 47 43 48 <td>${fieldValue(bean:assetTypeInstance, field:'lifeplan')}</td>49 50 44 <td>${fieldValue(bean:assetTypeInstance, field:'name')}</td> 51 52 <td>${fieldValue(bean:assetTypeInstance, field:'systemSection')}</td>53 45 54 46 </tr> -
trunk/grails-app/views/assetType/show.gsp
r118 r122 44 44 45 45 <tr class="prop"> 46 <td valign="top" class="name">Asset Extended Attributes:</td> 47 48 <td valign="top" style="text-align:left;" class="value"> 49 <ul> 50 <g:each var="a" in="${assetTypeInstance.assetExtendedAttributes}"> 51 <li><g:link controller="assetExtendedAttribute" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 52 </g:each> 53 </ul> 54 </td> 55 56 </tr> 57 58 <tr class="prop"> 46 59 <td valign="top" class="name">Assets:</td> 47 60 … … 71 84 72 85 <tr class="prop"> 73 <td valign="top" class="name"> Lifeplan:</td>86 <td valign="top" class="name">Maintenance Actions:</td> 74 87 75 <td valign="top" class="value"><g:link controller="lifePlan" action="show" id="${assetTypeInstance?.lifeplan?.id}">${assetTypeInstance?.lifeplan?.encodeAsHTML()}</g:link></td> 88 <td valign="top" style="text-align:left;" class="value"> 89 <ul> 90 <g:each var="m" in="${assetTypeInstance.maintenanceActions}"> 91 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 92 </g:each> 93 </ul> 94 </td> 76 95 77 96 </tr> … … 81 100 82 101 <td valign="top" class="value">${fieldValue(bean:assetTypeInstance, field:'name')}</td> 83 84 </tr>85 86 <tr class="prop">87 <td valign="top" class="name">System Section:</td>88 89 <td valign="top" class="value"><g:link controller="systemSection" action="show" id="${assetTypeInstance?.systemSection?.id}">${assetTypeInstance?.systemSection?.encodeAsHTML()}</g:link></td>90 102 91 103 </tr> -
trunk/grails-app/views/componentItem/create.gsp
r118 r122 38 38 <tr class="prop"> 39 39 <td valign="top" class="name"> 40 <label for="fmeaNumber">Fmea Number:</label>41 </td>42 <td valign="top" class="value ${hasErrors(bean:componentItemInstance,field:'fmeaNumber','errors')}">43 <input type="text" id="fmeaNumber" name="fmeaNumber" value="${fieldValue(bean:componentItemInstance,field:'fmeaNumber')}" />44 </td>45 </tr>46 47 <tr class="prop">48 <td valign="top" class="name">49 40 <label for="isActive">Is Active:</label> 50 41 </td> 51 42 <td valign="top" class="value ${hasErrors(bean:componentItemInstance,field:'isActive','errors')}"> 52 43 <g:checkBox name="isActive" value="${componentItemInstance?.isActive}" ></g:checkBox> 53 </td>54 </tr>55 56 <tr class="prop">57 <td valign="top" class="name">58 <label for="lifeplan">Lifeplan:</label>59 </td>60 <td valign="top" class="value ${hasErrors(bean:componentItemInstance,field:'lifeplan','errors')}">61 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${componentItemInstance?.lifeplan?.id}" ></g:select>62 44 </td> 63 45 </tr> -
trunk/grails-app/views/componentItem/edit.gsp
r118 r122 41 41 <tr class="prop"> 42 42 <td valign="top" class="name"> 43 <label for="fmeaNumber">Fmea Number:</label>44 </td>45 <td valign="top" class="value ${hasErrors(bean:componentItemInstance,field:'fmeaNumber','errors')}">46 <input type="text" id="fmeaNumber" name="fmeaNumber" value="${fieldValue(bean:componentItemInstance,field:'fmeaNumber')}" />47 </td>48 </tr>49 50 <tr class="prop">51 <td valign="top" class="name">52 43 <label for="isActive">Is Active:</label> 53 44 </td> … … 59 50 <tr class="prop"> 60 51 <td valign="top" class="name"> 61 <label for=" lifeplan">Lifeplan:</label>52 <label for="maintenanceActions">Maintenance Actions:</label> 62 53 </td> 63 <td valign="top" class="value ${hasErrors(bean:componentItemInstance,field:'lifeplan','errors')}"> 64 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${componentItemInstance?.lifeplan?.id}" ></g:select> 54 <td valign="top" class="value ${hasErrors(bean:componentItemInstance,field:'maintenanceActions','errors')}"> 55 56 <ul> 57 <g:each var="m" in="${componentItemInstance?.maintenanceActions?}"> 58 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 59 </g:each> 60 </ul> 61 <g:link controller="maintenanceAction" params="['componentItem.id':componentItemInstance?.id]" action="create">Add MaintenanceAction</g:link> 62 65 63 </td> 66 64 </tr> -
trunk/grails-app/views/componentItem/list.gsp
r118 r122 26 26 <g:sortableColumn property="description" title="Description" /> 27 27 28 <g:sortableColumn property="fmeaNumber" title="Fmea Number" />29 30 28 <g:sortableColumn property="isActive" title="Is Active" /> 31 29 32 <th>Lifeplan</th>33 34 30 <g:sortableColumn property="name" title="Name" /> 35 31 … … 44 40 <td>${fieldValue(bean:componentItemInstance, field:'description')}</td> 45 41 46 <td>${fieldValue(bean:componentItemInstance, field:'fmeaNumber')}</td>47 48 42 <td>${fieldValue(bean:componentItemInstance, field:'isActive')}</td> 49 50 <td>${fieldValue(bean:componentItemInstance, field:'lifeplan')}</td>51 43 52 44 <td>${fieldValue(bean:componentItemInstance, field:'name')}</td> -
trunk/grails-app/views/componentItem/show.gsp
r118 r122 38 38 39 39 <tr class="prop"> 40 <td valign="top" class="name">Fmea Number:</td>41 42 <td valign="top" class="value">${fieldValue(bean:componentItemInstance, field:'fmeaNumber')}</td>43 44 </tr>45 46 <tr class="prop">47 40 <td valign="top" class="name">Is Active:</td> 48 41 … … 52 45 53 46 <tr class="prop"> 54 <td valign="top" class="name"> Lifeplan:</td>47 <td valign="top" class="name">Maintenance Actions:</td> 55 48 56 <td valign="top" class="value"><g:link controller="lifePlan" action="show" id="${componentItemInstance?.lifeplan?.id}">${componentItemInstance?.lifeplan?.encodeAsHTML()}</g:link></td> 49 <td valign="top" style="text-align:left;" class="value"> 50 <ul> 51 <g:each var="m" in="${componentItemInstance.maintenanceActions}"> 52 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 53 </g:each> 54 </ul> 55 </td> 57 56 58 57 </tr> -
trunk/grails-app/views/entry/edit.gsp
r66 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${entryInstance?.id}" /> 27 <input type="hidden" name="version" value="${entryInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/entry/list.gsp
r66 r122 58 58 </div> 59 59 <div class="paginateButtons"> 60 <g:paginate total="${ Entry.count()}" />60 <g:paginate total="${entryInstanceTotal}" /> 61 61 </div> 62 62 </div> -
trunk/grails-app/views/entryType/edit.gsp
r66 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${entryTypeInstance?.id}" /> 27 <input type="hidden" name="version" value="${entryTypeInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/entryType/list.gsp
r66 r122 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ EntryType.count()}" />52 <g:paginate total="${entryTypeInstanceTotal}" /> 53 53 </div> 54 54 </div> -
trunk/grails-app/views/lifePlan/create.gsp
r118 r122 29 29 <tr class="prop"> 30 30 <td valign="top" class="name"> 31 <label for="asset">Asset:</label>32 </td>33 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'asset','errors')}">34 <g:select optionKey="id" from="${Asset.list()}" name="asset.id" value="${lifePlanInstance?.asset?.id}" noSelection="['null':'']"></g:select>35 </td>36 </tr>37 38 <tr class="prop">39 <td valign="top" class="name">40 <label for="form">Form:</label>41 </td>42 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'form','errors')}">43 <g:select optionKey="id" from="${Form.list()}" name="form.id" value="${lifePlanInstance?.form?.id}" noSelection="['null':'']"></g:select>44 </td>45 </tr>46 47 <tr class="prop">48 <td valign="top" class="name">49 <label for="frequency">Frequency:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'frequency','errors')}">52 <g:select optionKey="id" from="${Frequency.list()}" name="frequency.id" value="${lifePlanInstance?.frequency?.id}" noSelection="['null':'']"></g:select>53 </td>54 </tr>55 56 <tr class="prop">57 <td valign="top" class="name">58 <label for="assetType">Asset Type:</label>59 </td>60 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'assetType','errors')}">61 <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${lifePlanInstance?.assetType?.id}" noSelection="['null':'']"></g:select>62 </td>63 </tr>64 65 <tr class="prop">66 <td valign="top" class="name">67 <label for="assembly">Assembly:</label>68 </td>69 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'assembly','errors')}">70 <g:select optionKey="id" from="${Assembly.list()}" name="assembly.id" value="${lifePlanInstance?.assembly?.id}" noSelection="['null':'']"></g:select>71 </td>72 </tr>73 74 <tr class="prop">75 <td valign="top" class="name">76 <label for="subAssembly">Sub Assembly:</label>77 </td>78 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'subAssembly','errors')}">79 <g:select optionKey="id" from="${SubAssembly.list()}" name="subAssembly.id" value="${lifePlanInstance?.subAssembly?.id}" noSelection="['null':'']"></g:select>80 </td>81 </tr>82 83 <tr class="prop">84 <td valign="top" class="name">85 <label for="componentItem">Component Item:</label>86 </td>87 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'componentItem','errors')}">88 <g:select optionKey="id" from="${ComponentItem.list()}" name="componentItem.id" value="${lifePlanInstance?.componentItem?.id}" noSelection="['null':'']"></g:select>89 </td>90 </tr>91 92 <tr class="prop">93 <td valign="top" class="name">94 31 <label for="description">Description:</label> 95 32 </td> … … 110 47 <tr class="prop"> 111 48 <td valign="top" class="name"> 112 <label for="maintenanceAction">Maintenance Action:</label>113 </td>114 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'maintenanceAction','errors')}">115 <input type="text" id="maintenanceAction" name="maintenanceAction" value="${fieldValue(bean:lifePlanInstance,field:'maintenanceAction')}"/>116 </td>117 </tr>118 119 <tr class="prop">120 <td valign="top" class="name">121 49 <label for="name">Name:</label> 122 50 </td> 123 51 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'name','errors')}"> 124 52 <input type="text" id="name" name="name" value="${fieldValue(bean:lifePlanInstance,field:'name')}"/> 125 </td>126 </tr>127 128 <tr class="prop">129 <td valign="top" class="name">130 <label for="notes">Notes:</label>131 </td>132 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'notes','errors')}">133 <input type="text" id="notes" name="notes" value="${fieldValue(bean:lifePlanInstance,field:'notes')}"/>134 </td>135 </tr>136 137 <tr class="prop">138 <td valign="top" class="name">139 <label for="resourceNumber">Resource Number:</label>140 </td>141 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'resourceNumber','errors')}">142 <input type="text" id="resourceNumber" name="resourceNumber" value="${fieldValue(bean:lifePlanInstance,field:'resourceNumber')}"/>143 </td>144 </tr>145 146 <tr class="prop">147 <td valign="top" class="name">148 <label for="timeInHours">Time In Hours:</label>149 </td>150 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'timeInHours','errors')}">151 <input type="text" id="timeInHours" name="timeInHours" value="${fieldValue(bean:lifePlanInstance,field:'timeInHours')}" />152 53 </td> 153 54 </tr> -
trunk/grails-app/views/lifePlan/edit.gsp
r118 r122 32 32 <tr class="prop"> 33 33 <td valign="top" class="name"> 34 <label for="asset">Asset:</label>35 </td>36 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'asset','errors')}">37 <g:select optionKey="id" from="${Asset.list()}" name="asset.id" value="${lifePlanInstance?.asset?.id}" noSelection="['null':'']"></g:select>38 </td>39 </tr>40 41 <tr class="prop">42 <td valign="top" class="name">43 <label for="form">Form:</label>44 </td>45 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'form','errors')}">46 <g:select optionKey="id" from="${Form.list()}" name="form.id" value="${lifePlanInstance?.form?.id}" noSelection="['null':'']"></g:select>47 </td>48 </tr>49 50 <tr class="prop">51 <td valign="top" class="name">52 <label for="frequency">Frequency:</label>53 </td>54 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'frequency','errors')}">55 <g:select optionKey="id" from="${Frequency.list()}" name="frequency.id" value="${lifePlanInstance?.frequency?.id}" noSelection="['null':'']"></g:select>56 </td>57 </tr>58 59 <tr class="prop">60 <td valign="top" class="name">61 <label for="assetType">Asset Type:</label>62 </td>63 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'assetType','errors')}">64 <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${lifePlanInstance?.assetType?.id}" noSelection="['null':'']"></g:select>65 </td>66 </tr>67 68 <tr class="prop">69 <td valign="top" class="name">70 <label for="assembly">Assembly:</label>71 </td>72 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'assembly','errors')}">73 <g:select optionKey="id" from="${Assembly.list()}" name="assembly.id" value="${lifePlanInstance?.assembly?.id}" noSelection="['null':'']"></g:select>74 </td>75 </tr>76 77 <tr class="prop">78 <td valign="top" class="name">79 <label for="subAssembly">Sub Assembly:</label>80 </td>81 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'subAssembly','errors')}">82 <g:select optionKey="id" from="${SubAssembly.list()}" name="subAssembly.id" value="${lifePlanInstance?.subAssembly?.id}" noSelection="['null':'']"></g:select>83 </td>84 </tr>85 86 <tr class="prop">87 <td valign="top" class="name">88 <label for="componentItem">Component Item:</label>89 </td>90 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'componentItem','errors')}">91 <g:select optionKey="id" from="${ComponentItem.list()}" name="componentItem.id" value="${lifePlanInstance?.componentItem?.id}" noSelection="['null':'']"></g:select>92 </td>93 </tr>94 95 <tr class="prop">96 <td valign="top" class="name">97 34 <label for="description">Description:</label> 98 35 </td> … … 113 50 <tr class="prop"> 114 51 <td valign="top" class="name"> 115 <label for="maintenanceAction">Maintenance Action:</label>116 </td>117 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'maintenanceAction','errors')}">118 <input type="text" id="maintenanceAction" name="maintenanceAction" value="${fieldValue(bean:lifePlanInstance,field:'maintenanceAction')}"/>119 </td>120 </tr>121 122 <tr class="prop">123 <td valign="top" class="name">124 52 <label for="name">Name:</label> 125 53 </td> 126 54 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'name','errors')}"> 127 55 <input type="text" id="name" name="name" value="${fieldValue(bean:lifePlanInstance,field:'name')}"/> 128 </td>129 </tr>130 131 <tr class="prop">132 <td valign="top" class="name">133 <label for="notes">Notes:</label>134 </td>135 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'notes','errors')}">136 <input type="text" id="notes" name="notes" value="${fieldValue(bean:lifePlanInstance,field:'notes')}"/>137 </td>138 </tr>139 140 <tr class="prop">141 <td valign="top" class="name">142 <label for="resourceNumber">Resource Number:</label>143 </td>144 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'resourceNumber','errors')}">145 <input type="text" id="resourceNumber" name="resourceNumber" value="${fieldValue(bean:lifePlanInstance,field:'resourceNumber')}"/>146 </td>147 </tr>148 149 <tr class="prop">150 <td valign="top" class="name">151 <label for="systemSections">System Sections:</label>152 </td>153 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'systemSections','errors')}">154 155 </td>156 </tr>157 158 <tr class="prop">159 <td valign="top" class="name">160 <label for="timeInHours">Time In Hours:</label>161 </td>162 <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'timeInHours','errors')}">163 <input type="text" id="timeInHours" name="timeInHours" value="${fieldValue(bean:lifePlanInstance,field:'timeInHours')}" />164 56 </td> 165 57 </tr> -
trunk/grails-app/views/lifePlan/list.gsp
r118 r122 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <th>Asset</th> 27 28 <th>Form</th> 29 30 <th>Frequency</th> 31 32 <th>Asset Type</th> 33 34 <th>Assembly</th> 35 26 <g:sortableColumn property="description" title="Description" /> 27 28 <g:sortableColumn property="isActive" title="Is Active" /> 29 30 <g:sortableColumn property="name" title="Name" /> 31 36 32 </tr> 37 33 </thead> … … 42 38 <td><g:link action="show" id="${lifePlanInstance.id}">${fieldValue(bean:lifePlanInstance, field:'id')}</g:link></td> 43 39 44 <td>${fieldValue(bean:lifePlanInstance, field:' asset')}</td>40 <td>${fieldValue(bean:lifePlanInstance, field:'description')}</td> 45 41 46 <td>${fieldValue(bean:lifePlanInstance, field:' form')}</td>42 <td>${fieldValue(bean:lifePlanInstance, field:'isActive')}</td> 47 43 48 <td>${fieldValue(bean:lifePlanInstance, field:'frequency')}</td> 49 50 <td>${fieldValue(bean:lifePlanInstance, field:'assetType')}</td> 51 52 <td>${fieldValue(bean:lifePlanInstance, field:'assembly')}</td> 44 <td>${fieldValue(bean:lifePlanInstance, field:'name')}</td> 53 45 54 46 </tr> -
trunk/grails-app/views/lifePlan/show.gsp
r118 r122 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name">Asset:</td>34 35 <td valign="top" class="value"><g:link controller="asset" action="show" id="${lifePlanInstance?.asset?.id}">${lifePlanInstance?.asset?.encodeAsHTML()}</g:link></td>36 37 </tr>38 39 <tr class="prop">40 <td valign="top" class="name">Form:</td>41 42 <td valign="top" class="value"><g:link controller="form" action="show" id="${lifePlanInstance?.form?.id}">${lifePlanInstance?.form?.encodeAsHTML()}</g:link></td>43 44 </tr>45 46 <tr class="prop">47 <td valign="top" class="name">Frequency:</td>48 49 <td valign="top" class="value"><g:link controller="frequency" action="show" id="${lifePlanInstance?.frequency?.id}">${lifePlanInstance?.frequency?.encodeAsHTML()}</g:link></td>50 51 </tr>52 53 <tr class="prop">54 <td valign="top" class="name">Asset Type:</td>55 56 <td valign="top" class="value"><g:link controller="assetType" action="show" id="${lifePlanInstance?.assetType?.id}">${lifePlanInstance?.assetType?.encodeAsHTML()}</g:link></td>57 58 </tr>59 60 <tr class="prop">61 <td valign="top" class="name">Assembly:</td>62 63 <td valign="top" class="value"><g:link controller="assembly" action="show" id="${lifePlanInstance?.assembly?.id}">${lifePlanInstance?.assembly?.encodeAsHTML()}</g:link></td>64 65 </tr>66 67 <tr class="prop">68 <td valign="top" class="name">Sub Assembly:</td>69 70 <td valign="top" class="value"><g:link controller="subAssembly" action="show" id="${lifePlanInstance?.subAssembly?.id}">${lifePlanInstance?.subAssembly?.encodeAsHTML()}</g:link></td>71 72 </tr>73 74 <tr class="prop">75 <td valign="top" class="name">Component Item:</td>76 77 <td valign="top" class="value"><g:link controller="componentItem" action="show" id="${lifePlanInstance?.componentItem?.id}">${lifePlanInstance?.componentItem?.encodeAsHTML()}</g:link></td>78 79 </tr>80 81 <tr class="prop">82 33 <td valign="top" class="name">Description:</td> 83 34 … … 94 45 95 46 <tr class="prop"> 96 <td valign="top" class="name">Maintenance Action:</td>97 98 <td valign="top" class="value">${fieldValue(bean:lifePlanInstance, field:'maintenanceAction')}</td>99 100 </tr>101 102 <tr class="prop">103 47 <td valign="top" class="name">Name:</td> 104 48 105 49 <td valign="top" class="value">${fieldValue(bean:lifePlanInstance, field:'name')}</td> 106 107 </tr>108 109 <tr class="prop">110 <td valign="top" class="name">Notes:</td>111 112 <td valign="top" class="value">${fieldValue(bean:lifePlanInstance, field:'notes')}</td>113 114 </tr>115 116 <tr class="prop">117 <td valign="top" class="name">Resource Number:</td>118 119 <td valign="top" class="value">${fieldValue(bean:lifePlanInstance, field:'resourceNumber')}</td>120 121 </tr>122 123 <tr class="prop">124 <td valign="top" class="name">System Sections:</td>125 126 <td valign="top" style="text-align:left;" class="value">127 <ul>128 <g:each var="s" in="${lifePlanInstance.systemSections}">129 <li><g:link controller="systemSection" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li>130 </g:each>131 </ul>132 </td>133 134 </tr>135 136 <tr class="prop">137 <td valign="top" class="name">Time In Hours:</td>138 139 <td valign="top" class="value">${fieldValue(bean:lifePlanInstance, field:'timeInHours')}</td>140 50 141 51 </tr> -
trunk/grails-app/views/period/create.gsp
r118 r122 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Create Frequency</title>7 <title>Create Period</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"> FrequencyList</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">Period List</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1>Create Frequency</h1>15 <h1>Create Period</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> 18 18 </g:if> 19 <g:hasErrors bean="${ frequencyInstance}">19 <g:hasErrors bean="${periodInstance}"> 20 20 <div class="errors"> 21 <g:renderErrors bean="${ frequencyInstance}" as="list" />21 <g:renderErrors bean="${periodInstance}" as="list" /> 22 22 </div> 23 23 </g:hasErrors> … … 29 29 <tr class="prop"> 30 30 <td valign="top" class="name"> 31 <label for=" frequency">Frequency:</label>31 <label for="isActive">Is Active:</label> 32 32 </td> 33 <td valign="top" class="value ${hasErrors(bean: frequencyInstance,field:'frequency','errors')}">34 < input type="text" id="frequency" name="frequency" value="${fieldValue(bean:frequencyInstance,field:'frequency')}"/>33 <td valign="top" class="value ${hasErrors(bean:periodInstance,field:'isActive','errors')}"> 34 <g:checkBox name="isActive" value="${periodInstance?.isActive}" ></g:checkBox> 35 35 </td> 36 36 </tr> … … 38 38 <tr class="prop"> 39 39 <td valign="top" class="name"> 40 <label for=" isActive">Is Active:</label>40 <label for="period">Period:</label> 41 41 </td> 42 <td valign="top" class="value ${hasErrors(bean: frequencyInstance,field:'isActive','errors')}">43 < g:checkBox name="isActive" value="${frequencyInstance?.isActive}" ></g:checkBox>42 <td valign="top" class="value ${hasErrors(bean:periodInstance,field:'period','errors')}"> 43 <input type="text" id="period" name="period" value="${fieldValue(bean:periodInstance,field:'period')}"/> 44 44 </td> 45 45 </tr> -
trunk/grails-app/views/period/edit.gsp
r118 r122 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Edit Frequency</title>7 <title>Edit Period</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"> FrequencyList</g:link></span>13 <span class="menuButton"><g:link class="create" action="create">New Frequency</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">Period List</g:link></span> 13 <span class="menuButton"><g:link class="create" action="create">New Period</g:link></span> 14 14 </div> 15 15 <div class="body"> 16 <h1>Edit Frequency</h1>16 <h1>Edit Period</h1> 17 17 <g:if test="${flash.message}"> 18 18 <div class="message">${flash.message}</div> 19 19 </g:if> 20 <g:hasErrors bean="${ frequencyInstance}">20 <g:hasErrors bean="${periodInstance}"> 21 21 <div class="errors"> 22 <g:renderErrors bean="${ frequencyInstance}" as="list" />22 <g:renderErrors bean="${periodInstance}" as="list" /> 23 23 </div> 24 24 </g:hasErrors> 25 25 <g:form method="post" > 26 <input type="hidden" name="id" value="${ frequencyInstance?.id}" />27 <input type="hidden" name="version" value="${ frequencyInstance?.version}" />26 <input type="hidden" name="id" value="${periodInstance?.id}" /> 27 <input type="hidden" name="version" value="${periodInstance?.version}" /> 28 28 <div class="dialog"> 29 29 <table> … … 32 32 <tr class="prop"> 33 33 <td valign="top" class="name"> 34 <label for=" frequency">Frequency:</label>34 <label for="isActive">Is Active:</label> 35 35 </td> 36 <td valign="top" class="value ${hasErrors(bean: frequencyInstance,field:'frequency','errors')}">37 < input type="text" id="frequency" name="frequency" value="${fieldValue(bean:frequencyInstance,field:'frequency')}"/>36 <td valign="top" class="value ${hasErrors(bean:periodInstance,field:'isActive','errors')}"> 37 <g:checkBox name="isActive" value="${periodInstance?.isActive}" ></g:checkBox> 38 38 </td> 39 39 </tr> … … 41 41 <tr class="prop"> 42 42 <td valign="top" class="name"> 43 <label for=" isActive">Is Active:</label>43 <label for="period">Period:</label> 44 44 </td> 45 <td valign="top" class="value ${hasErrors(bean: frequencyInstance,field:'isActive','errors')}">46 < g:checkBox name="isActive" value="${frequencyInstance?.isActive}" ></g:checkBox>45 <td valign="top" class="value ${hasErrors(bean:periodInstance,field:'period','errors')}"> 46 <input type="text" id="period" name="period" value="${fieldValue(bean:periodInstance,field:'period')}"/> 47 47 </td> 48 48 </tr> … … 50 50 <tr class="prop"> 51 51 <td valign="top" class="name"> 52 <label for=" lifePlans">Life Plans:</label>52 <label for="recurringSchedules">Recurring Schedules:</label> 53 53 </td> 54 <td valign="top" class="value ${hasErrors(bean: frequencyInstance,field:'lifePlans','errors')}">54 <td valign="top" class="value ${hasErrors(bean:periodInstance,field:'recurringSchedules','errors')}"> 55 55 56 56 <ul> 57 <g:each var=" l" in="${frequencyInstance?.lifePlans?}">58 <li><g:link controller=" lifePlan" action="show" id="${l.id}">${l?.encodeAsHTML()}</g:link></li>57 <g:each var="r" in="${periodInstance?.recurringSchedules?}"> 58 <li><g:link controller="recurringSchedule" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></li> 59 59 </g:each> 60 60 </ul> 61 <g:link controller=" lifePlan" params="['frequency.id':frequencyInstance?.id]" action="create">Add LifePlan</g:link>61 <g:link controller="recurringSchedule" params="['period.id':periodInstance?.id]" action="create">Add RecurringSchedule</g:link> 62 62 63 63 </td> -
trunk/grails-app/views/period/list.gsp
r118 r122 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title> FrequencyList</title>7 <title>Period 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 Frequency</g:link></span>12 <span class="menuButton"><g:link class="create" action="create">New Period</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1> FrequencyList</h1>15 <h1>Period List</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> … … 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <g:sortableColumn property=" frequency" title="Frequency" />26 <g:sortableColumn property="isActive" title="Is Active" /> 27 27 28 <g:sortableColumn property=" isActive" title="Is Active" />28 <g:sortableColumn property="period" title="Period" /> 29 29 30 30 </tr> 31 31 </thead> 32 32 <tbody> 33 <g:each in="${ frequencyInstanceList}" status="i" var="frequencyInstance">33 <g:each in="${periodInstanceList}" status="i" var="periodInstance"> 34 34 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> 35 35 36 <td><g:link action="show" id="${ frequencyInstance.id}">${fieldValue(bean:frequencyInstance, field:'id')}</g:link></td>36 <td><g:link action="show" id="${periodInstance.id}">${fieldValue(bean:periodInstance, field:'id')}</g:link></td> 37 37 38 <td>${fieldValue(bean: frequencyInstance, field:'frequency')}</td>38 <td>${fieldValue(bean:periodInstance, field:'isActive')}</td> 39 39 40 <td>${fieldValue(bean: frequencyInstance, field:'isActive')}</td>40 <td>${fieldValue(bean:periodInstance, field:'period')}</td> 41 41 42 42 </tr> … … 46 46 </div> 47 47 <div class="paginateButtons"> 48 <g:paginate total="${ frequencyInstanceTotal}" />48 <g:paginate total="${periodInstanceTotal}" /> 49 49 </div> 50 50 </div> -
trunk/grails-app/views/period/show.gsp
r118 r122 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Show Frequency</title>7 <title>Show Period</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"> FrequencyList</g:link></span>13 <span class="menuButton"><g:link class="create" action="create">New Frequency</g:link></span>12 <span class="menuButton"><g:link class="list" action="list">Period List</g:link></span> 13 <span class="menuButton"><g:link class="create" action="create">New Period</g:link></span> 14 14 </div> 15 15 <div class="body"> 16 <h1>Show Frequency</h1>16 <h1>Show Period</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:frequencyInstance, field:'id')}</td> 29 30 </tr> 31 32 <tr class="prop"> 33 <td valign="top" class="name">Frequency:</td> 34 35 <td valign="top" class="value">${fieldValue(bean:frequencyInstance, field:'frequency')}</td> 28 <td valign="top" class="value">${fieldValue(bean:periodInstance, field:'id')}</td> 36 29 37 30 </tr> … … 40 33 <td valign="top" class="name">Is Active:</td> 41 34 42 <td valign="top" class="value">${fieldValue(bean: frequencyInstance, field:'isActive')}</td>35 <td valign="top" class="value">${fieldValue(bean:periodInstance, field:'isActive')}</td> 43 36 44 37 </tr> 45 38 46 39 <tr class="prop"> 47 <td valign="top" class="name">Life Plans:</td> 40 <td valign="top" class="name">Period:</td> 41 42 <td valign="top" class="value">${fieldValue(bean:periodInstance, field:'period')}</td> 43 44 </tr> 45 46 <tr class="prop"> 47 <td valign="top" class="name">Recurring Schedules:</td> 48 48 49 49 <td valign="top" style="text-align:left;" class="value"> 50 50 <ul> 51 <g:each var=" l" in="${frequencyInstance.lifePlans}">52 <li><g:link controller=" lifePlan" action="show" id="${l.id}">${l?.encodeAsHTML()}</g:link></li>51 <g:each var="r" in="${periodInstance.recurringSchedules}"> 52 <li><g:link controller="recurringSchedule" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></li> 53 53 </g:each> 54 54 </ul> … … 62 62 <div class="buttons"> 63 63 <g:form> 64 <input type="hidden" name="id" value="${ frequencyInstance?.id}" />64 <input type="hidden" name="id" value="${periodInstance?.id}" /> 65 65 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 66 66 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> -
trunk/grails-app/views/personGroup/edit.gsp
r60 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${personGroupInstance?.id}" /> 27 <input type="hidden" name="version" value="${personGroupInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> … … 70 71 </td> 71 72 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'persons','errors')}"> 72 73 <ul> 74 <g:each var="p" in="${personGroupInstance?.persons?}"> 75 <li><g:link controller="person" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> 76 </g:each> 77 </ul> 78 <g:link controller="person" params="['personGroup.id':personGroupInstance?.id]" action="create">Add Person</g:link> 73 <g:select name="persons" 74 from="${Person.list()}" 75 size="5" multiple="yes" optionKey="id" 76 value="${personGroupInstance?.persons}" /> 79 77 80 78 </td> -
trunk/grails-app/views/personGroup/list.gsp
r60 r122 54 54 </div> 55 55 <div class="paginateButtons"> 56 <g:paginate total="${ PersonGroup.count()}" />56 <g:paginate total="${personGroupInstanceTotal}" /> 57 57 </div> 58 58 </div> -
trunk/grails-app/views/personGroup/show.gsp
r60 r122 61 61 <td valign="top" class="name">Persons:</td> 62 62 63 <td valign="top" class="value">${fieldValue(bean:personGroupInstance, field:'persons')}</td> 63 <td valign="top" style="text-align:left;" class="value"> 64 <ul> 65 <g:each var="p" in="${personGroupInstance.persons}"> 66 <li><g:link controller="person" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> 67 </g:each> 68 </ul> 69 </td> 64 70 65 71 </tr> -
trunk/grails-app/views/personGroupType/edit.gsp
r61 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${personGroupTypeInstance?.id}" /> 27 <input type="hidden" name="version" value="${personGroupTypeInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/personGroupType/list.gsp
r61 r122 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ PersonGroupType.count()}" />52 <g:paginate total="${personGroupTypeInstanceTotal}" /> 53 53 </div> 54 54 </div> -
trunk/grails-app/views/site/edit.gsp
r116 r122 73 73 </tr> 74 74 75 <tr class="prop"> 76 <td valign="top" class="name"> 77 <label for="systemSections">System Sections:</label> 78 </td> 79 <td valign="top" class="value ${hasErrors(bean:siteInstance,field:'systemSections','errors')}"> 80 81 <ul> 82 <g:each var="s" in="${siteInstance?.systemSections?}"> 83 <li><g:link controller="systemSection" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 84 </g:each> 85 </ul> 86 <g:link controller="systemSection" params="['site.id':siteInstance?.id]" action="create">Add SystemSection</g:link> 87 88 </td> 89 </tr> 90 75 91 </tbody> 76 92 </table> -
trunk/grails-app/views/site/show.gsp
r116 r122 64 64 </tr> 65 65 66 <tr class="prop"> 67 <td valign="top" class="name">System Sections:</td> 68 69 <td valign="top" style="text-align:left;" class="value"> 70 <ul> 71 <g:each var="s" in="${siteInstance.systemSections}"> 72 <li><g:link controller="systemSection" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 73 </g:each> 74 </ul> 75 </td> 76 77 </tr> 78 66 79 </tbody> 67 80 </table> -
trunk/grails-app/views/subAssembly/create.gsp
r118 r122 47 47 <tr class="prop"> 48 48 <td valign="top" class="name"> 49 <label for="lifeplan">Lifeplan:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:subAssemblyInstance,field:'lifeplan','errors')}">52 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${subAssemblyInstance?.lifeplan?.id}" ></g:select>53 </td>54 </tr>55 56 <tr class="prop">57 <td valign="top" class="name">58 49 <label for="name">Name:</label> 59 50 </td> -
trunk/grails-app/views/subAssembly/edit.gsp
r118 r122 72 72 <tr class="prop"> 73 73 <td valign="top" class="name"> 74 <label for=" lifeplan">Lifeplan:</label>74 <label for="maintenanceActions">Maintenance Actions:</label> 75 75 </td> 76 <td valign="top" class="value ${hasErrors(bean:subAssemblyInstance,field:'lifeplan','errors')}"> 77 <g:select optionKey="id" from="${LifePlan.list()}" name="lifeplan.id" value="${subAssemblyInstance?.lifeplan?.id}" ></g:select> 76 <td valign="top" class="value ${hasErrors(bean:subAssemblyInstance,field:'maintenanceActions','errors')}"> 77 78 <ul> 79 <g:each var="m" in="${subAssemblyInstance?.maintenanceActions?}"> 80 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 81 </g:each> 82 </ul> 83 <g:link controller="maintenanceAction" params="['subAssembly.id':subAssemblyInstance?.id]" action="create">Add MaintenanceAction</g:link> 84 78 85 </td> 79 86 </tr> -
trunk/grails-app/views/subAssembly/list.gsp
r118 r122 28 28 <g:sortableColumn property="isActive" title="Is Active" /> 29 29 30 <th>Lifeplan</th>31 32 30 <g:sortableColumn property="name" title="Name" /> 33 31 … … 44 42 <td>${fieldValue(bean:subAssemblyInstance, field:'isActive')}</td> 45 43 46 <td>${fieldValue(bean:subAssemblyInstance, field:'lifeplan')}</td>47 48 44 <td>${fieldValue(bean:subAssemblyInstance, field:'name')}</td> 49 45 -
trunk/grails-app/views/subAssembly/show.gsp
r118 r122 71 71 72 72 <tr class="prop"> 73 <td valign="top" class="name"> Lifeplan:</td>73 <td valign="top" class="name">Maintenance Actions:</td> 74 74 75 <td valign="top" class="value"><g:link controller="lifePlan" action="show" id="${subAssemblyInstance?.lifeplan?.id}">${subAssemblyInstance?.lifeplan?.encodeAsHTML()}</g:link></td> 75 <td valign="top" style="text-align:left;" class="value"> 76 <ul> 77 <g:each var="m" in="${subAssemblyInstance.maintenanceActions}"> 78 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 79 </g:each> 80 </ul> 81 </td> 76 82 77 83 </tr> -
trunk/grails-app/views/systemSection/create.gsp
r118 r122 54 54 </tr> 55 55 56 <tr class="prop"> 57 <td valign="top" class="name"> 58 <label for="site">Site:</label> 59 </td> 60 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'site','errors')}"> 61 <g:select optionKey="id" from="${Site.list()}" name="site.id" value="${systemSectionInstance?.site?.id}" ></g:select> 62 </td> 63 </tr> 64 56 65 </tbody> 57 66 </table> -
trunk/grails-app/views/systemSection/edit.gsp
r118 r122 32 32 <tr class="prop"> 33 33 <td valign="top" class="name"> 34 <label for="asset Types">Asset Types:</label>34 <label for="assets">Assets:</label> 35 35 </td> 36 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'asset Types','errors')}">36 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'assets','errors')}"> 37 37 38 38 <ul> 39 <g:each var="a" in="${systemSectionInstance?.asset Types?}">40 <li><g:link controller="asset Type" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>39 <g:each var="a" in="${systemSectionInstance?.assets?}"> 40 <li><g:link controller="asset" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 41 41 </g:each> 42 42 </ul> 43 <g:link controller="asset Type" params="['systemSection.id':systemSectionInstance?.id]" action="create">Add AssetType</g:link>43 <g:link controller="asset" params="['systemSection.id':systemSectionInstance?.id]" action="create">Add Asset</g:link> 44 44 45 45 </td> … … 66 66 <tr class="prop"> 67 67 <td valign="top" class="name"> 68 <label for=" lifePlans">Life Plans:</label>68 <label for="maintenanceActions">Maintenance Actions:</label> 69 69 </td> 70 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'lifePlans','errors')}"> 71 <g:select name="lifePlans" 72 from="${LifePlan.list()}" 73 size="5" multiple="yes" optionKey="id" 74 value="${systemSectionInstance?.lifePlans}" /> 70 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'maintenanceActions','errors')}"> 71 72 <ul> 73 <g:each var="m" in="${systemSectionInstance?.maintenanceActions?}"> 74 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 75 </g:each> 76 </ul> 77 <g:link controller="maintenanceAction" params="['systemSection.id':systemSectionInstance?.id]" action="create">Add MaintenanceAction</g:link> 75 78 76 79 </td> … … 83 86 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'name','errors')}"> 84 87 <input type="text" id="name" name="name" value="${fieldValue(bean:systemSectionInstance,field:'name')}"/> 88 </td> 89 </tr> 90 91 <tr class="prop"> 92 <td valign="top" class="name"> 93 <label for="site">Site:</label> 94 </td> 95 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'site','errors')}"> 96 <g:select optionKey="id" from="${Site.list()}" name="site.id" value="${systemSectionInstance?.site?.id}" ></g:select> 85 97 </td> 86 98 </tr> -
trunk/grails-app/views/systemSection/list.gsp
r118 r122 30 30 <g:sortableColumn property="name" title="Name" /> 31 31 32 <th>Site</th> 33 32 34 </tr> 33 35 </thead> … … 44 46 <td>${fieldValue(bean:systemSectionInstance, field:'name')}</td> 45 47 48 <td>${fieldValue(bean:systemSectionInstance, field:'site')}</td> 49 46 50 </tr> 47 51 </g:each> -
trunk/grails-app/views/systemSection/show.gsp
r118 r122 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name">Asset Types:</td>33 <td valign="top" class="name">Assets:</td> 34 34 35 35 <td valign="top" style="text-align:left;" class="value"> 36 36 <ul> 37 <g:each var="a" in="${systemSectionInstance.asset Types}">38 <li><g:link controller="asset Type" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>37 <g:each var="a" in="${systemSectionInstance.assets}"> 38 <li><g:link controller="asset" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 39 39 </g:each> 40 40 </ul> … … 58 58 59 59 <tr class="prop"> 60 <td valign="top" class="name"> Life Plans:</td>60 <td valign="top" class="name">Maintenance Actions:</td> 61 61 62 62 <td valign="top" style="text-align:left;" class="value"> 63 63 <ul> 64 <g:each var=" l" in="${systemSectionInstance.lifePlans}">65 <li><g:link controller=" lifePlan" action="show" id="${l.id}">${l?.encodeAsHTML()}</g:link></li>64 <g:each var="m" in="${systemSectionInstance.maintenanceActions}"> 65 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 66 66 </g:each> 67 67 </ul> … … 74 74 75 75 <td valign="top" class="value">${fieldValue(bean:systemSectionInstance, field:'name')}</td> 76 77 </tr> 78 79 <tr class="prop"> 80 <td valign="top" class="name">Site:</td> 81 82 <td valign="top" class="value"><g:link controller="site" action="show" id="${systemSectionInstance?.site?.id}">${systemSectionInstance?.site?.encodeAsHTML()}</g:link></td> 76 83 77 84 </tr> -
trunk/grails-app/views/task/create.gsp
r96 r122 86 86 </td> 87 87 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> 88 <textarea rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> 88 <input type="text" id="comment" name="comment" value="${fieldValue(bean:taskInstance,field:'comment')}"/> 89 </td> 90 </tr> 91 92 <tr class="prop"> 93 <td valign="top" class="name"> 94 <label for="primaryAsset">Primary Asset:</label> 95 </td> 96 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 97 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'']"></g:select> 89 98 </td> 90 99 </tr> … … 114 123 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> 115 124 <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> 125 </td> 126 </tr> 127 128 <tr class="prop"> 129 <td valign="top" class="name"> 130 <label for="recurringSchedule">Recurring Schedule:</label> 131 </td> 132 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'recurringSchedule','errors')}"> 133 <g:select optionKey="id" from="${RecurringSchedule.list()}" name="recurringSchedule.id" value="${taskInstance?.recurringSchedule?.id}" ></g:select> 116 134 </td> 117 135 </tr> -
trunk/grails-app/views/task/edit.gsp
r96 r122 89 89 </td> 90 90 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'comment','errors')}"> 91 <textarea rows="5" cols="40" name="comment">${fieldValue(bean:taskInstance, field:'comment')}</textarea> 91 <input type="text" id="comment" name="comment" value="${fieldValue(bean:taskInstance,field:'comment')}"/> 92 </td> 93 </tr> 94 95 <tr class="prop"> 96 <td valign="top" class="name"> 97 <label for="primaryAsset">Primary Asset:</label> 98 </td> 99 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 100 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'']"></g:select> 92 101 </td> 93 102 </tr> … … 111 120 <tr class="prop"> 112 121 <td valign="top" class="name"> 122 <label for="associatedAssets">Associated Assets:</label> 123 </td> 124 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}"> 125 <g:select name="associatedAssets" 126 from="${Asset.list()}" 127 size="5" multiple="yes" optionKey="id" 128 value="${taskInstance?.associatedAssets}" /> 129 130 </td> 131 </tr> 132 133 <tr class="prop"> 134 <td valign="top" class="name"> 113 135 <label for="entries">Entries:</label> 114 136 </td> … … 127 149 <tr class="prop"> 128 150 <td valign="top" class="name"> 151 <label for="inventoryMovements">Inventory Movements:</label> 152 </td> 153 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'inventoryMovements','errors')}"> 154 155 <ul> 156 <g:each var="i" in="${taskInstance?.inventoryMovements?}"> 157 <li><g:link controller="inventoryMovement" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li> 158 </g:each> 159 </ul> 160 <g:link controller="inventoryMovement" params="['task.id':taskInstance?.id]" action="create">Add InventoryMovement</g:link> 161 162 </td> 163 </tr> 164 165 <tr class="prop"> 166 <td valign="top" class="name"> 129 167 <label for="isActive">Is Active:</label> 130 168 </td> … … 149 187 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'isScheduled','errors')}"> 150 188 <g:checkBox name="isScheduled" value="${taskInstance?.isScheduled}" ></g:checkBox> 189 </td> 190 </tr> 191 192 <tr class="prop"> 193 <td valign="top" class="name"> 194 <label for="recurringSchedule">Recurring Schedule:</label> 195 </td> 196 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'recurringSchedule','errors')}"> 197 <g:select optionKey="id" from="${RecurringSchedule.list()}" name="recurringSchedule.id" value="${taskInstance?.recurringSchedule?.id}" ></g:select> 151 198 </td> 152 199 </tr> -
trunk/grails-app/views/task/show.gsp
r96 r122 80 80 81 81 <tr class="prop"> 82 <td valign="top" class="name">Primary Asset:</td> 83 84 <td valign="top" class="value"><g:link controller="asset" action="show" id="${taskInstance?.primaryAsset?.id}">${taskInstance?.primaryAsset?.encodeAsHTML()}</g:link></td> 85 86 </tr> 87 88 <tr class="prop"> 82 89 <td valign="top" class="name">Assigned Persons:</td> 83 90 … … 93 100 94 101 <tr class="prop"> 102 <td valign="top" class="name">Associated Assets:</td> 103 104 <td valign="top" style="text-align:left;" class="value"> 105 <ul> 106 <g:each var="a" in="${taskInstance.associatedAssets}"> 107 <li><g:link controller="asset" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 108 </g:each> 109 </ul> 110 </td> 111 112 </tr> 113 114 <tr class="prop"> 95 115 <td valign="top" class="name">Entries:</td> 96 116 … … 106 126 107 127 <tr class="prop"> 128 <td valign="top" class="name">Inventory Movements:</td> 129 130 <td valign="top" style="text-align:left;" class="value"> 131 <ul> 132 <g:each var="i" in="${taskInstance.inventoryMovements}"> 133 <li><g:link controller="inventoryMovement" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li> 134 </g:each> 135 </ul> 136 </td> 137 138 </tr> 139 140 <tr class="prop"> 108 141 <td valign="top" class="name">Is Active:</td> 109 142 … … 123 156 124 157 <td valign="top" class="value">${fieldValue(bean:taskInstance, field:'isScheduled')}</td> 158 159 </tr> 160 161 <tr class="prop"> 162 <td valign="top" class="name">Recurring Schedule:</td> 163 164 <td valign="top" class="value"><g:link controller="recurringSchedule" action="show" id="${taskInstance?.recurringSchedule?.id}">${taskInstance?.recurringSchedule?.encodeAsHTML()}</g:link></td> 125 165 126 166 </tr> -
trunk/grails-app/views/taskGroup/edit.gsp
r66 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${taskGroupInstance?.id}" /> 27 <input type="hidden" name="version" value="${taskGroupInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/taskGroup/list.gsp
r66 r122 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ TaskGroup.count()}" />52 <g:paginate total="${taskGroupInstanceTotal}" /> 53 53 </div> 54 54 </div> -
trunk/grails-app/views/taskModificationType/create.gsp
r93 r122 29 29 <tr class="prop"> 30 30 <td valign="top" class="name"> 31 <label for="name">Name:</label> 32 </td> 33 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'name','errors')}"> 34 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:taskModificationTypeInstance,field:'name')}"/> 35 </td> 36 </tr> 37 38 <tr class="prop"> 39 <td valign="top" class="name"> 31 40 <label for="description">Description:</label> 32 41 </td> 33 42 <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')}"/>43 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:taskModificationTypeInstance,field:'description')}"/> 35 44 </td> 36 45 </tr> … … 42 51 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'isActive','errors')}"> 43 52 <g:checkBox name="isActive" value="${taskModificationTypeInstance?.isActive}" ></g:checkBox> 44 </td>45 </tr>46 47 <tr class="prop">48 <td valign="top" class="name">49 <label for="name">Name:</label>50 </td>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/grails-app/views/taskModificationType/edit.gsp
r93 r122 32 32 <tr class="prop"> 33 33 <td valign="top" class="name"> 34 <label for="name">Name:</label> 35 </td> 36 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'name','errors')}"> 37 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:taskModificationTypeInstance,field:'name')}"/> 38 </td> 39 </tr> 40 41 <tr class="prop"> 42 <td valign="top" class="name"> 34 43 <label for="description">Description:</label> 35 44 </td> 36 45 <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')}"/>46 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:taskModificationTypeInstance,field:'description')}"/> 38 47 </td> 39 48 </tr> … … 45 54 <td valign="top" class="value ${hasErrors(bean:taskModificationTypeInstance,field:'isActive','errors')}"> 46 55 <g:checkBox name="isActive" value="${taskModificationTypeInstance?.isActive}" ></g:checkBox> 47 </td>48 </tr>49 50 <tr class="prop">51 <td valign="top" class="name">52 <label for="name">Name:</label>53 </td>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 56 </td> 57 57 </tr> -
trunk/grails-app/views/taskModificationType/list.gsp
r93 r122 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <g:sortableColumn property="name" title="Name" /> 27 26 28 <g:sortableColumn property="description" title="Description" /> 27 29 28 30 <g:sortableColumn property="isActive" title="Is Active" /> 29 30 <g:sortableColumn property="name" title="Name" />31 31 32 32 </tr> … … 38 38 <td><g:link action="show" id="${taskModificationTypeInstance.id}">${fieldValue(bean:taskModificationTypeInstance, field:'id')}</g:link></td> 39 39 40 <td>${fieldValue(bean:taskModificationTypeInstance, field:'name')}</td> 41 40 42 <td>${fieldValue(bean:taskModificationTypeInstance, field:'description')}</td> 41 43 42 44 <td>${fieldValue(bean:taskModificationTypeInstance, field:'isActive')}</td> 43 44 <td>${fieldValue(bean:taskModificationTypeInstance, field:'name')}</td>45 45 46 46 </tr> -
trunk/grails-app/views/taskModificationType/show.gsp
r93 r122 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name">Name:</td> 34 35 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'name')}</td> 36 37 </tr> 38 39 <tr class="prop"> 33 40 <td valign="top" class="name">Description:</td> 34 41 … … 41 48 42 49 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'isActive')}</td> 43 44 </tr>45 46 <tr class="prop">47 <td valign="top" class="name">Name:</td>48 49 <td valign="top" class="value">${fieldValue(bean:taskModificationTypeInstance, field:'name')}</td>50 50 51 51 </tr> -
trunk/grails-app/views/taskPriority/edit.gsp
r69 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${taskPriorityInstance?.id}" /> 27 <input type="hidden" name="version" value="${taskPriorityInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/taskPriority/list.gsp
r69 r122 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ TaskPriority.count()}" />52 <g:paginate total="${taskPriorityInstanceTotal}" /> 53 53 </div> 54 54 </div> -
trunk/grails-app/views/taskStatus/edit.gsp
r66 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${taskStatusInstance?.id}" /> 27 <input type="hidden" name="version" value="${taskStatusInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/taskStatus/list.gsp
r66 r122 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ TaskStatus.count()}" />52 <g:paginate total="${taskStatusInstanceTotal}" /> 53 53 </div> 54 54 </div> -
trunk/grails-app/views/taskType/edit.gsp
r69 r122 25 25 <g:form method="post" > 26 26 <input type="hidden" name="id" value="${taskTypeInstance?.id}" /> 27 <input type="hidden" name="version" value="${taskTypeInstance?.version}" /> 27 28 <div class="dialog"> 28 29 <table> -
trunk/grails-app/views/taskType/list.gsp
r69 r122 50 50 </div> 51 51 <div class="paginateButtons"> 52 <g:paginate total="${ TaskType.count()}" />52 <g:paginate total="${taskTypeInstanceTotal}" /> 53 53 </div> 54 54 </div>
Note: See TracChangeset
for help on using the changeset viewer.